code_text
stringlengths 604
999k
| repo_name
stringlengths 4
100
| file_path
stringlengths 4
873
| language
stringclasses 23
values | license
stringclasses 15
values | size
int32 1.02k
999k
|
---|---|---|---|---|---|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace System.Data.ProviderBase
{
sealed internal partial class DbConnectionPoolIdentity
{
public static readonly DbConnectionPoolIdentity NoIdentity = new DbConnectionPoolIdentity(String.Empty, false, true);
private readonly string _sidString;
private readonly bool _isRestricted;
private readonly bool _isNetwork;
private readonly int _hashCode;
private DbConnectionPoolIdentity(string sidString, bool isRestricted, bool isNetwork)
{
_sidString = sidString;
_isRestricted = isRestricted;
_isNetwork = isNetwork;
_hashCode = sidString == null ? 0 : sidString.GetHashCode();
}
internal bool IsRestricted
{
get { return _isRestricted; }
}
override public bool Equals(object value)
{
bool result = ((this == NoIdentity) || (this == value));
if (!result && (null != value))
{
DbConnectionPoolIdentity that = ((DbConnectionPoolIdentity)value);
result = ((_sidString == that._sidString) && (_isRestricted == that._isRestricted) && (_isNetwork == that._isNetwork));
}
return result;
}
override public int GetHashCode()
{
return _hashCode;
}
internal static DbConnectionPoolIdentity GetCurrentManaged()
{
string sidString = (!string.IsNullOrWhiteSpace(System.Environment.UserDomainName) ? System.Environment.UserDomainName + "\\" : "")
+ System.Environment.UserName;
bool isNetwork = false;
bool isRestricted = false;
return new DbConnectionPoolIdentity(sidString, isRestricted, isNetwork);
}
}
}
| mazong1123/corefx | src/System.Data.SqlClient/src/System/Data/ProviderBase/DbConnectionPoolIdentity.cs | C# | mit | 2,021 |
/**
* Combodate - 1.0.4
* Dropdown date and time picker.
* Converts text input into dropdowns to pick day, month, year, hour, minute and second.
* Uses momentjs as datetime library http://momentjs.com.
* For i18n include corresponding file from https://github.com/timrwood/moment/tree/master/lang
*
* Confusion at noon and midnight - see http://en.wikipedia.org/wiki/12-hour_clock#Confusion_at_noon_and_midnight
* In combodate:
* 12:00 pm --> 12:00 (24-h format, midday)
* 12:00 am --> 00:00 (24-h format, midnight, start of day)
*
* Differs from momentjs parse rules:
* 00:00 pm, 12:00 pm --> 12:00 (24-h format, day not change)
* 00:00 am, 12:00 am --> 00:00 (24-h format, day not change)
*
*
* Author: Vitaliy Potapov
* Project page: http://github.com/vitalets/combodate
* Copyright (c) 2012 Vitaliy Potapov. Released under MIT License.
**/
(function ($) {
var Combodate = function (element, options) {
this.$element = $(element);
if(!this.$element.is('input')) {
$.error('Combodate should be applied to INPUT element');
return;
}
this.options = $.extend({}, $.fn.combodate.defaults, options, this.$element.data());
this.init();
};
Combodate.prototype = {
constructor: Combodate,
init: function () {
this.map = {
//key regexp moment.method
day: ['D', 'date'],
month: ['M', 'month'],
year: ['Y', 'year'],
hour: ['[Hh]', 'hours'],
minute: ['m', 'minutes'],
second: ['s', 'seconds'],
ampm: ['[Aa]', '']
};
this.$widget = $('<span class="combodate"></span>').html(this.getTemplate());
this.initCombos();
//update original input on change
this.$widget.on('change', 'select', $.proxy(function(){
this.$element.val(this.getValue());
}, this));
this.$widget.find('select').css('width', 'auto');
//hide original input and insert widget
this.$element.hide().after(this.$widget);
//set initial value
this.setValue(this.$element.val() || this.options.value);
},
/*
Replace tokens in template with <select> elements
*/
getTemplate: function() {
var tpl = this.options.template;
//first pass
$.each(this.map, function(k, v) {
v = v[0];
var r = new RegExp(v+'+'),
token = v.length > 1 ? v.substring(1, 2) : v;
tpl = tpl.replace(r, '{'+token+'}');
});
//replace spaces with
tpl = tpl.replace(/ /g, ' ');
//second pass
$.each(this.map, function(k, v) {
v = v[0];
var token = v.length > 1 ? v.substring(1, 2) : v;
tpl = tpl.replace('{'+token+'}', '<select class="'+k+'"></select>');
});
return tpl;
},
/*
Initialize combos that presents in template
*/
initCombos: function() {
var that = this;
$.each(this.map, function(k, v) {
var $c = that.$widget.find('.'+k), f, items;
if($c.length) {
that['$'+k] = $c; //set properties like this.$day, this.$month etc.
f = 'fill' + k.charAt(0).toUpperCase() + k.slice(1); //define method name to fill items, e.g `fillDays`
items = that[f]();
that['$'+k].html(that.renderItems(items));
}
});
},
/*
Initialize items of combos. Handles `firstItem` option
*/
initItems: function(key) {
var values = [],
relTime;
if(this.options.firstItem === 'name') {
//need both to support moment ver < 2 and >= 2
relTime = moment.relativeTime || moment.langData()._relativeTime;
var header = typeof relTime[key] === 'function' ? relTime[key](1, true, key, false) : relTime[key];
//take last entry (see momentjs lang files structure)
header = header.split(' ').reverse()[0];
values.push(['', header]);
} else if(this.options.firstItem === 'empty') {
values.push(['', '']);
}
return values;
},
/*
render items to string of <option> tags
*/
renderItems: function(items) {
var str = [];
for(var i=0; i<items.length; i++) {
str.push('<option value="'+items[i][0]+'">'+items[i][1]+'</option>');
}
return str.join("\n");
},
/*
fill day
*/
fillDay: function() {
var items = this.initItems('d'), name, i,
twoDigit = this.options.template.indexOf('DD') !== -1;
for(i=1; i<=31; i++) {
name = twoDigit ? this.leadZero(i) : i;
items.push([i, name]);
}
return items;
},
/*
fill month
*/
fillMonth: function() {
var items = this.initItems('M'), name, i,
longNames = this.options.template.indexOf('MMMM') !== -1,
shortNames = this.options.template.indexOf('MMM') !== -1,
twoDigit = this.options.template.indexOf('MM') !== -1;
for(i=0; i<=11; i++) {
if(longNames) {
//see https://github.com/timrwood/momentjs.com/pull/36
name = moment().date(1).month(i).format('MMMM');
} else if(shortNames) {
name = moment().date(1).month(i).format('MMM');
} else if(twoDigit) {
name = this.leadZero(i+1);
} else {
name = i+1;
}
items.push([i, name]);
}
return items;
},
/*
fill year
*/
fillYear: function() {
var items = [], name, i,
longNames = this.options.template.indexOf('YYYY') !== -1;
for(i=this.options.maxYear; i>=this.options.minYear; i--) {
name = longNames ? i : (i+'').substring(2);
items[this.options.yearDescending ? 'push' : 'unshift']([i, name]);
}
items = this.initItems('y').concat(items);
return items;
},
/*
fill hour
*/
fillHour: function() {
var items = this.initItems('h'), name, i,
h12 = this.options.template.indexOf('h') !== -1,
h24 = this.options.template.indexOf('H') !== -1,
twoDigit = this.options.template.toLowerCase().indexOf('hh') !== -1,
min = h12 ? 1 : 0,
max = h12 ? 12 : 23;
for(i=min; i<=max; i++) {
name = twoDigit ? this.leadZero(i) : i;
items.push([i, name]);
}
return items;
},
/*
fill minute
*/
fillMinute: function() {
var items = this.initItems('m'), name, i,
twoDigit = this.options.template.indexOf('mm') !== -1;
for(i=0; i<=59; i+= this.options.minuteStep) {
name = twoDigit ? this.leadZero(i) : i;
items.push([i, name]);
}
return items;
},
/*
fill second
*/
fillSecond: function() {
var items = this.initItems('s'), name, i,
twoDigit = this.options.template.indexOf('ss') !== -1;
for(i=0; i<=59; i+= this.options.secondStep) {
name = twoDigit ? this.leadZero(i) : i;
items.push([i, name]);
}
return items;
},
/*
fill ampm
*/
fillAmpm: function() {
var ampmL = this.options.template.indexOf('a') !== -1,
ampmU = this.options.template.indexOf('A') !== -1,
items = [
['am', ampmL ? 'am' : 'AM'],
['pm', ampmL ? 'pm' : 'PM']
];
return items;
},
/*
Returns current date value from combos.
If format not specified - `options.format` used.
If format = `null` - Moment object returned.
*/
getValue: function(format) {
var dt, values = {},
that = this,
notSelected = false;
//getting selected values
$.each(this.map, function(k, v) {
if(k === 'ampm') {
return;
}
var def = k === 'day' ? 1 : 0;
values[k] = that['$'+k] ? parseInt(that['$'+k].val(), 10) : def;
if(isNaN(values[k])) {
notSelected = true;
return false;
}
});
//if at least one visible combo not selected - return empty string
if(notSelected) {
return '';
}
//convert hours 12h --> 24h
if(this.$ampm) {
//12:00 pm --> 12:00 (24-h format, midday), 12:00 am --> 00:00 (24-h format, midnight, start of day)
if(values.hour === 12) {
values.hour = this.$ampm.val() === 'am' ? 0 : 12;
} else {
values.hour = this.$ampm.val() === 'am' ? values.hour : values.hour+12;
}
}
dt = moment([values.year, values.month, values.day, values.hour, values.minute, values.second]);
//highlight invalid date
this.highlight(dt);
format = format === undefined ? this.options.format : format;
if(format === null) {
return dt.isValid() ? dt : null;
} else {
return dt.isValid() ? dt.format(format) : '';
}
},
setValue: function(value) {
if(!value) {
return;
}
var dt = typeof value === 'string' ? moment(value, this.options.format) : moment(value),
that = this,
values = {};
//function to find nearest value in select options
function getNearest($select, value) {
var delta = {};
$select.children('option').each(function(i, opt){
var optValue = $(opt).attr('value'),
distance;
if(optValue === '') return;
distance = Math.abs(optValue - value);
if(typeof delta.distance === 'undefined' || distance < delta.distance) {
delta = {value: optValue, distance: distance};
}
});
return delta.value;
}
if(dt.isValid()) {
//read values from date object
$.each(this.map, function(k, v) {
if(k === 'ampm') {
return;
}
values[k] = dt[v[1]]();
});
if(this.$ampm) {
//12:00 pm --> 12:00 (24-h format, midday), 12:00 am --> 00:00 (24-h format, midnight, start of day)
if(values.hour >= 12) {
values.ampm = 'pm';
if(values.hour > 12) {
values.hour -= 12;
}
} else {
values.ampm = 'am';
if(values.hour === 0) {
values.hour = 12;
}
}
}
$.each(values, function(k, v) {
//call val() for each existing combo, e.g. this.$hour.val()
if(that['$'+k]) {
if(k === 'minute' && that.options.minuteStep > 1 && that.options.roundTime) {
v = getNearest(that['$'+k], v);
}
if(k === 'second' && that.options.secondStep > 1 && that.options.roundTime) {
v = getNearest(that['$'+k], v);
}
that['$'+k].val(v);
}
});
this.$element.val(dt.format(this.options.format));
}
},
/*
highlight combos if date is invalid
*/
highlight: function(dt) {
if(!dt.isValid()) {
if(this.options.errorClass) {
this.$widget.addClass(this.options.errorClass);
} else {
//store original border color
if(!this.borderColor) {
this.borderColor = this.$widget.find('select').css('border-color');
}
this.$widget.find('select').css('border-color', 'red');
}
} else {
if(this.options.errorClass) {
this.$widget.removeClass(this.options.errorClass);
} else {
this.$widget.find('select').css('border-color', this.borderColor);
}
}
},
leadZero: function(v) {
return v <= 9 ? '0' + v : v;
},
destroy: function() {
this.$widget.remove();
this.$element.removeData('combodate').show();
}
//todo: clear method
};
$.fn.combodate = function ( option ) {
var d, args = Array.apply(null, arguments);
args.shift();
//getValue returns date as string / object (not jQuery object)
if(option === 'getValue' && this.length && (d = this.eq(0).data('combodate'))) {
return d.getValue.apply(d, args);
}
return this.each(function () {
var $this = $(this),
data = $this.data('combodate'),
options = typeof option == 'object' && option;
if (!data) {
$this.data('combodate', (data = new Combodate(this, options)));
}
if (typeof option == 'string' && typeof data[option] == 'function') {
data[option].apply(data, args);
}
});
};
$.fn.combodate.defaults = {
//in this format value stored in original input
format: 'DD-MM-YYYY HH:mm',
//in this format items in dropdowns are displayed
template: 'D / MMM / YYYY H : mm',
//initial value, can be `new Date()`
value: null,
minYear: 1970,
maxYear: 2015,
yearDescending: true,
minuteStep: 5,
secondStep: 1,
firstItem: 'empty', //'name', 'empty', 'none'
errorClass: null,
roundTime: true //whether to round minutes and seconds if step > 1
};
}(window.jQuery)); | project-store/theme | backend/myxdashboard/js/form/combodate/combodate.js | JavaScript | mit | 16,495 |
<?php
/*
* CKFinder
* ========
* http://cksource.com/ckfinder
* Copyright (C) 2007-2016, CKSource - Frederico Knabben. All rights reserved.
*
* The software, this file and its contents are subject to the CKFinder
* License. Please read the license.txt file before using, installing, copying,
* modifying or distribute this file or part of its contents. The contents of
* this file is part of the Source Code of CKFinder.
*/
namespace CKSource\CKFinder\Event;
use CKSource\CKFinder\CKFinder;
use CKSource\CKFinder\Filesystem\File\CopiedFile;
/**
* The CopyFileEvent event class.
*/
class CopyFileEvent extends CKFinderEvent
{
/**
* @var CopiedFile $copiedFile
*/
protected $copiedFile;
/**
* Constructor.
*
* @param CKFinder $app
* @param CopiedFile $copiedFile
*/
public function __construct(CKFinder $app, CopiedFile $copiedFile)
{
$this->copiedFile = $copiedFile;
parent::__construct($app);
}
/**
* Returns the copied file object.
*
* @return CopiedFile
*
* @deprecated Please use getFile() instead.
*/
public function getCopiedFile()
{
return $this->copiedFile;
}
/**
* Returns the copied file object.
*
* @return CopiedFile
*/
public function getFile()
{
return $this->copiedFile;
}
}
| lemanhtoan/pharma | plugin/ckfinder/core/connector/php/vendor/cksource/ckfinder/src/CKSource/CKFinder/Event/CopyFileEvent.php | PHP | mit | 1,388 |
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("React"));
else if(typeof define === 'function' && define.amd)
define(["React"], factory);
else if(typeof exports === 'object')
exports["Griddle"] = factory(require("React"));
else
root["Griddle"] = factory(root["React"]);
})(this, function(__WEBPACK_EXTERNAL_MODULE_2__) {
return /******/ (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] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.loaded = 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;
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "/";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(1);
/***/ },
/* 1 */
/***/ function(module, exports, __webpack_require__) {
/*
Griddle - Simple Grid Component for React
https://github.com/DynamicTyped/Griddle
Copyright (c) 2014 Ryan Lanciaux | DynamicTyped
See License / Disclaimer https://raw.githubusercontent.com/DynamicTyped/Griddle/master/LICENSE
*/
'use strict';
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;
};
var React = __webpack_require__(2);
var GridTable = __webpack_require__(3);
var GridFilter = __webpack_require__(171);
var GridPagination = __webpack_require__(172);
var GridSettings = __webpack_require__(173);
var GridNoData = __webpack_require__(179);
var GridRow = __webpack_require__(180);
var GridRowContainer = __webpack_require__(162);
var CustomRowComponentContainer = __webpack_require__(200);
var CustomPaginationContainer = __webpack_require__(201);
var CustomFilterContainer = __webpack_require__(202);
var ColumnProperties = __webpack_require__(5);
var RowProperties = __webpack_require__(169);
var deep = __webpack_require__(181);
var drop = __webpack_require__(203);
var dropRight = __webpack_require__(205);
var find = __webpack_require__(125);
var first = __webpack_require__(206);
var forEach = __webpack_require__(182);
var initial = __webpack_require__(207);
var intersection = __webpack_require__(208);
var isArray = __webpack_require__(74);
var isEmpty = __webpack_require__(211);
var isNull = __webpack_require__(212);
var isUndefined = __webpack_require__(213);
var omit = __webpack_require__(214);
var map = __webpack_require__(6);
var extend = __webpack_require__(157);
var _filter = __webpack_require__(122);
var _orderBy = __webpack_require__(245);
var _property = __webpack_require__(113);
var _get = __webpack_require__(98);
var Griddle = React.createClass({
displayName: 'Griddle',
statics: {
GridTable: GridTable,
GridFilter: GridFilter,
GridPagination: GridPagination,
GridSettings: GridSettings,
GridRow: GridRow
},
columnSettings: null,
rowSettings: null,
getDefaultProps: function getDefaultProps() {
return {
"columns": [],
"gridMetadata": null,
"columnMetadata": [],
"rowMetadata": null,
"results": [], // Used if all results are already loaded.
"initialSort": "",
"gridClassName": "",
"tableClassName": "",
"customRowComponentClassName": "",
"settingsText": "Settings",
"filterPlaceholderText": "Filter Results",
"nextText": "Next",
"previousText": "Previous",
"maxRowsText": "Rows per page",
"enableCustomFormatText": "Enable Custom Formatting",
//this column will determine which column holds subgrid data
//it will be passed through with the data object but will not be rendered
"childrenColumnName": "children",
//Any column in this list will be treated as metadata and will be passed through with the data but won't be rendered
"metadataColumns": [],
"showFilter": false,
"showSettings": false,
"useCustomRowComponent": false,
"useCustomGridComponent": false,
"useCustomPagerComponent": false,
"useCustomFilterer": false,
"useCustomFilterComponent": false,
"useGriddleStyles": true,
"useGriddleIcons": true,
"customRowComponent": null,
"customGridComponent": null,
"customPagerComponent": {},
"customFilterComponent": null,
"customFilterer": null,
"globalData": null,
"enableToggleCustom": false,
"noDataMessage": "There is no data to display.",
"noDataClassName": "griddle-nodata",
"customNoDataComponent": null,
"customNoDataComponentProps": null,
"allowEmptyGrid": false,
"showTableHeading": true,
"showPager": true,
"useFixedHeader": false,
"useExternal": false,
"externalSetPage": null,
"externalChangeSort": null,
"externalSetFilter": null,
"externalSetPageSize": null,
"externalMaxPage": null,
"externalCurrentPage": null,
"externalSortColumn": null,
"externalSortAscending": true,
"externalLoadingComponent": null,
"externalIsLoading": false,
"enableInfiniteScroll": false,
"bodyHeight": null,
"paddingHeight": 5,
"rowHeight": 25,
"infiniteScrollLoadTreshold": 50,
"useFixedLayout": true,
"isSubGriddle": false,
"enableSort": true,
"onRowClick": null,
/* css class names */
"sortAscendingClassName": "sort-ascending",
"sortDescendingClassName": "sort-descending",
"parentRowCollapsedClassName": "parent-row",
"parentRowExpandedClassName": "parent-row expanded",
"settingsToggleClassName": "settings",
"nextClassName": "griddle-next",
"previousClassName": "griddle-previous",
"headerStyles": {},
/* icon components */
"sortAscendingComponent": " ▲",
"sortDescendingComponent": " ▼",
"sortDefaultComponent": null,
"parentRowCollapsedComponent": "▶",
"parentRowExpandedComponent": "▼",
"settingsIconComponent": "",
"nextIconComponent": "",
"previousIconComponent": "",
"isMultipleSelection": false, //currently does not support subgrids
"selectedRowIds": [],
"uniqueIdentifier": "id",
"onSelectionChange": null
};
},
propTypes: {
isMultipleSelection: React.PropTypes.bool,
selectedRowIds: React.PropTypes.oneOfType([React.PropTypes.arrayOf(React.PropTypes.number), React.PropTypes.arrayOf(React.PropTypes.string)]),
uniqueIdentifier: React.PropTypes.string,
onSelectionChange: React.PropTypes.func
},
defaultFilter: function defaultFilter(results, filter) {
var that = this;
return _filter(results, function (item) {
var arr = deep.keys(item);
for (var i = 0; i < arr.length; i++) {
var isFilterable = that.columnSettings.getMetadataColumnProperty(arr[i], "filterable", true);
if (isFilterable && (deep.getAt(item, arr[i]) || "").toString().toLowerCase().indexOf(filter.toLowerCase()) >= 0) {
return true;
}
}
return false;
});
},
defaultColumnFilter: function defaultColumnFilter(value, filter) {
return _filter(deep.getObjectValues(value), function (value) {
return value.toString().toLowerCase().indexOf(filter.toLowerCase()) >= 0;
}).length > 0;
},
filterByColumnFilters: function filterByColumnFilters(columnFilters) {
var filterFunction = this.defaultColumnFilter;
var filteredResults = Object.keys(columnFilters).reduce(function (previous, current) {
return _filter(previous, function (item) {
var value = deep.getAt(item, current || "");
var filter = columnFilters[current];
return filterFunction(value, filter);
});
}, this.props.results);
var newState = {
columnFilters: columnFilters
};
if (columnFilters) {
newState.filteredResults = filteredResults;
newState.maxPage = this.getMaxPage(newState.filteredResults);
} else if (this.state.filter) {
newState.filteredResults = this.props.useCustomFilterer ? this.props.customFilterer(this.props.results, filter) : this.defaultFilter(this.props.results, filter);
} else {
newState.filteredResults = null;
}
this.setState(newState);
},
filterByColumn: function filterByColumn(filter, column) {
var columnFilters = this.state.columnFilters;
//if filter is "" remove it from the columnFilters object
if (columnFilters.hasOwnProperty(column) && !filter) {
columnFilters = omit(columnFilters, column);
} else {
var newObject = {};
newObject[column] = filter;
columnFilters = extend({}, columnFilters, newObject);
}
this.filterByColumnFilters(columnFilters);
},
/* if we have a filter display the max page and results accordingly */
setFilter: function setFilter(filter) {
if (this.props.useExternal) {
this.props.externalSetFilter(filter);
return;
}
var that = this,
updatedState = {
page: 0,
filter: filter
};
// Obtain the state results.
updatedState.filteredResults = this.props.useCustomFilterer ? this.props.customFilterer(this.props.results, filter) : this.defaultFilter(this.props.results, filter);
// Update the max page.
updatedState.maxPage = that.getMaxPage(updatedState.filteredResults);
//if filter is null or undefined reset the filter.
if (isUndefined(filter) || isNull(filter) || isEmpty(filter)) {
updatedState.filter = filter;
updatedState.filteredResults = null;
}
// Set the state.
that.setState(updatedState);
this._resetSelectedRows();
},
setPageSize: function setPageSize(size) {
if (this.props.useExternal) {
this.setState({
resultsPerPage: size
});
this.props.externalSetPageSize(size);
return;
}
//make this better.
this.state.resultsPerPage = size;
this.setMaxPage();
},
toggleColumnChooser: function toggleColumnChooser() {
this.setState({
showColumnChooser: !this.state.showColumnChooser
});
},
isNullOrUndefined: function isNullOrUndefined(value) {
return value === undefined || value === null;
},
shouldUseCustomRowComponent: function shouldUseCustomRowComponent() {
return this.isNullOrUndefined(this.state.useCustomRowComponent) ? this.props.useCustomRowComponent : this.state.useCustomRowComponent;
},
shouldUseCustomGridComponent: function shouldUseCustomGridComponent() {
return this.isNullOrUndefined(this.state.useCustomGridComponent) ? this.props.useCustomGridComponent : this.state.useCustomGridComponent;
},
toggleCustomComponent: function toggleCustomComponent() {
if (this.state.customComponentType === "grid") {
this.setState({
useCustomGridComponent: !this.shouldUseCustomGridComponent()
});
} else if (this.state.customComponentType === "row") {
this.setState({
useCustomRowComponent: !this.shouldUseCustomRowComponent()
});
}
},
getMaxPage: function getMaxPage(results, totalResults) {
if (this.props.useExternal) {
return this.props.externalMaxPage;
}
if (!totalResults) {
totalResults = (results || this.getCurrentResults()).length;
}
var maxPage = Math.ceil(totalResults / this.state.resultsPerPage);
return maxPage;
},
setMaxPage: function setMaxPage(results) {
var maxPage = this.getMaxPage(results);
//re-render if we have new max page value
if (this.state.maxPage !== maxPage) {
this.setState({ page: 0, maxPage: maxPage, filteredColumns: this.columnSettings.filteredColumns });
}
},
setPage: function setPage(number) {
if (this.props.useExternal) {
this.props.externalSetPage(number);
return;
}
//check page size and move the filteredResults to pageSize * pageNumber
if (number * this.state.resultsPerPage <= this.state.resultsPerPage * this.state.maxPage) {
var that = this,
state = {
page: number
};
that.setState(state);
}
//When infinite scrolling is enabled, uncheck the "select all" checkbox, since more unchecked rows will be appended at the end
if (this.props.enableInfiniteScroll) {
this.setState({
isSelectAllChecked: false
});
}
},
setColumns: function setColumns(columns) {
this.columnSettings.filteredColumns = isArray(columns) ? columns : [columns];
this.setState({
filteredColumns: this.columnSettings.filteredColumns
});
},
nextPage: function nextPage() {
var currentPage = this.getCurrentPage();
if (currentPage < this.getCurrentMaxPage() - 1) {
this.setPage(currentPage + 1);
}
},
previousPage: function previousPage() {
var currentPage = this.getCurrentPage();
if (currentPage > 0) {
this.setPage(currentPage - 1);
}
},
changeSort: function changeSort(column) {
if (this.props.enableSort === false) {
return;
}
if (this.props.useExternal) {
var isAscending = this.props.externalSortColumn === column ? !this.props.externalSortAscending : true;
this.setState({
sortColumn: column,
sortDirection: isAscending ? 'asc' : 'desc'
});
this.props.externalChangeSort(column, isAscending);
return;
}
var columnMeta = find(this.props.columnMetadata, { columnName: column }) || {};
var sortDirectionCycle = columnMeta.sortDirectionCycle ? columnMeta.sortDirectionCycle : [null, 'asc', 'desc'];
var sortDirection = null;
// Find the current position in the cycle (or -1).
var i = sortDirectionCycle.indexOf(this.state.sortDirection && column === this.state.sortColumn ? this.state.sortDirection : null);
// Proceed to the next position in the cycle (or start at the beginning).
i = (i + 1) % sortDirectionCycle.length;
if (sortDirectionCycle[i]) {
sortDirection = sortDirectionCycle[i];
} else {
sortDirection = null;
}
var state = {
page: 0,
sortColumn: column,
sortDirection: sortDirection
};
this.setState(state);
},
componentWillReceiveProps: function componentWillReceiveProps(nextProps) {
this.setMaxPage(nextProps.results);
if (nextProps.resultsPerPage !== this.props.resultsPerPage) {
this.setPageSize(nextProps.resultsPerPage);
}
//This will updaet the column Metadata
this.columnSettings.columnMetadata = nextProps.columnMetadata;
if (nextProps.results.length > 0) {
var deepKeys = deep.keys(nextProps.results[0]);
var is_same = this.columnSettings.allColumns.length == deepKeys.length && this.columnSettings.allColumns.every(function (element, index) {
return element === deepKeys[index];
});
if (!is_same) {
this.columnSettings.allColumns = deepKeys;
}
} else if (this.columnSettings.allColumns.length > 0) {
this.columnSettings.allColumns = [];
}
if (nextProps.selectedRowIds) {
var visibleRows = this.getDataForRender(this.getCurrentResults(nextProps.results), this.columnSettings.getColumns(), true);
this.setState({
isSelectAllChecked: this._getAreAllRowsChecked(nextProps.selectedRowIds, map(visibleRows, this.props.uniqueIdentifier)),
selectedRowIds: nextProps.selectedRowIds
});
}
},
getInitialState: function getInitialState() {
var state = {
maxPage: 0,
page: 0,
filteredResults: null,
filteredColumns: [],
filter: "",
//this sets the individual column filters
columnFilters: {},
resultsPerPage: this.props.resultsPerPage || 5,
showColumnChooser: false,
isSelectAllChecked: false,
selectedRowIds: this.props.selectedRowIds
};
return state;
},
componentWillMount: function componentWillMount() {
this.verifyExternal();
this.verifyCustom();
this.columnSettings = new ColumnProperties(this.props.results.length > 0 ? deep.keys(this.props.results[0]) : [], this.props.columns, this.props.childrenColumnName, this.props.columnMetadata, this.props.metadataColumns);
this.rowSettings = new RowProperties(this.props.rowMetadata, this.props.useCustomTableRowComponent && this.props.customTableRowComponent ? this.props.customTableRowComponent : GridRow, this.props.useCustomTableRowComponent);
if (this.props.initialSort) {
// shouldn't change Sort on init for external
if (this.props.useExternal) {
this.setState({
sortColumn: this.props.externalSortColumn,
sortDirection: this.props.externalSortAscending ? 'asc' : 'desc'
});
} else {
this.changeSort(this.props.initialSort);
}
}
this.setMaxPage();
//don't like the magic strings
if (this.shouldUseCustomGridComponent()) {
this.setState({
customComponentType: "grid"
});
} else if (this.shouldUseCustomRowComponent()) {
this.setState({
customComponentType: "row"
});
} else {
this.setState({
filteredColumns: this.columnSettings.filteredColumns
});
}
},
componentDidMount: function componentDidMount() {
if (this.props.componentDidMount && typeof this.props.componentDidMount === "function") {
return this.props.componentDidMount();
}
},
componentDidUpdate: function componentDidUpdate() {
if (this.props.componentDidUpdate && typeof this.props.componentDidUpdate === "function") {
return this.props.componentDidUpdate(this.state);
}
},
//todo: clean these verify methods up
verifyExternal: function verifyExternal() {
if (this.props.useExternal === true) {
//hooray for big ugly nested if
if (this.props.externalSetPage === null) {
console.error("useExternal is set to true but there is no externalSetPage function specified.");
}
if (this.props.externalChangeSort === null) {
console.error("useExternal is set to true but there is no externalChangeSort function specified.");
}
if (this.props.externalSetFilter === null) {
console.error("useExternal is set to true but there is no externalSetFilter function specified.");
}
if (this.props.externalSetPageSize === null) {
console.error("useExternal is set to true but there is no externalSetPageSize function specified.");
}
if (this.props.externalMaxPage === null) {
console.error("useExternal is set to true but externalMaxPage is not set.");
}
if (this.props.externalCurrentPage === null) {
console.error("useExternal is set to true but externalCurrentPage is not set. Griddle will not page correctly without that property when using external data.");
}
}
},
//TODO: Do this with propTypes
verifyCustom: function verifyCustom() {
if (this.props.useCustomGridComponent === true && this.props.customGridComponent === null) {
console.error("useCustomGridComponent is set to true but no custom component was specified.");
}
if (this.props.useCustomRowComponent === true && this.props.customRowComponent === null) {
console.error("useCustomRowComponent is set to true but no custom component was specified.");
}
if (this.props.useCustomGridComponent === true && this.props.useCustomRowComponent === true) {
console.error("Cannot currently use both customGridComponent and customRowComponent.");
}
if (this.props.useCustomFilterer === true && this.props.customFilterer === null) {
console.error("useCustomFilterer is set to true but no custom filter function was specified.");
}
if (this.props.useCustomFilterComponent === true && this.props.customFilterComponent === null) {
console.error("useCustomFilterComponent is set to true but no customFilterComponent was specified.");
}
},
getDataForRender: function getDataForRender(data, cols, pageList) {
var _this = this;
var that = this;
// get the correct page size
if (this.state.sortColumn !== "") {
var column = this.state.sortColumn;
var sortColumn = _filter(this.props.columnMetadata, { columnName: column });
var customCompareFn;
var multiSort = {
columns: [],
orders: []
};
if (sortColumn.length > 0) {
customCompareFn = sortColumn[0].hasOwnProperty("customCompareFn") && sortColumn[0]["customCompareFn"];
if (sortColumn[0]["multiSort"]) {
multiSort = sortColumn[0]["multiSort"];
}
}
if (this.state.sortDirection) {
if (typeof customCompareFn === 'function') {
if (customCompareFn.length === 2) {
data = data.sort(function (a, b) {
return customCompareFn(_get(a, column), _get(b, column));
});
if (this.state.sortDirection === 'desc') {
data.reverse();
}
} else if (customCompareFn.length === 1) {
data = _orderBy(data, function (item) {
return customCompareFn(_get(item, column));
}, [this.state.sortDirection]);
}
} else {
var iteratees = [function (row) {
return (_get(row, column) || '').toString().toLowerCase();
}];
var orders = [this.state.sortDirection];
multiSort.columns.forEach(function (col, i) {
iteratees.push(function (row) {
return (_get(row, col) || '').toString().toLowerCase();
});
if (multiSort.orders[i] === 'asc' || multiSort.orders[i] === 'desc') {
orders.push(multiSort.orders[i]);
} else {
orders.push(_this.state.sortDirection);
}
});
data = _orderBy(data, iteratees, orders);
}
}
}
var currentPage = this.getCurrentPage();
if (!this.props.useExternal && pageList && this.state.resultsPerPage * (currentPage + 1) <= this.state.resultsPerPage * this.state.maxPage && currentPage >= 0) {
if (this.isInfiniteScrollEnabled()) {
// If we're doing infinite scroll, grab all results up to the current page.
data = first(data, (currentPage + 1) * this.state.resultsPerPage);
} else {
//the 'rest' is grabbing the whole array from index on and the 'initial' is getting the first n results
var rest = drop(data, currentPage * this.state.resultsPerPage);
data = (dropRight || initial)(rest, rest.length - this.state.resultsPerPage);
}
}
var meta = this.columnSettings.getMetadataColumns;
var transformedData = [];
for (var i = 0; i < data.length; i++) {
var mappedData = data[i];
if (typeof mappedData[that.props.childrenColumnName] !== "undefined" && mappedData[that.props.childrenColumnName].length > 0) {
//internally we're going to use children instead of whatever it is so we don't have to pass the custom name around
mappedData["children"] = that.getDataForRender(mappedData[that.props.childrenColumnName], cols, false);
if (that.props.childrenColumnName !== "children") {
delete mappedData[that.props.childrenColumnName];
}
}
transformedData.push(mappedData);
}
return transformedData;
},
getCurrentResults: function getCurrentResults(results) {
return this.state.filteredResults || results || this.props.results;
},
getCurrentPage: function getCurrentPage() {
return this.props.externalCurrentPage || this.state.page;
},
getCurrentSort: function getCurrentSort() {
return this.props.useExternal ? this.props.externalSortColumn : this.state.sortColumn;
},
getCurrentSortAscending: function getCurrentSortAscending() {
return this.props.useExternal ? this.props.externalSortAscending : this.state.sortDirection === 'asc';
},
getCurrentMaxPage: function getCurrentMaxPage() {
return this.props.useExternal ? this.props.externalMaxPage : this.state.maxPage;
},
//This takes the props relating to sort and puts them in one object
getSortObject: function getSortObject() {
return {
enableSort: this.props.enableSort,
changeSort: this.changeSort,
sortColumn: this.getCurrentSort(),
sortAscending: this.getCurrentSortAscending(),
sortDirection: this.state.sortDirection,
sortAscendingClassName: this.props.sortAscendingClassName,
sortDescendingClassName: this.props.sortDescendingClassName,
sortAscendingComponent: this.props.sortAscendingComponent,
sortDescendingComponent: this.props.sortDescendingComponent,
sortDefaultComponent: this.props.sortDefaultComponent
};
},
_toggleSelectAll: function _toggleSelectAll() {
var visibleRows = this.getDataForRender(this.getCurrentResults(), this.columnSettings.getColumns(), true),
newIsSelectAllChecked = !this.state.isSelectAllChecked,
newSelectedRowIds = JSON.parse(JSON.stringify(this.state.selectedRowIds));
var self = this;
forEach(visibleRows, function (row) {
self._updateSelectedRowIds(row[self.props.uniqueIdentifier], newSelectedRowIds, newIsSelectAllChecked);
}, this);
this.setState({
isSelectAllChecked: newIsSelectAllChecked,
selectedRowIds: newSelectedRowIds
});
if (this.props.onSelectionChange) {
this.props.onSelectionChange(newSelectedRowIds, newIsSelectAllChecked);
}
},
_toggleSelectRow: function _toggleSelectRow(row, isChecked) {
var visibleRows = this.getDataForRender(this.getCurrentResults(), this.columnSettings.getColumns(), true),
newSelectedRowIds = JSON.parse(JSON.stringify(this.state.selectedRowIds));
this._updateSelectedRowIds(row[this.props.uniqueIdentifier], newSelectedRowIds, isChecked);
var newIsSelectAllChecked = this._getAreAllRowsChecked(newSelectedRowIds, map(visibleRows, this.props.uniqueIdentifier));
this.setState({
isSelectAllChecked: newIsSelectAllChecked,
selectedRowIds: newSelectedRowIds
});
if (this.props.onSelectionChange) {
this.props.onSelectionChange(newSelectedRowIds, newIsSelectAllChecked);
}
},
_updateSelectedRowIds: function _updateSelectedRowIds(id, selectedRowIds, isChecked) {
var isFound;
if (isChecked) {
isFound = find(selectedRowIds, function (item) {
return id === item;
});
if (isFound === undefined) {
selectedRowIds.push(id);
}
} else {
selectedRowIds.splice(selectedRowIds.indexOf(id), 1);
}
},
_getIsSelectAllChecked: function _getIsSelectAllChecked() {
return this.state.isSelectAllChecked;
},
_getAreAllRowsChecked: function _getAreAllRowsChecked(selectedRowIds, visibleRowIds) {
return visibleRowIds.length === intersection(visibleRowIds, selectedRowIds).length;
},
_getIsRowChecked: function _getIsRowChecked(row) {
return this.state.selectedRowIds.indexOf(row[this.props.uniqueIdentifier]) > -1 ? true : false;
},
getSelectedRowIds: function getSelectedRowIds() {
return this.state.selectedRowIds;
},
_resetSelectedRows: function _resetSelectedRows() {
this.setState({
isSelectAllChecked: false,
selectedRowIds: []
});
},
//This takes the props relating to multiple selection and puts them in one object
getMultipleSelectionObject: function getMultipleSelectionObject() {
return {
isMultipleSelection: find(this.props.results, function (result) {
return 'children' in result;
}) ? false : this.props.isMultipleSelection, //does not support subgrids
toggleSelectAll: this._toggleSelectAll,
getIsSelectAllChecked: this._getIsSelectAllChecked,
toggleSelectRow: this._toggleSelectRow,
getSelectedRowIds: this.getSelectedRowIds,
getIsRowChecked: this._getIsRowChecked
};
},
isInfiniteScrollEnabled: function isInfiniteScrollEnabled() {
// If a custom pager is included, don't allow for infinite scrolling.
if (this.props.useCustomPagerComponent) {
return false;
}
// Otherwise, send back the property.
return this.props.enableInfiniteScroll;
},
getClearFixStyles: function getClearFixStyles() {
return {
clear: "both",
display: "table",
width: "100%"
};
},
getSettingsStyles: function getSettingsStyles() {
return {
"float": "left",
width: "50%",
textAlign: "right"
};
},
getFilterStyles: function getFilterStyles() {
return {
"float": "left",
width: "50%",
textAlign: "left",
color: "#222",
minHeight: "1px"
};
},
getFilter: function getFilter() {
return this.props.showFilter && this.shouldUseCustomGridComponent() === false ? this.props.useCustomFilterComponent ? React.createElement(CustomFilterContainer, { changeFilter: this.setFilter, placeholderText: this.props.filterPlaceholderText, customFilterComponent: this.props.customFilterComponent, results: this.props.results, currentResults: this.getCurrentResults() }) : React.createElement(GridFilter, { changeFilter: this.setFilter, placeholderText: this.props.filterPlaceholderText }) : "";
},
getSettings: function getSettings() {
return this.props.showSettings ? React.createElement('button', { type: 'button', className: this.props.settingsToggleClassName, onClick: this.toggleColumnChooser,
style: this.props.useGriddleStyles ? { background: "none", border: "none", padding: 0, margin: 0, fontSize: 14 } : null }, this.props.settingsText, this.props.settingsIconComponent) : "";
},
getTopSection: function getTopSection(filter, settings) {
if (this.props.showFilter === false && this.props.showSettings === false) {
return "";
}
var filterStyles = null,
settingsStyles = null,
topContainerStyles = null;
if (this.props.useGriddleStyles) {
filterStyles = this.getFilterStyles();
settingsStyles = this.getSettingsStyles();
topContainerStyles = this.getClearFixStyles();
}
return React.createElement('div', { className: 'top-section', style: topContainerStyles }, React.createElement('div', { className: 'griddle-filter', style: filterStyles }, filter), React.createElement('div', { className: 'griddle-settings-toggle', style: settingsStyles }, settings));
},
getPagingSection: function getPagingSection(currentPage, maxPage) {
if ((this.props.showPager && !this.isInfiniteScrollEnabled() && !this.shouldUseCustomGridComponent()) === false) {
return undefined;
}
return React.createElement('div', { className: 'griddle-footer' }, this.props.useCustomPagerComponent ? React.createElement(CustomPaginationContainer, { customPagerComponentOptions: this.props.customPagerComponentOptions, next: this.nextPage, previous: this.previousPage, currentPage: currentPage, maxPage: maxPage, setPage: this.setPage, nextText: this.props.nextText, previousText: this.props.previousText, customPagerComponent: this.props.customPagerComponent }) : React.createElement(GridPagination, { useGriddleStyles: this.props.useGriddleStyles, next: this.nextPage, previous: this.previousPage, nextClassName: this.props.nextClassName, nextIconComponent: this.props.nextIconComponent, previousClassName: this.props.previousClassName, previousIconComponent: this.props.previousIconComponent, currentPage: currentPage, maxPage: maxPage, setPage: this.setPage, nextText: this.props.nextText, previousText: this.props.previousText }));
},
getColumnSelectorSection: function getColumnSelectorSection(keys, cols) {
return this.state.showColumnChooser ? React.createElement(GridSettings, { columns: keys, selectedColumns: cols, setColumns: this.setColumns, settingsText: this.props.settingsText,
settingsIconComponent: this.props.settingsIconComponent, maxRowsText: this.props.maxRowsText, setPageSize: this.setPageSize,
showSetPageSize: !this.shouldUseCustomGridComponent(), resultsPerPage: this.state.resultsPerPage, enableToggleCustom: this.props.enableToggleCustom,
toggleCustomComponent: this.toggleCustomComponent, useCustomComponent: this.shouldUseCustomRowComponent() || this.shouldUseCustomGridComponent(),
useGriddleStyles: this.props.useGriddleStyles, enableCustomFormatText: this.props.enableCustomFormatText, columnMetadata: this.props.columnMetadata }) : "";
},
getCustomGridSection: function getCustomGridSection() {
return React.createElement(this.props.customGridComponent, _extends({ data: this.props.results, className: this.props.customGridComponentClassName }, this.props.gridMetadata));
},
getCustomRowSection: function getCustomRowSection(data, cols, meta, pagingContent, globalData) {
return React.createElement('div', null, React.createElement(CustomRowComponentContainer, { data: data, columns: cols, metadataColumns: meta, globalData: globalData,
className: this.props.customRowComponentClassName, customComponent: this.props.customRowComponent,
style: this.props.useGriddleStyles ? this.getClearFixStyles() : null }), this.props.showPager && pagingContent);
},
getStandardGridSection: function getStandardGridSection(data, cols, meta, pagingContent, hasMorePages) {
var sortProperties = this.getSortObject();
var multipleSelectionProperties = this.getMultipleSelectionObject();
// no data section
var showNoData = this.shouldShowNoDataSection(data);
var noDataSection = this.getNoDataSection();
return React.createElement('div', { className: 'griddle-body' }, React.createElement(GridTable, { useGriddleStyles: this.props.useGriddleStyles,
noDataSection: noDataSection,
showNoData: showNoData,
columnSettings: this.columnSettings,
rowSettings: this.rowSettings,
sortSettings: sortProperties,
multipleSelectionSettings: multipleSelectionProperties,
filterByColumn: this.filterByColumn,
isSubGriddle: this.props.isSubGriddle,
useGriddleIcons: this.props.useGriddleIcons,
useFixedLayout: this.props.useFixedLayout,
showPager: this.props.showPager,
pagingContent: pagingContent,
data: data,
className: this.props.tableClassName,
enableInfiniteScroll: this.isInfiniteScrollEnabled(),
nextPage: this.nextPage,
showTableHeading: this.props.showTableHeading,
useFixedHeader: this.props.useFixedHeader,
parentRowCollapsedClassName: this.props.parentRowCollapsedClassName,
parentRowExpandedClassName: this.props.parentRowExpandedClassName,
parentRowCollapsedComponent: this.props.parentRowCollapsedComponent,
parentRowExpandedComponent: this.props.parentRowExpandedComponent,
bodyHeight: this.props.bodyHeight,
paddingHeight: this.props.paddingHeight,
rowHeight: this.props.rowHeight,
infiniteScrollLoadTreshold: this.props.infiniteScrollLoadTreshold,
externalLoadingComponent: this.props.externalLoadingComponent,
externalIsLoading: this.props.externalIsLoading,
hasMorePages: hasMorePages,
onRowClick: this.props.onRowClick }));
},
getContentSection: function getContentSection(data, cols, meta, pagingContent, hasMorePages, globalData) {
if (this.shouldUseCustomGridComponent() && this.props.customGridComponent !== null) {
return this.getCustomGridSection();
} else if (this.shouldUseCustomRowComponent()) {
return this.getCustomRowSection(data, cols, meta, pagingContent, globalData);
} else {
return this.getStandardGridSection(data, cols, meta, pagingContent, hasMorePages);
}
},
getNoDataSection: function getNoDataSection() {
if (this.props.customNoDataComponent != null) {
return React.createElement('div', { className: this.props.noDataClassName }, React.createElement(this.props.customNoDataComponent, this.props.customNoDataComponentProps));
}
return React.createElement(GridNoData, { noDataMessage: this.props.noDataMessage });
},
shouldShowNoDataSection: function shouldShowNoDataSection(results) {
if (this.props.allowEmptyGrid) {
return false;
}
return this.props.useExternal === false && (typeof results === 'undefined' || results.length === 0) || this.props.useExternal === true && this.props.externalIsLoading === false && results.length === 0;
},
render: function render() {
var that = this,
results = this.getCurrentResults(); // Attempt to assign to the filtered results, if we have any.
var headerTableClassName = this.props.tableClassName + " table-header";
//figure out if we want to show the filter section
var filter = this.getFilter();
var settings = this.getSettings();
//if we have neither filter or settings don't need to render this stuff
var topSection = this.getTopSection(filter, settings);
var keys = [];
var cols = this.columnSettings.getColumns();
//figure out which columns are displayed and show only those
var data = this.getDataForRender(results, cols, true);
var meta = this.columnSettings.getMetadataColumns();
if (this.props.columnMetadata) {
// Get column keys from column metadata
forEach(this.props.columnMetadata, function (meta) {
if (!(typeof meta.visible === 'boolean' && meta.visible === false)) {
keys.push(meta.columnName);
}
});
} else {
// Grab the column keys from the first results
keys = deep.keys(omit(results[0], meta));
}
// sort keys by order
keys = this.columnSettings.orderColumns(keys);
// Grab the current and max page values.
var currentPage = this.getCurrentPage();
var maxPage = this.getCurrentMaxPage();
// Determine if we need to enable infinite scrolling on the table.
var hasMorePages = currentPage + 1 < maxPage;
// Grab the paging content if it's to be displayed
var pagingContent = this.getPagingSection(currentPage, maxPage);
var resultContent = this.getContentSection(data, cols, meta, pagingContent, hasMorePages, this.props.globalData);
var columnSelector = this.getColumnSelectorSection(keys, cols);
var gridClassName = this.props.gridClassName.length > 0 ? "griddle " + this.props.gridClassName : "griddle";
//add custom to the class name so we can style it differently
gridClassName += this.shouldUseCustomRowComponent() ? " griddle-custom" : "";
return React.createElement('div', { className: gridClassName }, topSection, columnSelector, React.createElement('div', { className: 'griddle-container', style: this.props.useGriddleStyles && !this.props.isSubGriddle ? { border: "1px solid #DDD" } : null }, resultContent));
}
});
GridRowContainer.Griddle = module.exports = Griddle;
/***/ },
/* 2 */
/***/ function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_2__;
/***/ },
/* 3 */
/***/ function(module, exports, __webpack_require__) {
/*
See License / Disclaimer https://raw.githubusercontent.com/DynamicTyped/Griddle/master/LICENSE
*/
'use strict';
var React = __webpack_require__(2);
var GridTitle = __webpack_require__(4);
var GridRowContainer = __webpack_require__(162);
var ColumnProperties = __webpack_require__(5);
var RowProperties = __webpack_require__(169);
var GridTable = React.createClass({
displayName: 'GridTable',
getDefaultProps: function getDefaultProps() {
return {
"data": [],
"columnSettings": null,
"rowSettings": null,
"sortSettings": null,
"multipleSelectionSettings": null,
"className": "",
"enableInfiniteScroll": false,
"nextPage": null,
"hasMorePages": false,
"useFixedHeader": false,
"useFixedLayout": true,
"paddingHeight": null,
"rowHeight": null,
"filterByColumn": null,
"infiniteScrollLoadTreshold": null,
"bodyHeight": null,
"useGriddleStyles": true,
"useGriddleIcons": true,
"isSubGriddle": false,
"parentRowCollapsedClassName": "parent-row",
"parentRowExpandedClassName": "parent-row expanded",
"parentRowCollapsedComponent": "▶",
"parentRowExpandedComponent": "▼",
"externalLoadingComponent": null,
"externalIsLoading": false,
"onRowClick": null
};
},
getInitialState: function getInitialState() {
return {
scrollTop: 0,
scrollHeight: this.props.bodyHeight,
clientHeight: this.props.bodyHeight
};
},
componentDidMount: function componentDidMount() {
// After the initial render, see if we need to load additional pages.
this.gridScroll();
},
componentDidUpdate: function componentDidUpdate(prevProps, prevState) {
// After the subsequent renders, see if we need to load additional pages.
this.gridScroll();
},
gridScroll: function gridScroll() {
if (this.props.enableInfiniteScroll && !this.props.externalIsLoading) {
// If the scroll height is greater than the current amount of rows displayed, update the page.
var scrollable = this.refs.scrollable;
var scrollTop = scrollable.scrollTop;
var scrollHeight = scrollable.scrollHeight;
var clientHeight = scrollable.clientHeight;
// If the scroll position changed and the difference is greater than a row height
if (this.props.rowHeight !== null && this.state.scrollTop !== scrollTop && Math.abs(this.state.scrollTop - scrollTop) >= this.getAdjustedRowHeight()) {
var newState = {
scrollTop: scrollTop,
scrollHeight: scrollHeight,
clientHeight: clientHeight
};
// Set the state to the new state
this.setState(newState);
}
// Determine the diff by subtracting the amount scrolled by the total height, taking into consideratoin
// the spacer's height.
var scrollHeightDiff = scrollHeight - (scrollTop + clientHeight) - this.props.infiniteScrollLoadTreshold;
// Make sure that we load results a little before reaching the bottom.
var compareHeight = scrollHeightDiff * 0.6;
if (compareHeight <= this.props.infiniteScrollLoadTreshold) {
this.props.nextPage();
}
}
},
verifyProps: function verifyProps() {
if (this.props.columnSettings === null) {
console.error("gridTable: The columnSettings prop is null and it shouldn't be");
}
if (this.props.rowSettings === null) {
console.error("gridTable: The rowSettings prop is null and it shouldn't be");
}
},
getAdjustedRowHeight: function getAdjustedRowHeight() {
return this.props.rowHeight + this.props.paddingHeight * 2; // account for padding.
},
getNodeContent: function getNodeContent() {
this.verifyProps();
var that = this;
//figure out if we need to wrap the group in one tbody or many
var anyHasChildren = false;
// If the data is still being loaded, don't build the nodes unless this is an infinite scroll table.
if (!this.props.externalIsLoading || this.props.enableInfiniteScroll) {
var nodeData = that.props.data;
var aboveSpacerRow = null;
var belowSpacerRow = null;
var usingDefault = false;
// If we have a row height specified, only render what's going to be visible.
if (this.props.enableInfiniteScroll && this.props.rowHeight !== null && this.refs.scrollable !== undefined) {
var adjustedHeight = that.getAdjustedRowHeight();
var visibleRecordCount = Math.ceil(that.state.clientHeight / adjustedHeight);
// Inspired by : http://jsfiddle.net/vjeux/KbWJ2/9/
var displayStart = Math.max(0, Math.floor(that.state.scrollTop / adjustedHeight) - visibleRecordCount * 0.25);
var displayEnd = Math.min(displayStart + visibleRecordCount * 1.25, this.props.data.length - 1);
// Split the amount of nodes.
nodeData = nodeData.slice(displayStart, displayEnd + 1);
// Set the above and below nodes.
var aboveSpacerRowStyle = { height: displayStart * adjustedHeight + "px" };
aboveSpacerRow = React.createElement('tr', { key: 'above-' + aboveSpacerRowStyle.height, style: aboveSpacerRowStyle });
var belowSpacerRowStyle = { height: (this.props.data.length - displayEnd) * adjustedHeight + "px" };
belowSpacerRow = React.createElement('tr', { key: 'below-' + belowSpacerRowStyle.height, style: belowSpacerRowStyle });
}
var nodes = nodeData.map(function (row, index) {
var hasChildren = typeof row["children"] !== "undefined" && row["children"].length > 0;
var uniqueId = that.props.rowSettings.getRowKey(row, index);
//at least one item in the group has children.
if (hasChildren) {
anyHasChildren = hasChildren;
}
return React.createElement(GridRowContainer, {
useGriddleStyles: that.props.useGriddleStyles,
isSubGriddle: that.props.isSubGriddle,
parentRowExpandedClassName: that.props.parentRowExpandedClassName,
parentRowCollapsedClassName: that.props.parentRowCollapsedClassName,
parentRowExpandedComponent: that.props.parentRowExpandedComponent,
parentRowCollapsedComponent: that.props.parentRowCollapsedComponent,
data: row,
key: uniqueId + '-container',
uniqueId: uniqueId,
columnSettings: that.props.columnSettings,
rowSettings: that.props.rowSettings,
paddingHeight: that.props.paddingHeight,
multipleSelectionSettings: that.props.multipleSelectionSettings,
rowHeight: that.props.rowHeight,
hasChildren: hasChildren,
tableClassName: that.props.className,
onRowClick: that.props.onRowClick
});
});
// no data section
if (this.props.showNoData) {
var colSpan = this.props.columnSettings.getVisibleColumnCount();
nodes.push(React.createElement('tr', { key: 'no-data-section' }, React.createElement('td', { colSpan: colSpan }, this.props.noDataSection)));
}
// Add the spacer rows for nodes we're not rendering.
if (aboveSpacerRow) {
nodes.unshift(aboveSpacerRow);
}
if (belowSpacerRow) {
nodes.push(belowSpacerRow);
}
// Send back the nodes.
return {
nodes: nodes,
anyHasChildren: anyHasChildren
};
} else {
return null;
}
},
render: function render() {
var that = this;
var nodes = [];
// for if we need to wrap the group in one tbody or many
var anyHasChildren = false;
// Grab the nodes to render
var nodeContent = this.getNodeContent();
if (nodeContent) {
nodes = nodeContent.nodes;
anyHasChildren = nodeContent.anyHasChildren;
}
var gridStyle = null;
var loadingContent = null;
var tableStyle = {
width: "100%"
};
if (this.props.useFixedLayout) {
tableStyle.tableLayout = "fixed";
}
if (this.props.enableInfiniteScroll) {
// If we're enabling infinite scrolling, we'll want to include the max height of the grid body + allow scrolling.
gridStyle = {
"position": "relative",
"overflowY": "scroll",
"height": this.props.bodyHeight + "px",
"width": "100%"
};
}
// If we're currently loading, populate the loading content
if (this.props.externalIsLoading) {
var defaultLoadingStyle = null;
var defaultColSpan = null;
if (this.props.useGriddleStyles) {
defaultLoadingStyle = {
textAlign: "center",
paddingBottom: "40px"
};
}
defaultColSpan = this.props.columnSettings.getVisibleColumnCount();
var loadingComponent = this.props.externalLoadingComponent ? React.createElement(this.props.externalLoadingComponent, null) : React.createElement('div', null, 'Loading...');
loadingContent = React.createElement('tbody', null, React.createElement('tr', null, React.createElement('td', { style: defaultLoadingStyle, colSpan: defaultColSpan }, loadingComponent)));
}
//construct the table heading component
var tableHeading = this.props.showTableHeading ? React.createElement(GridTitle, { useGriddleStyles: this.props.useGriddleStyles, useGriddleIcons: this.props.useGriddleIcons,
sortSettings: this.props.sortSettings,
multipleSelectionSettings: this.props.multipleSelectionSettings,
columnSettings: this.props.columnSettings,
filterByColumn: this.props.filterByColumn,
rowSettings: this.props.rowSettings }) : undefined;
//check to see if any of the rows have children... if they don't wrap everything in a tbody so the browser doesn't auto do this
if (!anyHasChildren) {
nodes = React.createElement('tbody', null, nodes);
}
var pagingContent = React.createElement('tbody', null);
if (this.props.showPager) {
var pagingStyles = this.props.useGriddleStyles ? {
padding: "0px",
backgroundColor: "#EDEDED",
border: "0px",
color: "#222",
height: this.props.showNoData ? "20px" : null
} : null;
pagingContent = React.createElement('tbody', null, React.createElement('tr', null, React.createElement('td', { colSpan: this.props.multipleSelectionSettings.isMultipleSelection ? this.props.columnSettings.getVisibleColumnCount() + 1 : this.props.columnSettings.getVisibleColumnCount(), style: pagingStyles, className: 'footer-container' }, !this.props.showNoData ? this.props.pagingContent : null)));
}
// If we have a fixed header, split into two tables.
if (this.props.useFixedHeader) {
if (this.props.useGriddleStyles) {
tableStyle.tableLayout = "fixed";
}
return React.createElement('div', null, React.createElement('table', { className: this.props.className, style: this.props.useGriddleStyles && tableStyle || null }, tableHeading), React.createElement('div', { ref: 'scrollable', onScroll: this.gridScroll, style: gridStyle }, React.createElement('table', { className: this.props.className, style: this.props.useGriddleStyles && tableStyle || null }, nodes, loadingContent, pagingContent)));
}
return React.createElement('div', { ref: 'scrollable', onScroll: this.gridScroll, style: gridStyle }, React.createElement('table', { className: this.props.className, style: this.props.useGriddleStyles && tableStyle || null }, tableHeading, nodes, loadingContent, pagingContent));
}
});
module.exports = GridTable;
/***/ },
/* 4 */
/***/ function(module, exports, __webpack_require__) {
/*
See License / Disclaimer https://raw.githubusercontent.com/DynamicTyped/Griddle/master/LICENSE
*/
'use strict';
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;
};
var React = __webpack_require__(2);
var ColumnProperties = __webpack_require__(5);
var assign = __webpack_require__(157);
var DefaultHeaderComponent = React.createClass({
displayName: 'DefaultHeaderComponent',
render: function render() {
return React.createElement('span', null, this.props.displayName);
}
});
var GridTitle = React.createClass({
displayName: 'GridTitle',
getDefaultProps: function getDefaultProps() {
return {
"columnSettings": null,
"filterByColumn": function filterByColumn() {},
"rowSettings": null,
"sortSettings": null,
"multipleSelectionSettings": null,
"headerStyle": null,
"useGriddleStyles": true,
"useGriddleIcons": true,
"headerStyles": {}
};
},
componentWillMount: function componentWillMount() {
this.verifyProps();
},
sort: function sort(column) {
var that = this;
return function (event) {
that.props.sortSettings.changeSort(column);
};
},
toggleSelectAll: function toggleSelectAll(event) {
this.props.multipleSelectionSettings.toggleSelectAll();
},
handleSelectionChange: function handleSelectionChange(event) {
//hack to get around warning message that's not helpful in this case
return;
},
verifyProps: function verifyProps() {
if (this.props.columnSettings === null) {
console.error("gridTitle: The columnSettings prop is null and it shouldn't be");
}
if (this.props.sortSettings === null) {
console.error("gridTitle: The sortSettings prop is null and it shouldn't be");
}
},
render: function render() {
this.verifyProps();
var that = this;
var titleStyles = {};
var nodes = this.props.columnSettings.getColumns().map(function (col, index) {
var defaultTitleStyles = {};
var columnSort = "";
var columnIsSortable = that.props.columnSettings.getMetadataColumnProperty(col, "sortable", true);
var sortComponent = columnIsSortable ? that.props.sortSettings.sortDefaultComponent : null;
if (that.props.sortSettings.sortColumn == col && that.props.sortSettings.sortDirection === 'asc') {
columnSort = that.props.sortSettings.sortAscendingClassName;
sortComponent = that.props.useGriddleIcons && that.props.sortSettings.sortAscendingComponent;
} else if (that.props.sortSettings.sortColumn == col && that.props.sortSettings.sortDirection === 'desc') {
columnSort += that.props.sortSettings.sortDescendingClassName;
sortComponent = that.props.useGriddleIcons && that.props.sortSettings.sortDescendingComponent;
}
var meta = that.props.columnSettings.getColumnMetadataByName(col);
var displayName = that.props.columnSettings.getMetadataColumnProperty(col, "displayName", col);
var HeaderComponent = that.props.columnSettings.getMetadataColumnProperty(col, "customHeaderComponent", DefaultHeaderComponent);
var headerProps = that.props.columnSettings.getMetadataColumnProperty(col, "customHeaderComponentProps", {});
columnSort = meta == null ? columnSort : (columnSort && columnSort + " " || columnSort) + that.props.columnSettings.getMetadataColumnProperty(col, "cssClassName", "");
if (that.props.useGriddleStyles) {
defaultTitleStyles = {
backgroundColor: "#EDEDEF",
border: "0px",
borderBottom: "1px solid #DDD",
color: "#222",
padding: "5px",
cursor: columnIsSortable ? "pointer" : "default"
};
}
titleStyles = meta && meta.titleStyles ? assign({}, defaultTitleStyles, meta.titleStyles) : assign({}, defaultTitleStyles);
var ComponentClass = displayName ? 'th' : 'td';
return React.createElement(ComponentClass, { onClick: columnIsSortable ? that.sort(col) : null, 'data-title': col, className: columnSort, key: col,
style: titleStyles }, React.createElement(HeaderComponent, _extends({ columnName: col, displayName: displayName,
filterByColumn: that.props.filterByColumn }, headerProps)), sortComponent);
});
if (nodes && this.props.multipleSelectionSettings.isMultipleSelection) {
nodes.unshift(React.createElement('th', { key: 'selection', onClick: this.toggleSelectAll, style: titleStyles, className: 'griddle-select griddle-select-title' }, React.createElement('input', {
type: 'checkbox',
checked: this.props.multipleSelectionSettings.getIsSelectAllChecked(),
onChange: this.handleSelectionChange
})));
}
//Get the row from the row settings.
var className = that.props.rowSettings && that.props.rowSettings.getHeaderRowMetadataClass() || null;
return React.createElement('thead', null, React.createElement('tr', {
className: className,
style: this.props.headerStyles }, nodes));
}
});
module.exports = GridTitle;
/***/ },
/* 5 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
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; }; })();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
var map = __webpack_require__(6);
var filter = __webpack_require__(122);
var find = __webpack_require__(125);
var sortBy = __webpack_require__(132);
var difference = __webpack_require__(149);
var ColumnProperties = (function () {
function ColumnProperties() {
var allColumns = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0];
var filteredColumns = arguments.length <= 1 || arguments[1] === undefined ? [] : arguments[1];
var childrenColumnName = arguments.length <= 2 || arguments[2] === undefined ? "children" : arguments[2];
var columnMetadata = arguments.length <= 3 || arguments[3] === undefined ? [] : arguments[3];
var metadataColumns = arguments.length <= 4 || arguments[4] === undefined ? [] : arguments[4];
_classCallCheck(this, ColumnProperties);
this.allColumns = allColumns;
this.filteredColumns = filteredColumns;
this.childrenColumnName = childrenColumnName;
this.columnMetadata = columnMetadata;
this.metadataColumns = metadataColumns;
}
_createClass(ColumnProperties, [{
key: 'getMetadataColumns',
value: function getMetadataColumns() {
var meta = map(filter(this.columnMetadata, { visible: false }), function (item) {
return item.columnName;
});
if (meta.indexOf(this.childrenColumnName) < 0) {
meta.push(this.childrenColumnName);
}
return meta.concat(this.metadataColumns);
}
}, {
key: 'getVisibleColumnCount',
value: function getVisibleColumnCount() {
return this.getColumns().length;
}
}, {
key: 'getColumnMetadataByName',
value: function getColumnMetadataByName(name) {
return find(this.columnMetadata, { columnName: name });
}
}, {
key: 'hasColumnMetadata',
value: function hasColumnMetadata() {
return this.columnMetadata !== null && this.columnMetadata.length > 0;
}
}, {
key: 'getMetadataColumnProperty',
value: function getMetadataColumnProperty(columnName, propertyName, defaultValue) {
var meta = this.getColumnMetadataByName(columnName);
//send back the default value if meta isn't there
if (typeof meta === "undefined" || meta === null) return defaultValue;
return meta.hasOwnProperty(propertyName) ? meta[propertyName] : defaultValue;
}
}, {
key: 'orderColumns',
value: function orderColumns(cols) {
var _this = this;
var ORDER_MAX = 100;
var orderedColumns = sortBy(cols, function (item) {
var metaItem = find(_this.columnMetadata, { columnName: item });
if (typeof metaItem === 'undefined' || metaItem === null || isNaN(metaItem.order)) {
return ORDER_MAX;
}
return metaItem.order;
});
return orderedColumns;
}
}, {
key: 'getColumns',
value: function getColumns() {
//if we didn't set default or filter
var filteredColumns = this.filteredColumns.length === 0 ? this.allColumns : this.filteredColumns;
filteredColumns = difference(filteredColumns, this.metadataColumns);
filteredColumns = this.orderColumns(filteredColumns);
return filteredColumns;
}
}]);
return ColumnProperties;
})();
module.exports = ColumnProperties;
/***/ },
/* 6 */
/***/ function(module, exports, __webpack_require__) {
var arrayMap = __webpack_require__(7),
baseIteratee = __webpack_require__(8),
baseMap = __webpack_require__(116),
isArray = __webpack_require__(74);
/**
* Creates an array of values by running each element in `collection` thru
* `iteratee`. The iteratee is invoked with three arguments:
* (value, index|key, collection).
*
* Many lodash methods are guarded to work as iteratees for methods like
* `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
*
* The guarded methods are:
* `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
* `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
* `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
* `template`, `trim`, `trimEnd`, `trimStart`, and `words`
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Array} Returns the new mapped array.
* @example
*
* function square(n) {
* return n * n;
* }
*
* _.map([4, 8], square);
* // => [16, 64]
*
* _.map({ 'a': 4, 'b': 8 }, square);
* // => [16, 64] (iteration order is not guaranteed)
*
* var users = [
* { 'user': 'barney' },
* { 'user': 'fred' }
* ];
*
* // The `_.property` iteratee shorthand.
* _.map(users, 'user');
* // => ['barney', 'fred']
*/
function map(collection, iteratee) {
var func = isArray(collection) ? arrayMap : baseMap;
return func(collection, baseIteratee(iteratee, 3));
}
module.exports = map;
/***/ },
/* 7 */
/***/ function(module, exports) {
/**
* A specialized version of `_.map` for arrays without support for iteratee
* shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns the new mapped array.
*/
function arrayMap(array, iteratee) {
var index = -1,
length = array == null ? 0 : array.length,
result = Array(length);
while (++index < length) {
result[index] = iteratee(array[index], index, array);
}
return result;
}
module.exports = arrayMap;
/***/ },
/* 8 */
/***/ function(module, exports, __webpack_require__) {
var baseMatches = __webpack_require__(9),
baseMatchesProperty = __webpack_require__(97),
identity = __webpack_require__(112),
isArray = __webpack_require__(74),
property = __webpack_require__(113);
/**
* The base implementation of `_.iteratee`.
*
* @private
* @param {*} [value=_.identity] The value to convert to an iteratee.
* @returns {Function} Returns the iteratee.
*/
function baseIteratee(value) {
// Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
// See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
if (typeof value == 'function') {
return value;
}
if (value == null) {
return identity;
}
if (typeof value == 'object') {
return isArray(value)
? baseMatchesProperty(value[0], value[1])
: baseMatches(value);
}
return property(value);
}
module.exports = baseIteratee;
/***/ },
/* 9 */
/***/ function(module, exports, __webpack_require__) {
var baseIsMatch = __webpack_require__(10),
getMatchData = __webpack_require__(94),
matchesStrictComparable = __webpack_require__(96);
/**
* The base implementation of `_.matches` which doesn't clone `source`.
*
* @private
* @param {Object} source The object of property values to match.
* @returns {Function} Returns the new spec function.
*/
function baseMatches(source) {
var matchData = getMatchData(source);
if (matchData.length == 1 && matchData[0][2]) {
return matchesStrictComparable(matchData[0][0], matchData[0][1]);
}
return function(object) {
return object === source || baseIsMatch(object, source, matchData);
};
}
module.exports = baseMatches;
/***/ },
/* 10 */
/***/ function(module, exports, __webpack_require__) {
var Stack = __webpack_require__(11),
baseIsEqual = __webpack_require__(55);
/** Used to compose bitmasks for value comparisons. */
var COMPARE_PARTIAL_FLAG = 1,
COMPARE_UNORDERED_FLAG = 2;
/**
* The base implementation of `_.isMatch` without support for iteratee shorthands.
*
* @private
* @param {Object} object The object to inspect.
* @param {Object} source The object of property values to match.
* @param {Array} matchData The property names, values, and compare flags to match.
* @param {Function} [customizer] The function to customize comparisons.
* @returns {boolean} Returns `true` if `object` is a match, else `false`.
*/
function baseIsMatch(object, source, matchData, customizer) {
var index = matchData.length,
length = index,
noCustomizer = !customizer;
if (object == null) {
return !length;
}
object = Object(object);
while (index--) {
var data = matchData[index];
if ((noCustomizer && data[2])
? data[1] !== object[data[0]]
: !(data[0] in object)
) {
return false;
}
}
while (++index < length) {
data = matchData[index];
var key = data[0],
objValue = object[key],
srcValue = data[1];
if (noCustomizer && data[2]) {
if (objValue === undefined && !(key in object)) {
return false;
}
} else {
var stack = new Stack;
if (customizer) {
var result = customizer(objValue, srcValue, key, object, source, stack);
}
if (!(result === undefined
? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
: result
)) {
return false;
}
}
}
return true;
}
module.exports = baseIsMatch;
/***/ },
/* 11 */
/***/ function(module, exports, __webpack_require__) {
var ListCache = __webpack_require__(12),
stackClear = __webpack_require__(20),
stackDelete = __webpack_require__(21),
stackGet = __webpack_require__(22),
stackHas = __webpack_require__(23),
stackSet = __webpack_require__(24);
/**
* Creates a stack cache object to store key-value pairs.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function Stack(entries) {
var data = this.__data__ = new ListCache(entries);
this.size = data.size;
}
// Add methods to `Stack`.
Stack.prototype.clear = stackClear;
Stack.prototype['delete'] = stackDelete;
Stack.prototype.get = stackGet;
Stack.prototype.has = stackHas;
Stack.prototype.set = stackSet;
module.exports = Stack;
/***/ },
/* 12 */
/***/ function(module, exports, __webpack_require__) {
var listCacheClear = __webpack_require__(13),
listCacheDelete = __webpack_require__(14),
listCacheGet = __webpack_require__(17),
listCacheHas = __webpack_require__(18),
listCacheSet = __webpack_require__(19);
/**
* Creates an list cache object.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function ListCache(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
// Add methods to `ListCache`.
ListCache.prototype.clear = listCacheClear;
ListCache.prototype['delete'] = listCacheDelete;
ListCache.prototype.get = listCacheGet;
ListCache.prototype.has = listCacheHas;
ListCache.prototype.set = listCacheSet;
module.exports = ListCache;
/***/ },
/* 13 */
/***/ function(module, exports) {
/**
* Removes all key-value entries from the list cache.
*
* @private
* @name clear
* @memberOf ListCache
*/
function listCacheClear() {
this.__data__ = [];
this.size = 0;
}
module.exports = listCacheClear;
/***/ },
/* 14 */
/***/ function(module, exports, __webpack_require__) {
var assocIndexOf = __webpack_require__(15);
/** Used for built-in method references. */
var arrayProto = Array.prototype;
/** Built-in value references. */
var splice = arrayProto.splice;
/**
* Removes `key` and its value from the list cache.
*
* @private
* @name delete
* @memberOf ListCache
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function listCacheDelete(key) {
var data = this.__data__,
index = assocIndexOf(data, key);
if (index < 0) {
return false;
}
var lastIndex = data.length - 1;
if (index == lastIndex) {
data.pop();
} else {
splice.call(data, index, 1);
}
--this.size;
return true;
}
module.exports = listCacheDelete;
/***/ },
/* 15 */
/***/ function(module, exports, __webpack_require__) {
var eq = __webpack_require__(16);
/**
* Gets the index at which the `key` is found in `array` of key-value pairs.
*
* @private
* @param {Array} array The array to inspect.
* @param {*} key The key to search for.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function assocIndexOf(array, key) {
var length = array.length;
while (length--) {
if (eq(array[length][0], key)) {
return length;
}
}
return -1;
}
module.exports = assocIndexOf;
/***/ },
/* 16 */
/***/ function(module, exports) {
/**
* Performs a
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* comparison between two values to determine if they are equivalent.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
* @example
*
* var object = { 'a': 1 };
* var other = { 'a': 1 };
*
* _.eq(object, object);
* // => true
*
* _.eq(object, other);
* // => false
*
* _.eq('a', 'a');
* // => true
*
* _.eq('a', Object('a'));
* // => false
*
* _.eq(NaN, NaN);
* // => true
*/
function eq(value, other) {
return value === other || (value !== value && other !== other);
}
module.exports = eq;
/***/ },
/* 17 */
/***/ function(module, exports, __webpack_require__) {
var assocIndexOf = __webpack_require__(15);
/**
* Gets the list cache value for `key`.
*
* @private
* @name get
* @memberOf ListCache
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function listCacheGet(key) {
var data = this.__data__,
index = assocIndexOf(data, key);
return index < 0 ? undefined : data[index][1];
}
module.exports = listCacheGet;
/***/ },
/* 18 */
/***/ function(module, exports, __webpack_require__) {
var assocIndexOf = __webpack_require__(15);
/**
* Checks if a list cache value for `key` exists.
*
* @private
* @name has
* @memberOf ListCache
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function listCacheHas(key) {
return assocIndexOf(this.__data__, key) > -1;
}
module.exports = listCacheHas;
/***/ },
/* 19 */
/***/ function(module, exports, __webpack_require__) {
var assocIndexOf = __webpack_require__(15);
/**
* Sets the list cache `key` to `value`.
*
* @private
* @name set
* @memberOf ListCache
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the list cache instance.
*/
function listCacheSet(key, value) {
var data = this.__data__,
index = assocIndexOf(data, key);
if (index < 0) {
++this.size;
data.push([key, value]);
} else {
data[index][1] = value;
}
return this;
}
module.exports = listCacheSet;
/***/ },
/* 20 */
/***/ function(module, exports, __webpack_require__) {
var ListCache = __webpack_require__(12);
/**
* Removes all key-value entries from the stack.
*
* @private
* @name clear
* @memberOf Stack
*/
function stackClear() {
this.__data__ = new ListCache;
this.size = 0;
}
module.exports = stackClear;
/***/ },
/* 21 */
/***/ function(module, exports) {
/**
* Removes `key` and its value from the stack.
*
* @private
* @name delete
* @memberOf Stack
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function stackDelete(key) {
var data = this.__data__,
result = data['delete'](key);
this.size = data.size;
return result;
}
module.exports = stackDelete;
/***/ },
/* 22 */
/***/ function(module, exports) {
/**
* Gets the stack value for `key`.
*
* @private
* @name get
* @memberOf Stack
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function stackGet(key) {
return this.__data__.get(key);
}
module.exports = stackGet;
/***/ },
/* 23 */
/***/ function(module, exports) {
/**
* Checks if a stack value for `key` exists.
*
* @private
* @name has
* @memberOf Stack
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function stackHas(key) {
return this.__data__.has(key);
}
module.exports = stackHas;
/***/ },
/* 24 */
/***/ function(module, exports, __webpack_require__) {
var ListCache = __webpack_require__(12),
Map = __webpack_require__(25),
MapCache = __webpack_require__(40);
/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;
/**
* Sets the stack `key` to `value`.
*
* @private
* @name set
* @memberOf Stack
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the stack cache instance.
*/
function stackSet(key, value) {
var data = this.__data__;
if (data instanceof ListCache) {
var pairs = data.__data__;
if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
pairs.push([key, value]);
this.size = ++data.size;
return this;
}
data = this.__data__ = new MapCache(pairs);
}
data.set(key, value);
this.size = data.size;
return this;
}
module.exports = stackSet;
/***/ },
/* 25 */
/***/ function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(26),
root = __webpack_require__(31);
/* Built-in method references that are verified to be native. */
var Map = getNative(root, 'Map');
module.exports = Map;
/***/ },
/* 26 */
/***/ function(module, exports, __webpack_require__) {
var baseIsNative = __webpack_require__(27),
getValue = __webpack_require__(39);
/**
* Gets the native function at `key` of `object`.
*
* @private
* @param {Object} object The object to query.
* @param {string} key The key of the method to get.
* @returns {*} Returns the function if it's native, else `undefined`.
*/
function getNative(object, key) {
var value = getValue(object, key);
return baseIsNative(value) ? value : undefined;
}
module.exports = getNative;
/***/ },
/* 27 */
/***/ function(module, exports, __webpack_require__) {
var isFunction = __webpack_require__(28),
isMasked = __webpack_require__(36),
isObject = __webpack_require__(35),
toSource = __webpack_require__(38);
/**
* Used to match `RegExp`
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
*/
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
/** Used to detect host constructors (Safari). */
var reIsHostCtor = /^\[object .+?Constructor\]$/;
/** Used for built-in method references. */
var funcProto = Function.prototype,
objectProto = Object.prototype;
/** Used to resolve the decompiled source of functions. */
var funcToString = funcProto.toString;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/** Used to detect if a method is native. */
var reIsNative = RegExp('^' +
funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
);
/**
* The base implementation of `_.isNative` without bad shim checks.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a native function,
* else `false`.
*/
function baseIsNative(value) {
if (!isObject(value) || isMasked(value)) {
return false;
}
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
return pattern.test(toSource(value));
}
module.exports = baseIsNative;
/***/ },
/* 28 */
/***/ function(module, exports, __webpack_require__) {
var baseGetTag = __webpack_require__(29),
isObject = __webpack_require__(35);
/** `Object#toString` result references. */
var asyncTag = '[object AsyncFunction]',
funcTag = '[object Function]',
genTag = '[object GeneratorFunction]',
proxyTag = '[object Proxy]';
/**
* Checks if `value` is classified as a `Function` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
* @example
*
* _.isFunction(_);
* // => true
*
* _.isFunction(/abc/);
* // => false
*/
function isFunction(value) {
if (!isObject(value)) {
return false;
}
// The use of `Object#toString` avoids issues with the `typeof` operator
// in Safari 9 which returns 'object' for typed arrays and other constructors.
var tag = baseGetTag(value);
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
}
module.exports = isFunction;
/***/ },
/* 29 */
/***/ function(module, exports, __webpack_require__) {
var Symbol = __webpack_require__(30),
getRawTag = __webpack_require__(33),
objectToString = __webpack_require__(34);
/** `Object#toString` result references. */
var nullTag = '[object Null]',
undefinedTag = '[object Undefined]';
/** Built-in value references. */
var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
/**
* The base implementation of `getTag` without fallbacks for buggy environments.
*
* @private
* @param {*} value The value to query.
* @returns {string} Returns the `toStringTag`.
*/
function baseGetTag(value) {
if (value == null) {
return value === undefined ? undefinedTag : nullTag;
}
value = Object(value);
return (symToStringTag && symToStringTag in value)
? getRawTag(value)
: objectToString(value);
}
module.exports = baseGetTag;
/***/ },
/* 30 */
/***/ function(module, exports, __webpack_require__) {
var root = __webpack_require__(31);
/** Built-in value references. */
var Symbol = root.Symbol;
module.exports = Symbol;
/***/ },
/* 31 */
/***/ function(module, exports, __webpack_require__) {
var freeGlobal = __webpack_require__(32);
/** Detect free variable `self`. */
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
/** Used as a reference to the global object. */
var root = freeGlobal || freeSelf || Function('return this')();
module.exports = root;
/***/ },
/* 32 */
/***/ function(module, exports) {
/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
module.exports = freeGlobal;
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
/***/ },
/* 33 */
/***/ function(module, exports, __webpack_require__) {
var Symbol = __webpack_require__(30);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
* of values.
*/
var nativeObjectToString = objectProto.toString;
/** Built-in value references. */
var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
/**
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
*
* @private
* @param {*} value The value to query.
* @returns {string} Returns the raw `toStringTag`.
*/
function getRawTag(value) {
var isOwn = hasOwnProperty.call(value, symToStringTag),
tag = value[symToStringTag];
try {
value[symToStringTag] = undefined;
var unmasked = true;
} catch (e) {}
var result = nativeObjectToString.call(value);
if (unmasked) {
if (isOwn) {
value[symToStringTag] = tag;
} else {
delete value[symToStringTag];
}
}
return result;
}
module.exports = getRawTag;
/***/ },
/* 34 */
/***/ function(module, exports) {
/** Used for built-in method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
* of values.
*/
var nativeObjectToString = objectProto.toString;
/**
* Converts `value` to a string using `Object.prototype.toString`.
*
* @private
* @param {*} value The value to convert.
* @returns {string} Returns the converted string.
*/
function objectToString(value) {
return nativeObjectToString.call(value);
}
module.exports = objectToString;
/***/ },
/* 35 */
/***/ function(module, exports) {
/**
* Checks if `value` is the
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
* @example
*
* _.isObject({});
* // => true
*
* _.isObject([1, 2, 3]);
* // => true
*
* _.isObject(_.noop);
* // => true
*
* _.isObject(null);
* // => false
*/
function isObject(value) {
var type = typeof value;
return value != null && (type == 'object' || type == 'function');
}
module.exports = isObject;
/***/ },
/* 36 */
/***/ function(module, exports, __webpack_require__) {
var coreJsData = __webpack_require__(37);
/** Used to detect methods masquerading as native. */
var maskSrcKey = (function() {
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
return uid ? ('Symbol(src)_1.' + uid) : '';
}());
/**
* Checks if `func` has its source masked.
*
* @private
* @param {Function} func The function to check.
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
*/
function isMasked(func) {
return !!maskSrcKey && (maskSrcKey in func);
}
module.exports = isMasked;
/***/ },
/* 37 */
/***/ function(module, exports, __webpack_require__) {
var root = __webpack_require__(31);
/** Used to detect overreaching core-js shims. */
var coreJsData = root['__core-js_shared__'];
module.exports = coreJsData;
/***/ },
/* 38 */
/***/ function(module, exports) {
/** Used for built-in method references. */
var funcProto = Function.prototype;
/** Used to resolve the decompiled source of functions. */
var funcToString = funcProto.toString;
/**
* Converts `func` to its source code.
*
* @private
* @param {Function} func The function to convert.
* @returns {string} Returns the source code.
*/
function toSource(func) {
if (func != null) {
try {
return funcToString.call(func);
} catch (e) {}
try {
return (func + '');
} catch (e) {}
}
return '';
}
module.exports = toSource;
/***/ },
/* 39 */
/***/ function(module, exports) {
/**
* Gets the value at `key` of `object`.
*
* @private
* @param {Object} [object] The object to query.
* @param {string} key The key of the property to get.
* @returns {*} Returns the property value.
*/
function getValue(object, key) {
return object == null ? undefined : object[key];
}
module.exports = getValue;
/***/ },
/* 40 */
/***/ function(module, exports, __webpack_require__) {
var mapCacheClear = __webpack_require__(41),
mapCacheDelete = __webpack_require__(49),
mapCacheGet = __webpack_require__(52),
mapCacheHas = __webpack_require__(53),
mapCacheSet = __webpack_require__(54);
/**
* Creates a map cache object to store key-value pairs.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function MapCache(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
// Add methods to `MapCache`.
MapCache.prototype.clear = mapCacheClear;
MapCache.prototype['delete'] = mapCacheDelete;
MapCache.prototype.get = mapCacheGet;
MapCache.prototype.has = mapCacheHas;
MapCache.prototype.set = mapCacheSet;
module.exports = MapCache;
/***/ },
/* 41 */
/***/ function(module, exports, __webpack_require__) {
var Hash = __webpack_require__(42),
ListCache = __webpack_require__(12),
Map = __webpack_require__(25);
/**
* Removes all key-value entries from the map.
*
* @private
* @name clear
* @memberOf MapCache
*/
function mapCacheClear() {
this.size = 0;
this.__data__ = {
'hash': new Hash,
'map': new (Map || ListCache),
'string': new Hash
};
}
module.exports = mapCacheClear;
/***/ },
/* 42 */
/***/ function(module, exports, __webpack_require__) {
var hashClear = __webpack_require__(43),
hashDelete = __webpack_require__(45),
hashGet = __webpack_require__(46),
hashHas = __webpack_require__(47),
hashSet = __webpack_require__(48);
/**
* Creates a hash object.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function Hash(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
// Add methods to `Hash`.
Hash.prototype.clear = hashClear;
Hash.prototype['delete'] = hashDelete;
Hash.prototype.get = hashGet;
Hash.prototype.has = hashHas;
Hash.prototype.set = hashSet;
module.exports = Hash;
/***/ },
/* 43 */
/***/ function(module, exports, __webpack_require__) {
var nativeCreate = __webpack_require__(44);
/**
* Removes all key-value entries from the hash.
*
* @private
* @name clear
* @memberOf Hash
*/
function hashClear() {
this.__data__ = nativeCreate ? nativeCreate(null) : {};
this.size = 0;
}
module.exports = hashClear;
/***/ },
/* 44 */
/***/ function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(26);
/* Built-in method references that are verified to be native. */
var nativeCreate = getNative(Object, 'create');
module.exports = nativeCreate;
/***/ },
/* 45 */
/***/ function(module, exports) {
/**
* Removes `key` and its value from the hash.
*
* @private
* @name delete
* @memberOf Hash
* @param {Object} hash The hash to modify.
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function hashDelete(key) {
var result = this.has(key) && delete this.__data__[key];
this.size -= result ? 1 : 0;
return result;
}
module.exports = hashDelete;
/***/ },
/* 46 */
/***/ function(module, exports, __webpack_require__) {
var nativeCreate = __webpack_require__(44);
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Gets the hash value for `key`.
*
* @private
* @name get
* @memberOf Hash
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function hashGet(key) {
var data = this.__data__;
if (nativeCreate) {
var result = data[key];
return result === HASH_UNDEFINED ? undefined : result;
}
return hasOwnProperty.call(data, key) ? data[key] : undefined;
}
module.exports = hashGet;
/***/ },
/* 47 */
/***/ function(module, exports, __webpack_require__) {
var nativeCreate = __webpack_require__(44);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Checks if a hash value for `key` exists.
*
* @private
* @name has
* @memberOf Hash
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function hashHas(key) {
var data = this.__data__;
return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
}
module.exports = hashHas;
/***/ },
/* 48 */
/***/ function(module, exports, __webpack_require__) {
var nativeCreate = __webpack_require__(44);
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';
/**
* Sets the hash `key` to `value`.
*
* @private
* @name set
* @memberOf Hash
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the hash instance.
*/
function hashSet(key, value) {
var data = this.__data__;
this.size += this.has(key) ? 0 : 1;
data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
return this;
}
module.exports = hashSet;
/***/ },
/* 49 */
/***/ function(module, exports, __webpack_require__) {
var getMapData = __webpack_require__(50);
/**
* Removes `key` and its value from the map.
*
* @private
* @name delete
* @memberOf MapCache
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function mapCacheDelete(key) {
var result = getMapData(this, key)['delete'](key);
this.size -= result ? 1 : 0;
return result;
}
module.exports = mapCacheDelete;
/***/ },
/* 50 */
/***/ function(module, exports, __webpack_require__) {
var isKeyable = __webpack_require__(51);
/**
* Gets the data for `map`.
*
* @private
* @param {Object} map The map to query.
* @param {string} key The reference key.
* @returns {*} Returns the map data.
*/
function getMapData(map, key) {
var data = map.__data__;
return isKeyable(key)
? data[typeof key == 'string' ? 'string' : 'hash']
: data.map;
}
module.exports = getMapData;
/***/ },
/* 51 */
/***/ function(module, exports) {
/**
* Checks if `value` is suitable for use as unique object key.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
*/
function isKeyable(value) {
var type = typeof value;
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
? (value !== '__proto__')
: (value === null);
}
module.exports = isKeyable;
/***/ },
/* 52 */
/***/ function(module, exports, __webpack_require__) {
var getMapData = __webpack_require__(50);
/**
* Gets the map value for `key`.
*
* @private
* @name get
* @memberOf MapCache
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function mapCacheGet(key) {
return getMapData(this, key).get(key);
}
module.exports = mapCacheGet;
/***/ },
/* 53 */
/***/ function(module, exports, __webpack_require__) {
var getMapData = __webpack_require__(50);
/**
* Checks if a map value for `key` exists.
*
* @private
* @name has
* @memberOf MapCache
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function mapCacheHas(key) {
return getMapData(this, key).has(key);
}
module.exports = mapCacheHas;
/***/ },
/* 54 */
/***/ function(module, exports, __webpack_require__) {
var getMapData = __webpack_require__(50);
/**
* Sets the map `key` to `value`.
*
* @private
* @name set
* @memberOf MapCache
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the map cache instance.
*/
function mapCacheSet(key, value) {
var data = getMapData(this, key),
size = data.size;
data.set(key, value);
this.size += data.size == size ? 0 : 1;
return this;
}
module.exports = mapCacheSet;
/***/ },
/* 55 */
/***/ function(module, exports, __webpack_require__) {
var baseIsEqualDeep = __webpack_require__(56),
isObject = __webpack_require__(35),
isObjectLike = __webpack_require__(73);
/**
* The base implementation of `_.isEqual` which supports partial comparisons
* and tracks traversed objects.
*
* @private
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @param {boolean} bitmask The bitmask flags.
* 1 - Unordered comparison
* 2 - Partial comparison
* @param {Function} [customizer] The function to customize comparisons.
* @param {Object} [stack] Tracks traversed `value` and `other` objects.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
*/
function baseIsEqual(value, other, bitmask, customizer, stack) {
if (value === other) {
return true;
}
if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
return value !== value && other !== other;
}
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
}
module.exports = baseIsEqual;
/***/ },
/* 56 */
/***/ function(module, exports, __webpack_require__) {
var Stack = __webpack_require__(11),
equalArrays = __webpack_require__(57),
equalByTag = __webpack_require__(63),
equalObjects = __webpack_require__(67),
getTag = __webpack_require__(89),
isArray = __webpack_require__(74),
isBuffer = __webpack_require__(75),
isTypedArray = __webpack_require__(79);
/** Used to compose bitmasks for value comparisons. */
var COMPARE_PARTIAL_FLAG = 1;
/** `Object#toString` result references. */
var argsTag = '[object Arguments]',
arrayTag = '[object Array]',
objectTag = '[object Object]';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* A specialized version of `baseIsEqual` for arrays and objects which performs
* deep comparisons and tracks traversed objects enabling objects with circular
* references to be compared.
*
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
* @param {Function} customizer The function to customize comparisons.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Object} [stack] Tracks traversed `object` and `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
var objIsArr = isArray(object),
othIsArr = isArray(other),
objTag = arrayTag,
othTag = arrayTag;
if (!objIsArr) {
objTag = getTag(object);
objTag = objTag == argsTag ? objectTag : objTag;
}
if (!othIsArr) {
othTag = getTag(other);
othTag = othTag == argsTag ? objectTag : othTag;
}
var objIsObj = objTag == objectTag,
othIsObj = othTag == objectTag,
isSameTag = objTag == othTag;
if (isSameTag && isBuffer(object)) {
if (!isBuffer(other)) {
return false;
}
objIsArr = true;
objIsObj = false;
}
if (isSameTag && !objIsObj) {
stack || (stack = new Stack);
return (objIsArr || isTypedArray(object))
? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
: equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
}
if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
if (objIsWrapped || othIsWrapped) {
var objUnwrapped = objIsWrapped ? object.value() : object,
othUnwrapped = othIsWrapped ? other.value() : other;
stack || (stack = new Stack);
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
}
}
if (!isSameTag) {
return false;
}
stack || (stack = new Stack);
return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
}
module.exports = baseIsEqualDeep;
/***/ },
/* 57 */
/***/ function(module, exports, __webpack_require__) {
var SetCache = __webpack_require__(58),
arraySome = __webpack_require__(61),
cacheHas = __webpack_require__(62);
/** Used to compose bitmasks for value comparisons. */
var COMPARE_PARTIAL_FLAG = 1,
COMPARE_UNORDERED_FLAG = 2;
/**
* A specialized version of `baseIsEqualDeep` for arrays with support for
* partial deep comparisons.
*
* @private
* @param {Array} array The array to compare.
* @param {Array} other The other array to compare.
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
* @param {Function} customizer The function to customize comparisons.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Object} stack Tracks traversed `array` and `other` objects.
* @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
*/
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
arrLength = array.length,
othLength = other.length;
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
return false;
}
// Assume cyclic values are equal.
var stacked = stack.get(array);
if (stacked && stack.get(other)) {
return stacked == other;
}
var index = -1,
result = true,
seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
stack.set(array, other);
stack.set(other, array);
// Ignore non-index properties.
while (++index < arrLength) {
var arrValue = array[index],
othValue = other[index];
if (customizer) {
var compared = isPartial
? customizer(othValue, arrValue, index, other, array, stack)
: customizer(arrValue, othValue, index, array, other, stack);
}
if (compared !== undefined) {
if (compared) {
continue;
}
result = false;
break;
}
// Recursively compare arrays (susceptible to call stack limits).
if (seen) {
if (!arraySome(other, function(othValue, othIndex) {
if (!cacheHas(seen, othIndex) &&
(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
return seen.push(othIndex);
}
})) {
result = false;
break;
}
} else if (!(
arrValue === othValue ||
equalFunc(arrValue, othValue, bitmask, customizer, stack)
)) {
result = false;
break;
}
}
stack['delete'](array);
stack['delete'](other);
return result;
}
module.exports = equalArrays;
/***/ },
/* 58 */
/***/ function(module, exports, __webpack_require__) {
var MapCache = __webpack_require__(40),
setCacheAdd = __webpack_require__(59),
setCacheHas = __webpack_require__(60);
/**
*
* Creates an array cache object to store unique values.
*
* @private
* @constructor
* @param {Array} [values] The values to cache.
*/
function SetCache(values) {
var index = -1,
length = values == null ? 0 : values.length;
this.__data__ = new MapCache;
while (++index < length) {
this.add(values[index]);
}
}
// Add methods to `SetCache`.
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
SetCache.prototype.has = setCacheHas;
module.exports = SetCache;
/***/ },
/* 59 */
/***/ function(module, exports) {
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';
/**
* Adds `value` to the array cache.
*
* @private
* @name add
* @memberOf SetCache
* @alias push
* @param {*} value The value to cache.
* @returns {Object} Returns the cache instance.
*/
function setCacheAdd(value) {
this.__data__.set(value, HASH_UNDEFINED);
return this;
}
module.exports = setCacheAdd;
/***/ },
/* 60 */
/***/ function(module, exports) {
/**
* Checks if `value` is in the array cache.
*
* @private
* @name has
* @memberOf SetCache
* @param {*} value The value to search for.
* @returns {number} Returns `true` if `value` is found, else `false`.
*/
function setCacheHas(value) {
return this.__data__.has(value);
}
module.exports = setCacheHas;
/***/ },
/* 61 */
/***/ function(module, exports) {
/**
* A specialized version of `_.some` for arrays without support for iteratee
* shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {boolean} Returns `true` if any element passes the predicate check,
* else `false`.
*/
function arraySome(array, predicate) {
var index = -1,
length = array == null ? 0 : array.length;
while (++index < length) {
if (predicate(array[index], index, array)) {
return true;
}
}
return false;
}
module.exports = arraySome;
/***/ },
/* 62 */
/***/ function(module, exports) {
/**
* Checks if a `cache` value for `key` exists.
*
* @private
* @param {Object} cache The cache to query.
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function cacheHas(cache, key) {
return cache.has(key);
}
module.exports = cacheHas;
/***/ },
/* 63 */
/***/ function(module, exports, __webpack_require__) {
var Symbol = __webpack_require__(30),
Uint8Array = __webpack_require__(64),
eq = __webpack_require__(16),
equalArrays = __webpack_require__(57),
mapToArray = __webpack_require__(65),
setToArray = __webpack_require__(66);
/** Used to compose bitmasks for value comparisons. */
var COMPARE_PARTIAL_FLAG = 1,
COMPARE_UNORDERED_FLAG = 2;
/** `Object#toString` result references. */
var boolTag = '[object Boolean]',
dateTag = '[object Date]',
errorTag = '[object Error]',
mapTag = '[object Map]',
numberTag = '[object Number]',
regexpTag = '[object RegExp]',
setTag = '[object Set]',
stringTag = '[object String]',
symbolTag = '[object Symbol]';
var arrayBufferTag = '[object ArrayBuffer]',
dataViewTag = '[object DataView]';
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
/**
* A specialized version of `baseIsEqualDeep` for comparing objects of
* the same `toStringTag`.
*
* **Note:** This function only supports comparing values with tags of
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
*
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @param {string} tag The `toStringTag` of the objects to compare.
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
* @param {Function} customizer The function to customize comparisons.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Object} stack Tracks traversed `object` and `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
switch (tag) {
case dataViewTag:
if ((object.byteLength != other.byteLength) ||
(object.byteOffset != other.byteOffset)) {
return false;
}
object = object.buffer;
other = other.buffer;
case arrayBufferTag:
if ((object.byteLength != other.byteLength) ||
!equalFunc(new Uint8Array(object), new Uint8Array(other))) {
return false;
}
return true;
case boolTag:
case dateTag:
case numberTag:
// Coerce booleans to `1` or `0` and dates to milliseconds.
// Invalid dates are coerced to `NaN`.
return eq(+object, +other);
case errorTag:
return object.name == other.name && object.message == other.message;
case regexpTag:
case stringTag:
// Coerce regexes to strings and treat strings, primitives and objects,
// as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
// for more details.
return object == (other + '');
case mapTag:
var convert = mapToArray;
case setTag:
var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
convert || (convert = setToArray);
if (object.size != other.size && !isPartial) {
return false;
}
// Assume cyclic values are equal.
var stacked = stack.get(object);
if (stacked) {
return stacked == other;
}
bitmask |= COMPARE_UNORDERED_FLAG;
// Recursively compare objects (susceptible to call stack limits).
stack.set(object, other);
var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
stack['delete'](object);
return result;
case symbolTag:
if (symbolValueOf) {
return symbolValueOf.call(object) == symbolValueOf.call(other);
}
}
return false;
}
module.exports = equalByTag;
/***/ },
/* 64 */
/***/ function(module, exports, __webpack_require__) {
var root = __webpack_require__(31);
/** Built-in value references. */
var Uint8Array = root.Uint8Array;
module.exports = Uint8Array;
/***/ },
/* 65 */
/***/ function(module, exports) {
/**
* Converts `map` to its key-value pairs.
*
* @private
* @param {Object} map The map to convert.
* @returns {Array} Returns the key-value pairs.
*/
function mapToArray(map) {
var index = -1,
result = Array(map.size);
map.forEach(function(value, key) {
result[++index] = [key, value];
});
return result;
}
module.exports = mapToArray;
/***/ },
/* 66 */
/***/ function(module, exports) {
/**
* Converts `set` to an array of its values.
*
* @private
* @param {Object} set The set to convert.
* @returns {Array} Returns the values.
*/
function setToArray(set) {
var index = -1,
result = Array(set.size);
set.forEach(function(value) {
result[++index] = value;
});
return result;
}
module.exports = setToArray;
/***/ },
/* 67 */
/***/ function(module, exports, __webpack_require__) {
var keys = __webpack_require__(68);
/** Used to compose bitmasks for value comparisons. */
var COMPARE_PARTIAL_FLAG = 1;
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* A specialized version of `baseIsEqualDeep` for objects with support for
* partial deep comparisons.
*
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
* @param {Function} customizer The function to customize comparisons.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Object} stack Tracks traversed `object` and `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
objProps = keys(object),
objLength = objProps.length,
othProps = keys(other),
othLength = othProps.length;
if (objLength != othLength && !isPartial) {
return false;
}
var index = objLength;
while (index--) {
var key = objProps[index];
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
return false;
}
}
// Assume cyclic values are equal.
var stacked = stack.get(object);
if (stacked && stack.get(other)) {
return stacked == other;
}
var result = true;
stack.set(object, other);
stack.set(other, object);
var skipCtor = isPartial;
while (++index < objLength) {
key = objProps[index];
var objValue = object[key],
othValue = other[key];
if (customizer) {
var compared = isPartial
? customizer(othValue, objValue, key, other, object, stack)
: customizer(objValue, othValue, key, object, other, stack);
}
// Recursively compare objects (susceptible to call stack limits).
if (!(compared === undefined
? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
: compared
)) {
result = false;
break;
}
skipCtor || (skipCtor = key == 'constructor');
}
if (result && !skipCtor) {
var objCtor = object.constructor,
othCtor = other.constructor;
// Non `Object` object instances with different constructors are not equal.
if (objCtor != othCtor &&
('constructor' in object && 'constructor' in other) &&
!(typeof objCtor == 'function' && objCtor instanceof objCtor &&
typeof othCtor == 'function' && othCtor instanceof othCtor)) {
result = false;
}
}
stack['delete'](object);
stack['delete'](other);
return result;
}
module.exports = equalObjects;
/***/ },
/* 68 */
/***/ function(module, exports, __webpack_require__) {
var arrayLikeKeys = __webpack_require__(69),
baseKeys = __webpack_require__(84),
isArrayLike = __webpack_require__(88);
/**
* Creates an array of the own enumerable property names of `object`.
*
* **Note:** Non-object values are coerced to objects. See the
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
* for more details.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.keys(new Foo);
* // => ['a', 'b'] (iteration order is not guaranteed)
*
* _.keys('hi');
* // => ['0', '1']
*/
function keys(object) {
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
}
module.exports = keys;
/***/ },
/* 69 */
/***/ function(module, exports, __webpack_require__) {
var baseTimes = __webpack_require__(70),
isArguments = __webpack_require__(71),
isArray = __webpack_require__(74),
isBuffer = __webpack_require__(75),
isIndex = __webpack_require__(78),
isTypedArray = __webpack_require__(79);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Creates an array of the enumerable property names of the array-like `value`.
*
* @private
* @param {*} value The value to query.
* @param {boolean} inherited Specify returning inherited property names.
* @returns {Array} Returns the array of property names.
*/
function arrayLikeKeys(value, inherited) {
var isArr = isArray(value),
isArg = !isArr && isArguments(value),
isBuff = !isArr && !isArg && isBuffer(value),
isType = !isArr && !isArg && !isBuff && isTypedArray(value),
skipIndexes = isArr || isArg || isBuff || isType,
result = skipIndexes ? baseTimes(value.length, String) : [],
length = result.length;
for (var key in value) {
if ((inherited || hasOwnProperty.call(value, key)) &&
!(skipIndexes && (
// Safari 9 has enumerable `arguments.length` in strict mode.
key == 'length' ||
// Node.js 0.10 has enumerable non-index properties on buffers.
(isBuff && (key == 'offset' || key == 'parent')) ||
// PhantomJS 2 has enumerable non-index properties on typed arrays.
(isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
// Skip index properties.
isIndex(key, length)
))) {
result.push(key);
}
}
return result;
}
module.exports = arrayLikeKeys;
/***/ },
/* 70 */
/***/ function(module, exports) {
/**
* The base implementation of `_.times` without support for iteratee shorthands
* or max array length checks.
*
* @private
* @param {number} n The number of times to invoke `iteratee`.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns the array of results.
*/
function baseTimes(n, iteratee) {
var index = -1,
result = Array(n);
while (++index < n) {
result[index] = iteratee(index);
}
return result;
}
module.exports = baseTimes;
/***/ },
/* 71 */
/***/ function(module, exports, __webpack_require__) {
var baseIsArguments = __webpack_require__(72),
isObjectLike = __webpack_require__(73);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/** Built-in value references. */
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
/**
* Checks if `value` is likely an `arguments` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
* else `false`.
* @example
*
* _.isArguments(function() { return arguments; }());
* // => true
*
* _.isArguments([1, 2, 3]);
* // => false
*/
var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
!propertyIsEnumerable.call(value, 'callee');
};
module.exports = isArguments;
/***/ },
/* 72 */
/***/ function(module, exports, __webpack_require__) {
var baseGetTag = __webpack_require__(29),
isObjectLike = __webpack_require__(73);
/** `Object#toString` result references. */
var argsTag = '[object Arguments]';
/**
* The base implementation of `_.isArguments`.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
*/
function baseIsArguments(value) {
return isObjectLike(value) && baseGetTag(value) == argsTag;
}
module.exports = baseIsArguments;
/***/ },
/* 73 */
/***/ function(module, exports) {
/**
* Checks if `value` is object-like. A value is object-like if it's not `null`
* and has a `typeof` result of "object".
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
* @example
*
* _.isObjectLike({});
* // => true
*
* _.isObjectLike([1, 2, 3]);
* // => true
*
* _.isObjectLike(_.noop);
* // => false
*
* _.isObjectLike(null);
* // => false
*/
function isObjectLike(value) {
return value != null && typeof value == 'object';
}
module.exports = isObjectLike;
/***/ },
/* 74 */
/***/ function(module, exports) {
/**
* Checks if `value` is classified as an `Array` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
* @example
*
* _.isArray([1, 2, 3]);
* // => true
*
* _.isArray(document.body.children);
* // => false
*
* _.isArray('abc');
* // => false
*
* _.isArray(_.noop);
* // => false
*/
var isArray = Array.isArray;
module.exports = isArray;
/***/ },
/* 75 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(31),
stubFalse = __webpack_require__(77);
/** Detect free variable `exports`. */
var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
/** Detect free variable `module`. */
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports = freeModule && freeModule.exports === freeExports;
/** Built-in value references. */
var Buffer = moduleExports ? root.Buffer : undefined;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
/**
* Checks if `value` is a buffer.
*
* @static
* @memberOf _
* @since 4.3.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
* @example
*
* _.isBuffer(new Buffer(2));
* // => true
*
* _.isBuffer(new Uint8Array(2));
* // => false
*/
var isBuffer = nativeIsBuffer || stubFalse;
module.exports = isBuffer;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(76)(module)))
/***/ },
/* 76 */
/***/ function(module, exports) {
module.exports = function(module) {
if(!module.webpackPolyfill) {
module.deprecate = function() {};
module.paths = [];
// module.parent = undefined by default
module.children = [];
module.webpackPolyfill = 1;
}
return module;
}
/***/ },
/* 77 */
/***/ function(module, exports) {
/**
* This method returns `false`.
*
* @static
* @memberOf _
* @since 4.13.0
* @category Util
* @returns {boolean} Returns `false`.
* @example
*
* _.times(2, _.stubFalse);
* // => [false, false]
*/
function stubFalse() {
return false;
}
module.exports = stubFalse;
/***/ },
/* 78 */
/***/ function(module, exports) {
/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;
/** Used to detect unsigned integer values. */
var reIsUint = /^(?:0|[1-9]\d*)$/;
/**
* Checks if `value` is a valid array-like index.
*
* @private
* @param {*} value The value to check.
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
*/
function isIndex(value, length) {
length = length == null ? MAX_SAFE_INTEGER : length;
return !!length &&
(typeof value == 'number' || reIsUint.test(value)) &&
(value > -1 && value % 1 == 0 && value < length);
}
module.exports = isIndex;
/***/ },
/* 79 */
/***/ function(module, exports, __webpack_require__) {
var baseIsTypedArray = __webpack_require__(80),
baseUnary = __webpack_require__(82),
nodeUtil = __webpack_require__(83);
/* Node.js helper references. */
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
/**
* Checks if `value` is classified as a typed array.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
* @example
*
* _.isTypedArray(new Uint8Array);
* // => true
*
* _.isTypedArray([]);
* // => false
*/
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
module.exports = isTypedArray;
/***/ },
/* 80 */
/***/ function(module, exports, __webpack_require__) {
var baseGetTag = __webpack_require__(29),
isLength = __webpack_require__(81),
isObjectLike = __webpack_require__(73);
/** `Object#toString` result references. */
var argsTag = '[object Arguments]',
arrayTag = '[object Array]',
boolTag = '[object Boolean]',
dateTag = '[object Date]',
errorTag = '[object Error]',
funcTag = '[object Function]',
mapTag = '[object Map]',
numberTag = '[object Number]',
objectTag = '[object Object]',
regexpTag = '[object RegExp]',
setTag = '[object Set]',
stringTag = '[object String]',
weakMapTag = '[object WeakMap]';
var arrayBufferTag = '[object ArrayBuffer]',
dataViewTag = '[object DataView]',
float32Tag = '[object Float32Array]',
float64Tag = '[object Float64Array]',
int8Tag = '[object Int8Array]',
int16Tag = '[object Int16Array]',
int32Tag = '[object Int32Array]',
uint8Tag = '[object Uint8Array]',
uint8ClampedTag = '[object Uint8ClampedArray]',
uint16Tag = '[object Uint16Array]',
uint32Tag = '[object Uint32Array]';
/** Used to identify `toStringTag` values of typed arrays. */
var typedArrayTags = {};
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
typedArrayTags[uint32Tag] = true;
typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
typedArrayTags[errorTag] = typedArrayTags[funcTag] =
typedArrayTags[mapTag] = typedArrayTags[numberTag] =
typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
typedArrayTags[setTag] = typedArrayTags[stringTag] =
typedArrayTags[weakMapTag] = false;
/**
* The base implementation of `_.isTypedArray` without Node.js optimizations.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
*/
function baseIsTypedArray(value) {
return isObjectLike(value) &&
isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
}
module.exports = baseIsTypedArray;
/***/ },
/* 81 */
/***/ function(module, exports) {
/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;
/**
* Checks if `value` is a valid array-like length.
*
* **Note:** This method is loosely based on
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
* @example
*
* _.isLength(3);
* // => true
*
* _.isLength(Number.MIN_VALUE);
* // => false
*
* _.isLength(Infinity);
* // => false
*
* _.isLength('3');
* // => false
*/
function isLength(value) {
return typeof value == 'number' &&
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}
module.exports = isLength;
/***/ },
/* 82 */
/***/ function(module, exports) {
/**
* The base implementation of `_.unary` without support for storing metadata.
*
* @private
* @param {Function} func The function to cap arguments for.
* @returns {Function} Returns the new capped function.
*/
function baseUnary(func) {
return function(value) {
return func(value);
};
}
module.exports = baseUnary;
/***/ },
/* 83 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(32);
/** Detect free variable `exports`. */
var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
/** Detect free variable `module`. */
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports = freeModule && freeModule.exports === freeExports;
/** Detect free variable `process` from Node.js. */
var freeProcess = moduleExports && freeGlobal.process;
/** Used to access faster Node.js helpers. */
var nodeUtil = (function() {
try {
return freeProcess && freeProcess.binding && freeProcess.binding('util');
} catch (e) {}
}());
module.exports = nodeUtil;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(76)(module)))
/***/ },
/* 84 */
/***/ function(module, exports, __webpack_require__) {
var isPrototype = __webpack_require__(85),
nativeKeys = __webpack_require__(86);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
*/
function baseKeys(object) {
if (!isPrototype(object)) {
return nativeKeys(object);
}
var result = [];
for (var key in Object(object)) {
if (hasOwnProperty.call(object, key) && key != 'constructor') {
result.push(key);
}
}
return result;
}
module.exports = baseKeys;
/***/ },
/* 85 */
/***/ function(module, exports) {
/** Used for built-in method references. */
var objectProto = Object.prototype;
/**
* Checks if `value` is likely a prototype object.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
*/
function isPrototype(value) {
var Ctor = value && value.constructor,
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
return value === proto;
}
module.exports = isPrototype;
/***/ },
/* 86 */
/***/ function(module, exports, __webpack_require__) {
var overArg = __webpack_require__(87);
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeKeys = overArg(Object.keys, Object);
module.exports = nativeKeys;
/***/ },
/* 87 */
/***/ function(module, exports) {
/**
* Creates a unary function that invokes `func` with its argument transformed.
*
* @private
* @param {Function} func The function to wrap.
* @param {Function} transform The argument transform.
* @returns {Function} Returns the new function.
*/
function overArg(func, transform) {
return function(arg) {
return func(transform(arg));
};
}
module.exports = overArg;
/***/ },
/* 88 */
/***/ function(module, exports, __webpack_require__) {
var isFunction = __webpack_require__(28),
isLength = __webpack_require__(81);
/**
* Checks if `value` is array-like. A value is considered array-like if it's
* not a function and has a `value.length` that's an integer greater than or
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
* @example
*
* _.isArrayLike([1, 2, 3]);
* // => true
*
* _.isArrayLike(document.body.children);
* // => true
*
* _.isArrayLike('abc');
* // => true
*
* _.isArrayLike(_.noop);
* // => false
*/
function isArrayLike(value) {
return value != null && isLength(value.length) && !isFunction(value);
}
module.exports = isArrayLike;
/***/ },
/* 89 */
/***/ function(module, exports, __webpack_require__) {
var DataView = __webpack_require__(90),
Map = __webpack_require__(25),
Promise = __webpack_require__(91),
Set = __webpack_require__(92),
WeakMap = __webpack_require__(93),
baseGetTag = __webpack_require__(29),
toSource = __webpack_require__(38);
/** `Object#toString` result references. */
var mapTag = '[object Map]',
objectTag = '[object Object]',
promiseTag = '[object Promise]',
setTag = '[object Set]',
weakMapTag = '[object WeakMap]';
var dataViewTag = '[object DataView]';
/** Used to detect maps, sets, and weakmaps. */
var dataViewCtorString = toSource(DataView),
mapCtorString = toSource(Map),
promiseCtorString = toSource(Promise),
setCtorString = toSource(Set),
weakMapCtorString = toSource(WeakMap);
/**
* Gets the `toStringTag` of `value`.
*
* @private
* @param {*} value The value to query.
* @returns {string} Returns the `toStringTag`.
*/
var getTag = baseGetTag;
// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
(Map && getTag(new Map) != mapTag) ||
(Promise && getTag(Promise.resolve()) != promiseTag) ||
(Set && getTag(new Set) != setTag) ||
(WeakMap && getTag(new WeakMap) != weakMapTag)) {
getTag = function(value) {
var result = baseGetTag(value),
Ctor = result == objectTag ? value.constructor : undefined,
ctorString = Ctor ? toSource(Ctor) : '';
if (ctorString) {
switch (ctorString) {
case dataViewCtorString: return dataViewTag;
case mapCtorString: return mapTag;
case promiseCtorString: return promiseTag;
case setCtorString: return setTag;
case weakMapCtorString: return weakMapTag;
}
}
return result;
};
}
module.exports = getTag;
/***/ },
/* 90 */
/***/ function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(26),
root = __webpack_require__(31);
/* Built-in method references that are verified to be native. */
var DataView = getNative(root, 'DataView');
module.exports = DataView;
/***/ },
/* 91 */
/***/ function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(26),
root = __webpack_require__(31);
/* Built-in method references that are verified to be native. */
var Promise = getNative(root, 'Promise');
module.exports = Promise;
/***/ },
/* 92 */
/***/ function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(26),
root = __webpack_require__(31);
/* Built-in method references that are verified to be native. */
var Set = getNative(root, 'Set');
module.exports = Set;
/***/ },
/* 93 */
/***/ function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(26),
root = __webpack_require__(31);
/* Built-in method references that are verified to be native. */
var WeakMap = getNative(root, 'WeakMap');
module.exports = WeakMap;
/***/ },
/* 94 */
/***/ function(module, exports, __webpack_require__) {
var isStrictComparable = __webpack_require__(95),
keys = __webpack_require__(68);
/**
* Gets the property names, values, and compare flags of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the match data of `object`.
*/
function getMatchData(object) {
var result = keys(object),
length = result.length;
while (length--) {
var key = result[length],
value = object[key];
result[length] = [key, value, isStrictComparable(value)];
}
return result;
}
module.exports = getMatchData;
/***/ },
/* 95 */
/***/ function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(35);
/**
* Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` if suitable for strict
* equality comparisons, else `false`.
*/
function isStrictComparable(value) {
return value === value && !isObject(value);
}
module.exports = isStrictComparable;
/***/ },
/* 96 */
/***/ function(module, exports) {
/**
* A specialized version of `matchesProperty` for source values suitable
* for strict equality comparisons, i.e. `===`.
*
* @private
* @param {string} key The key of the property to get.
* @param {*} srcValue The value to match.
* @returns {Function} Returns the new spec function.
*/
function matchesStrictComparable(key, srcValue) {
return function(object) {
if (object == null) {
return false;
}
return object[key] === srcValue &&
(srcValue !== undefined || (key in Object(object)));
};
}
module.exports = matchesStrictComparable;
/***/ },
/* 97 */
/***/ function(module, exports, __webpack_require__) {
var baseIsEqual = __webpack_require__(55),
get = __webpack_require__(98),
hasIn = __webpack_require__(109),
isKey = __webpack_require__(101),
isStrictComparable = __webpack_require__(95),
matchesStrictComparable = __webpack_require__(96),
toKey = __webpack_require__(108);
/** Used to compose bitmasks for value comparisons. */
var COMPARE_PARTIAL_FLAG = 1,
COMPARE_UNORDERED_FLAG = 2;
/**
* The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
*
* @private
* @param {string} path The path of the property to get.
* @param {*} srcValue The value to match.
* @returns {Function} Returns the new spec function.
*/
function baseMatchesProperty(path, srcValue) {
if (isKey(path) && isStrictComparable(srcValue)) {
return matchesStrictComparable(toKey(path), srcValue);
}
return function(object) {
var objValue = get(object, path);
return (objValue === undefined && objValue === srcValue)
? hasIn(object, path)
: baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
};
}
module.exports = baseMatchesProperty;
/***/ },
/* 98 */
/***/ function(module, exports, __webpack_require__) {
var baseGet = __webpack_require__(99);
/**
* Gets the value at `path` of `object`. If the resolved value is
* `undefined`, the `defaultValue` is returned in its place.
*
* @static
* @memberOf _
* @since 3.7.0
* @category Object
* @param {Object} object The object to query.
* @param {Array|string} path The path of the property to get.
* @param {*} [defaultValue] The value returned for `undefined` resolved values.
* @returns {*} Returns the resolved value.
* @example
*
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
*
* _.get(object, 'a[0].b.c');
* // => 3
*
* _.get(object, ['a', '0', 'b', 'c']);
* // => 3
*
* _.get(object, 'a.b.c', 'default');
* // => 'default'
*/
function get(object, path, defaultValue) {
var result = object == null ? undefined : baseGet(object, path);
return result === undefined ? defaultValue : result;
}
module.exports = get;
/***/ },
/* 99 */
/***/ function(module, exports, __webpack_require__) {
var castPath = __webpack_require__(100),
toKey = __webpack_require__(108);
/**
* The base implementation of `_.get` without support for default values.
*
* @private
* @param {Object} object The object to query.
* @param {Array|string} path The path of the property to get.
* @returns {*} Returns the resolved value.
*/
function baseGet(object, path) {
path = castPath(path, object);
var index = 0,
length = path.length;
while (object != null && index < length) {
object = object[toKey(path[index++])];
}
return (index && index == length) ? object : undefined;
}
module.exports = baseGet;
/***/ },
/* 100 */
/***/ function(module, exports, __webpack_require__) {
var isArray = __webpack_require__(74),
isKey = __webpack_require__(101),
stringToPath = __webpack_require__(103),
toString = __webpack_require__(106);
/**
* Casts `value` to a path array if it's not one.
*
* @private
* @param {*} value The value to inspect.
* @param {Object} [object] The object to query keys on.
* @returns {Array} Returns the cast property path array.
*/
function castPath(value, object) {
if (isArray(value)) {
return value;
}
return isKey(value, object) ? [value] : stringToPath(toString(value));
}
module.exports = castPath;
/***/ },
/* 101 */
/***/ function(module, exports, __webpack_require__) {
var isArray = __webpack_require__(74),
isSymbol = __webpack_require__(102);
/** Used to match property names within property paths. */
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
reIsPlainProp = /^\w*$/;
/**
* Checks if `value` is a property name and not a property path.
*
* @private
* @param {*} value The value to check.
* @param {Object} [object] The object to query keys on.
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
*/
function isKey(value, object) {
if (isArray(value)) {
return false;
}
var type = typeof value;
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
value == null || isSymbol(value)) {
return true;
}
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
(object != null && value in Object(object));
}
module.exports = isKey;
/***/ },
/* 102 */
/***/ function(module, exports, __webpack_require__) {
var baseGetTag = __webpack_require__(29),
isObjectLike = __webpack_require__(73);
/** `Object#toString` result references. */
var symbolTag = '[object Symbol]';
/**
* Checks if `value` is classified as a `Symbol` primitive or object.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
* @example
*
* _.isSymbol(Symbol.iterator);
* // => true
*
* _.isSymbol('abc');
* // => false
*/
function isSymbol(value) {
return typeof value == 'symbol' ||
(isObjectLike(value) && baseGetTag(value) == symbolTag);
}
module.exports = isSymbol;
/***/ },
/* 103 */
/***/ function(module, exports, __webpack_require__) {
var memoizeCapped = __webpack_require__(104);
/** Used to match property names within property paths. */
var reLeadingDot = /^\./,
rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
/** Used to match backslashes in property paths. */
var reEscapeChar = /\\(\\)?/g;
/**
* Converts `string` to a property path array.
*
* @private
* @param {string} string The string to convert.
* @returns {Array} Returns the property path array.
*/
var stringToPath = memoizeCapped(function(string) {
var result = [];
if (reLeadingDot.test(string)) {
result.push('');
}
string.replace(rePropName, function(match, number, quote, string) {
result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
});
return result;
});
module.exports = stringToPath;
/***/ },
/* 104 */
/***/ function(module, exports, __webpack_require__) {
var memoize = __webpack_require__(105);
/** Used as the maximum memoize cache size. */
var MAX_MEMOIZE_SIZE = 500;
/**
* A specialized version of `_.memoize` which clears the memoized function's
* cache when it exceeds `MAX_MEMOIZE_SIZE`.
*
* @private
* @param {Function} func The function to have its output memoized.
* @returns {Function} Returns the new memoized function.
*/
function memoizeCapped(func) {
var result = memoize(func, function(key) {
if (cache.size === MAX_MEMOIZE_SIZE) {
cache.clear();
}
return key;
});
var cache = result.cache;
return result;
}
module.exports = memoizeCapped;
/***/ },
/* 105 */
/***/ function(module, exports, __webpack_require__) {
var MapCache = __webpack_require__(40);
/** Error message constants. */
var FUNC_ERROR_TEXT = 'Expected a function';
/**
* Creates a function that memoizes the result of `func`. If `resolver` is
* provided, it determines the cache key for storing the result based on the
* arguments provided to the memoized function. By default, the first argument
* provided to the memoized function is used as the map cache key. The `func`
* is invoked with the `this` binding of the memoized function.
*
* **Note:** The cache is exposed as the `cache` property on the memoized
* function. Its creation may be customized by replacing the `_.memoize.Cache`
* constructor with one whose instances implement the
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
* method interface of `clear`, `delete`, `get`, `has`, and `set`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Function
* @param {Function} func The function to have its output memoized.
* @param {Function} [resolver] The function to resolve the cache key.
* @returns {Function} Returns the new memoized function.
* @example
*
* var object = { 'a': 1, 'b': 2 };
* var other = { 'c': 3, 'd': 4 };
*
* var values = _.memoize(_.values);
* values(object);
* // => [1, 2]
*
* values(other);
* // => [3, 4]
*
* object.a = 2;
* values(object);
* // => [1, 2]
*
* // Modify the result cache.
* values.cache.set(object, ['a', 'b']);
* values(object);
* // => ['a', 'b']
*
* // Replace `_.memoize.Cache`.
* _.memoize.Cache = WeakMap;
*/
function memoize(func, resolver) {
if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
throw new TypeError(FUNC_ERROR_TEXT);
}
var memoized = function() {
var args = arguments,
key = resolver ? resolver.apply(this, args) : args[0],
cache = memoized.cache;
if (cache.has(key)) {
return cache.get(key);
}
var result = func.apply(this, args);
memoized.cache = cache.set(key, result) || cache;
return result;
};
memoized.cache = new (memoize.Cache || MapCache);
return memoized;
}
// Expose `MapCache`.
memoize.Cache = MapCache;
module.exports = memoize;
/***/ },
/* 106 */
/***/ function(module, exports, __webpack_require__) {
var baseToString = __webpack_require__(107);
/**
* Converts `value` to a string. An empty string is returned for `null`
* and `undefined` values. The sign of `-0` is preserved.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {string} Returns the converted string.
* @example
*
* _.toString(null);
* // => ''
*
* _.toString(-0);
* // => '-0'
*
* _.toString([1, 2, 3]);
* // => '1,2,3'
*/
function toString(value) {
return value == null ? '' : baseToString(value);
}
module.exports = toString;
/***/ },
/* 107 */
/***/ function(module, exports, __webpack_require__) {
var Symbol = __webpack_require__(30),
arrayMap = __webpack_require__(7),
isArray = __webpack_require__(74),
isSymbol = __webpack_require__(102);
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0;
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
symbolToString = symbolProto ? symbolProto.toString : undefined;
/**
* The base implementation of `_.toString` which doesn't convert nullish
* values to empty strings.
*
* @private
* @param {*} value The value to process.
* @returns {string} Returns the string.
*/
function baseToString(value) {
// Exit early for strings to avoid a performance hit in some environments.
if (typeof value == 'string') {
return value;
}
if (isArray(value)) {
// Recursively convert values (susceptible to call stack limits).
return arrayMap(value, baseToString) + '';
}
if (isSymbol(value)) {
return symbolToString ? symbolToString.call(value) : '';
}
var result = (value + '');
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
}
module.exports = baseToString;
/***/ },
/* 108 */
/***/ function(module, exports, __webpack_require__) {
var isSymbol = __webpack_require__(102);
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0;
/**
* Converts `value` to a string key if it's not a string or symbol.
*
* @private
* @param {*} value The value to inspect.
* @returns {string|symbol} Returns the key.
*/
function toKey(value) {
if (typeof value == 'string' || isSymbol(value)) {
return value;
}
var result = (value + '');
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
}
module.exports = toKey;
/***/ },
/* 109 */
/***/ function(module, exports, __webpack_require__) {
var baseHasIn = __webpack_require__(110),
hasPath = __webpack_require__(111);
/**
* Checks if `path` is a direct or inherited property of `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Object
* @param {Object} object The object to query.
* @param {Array|string} path The path to check.
* @returns {boolean} Returns `true` if `path` exists, else `false`.
* @example
*
* var object = _.create({ 'a': _.create({ 'b': 2 }) });
*
* _.hasIn(object, 'a');
* // => true
*
* _.hasIn(object, 'a.b');
* // => true
*
* _.hasIn(object, ['a', 'b']);
* // => true
*
* _.hasIn(object, 'b');
* // => false
*/
function hasIn(object, path) {
return object != null && hasPath(object, path, baseHasIn);
}
module.exports = hasIn;
/***/ },
/* 110 */
/***/ function(module, exports) {
/**
* The base implementation of `_.hasIn` without support for deep paths.
*
* @private
* @param {Object} [object] The object to query.
* @param {Array|string} key The key to check.
* @returns {boolean} Returns `true` if `key` exists, else `false`.
*/
function baseHasIn(object, key) {
return object != null && key in Object(object);
}
module.exports = baseHasIn;
/***/ },
/* 111 */
/***/ function(module, exports, __webpack_require__) {
var castPath = __webpack_require__(100),
isArguments = __webpack_require__(71),
isArray = __webpack_require__(74),
isIndex = __webpack_require__(78),
isLength = __webpack_require__(81),
toKey = __webpack_require__(108);
/**
* Checks if `path` exists on `object`.
*
* @private
* @param {Object} object The object to query.
* @param {Array|string} path The path to check.
* @param {Function} hasFunc The function to check properties.
* @returns {boolean} Returns `true` if `path` exists, else `false`.
*/
function hasPath(object, path, hasFunc) {
path = castPath(path, object);
var index = -1,
length = path.length,
result = false;
while (++index < length) {
var key = toKey(path[index]);
if (!(result = object != null && hasFunc(object, key))) {
break;
}
object = object[key];
}
if (result || ++index != length) {
return result;
}
length = object == null ? 0 : object.length;
return !!length && isLength(length) && isIndex(key, length) &&
(isArray(object) || isArguments(object));
}
module.exports = hasPath;
/***/ },
/* 112 */
/***/ function(module, exports) {
/**
* This method returns the first argument it receives.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Util
* @param {*} value Any value.
* @returns {*} Returns `value`.
* @example
*
* var object = { 'a': 1 };
*
* console.log(_.identity(object) === object);
* // => true
*/
function identity(value) {
return value;
}
module.exports = identity;
/***/ },
/* 113 */
/***/ function(module, exports, __webpack_require__) {
var baseProperty = __webpack_require__(114),
basePropertyDeep = __webpack_require__(115),
isKey = __webpack_require__(101),
toKey = __webpack_require__(108);
/**
* Creates a function that returns the value at `path` of a given object.
*
* @static
* @memberOf _
* @since 2.4.0
* @category Util
* @param {Array|string} path The path of the property to get.
* @returns {Function} Returns the new accessor function.
* @example
*
* var objects = [
* { 'a': { 'b': 2 } },
* { 'a': { 'b': 1 } }
* ];
*
* _.map(objects, _.property('a.b'));
* // => [2, 1]
*
* _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
* // => [1, 2]
*/
function property(path) {
return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
}
module.exports = property;
/***/ },
/* 114 */
/***/ function(module, exports) {
/**
* The base implementation of `_.property` without support for deep paths.
*
* @private
* @param {string} key The key of the property to get.
* @returns {Function} Returns the new accessor function.
*/
function baseProperty(key) {
return function(object) {
return object == null ? undefined : object[key];
};
}
module.exports = baseProperty;
/***/ },
/* 115 */
/***/ function(module, exports, __webpack_require__) {
var baseGet = __webpack_require__(99);
/**
* A specialized version of `baseProperty` which supports deep paths.
*
* @private
* @param {Array|string} path The path of the property to get.
* @returns {Function} Returns the new accessor function.
*/
function basePropertyDeep(path) {
return function(object) {
return baseGet(object, path);
};
}
module.exports = basePropertyDeep;
/***/ },
/* 116 */
/***/ function(module, exports, __webpack_require__) {
var baseEach = __webpack_require__(117),
isArrayLike = __webpack_require__(88);
/**
* The base implementation of `_.map` without support for iteratee shorthands.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns the new mapped array.
*/
function baseMap(collection, iteratee) {
var index = -1,
result = isArrayLike(collection) ? Array(collection.length) : [];
baseEach(collection, function(value, key, collection) {
result[++index] = iteratee(value, key, collection);
});
return result;
}
module.exports = baseMap;
/***/ },
/* 117 */
/***/ function(module, exports, __webpack_require__) {
var baseForOwn = __webpack_require__(118),
createBaseEach = __webpack_require__(121);
/**
* The base implementation of `_.forEach` without support for iteratee shorthands.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array|Object} Returns `collection`.
*/
var baseEach = createBaseEach(baseForOwn);
module.exports = baseEach;
/***/ },
/* 118 */
/***/ function(module, exports, __webpack_require__) {
var baseFor = __webpack_require__(119),
keys = __webpack_require__(68);
/**
* The base implementation of `_.forOwn` without support for iteratee shorthands.
*
* @private
* @param {Object} object The object to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Object} Returns `object`.
*/
function baseForOwn(object, iteratee) {
return object && baseFor(object, iteratee, keys);
}
module.exports = baseForOwn;
/***/ },
/* 119 */
/***/ function(module, exports, __webpack_require__) {
var createBaseFor = __webpack_require__(120);
/**
* The base implementation of `baseForOwn` which iterates over `object`
* properties returned by `keysFunc` and invokes `iteratee` for each property.
* Iteratee functions may exit iteration early by explicitly returning `false`.
*
* @private
* @param {Object} object The object to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @param {Function} keysFunc The function to get the keys of `object`.
* @returns {Object} Returns `object`.
*/
var baseFor = createBaseFor();
module.exports = baseFor;
/***/ },
/* 120 */
/***/ function(module, exports) {
/**
* Creates a base function for methods like `_.forIn` and `_.forOwn`.
*
* @private
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {Function} Returns the new base function.
*/
function createBaseFor(fromRight) {
return function(object, iteratee, keysFunc) {
var index = -1,
iterable = Object(object),
props = keysFunc(object),
length = props.length;
while (length--) {
var key = props[fromRight ? length : ++index];
if (iteratee(iterable[key], key, iterable) === false) {
break;
}
}
return object;
};
}
module.exports = createBaseFor;
/***/ },
/* 121 */
/***/ function(module, exports, __webpack_require__) {
var isArrayLike = __webpack_require__(88);
/**
* Creates a `baseEach` or `baseEachRight` function.
*
* @private
* @param {Function} eachFunc The function to iterate over a collection.
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {Function} Returns the new base function.
*/
function createBaseEach(eachFunc, fromRight) {
return function(collection, iteratee) {
if (collection == null) {
return collection;
}
if (!isArrayLike(collection)) {
return eachFunc(collection, iteratee);
}
var length = collection.length,
index = fromRight ? length : -1,
iterable = Object(collection);
while ((fromRight ? index-- : ++index < length)) {
if (iteratee(iterable[index], index, iterable) === false) {
break;
}
}
return collection;
};
}
module.exports = createBaseEach;
/***/ },
/* 122 */
/***/ function(module, exports, __webpack_require__) {
var arrayFilter = __webpack_require__(123),
baseFilter = __webpack_require__(124),
baseIteratee = __webpack_require__(8),
isArray = __webpack_require__(74);
/**
* Iterates over elements of `collection`, returning an array of all elements
* `predicate` returns truthy for. The predicate is invoked with three
* arguments: (value, index|key, collection).
*
* **Note:** Unlike `_.remove`, this method returns a new array.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @returns {Array} Returns the new filtered array.
* @see _.reject
* @example
*
* var users = [
* { 'user': 'barney', 'age': 36, 'active': true },
* { 'user': 'fred', 'age': 40, 'active': false }
* ];
*
* _.filter(users, function(o) { return !o.active; });
* // => objects for ['fred']
*
* // The `_.matches` iteratee shorthand.
* _.filter(users, { 'age': 36, 'active': true });
* // => objects for ['barney']
*
* // The `_.matchesProperty` iteratee shorthand.
* _.filter(users, ['active', false]);
* // => objects for ['fred']
*
* // The `_.property` iteratee shorthand.
* _.filter(users, 'active');
* // => objects for ['barney']
*/
function filter(collection, predicate) {
var func = isArray(collection) ? arrayFilter : baseFilter;
return func(collection, baseIteratee(predicate, 3));
}
module.exports = filter;
/***/ },
/* 123 */
/***/ function(module, exports) {
/**
* A specialized version of `_.filter` for arrays without support for
* iteratee shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {Array} Returns the new filtered array.
*/
function arrayFilter(array, predicate) {
var index = -1,
length = array == null ? 0 : array.length,
resIndex = 0,
result = [];
while (++index < length) {
var value = array[index];
if (predicate(value, index, array)) {
result[resIndex++] = value;
}
}
return result;
}
module.exports = arrayFilter;
/***/ },
/* 124 */
/***/ function(module, exports, __webpack_require__) {
var baseEach = __webpack_require__(117);
/**
* The base implementation of `_.filter` without support for iteratee shorthands.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {Array} Returns the new filtered array.
*/
function baseFilter(collection, predicate) {
var result = [];
baseEach(collection, function(value, index, collection) {
if (predicate(value, index, collection)) {
result.push(value);
}
});
return result;
}
module.exports = baseFilter;
/***/ },
/* 125 */
/***/ function(module, exports, __webpack_require__) {
var createFind = __webpack_require__(126),
findIndex = __webpack_require__(127);
/**
* Iterates over elements of `collection`, returning the first element
* `predicate` returns truthy for. The predicate is invoked with three
* arguments: (value, index|key, collection).
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to inspect.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @param {number} [fromIndex=0] The index to search from.
* @returns {*} Returns the matched element, else `undefined`.
* @example
*
* var users = [
* { 'user': 'barney', 'age': 36, 'active': true },
* { 'user': 'fred', 'age': 40, 'active': false },
* { 'user': 'pebbles', 'age': 1, 'active': true }
* ];
*
* _.find(users, function(o) { return o.age < 40; });
* // => object for 'barney'
*
* // The `_.matches` iteratee shorthand.
* _.find(users, { 'age': 1, 'active': true });
* // => object for 'pebbles'
*
* // The `_.matchesProperty` iteratee shorthand.
* _.find(users, ['active', false]);
* // => object for 'fred'
*
* // The `_.property` iteratee shorthand.
* _.find(users, 'active');
* // => object for 'barney'
*/
var find = createFind(findIndex);
module.exports = find;
/***/ },
/* 126 */
/***/ function(module, exports, __webpack_require__) {
var baseIteratee = __webpack_require__(8),
isArrayLike = __webpack_require__(88),
keys = __webpack_require__(68);
/**
* Creates a `_.find` or `_.findLast` function.
*
* @private
* @param {Function} findIndexFunc The function to find the collection index.
* @returns {Function} Returns the new find function.
*/
function createFind(findIndexFunc) {
return function(collection, predicate, fromIndex) {
var iterable = Object(collection);
if (!isArrayLike(collection)) {
var iteratee = baseIteratee(predicate, 3);
collection = keys(collection);
predicate = function(key) { return iteratee(iterable[key], key, iterable); };
}
var index = findIndexFunc(collection, predicate, fromIndex);
return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
};
}
module.exports = createFind;
/***/ },
/* 127 */
/***/ function(module, exports, __webpack_require__) {
var baseFindIndex = __webpack_require__(128),
baseIteratee = __webpack_require__(8),
toInteger = __webpack_require__(129);
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max;
/**
* This method is like `_.find` except that it returns the index of the first
* element `predicate` returns truthy for instead of the element itself.
*
* @static
* @memberOf _
* @since 1.1.0
* @category Array
* @param {Array} array The array to inspect.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @param {number} [fromIndex=0] The index to search from.
* @returns {number} Returns the index of the found element, else `-1`.
* @example
*
* var users = [
* { 'user': 'barney', 'active': false },
* { 'user': 'fred', 'active': false },
* { 'user': 'pebbles', 'active': true }
* ];
*
* _.findIndex(users, function(o) { return o.user == 'barney'; });
* // => 0
*
* // The `_.matches` iteratee shorthand.
* _.findIndex(users, { 'user': 'fred', 'active': false });
* // => 1
*
* // The `_.matchesProperty` iteratee shorthand.
* _.findIndex(users, ['active', false]);
* // => 0
*
* // The `_.property` iteratee shorthand.
* _.findIndex(users, 'active');
* // => 2
*/
function findIndex(array, predicate, fromIndex) {
var length = array == null ? 0 : array.length;
if (!length) {
return -1;
}
var index = fromIndex == null ? 0 : toInteger(fromIndex);
if (index < 0) {
index = nativeMax(length + index, 0);
}
return baseFindIndex(array, baseIteratee(predicate, 3), index);
}
module.exports = findIndex;
/***/ },
/* 128 */
/***/ function(module, exports) {
/**
* The base implementation of `_.findIndex` and `_.findLastIndex` without
* support for iteratee shorthands.
*
* @private
* @param {Array} array The array to inspect.
* @param {Function} predicate The function invoked per iteration.
* @param {number} fromIndex The index to search from.
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function baseFindIndex(array, predicate, fromIndex, fromRight) {
var length = array.length,
index = fromIndex + (fromRight ? 1 : -1);
while ((fromRight ? index-- : ++index < length)) {
if (predicate(array[index], index, array)) {
return index;
}
}
return -1;
}
module.exports = baseFindIndex;
/***/ },
/* 129 */
/***/ function(module, exports, __webpack_require__) {
var toFinite = __webpack_require__(130);
/**
* Converts `value` to an integer.
*
* **Note:** This method is loosely based on
* [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {number} Returns the converted integer.
* @example
*
* _.toInteger(3.2);
* // => 3
*
* _.toInteger(Number.MIN_VALUE);
* // => 0
*
* _.toInteger(Infinity);
* // => 1.7976931348623157e+308
*
* _.toInteger('3.2');
* // => 3
*/
function toInteger(value) {
var result = toFinite(value),
remainder = result % 1;
return result === result ? (remainder ? result - remainder : result) : 0;
}
module.exports = toInteger;
/***/ },
/* 130 */
/***/ function(module, exports, __webpack_require__) {
var toNumber = __webpack_require__(131);
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0,
MAX_INTEGER = 1.7976931348623157e+308;
/**
* Converts `value` to a finite number.
*
* @static
* @memberOf _
* @since 4.12.0
* @category Lang
* @param {*} value The value to convert.
* @returns {number} Returns the converted number.
* @example
*
* _.toFinite(3.2);
* // => 3.2
*
* _.toFinite(Number.MIN_VALUE);
* // => 5e-324
*
* _.toFinite(Infinity);
* // => 1.7976931348623157e+308
*
* _.toFinite('3.2');
* // => 3.2
*/
function toFinite(value) {
if (!value) {
return value === 0 ? value : 0;
}
value = toNumber(value);
if (value === INFINITY || value === -INFINITY) {
var sign = (value < 0 ? -1 : 1);
return sign * MAX_INTEGER;
}
return value === value ? value : 0;
}
module.exports = toFinite;
/***/ },
/* 131 */
/***/ function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(35),
isSymbol = __webpack_require__(102);
/** Used as references for various `Number` constants. */
var NAN = 0 / 0;
/** Used to match leading and trailing whitespace. */
var reTrim = /^\s+|\s+$/g;
/** Used to detect bad signed hexadecimal string values. */
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
/** Used to detect binary string values. */
var reIsBinary = /^0b[01]+$/i;
/** Used to detect octal string values. */
var reIsOctal = /^0o[0-7]+$/i;
/** Built-in method references without a dependency on `root`. */
var freeParseInt = parseInt;
/**
* Converts `value` to a number.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to process.
* @returns {number} Returns the number.
* @example
*
* _.toNumber(3.2);
* // => 3.2
*
* _.toNumber(Number.MIN_VALUE);
* // => 5e-324
*
* _.toNumber(Infinity);
* // => Infinity
*
* _.toNumber('3.2');
* // => 3.2
*/
function toNumber(value) {
if (typeof value == 'number') {
return value;
}
if (isSymbol(value)) {
return NAN;
}
if (isObject(value)) {
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
value = isObject(other) ? (other + '') : other;
}
if (typeof value != 'string') {
return value === 0 ? value : +value;
}
value = value.replace(reTrim, '');
var isBinary = reIsBinary.test(value);
return (isBinary || reIsOctal.test(value))
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
: (reIsBadHex.test(value) ? NAN : +value);
}
module.exports = toNumber;
/***/ },
/* 132 */
/***/ function(module, exports, __webpack_require__) {
var baseFlatten = __webpack_require__(133),
baseOrderBy = __webpack_require__(136),
baseRest = __webpack_require__(140),
isIterateeCall = __webpack_require__(148);
/**
* Creates an array of elements, sorted in ascending order by the results of
* running each element in a collection thru each iteratee. This method
* performs a stable sort, that is, it preserves the original sort order of
* equal elements. The iteratees are invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {...(Function|Function[])} [iteratees=[_.identity]]
* The iteratees to sort by.
* @returns {Array} Returns the new sorted array.
* @example
*
* var users = [
* { 'user': 'fred', 'age': 48 },
* { 'user': 'barney', 'age': 36 },
* { 'user': 'fred', 'age': 40 },
* { 'user': 'barney', 'age': 34 }
* ];
*
* _.sortBy(users, [function(o) { return o.user; }]);
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
*
* _.sortBy(users, ['user', 'age']);
* // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
*/
var sortBy = baseRest(function(collection, iteratees) {
if (collection == null) {
return [];
}
var length = iteratees.length;
if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
iteratees = [];
} else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
iteratees = [iteratees[0]];
}
return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
});
module.exports = sortBy;
/***/ },
/* 133 */
/***/ function(module, exports, __webpack_require__) {
var arrayPush = __webpack_require__(134),
isFlattenable = __webpack_require__(135);
/**
* The base implementation of `_.flatten` with support for restricting flattening.
*
* @private
* @param {Array} array The array to flatten.
* @param {number} depth The maximum recursion depth.
* @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
* @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
* @param {Array} [result=[]] The initial result value.
* @returns {Array} Returns the new flattened array.
*/
function baseFlatten(array, depth, predicate, isStrict, result) {
var index = -1,
length = array.length;
predicate || (predicate = isFlattenable);
result || (result = []);
while (++index < length) {
var value = array[index];
if (depth > 0 && predicate(value)) {
if (depth > 1) {
// Recursively flatten arrays (susceptible to call stack limits).
baseFlatten(value, depth - 1, predicate, isStrict, result);
} else {
arrayPush(result, value);
}
} else if (!isStrict) {
result[result.length] = value;
}
}
return result;
}
module.exports = baseFlatten;
/***/ },
/* 134 */
/***/ function(module, exports) {
/**
* Appends the elements of `values` to `array`.
*
* @private
* @param {Array} array The array to modify.
* @param {Array} values The values to append.
* @returns {Array} Returns `array`.
*/
function arrayPush(array, values) {
var index = -1,
length = values.length,
offset = array.length;
while (++index < length) {
array[offset + index] = values[index];
}
return array;
}
module.exports = arrayPush;
/***/ },
/* 135 */
/***/ function(module, exports, __webpack_require__) {
var Symbol = __webpack_require__(30),
isArguments = __webpack_require__(71),
isArray = __webpack_require__(74);
/** Built-in value references. */
var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;
/**
* Checks if `value` is a flattenable `arguments` object or array.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
*/
function isFlattenable(value) {
return isArray(value) || isArguments(value) ||
!!(spreadableSymbol && value && value[spreadableSymbol]);
}
module.exports = isFlattenable;
/***/ },
/* 136 */
/***/ function(module, exports, __webpack_require__) {
var arrayMap = __webpack_require__(7),
baseIteratee = __webpack_require__(8),
baseMap = __webpack_require__(116),
baseSortBy = __webpack_require__(137),
baseUnary = __webpack_require__(82),
compareMultiple = __webpack_require__(138),
identity = __webpack_require__(112);
/**
* The base implementation of `_.orderBy` without param guards.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
* @param {string[]} orders The sort orders of `iteratees`.
* @returns {Array} Returns the new sorted array.
*/
function baseOrderBy(collection, iteratees, orders) {
var index = -1;
iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(baseIteratee));
var result = baseMap(collection, function(value, key, collection) {
var criteria = arrayMap(iteratees, function(iteratee) {
return iteratee(value);
});
return { 'criteria': criteria, 'index': ++index, 'value': value };
});
return baseSortBy(result, function(object, other) {
return compareMultiple(object, other, orders);
});
}
module.exports = baseOrderBy;
/***/ },
/* 137 */
/***/ function(module, exports) {
/**
* The base implementation of `_.sortBy` which uses `comparer` to define the
* sort order of `array` and replaces criteria objects with their corresponding
* values.
*
* @private
* @param {Array} array The array to sort.
* @param {Function} comparer The function to define sort order.
* @returns {Array} Returns `array`.
*/
function baseSortBy(array, comparer) {
var length = array.length;
array.sort(comparer);
while (length--) {
array[length] = array[length].value;
}
return array;
}
module.exports = baseSortBy;
/***/ },
/* 138 */
/***/ function(module, exports, __webpack_require__) {
var compareAscending = __webpack_require__(139);
/**
* Used by `_.orderBy` to compare multiple properties of a value to another
* and stable sort them.
*
* If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
* specify an order of "desc" for descending or "asc" for ascending sort order
* of corresponding values.
*
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @param {boolean[]|string[]} orders The order to sort by for each property.
* @returns {number} Returns the sort order indicator for `object`.
*/
function compareMultiple(object, other, orders) {
var index = -1,
objCriteria = object.criteria,
othCriteria = other.criteria,
length = objCriteria.length,
ordersLength = orders.length;
while (++index < length) {
var result = compareAscending(objCriteria[index], othCriteria[index]);
if (result) {
if (index >= ordersLength) {
return result;
}
var order = orders[index];
return result * (order == 'desc' ? -1 : 1);
}
}
// Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
// that causes it, under certain circumstances, to provide the same value for
// `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
// for more details.
//
// This also ensures a stable sort in V8 and other engines.
// See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
return object.index - other.index;
}
module.exports = compareMultiple;
/***/ },
/* 139 */
/***/ function(module, exports, __webpack_require__) {
var isSymbol = __webpack_require__(102);
/**
* Compares values to sort them in ascending order.
*
* @private
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {number} Returns the sort order indicator for `value`.
*/
function compareAscending(value, other) {
if (value !== other) {
var valIsDefined = value !== undefined,
valIsNull = value === null,
valIsReflexive = value === value,
valIsSymbol = isSymbol(value);
var othIsDefined = other !== undefined,
othIsNull = other === null,
othIsReflexive = other === other,
othIsSymbol = isSymbol(other);
if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
(valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
(valIsNull && othIsDefined && othIsReflexive) ||
(!valIsDefined && othIsReflexive) ||
!valIsReflexive) {
return 1;
}
if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
(othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
(othIsNull && valIsDefined && valIsReflexive) ||
(!othIsDefined && valIsReflexive) ||
!othIsReflexive) {
return -1;
}
}
return 0;
}
module.exports = compareAscending;
/***/ },
/* 140 */
/***/ function(module, exports, __webpack_require__) {
var identity = __webpack_require__(112),
overRest = __webpack_require__(141),
setToString = __webpack_require__(143);
/**
* The base implementation of `_.rest` which doesn't validate or coerce arguments.
*
* @private
* @param {Function} func The function to apply a rest parameter to.
* @param {number} [start=func.length-1] The start position of the rest parameter.
* @returns {Function} Returns the new function.
*/
function baseRest(func, start) {
return setToString(overRest(func, start, identity), func + '');
}
module.exports = baseRest;
/***/ },
/* 141 */
/***/ function(module, exports, __webpack_require__) {
var apply = __webpack_require__(142);
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max;
/**
* A specialized version of `baseRest` which transforms the rest array.
*
* @private
* @param {Function} func The function to apply a rest parameter to.
* @param {number} [start=func.length-1] The start position of the rest parameter.
* @param {Function} transform The rest array transform.
* @returns {Function} Returns the new function.
*/
function overRest(func, start, transform) {
start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
return function() {
var args = arguments,
index = -1,
length = nativeMax(args.length - start, 0),
array = Array(length);
while (++index < length) {
array[index] = args[start + index];
}
index = -1;
var otherArgs = Array(start + 1);
while (++index < start) {
otherArgs[index] = args[index];
}
otherArgs[start] = transform(array);
return apply(func, this, otherArgs);
};
}
module.exports = overRest;
/***/ },
/* 142 */
/***/ function(module, exports) {
/**
* A faster alternative to `Function#apply`, this function invokes `func`
* with the `this` binding of `thisArg` and the arguments of `args`.
*
* @private
* @param {Function} func The function to invoke.
* @param {*} thisArg The `this` binding of `func`.
* @param {Array} args The arguments to invoke `func` with.
* @returns {*} Returns the result of `func`.
*/
function apply(func, thisArg, args) {
switch (args.length) {
case 0: return func.call(thisArg);
case 1: return func.call(thisArg, args[0]);
case 2: return func.call(thisArg, args[0], args[1]);
case 3: return func.call(thisArg, args[0], args[1], args[2]);
}
return func.apply(thisArg, args);
}
module.exports = apply;
/***/ },
/* 143 */
/***/ function(module, exports, __webpack_require__) {
var baseSetToString = __webpack_require__(144),
shortOut = __webpack_require__(147);
/**
* Sets the `toString` method of `func` to return `string`.
*
* @private
* @param {Function} func The function to modify.
* @param {Function} string The `toString` result.
* @returns {Function} Returns `func`.
*/
var setToString = shortOut(baseSetToString);
module.exports = setToString;
/***/ },
/* 144 */
/***/ function(module, exports, __webpack_require__) {
var constant = __webpack_require__(145),
defineProperty = __webpack_require__(146),
identity = __webpack_require__(112);
/**
* The base implementation of `setToString` without support for hot loop shorting.
*
* @private
* @param {Function} func The function to modify.
* @param {Function} string The `toString` result.
* @returns {Function} Returns `func`.
*/
var baseSetToString = !defineProperty ? identity : function(func, string) {
return defineProperty(func, 'toString', {
'configurable': true,
'enumerable': false,
'value': constant(string),
'writable': true
});
};
module.exports = baseSetToString;
/***/ },
/* 145 */
/***/ function(module, exports) {
/**
* Creates a function that returns `value`.
*
* @static
* @memberOf _
* @since 2.4.0
* @category Util
* @param {*} value The value to return from the new function.
* @returns {Function} Returns the new constant function.
* @example
*
* var objects = _.times(2, _.constant({ 'a': 1 }));
*
* console.log(objects);
* // => [{ 'a': 1 }, { 'a': 1 }]
*
* console.log(objects[0] === objects[1]);
* // => true
*/
function constant(value) {
return function() {
return value;
};
}
module.exports = constant;
/***/ },
/* 146 */
/***/ function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(26);
var defineProperty = (function() {
try {
var func = getNative(Object, 'defineProperty');
func({}, '', {});
return func;
} catch (e) {}
}());
module.exports = defineProperty;
/***/ },
/* 147 */
/***/ function(module, exports) {
/** Used to detect hot functions by number of calls within a span of milliseconds. */
var HOT_COUNT = 800,
HOT_SPAN = 16;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeNow = Date.now;
/**
* Creates a function that'll short out and invoke `identity` instead
* of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
* milliseconds.
*
* @private
* @param {Function} func The function to restrict.
* @returns {Function} Returns the new shortable function.
*/
function shortOut(func) {
var count = 0,
lastCalled = 0;
return function() {
var stamp = nativeNow(),
remaining = HOT_SPAN - (stamp - lastCalled);
lastCalled = stamp;
if (remaining > 0) {
if (++count >= HOT_COUNT) {
return arguments[0];
}
} else {
count = 0;
}
return func.apply(undefined, arguments);
};
}
module.exports = shortOut;
/***/ },
/* 148 */
/***/ function(module, exports, __webpack_require__) {
var eq = __webpack_require__(16),
isArrayLike = __webpack_require__(88),
isIndex = __webpack_require__(78),
isObject = __webpack_require__(35);
/**
* Checks if the given arguments are from an iteratee call.
*
* @private
* @param {*} value The potential iteratee value argument.
* @param {*} index The potential iteratee index or key argument.
* @param {*} object The potential iteratee object argument.
* @returns {boolean} Returns `true` if the arguments are from an iteratee call,
* else `false`.
*/
function isIterateeCall(value, index, object) {
if (!isObject(object)) {
return false;
}
var type = typeof index;
if (type == 'number'
? (isArrayLike(object) && isIndex(index, object.length))
: (type == 'string' && index in object)
) {
return eq(object[index], value);
}
return false;
}
module.exports = isIterateeCall;
/***/ },
/* 149 */
/***/ function(module, exports, __webpack_require__) {
var baseDifference = __webpack_require__(150),
baseFlatten = __webpack_require__(133),
baseRest = __webpack_require__(140),
isArrayLikeObject = __webpack_require__(156);
/**
* Creates an array of `array` values not included in the other given arrays
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons. The order and references of result values are
* determined by the first array.
*
* **Note:** Unlike `_.pullAll`, this method returns a new array.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to inspect.
* @param {...Array} [values] The values to exclude.
* @returns {Array} Returns the new array of filtered values.
* @see _.without, _.xor
* @example
*
* _.difference([2, 1], [2, 3]);
* // => [1]
*/
var difference = baseRest(function(array, values) {
return isArrayLikeObject(array)
? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
: [];
});
module.exports = difference;
/***/ },
/* 150 */
/***/ function(module, exports, __webpack_require__) {
var SetCache = __webpack_require__(58),
arrayIncludes = __webpack_require__(151),
arrayIncludesWith = __webpack_require__(155),
arrayMap = __webpack_require__(7),
baseUnary = __webpack_require__(82),
cacheHas = __webpack_require__(62);
/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;
/**
* The base implementation of methods like `_.difference` without support
* for excluding multiple arrays or iteratee shorthands.
*
* @private
* @param {Array} array The array to inspect.
* @param {Array} values The values to exclude.
* @param {Function} [iteratee] The iteratee invoked per element.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new array of filtered values.
*/
function baseDifference(array, values, iteratee, comparator) {
var index = -1,
includes = arrayIncludes,
isCommon = true,
length = array.length,
result = [],
valuesLength = values.length;
if (!length) {
return result;
}
if (iteratee) {
values = arrayMap(values, baseUnary(iteratee));
}
if (comparator) {
includes = arrayIncludesWith;
isCommon = false;
}
else if (values.length >= LARGE_ARRAY_SIZE) {
includes = cacheHas;
isCommon = false;
values = new SetCache(values);
}
outer:
while (++index < length) {
var value = array[index],
computed = iteratee == null ? value : iteratee(value);
value = (comparator || value !== 0) ? value : 0;
if (isCommon && computed === computed) {
var valuesIndex = valuesLength;
while (valuesIndex--) {
if (values[valuesIndex] === computed) {
continue outer;
}
}
result.push(value);
}
else if (!includes(values, computed, comparator)) {
result.push(value);
}
}
return result;
}
module.exports = baseDifference;
/***/ },
/* 151 */
/***/ function(module, exports, __webpack_require__) {
var baseIndexOf = __webpack_require__(152);
/**
* A specialized version of `_.includes` for arrays without support for
* specifying an index to search from.
*
* @private
* @param {Array} [array] The array to inspect.
* @param {*} target The value to search for.
* @returns {boolean} Returns `true` if `target` is found, else `false`.
*/
function arrayIncludes(array, value) {
var length = array == null ? 0 : array.length;
return !!length && baseIndexOf(array, value, 0) > -1;
}
module.exports = arrayIncludes;
/***/ },
/* 152 */
/***/ function(module, exports, __webpack_require__) {
var baseFindIndex = __webpack_require__(128),
baseIsNaN = __webpack_require__(153),
strictIndexOf = __webpack_require__(154);
/**
* The base implementation of `_.indexOf` without `fromIndex` bounds checks.
*
* @private
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.
* @param {number} fromIndex The index to search from.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function baseIndexOf(array, value, fromIndex) {
return value === value
? strictIndexOf(array, value, fromIndex)
: baseFindIndex(array, baseIsNaN, fromIndex);
}
module.exports = baseIndexOf;
/***/ },
/* 153 */
/***/ function(module, exports) {
/**
* The base implementation of `_.isNaN` without support for number objects.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
*/
function baseIsNaN(value) {
return value !== value;
}
module.exports = baseIsNaN;
/***/ },
/* 154 */
/***/ function(module, exports) {
/**
* A specialized version of `_.indexOf` which performs strict equality
* comparisons of values, i.e. `===`.
*
* @private
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.
* @param {number} fromIndex The index to search from.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function strictIndexOf(array, value, fromIndex) {
var index = fromIndex - 1,
length = array.length;
while (++index < length) {
if (array[index] === value) {
return index;
}
}
return -1;
}
module.exports = strictIndexOf;
/***/ },
/* 155 */
/***/ function(module, exports) {
/**
* This function is like `arrayIncludes` except that it accepts a comparator.
*
* @private
* @param {Array} [array] The array to inspect.
* @param {*} target The value to search for.
* @param {Function} comparator The comparator invoked per element.
* @returns {boolean} Returns `true` if `target` is found, else `false`.
*/
function arrayIncludesWith(array, value, comparator) {
var index = -1,
length = array == null ? 0 : array.length;
while (++index < length) {
if (comparator(value, array[index])) {
return true;
}
}
return false;
}
module.exports = arrayIncludesWith;
/***/ },
/* 156 */
/***/ function(module, exports, __webpack_require__) {
var isArrayLike = __webpack_require__(88),
isObjectLike = __webpack_require__(73);
/**
* This method is like `_.isArrayLike` except that it also checks if `value`
* is an object.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an array-like object,
* else `false`.
* @example
*
* _.isArrayLikeObject([1, 2, 3]);
* // => true
*
* _.isArrayLikeObject(document.body.children);
* // => true
*
* _.isArrayLikeObject('abc');
* // => false
*
* _.isArrayLikeObject(_.noop);
* // => false
*/
function isArrayLikeObject(value) {
return isObjectLike(value) && isArrayLike(value);
}
module.exports = isArrayLikeObject;
/***/ },
/* 157 */
/***/ function(module, exports, __webpack_require__) {
var assignValue = __webpack_require__(158),
copyObject = __webpack_require__(160),
createAssigner = __webpack_require__(161),
isArrayLike = __webpack_require__(88),
isPrototype = __webpack_require__(85),
keys = __webpack_require__(68);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Assigns own enumerable string keyed properties of source objects to the
* destination object. Source objects are applied from left to right.
* Subsequent sources overwrite property assignments of previous sources.
*
* **Note:** This method mutates `object` and is loosely based on
* [`Object.assign`](https://mdn.io/Object/assign).
*
* @static
* @memberOf _
* @since 0.10.0
* @category Object
* @param {Object} object The destination object.
* @param {...Object} [sources] The source objects.
* @returns {Object} Returns `object`.
* @see _.assignIn
* @example
*
* function Foo() {
* this.a = 1;
* }
*
* function Bar() {
* this.c = 3;
* }
*
* Foo.prototype.b = 2;
* Bar.prototype.d = 4;
*
* _.assign({ 'a': 0 }, new Foo, new Bar);
* // => { 'a': 1, 'c': 3 }
*/
var assign = createAssigner(function(object, source) {
if (isPrototype(source) || isArrayLike(source)) {
copyObject(source, keys(source), object);
return;
}
for (var key in source) {
if (hasOwnProperty.call(source, key)) {
assignValue(object, key, source[key]);
}
}
});
module.exports = assign;
/***/ },
/* 158 */
/***/ function(module, exports, __webpack_require__) {
var baseAssignValue = __webpack_require__(159),
eq = __webpack_require__(16);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Assigns `value` to `key` of `object` if the existing value is not equivalent
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons.
*
* @private
* @param {Object} object The object to modify.
* @param {string} key The key of the property to assign.
* @param {*} value The value to assign.
*/
function assignValue(object, key, value) {
var objValue = object[key];
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
(value === undefined && !(key in object))) {
baseAssignValue(object, key, value);
}
}
module.exports = assignValue;
/***/ },
/* 159 */
/***/ function(module, exports, __webpack_require__) {
var defineProperty = __webpack_require__(146);
/**
* The base implementation of `assignValue` and `assignMergeValue` without
* value checks.
*
* @private
* @param {Object} object The object to modify.
* @param {string} key The key of the property to assign.
* @param {*} value The value to assign.
*/
function baseAssignValue(object, key, value) {
if (key == '__proto__' && defineProperty) {
defineProperty(object, key, {
'configurable': true,
'enumerable': true,
'value': value,
'writable': true
});
} else {
object[key] = value;
}
}
module.exports = baseAssignValue;
/***/ },
/* 160 */
/***/ function(module, exports, __webpack_require__) {
var assignValue = __webpack_require__(158),
baseAssignValue = __webpack_require__(159);
/**
* Copies properties of `source` to `object`.
*
* @private
* @param {Object} source The object to copy properties from.
* @param {Array} props The property identifiers to copy.
* @param {Object} [object={}] The object to copy properties to.
* @param {Function} [customizer] The function to customize copied values.
* @returns {Object} Returns `object`.
*/
function copyObject(source, props, object, customizer) {
var isNew = !object;
object || (object = {});
var index = -1,
length = props.length;
while (++index < length) {
var key = props[index];
var newValue = customizer
? customizer(object[key], source[key], key, object, source)
: undefined;
if (newValue === undefined) {
newValue = source[key];
}
if (isNew) {
baseAssignValue(object, key, newValue);
} else {
assignValue(object, key, newValue);
}
}
return object;
}
module.exports = copyObject;
/***/ },
/* 161 */
/***/ function(module, exports, __webpack_require__) {
var baseRest = __webpack_require__(140),
isIterateeCall = __webpack_require__(148);
/**
* Creates a function like `_.assign`.
*
* @private
* @param {Function} assigner The function to assign values.
* @returns {Function} Returns the new assigner function.
*/
function createAssigner(assigner) {
return baseRest(function(object, sources) {
var index = -1,
length = sources.length,
customizer = length > 1 ? sources[length - 1] : undefined,
guard = length > 2 ? sources[2] : undefined;
customizer = (assigner.length > 3 && typeof customizer == 'function')
? (length--, customizer)
: undefined;
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
customizer = length < 3 ? undefined : customizer;
length = 1;
}
object = Object(object);
while (++index < length) {
var source = sources[index];
if (source) {
assigner(object, source, index, customizer);
}
}
return object;
});
}
module.exports = createAssigner;
/***/ },
/* 162 */
/***/ function(module, exports, __webpack_require__) {
/*
See License / Disclaimer https://raw.githubusercontent.com/DynamicTyped/Griddle/master/LICENSE
*/
'use strict';
var React = __webpack_require__(2);
var ColumnProperties = __webpack_require__(5);
var pick = __webpack_require__(163);
var GridRowContainer = React.createClass({
displayName: 'GridRowContainer',
getDefaultProps: function getDefaultProps() {
return {
"useGriddleStyles": true,
"useGriddleIcons": true,
"isSubGriddle": false,
"columnSettings": null,
"rowSettings": null,
"paddingHeight": null,
"rowHeight": null,
"parentRowCollapsedClassName": "parent-row",
"parentRowExpandedClassName": "parent-row expanded",
"parentRowCollapsedComponent": "▶",
"parentRowExpandedComponent": "▼",
"onRowClick": null,
"multipleSelectionSettings": null
};
},
getInitialState: function getInitialState() {
return {
"data": {},
"showChildren": false
};
},
componentWillReceiveProps: function componentWillReceiveProps() {
this.setShowChildren(false);
},
toggleChildren: function toggleChildren() {
this.setShowChildren(this.state.showChildren === false);
},
setShowChildren: function setShowChildren(visible) {
this.setState({
showChildren: visible
});
},
verifyProps: function verifyProps() {
if (this.props.columnSettings === null) {
console.error("gridRowContainer: The columnSettings prop is null and it shouldn't be");
}
},
render: function render() {
this.verifyProps();
var that = this;
if (typeof this.props.data === "undefined") {
return React.createElement('tbody', null);
}
var arr = [];
var columns = this.props.columnSettings.getColumns();
arr.push(React.createElement(this.props.rowSettings.rowComponent, {
useGriddleStyles: this.props.useGriddleStyles,
isSubGriddle: this.props.isSubGriddle,
data: this.props.rowSettings.isCustom ? pick(this.props.data, columns) : this.props.data,
rowData: this.props.rowSettings.isCustom ? this.props.data : null,
columnSettings: this.props.columnSettings,
rowSettings: this.props.rowSettings,
hasChildren: that.props.hasChildren,
toggleChildren: that.toggleChildren,
showChildren: that.state.showChildren,
key: that.props.uniqueId + '_base_row',
useGriddleIcons: that.props.useGriddleIcons,
parentRowExpandedClassName: this.props.parentRowExpandedClassName,
parentRowCollapsedClassName: this.props.parentRowCollapsedClassName,
parentRowExpandedComponent: this.props.parentRowExpandedComponent,
parentRowCollapsedComponent: this.props.parentRowCollapsedComponent,
paddingHeight: that.props.paddingHeight,
rowHeight: that.props.rowHeight,
onRowClick: that.props.onRowClick,
multipleSelectionSettings: this.props.multipleSelectionSettings }));
var children = null;
if (that.state.showChildren) {
children = that.props.hasChildren && this.props.data["children"].map(function (row, index) {
var key = that.props.rowSettings.getRowKey(row, index);
if (typeof row["children"] !== "undefined") {
var Griddle = that.constructor.Griddle;
return React.createElement('tr', { key: key, style: { paddingLeft: 5 } }, React.createElement('td', { colSpan: that.props.columnSettings.getVisibleColumnCount(), className: 'griddle-parent', style: that.props.useGriddleStyles ? { border: "none", "padding": "0 0 0 5px" } : null }, React.createElement(Griddle, {
rowMetadata: { key: 'id' },
isSubGriddle: true,
results: [row],
columns: that.props.columnSettings.getColumns(),
tableClassName: that.props.tableClassName,
parentRowExpandedClassName: that.props.parentRowExpandedClassName,
parentRowCollapsedClassName: that.props.parentRowCollapsedClassName,
showTableHeading: false,
showPager: false,
columnMetadata: that.props.columnSettings.columnMetadata,
parentRowExpandedComponent: that.props.parentRowExpandedComponent,
parentRowCollapsedComponent: that.props.parentRowCollapsedComponent,
paddingHeight: that.props.paddingHeight,
rowHeight: that.props.rowHeight
})));
}
return React.createElement(that.props.rowSettings.rowComponent, {
useGriddleStyles: that.props.useGriddleStyles,
isSubGriddle: that.props.isSubGriddle,
data: row,
columnSettings: that.props.columnSettings,
isChildRow: true,
columnMetadata: that.props.columnSettings.columnMetadata,
key: key
});
});
}
return that.props.hasChildren === false ? arr[0] : React.createElement('tbody', null, that.state.showChildren ? arr.concat(children) : arr);
}
});
module.exports = GridRowContainer;
/***/ },
/* 163 */
/***/ function(module, exports, __webpack_require__) {
var basePick = __webpack_require__(164),
flatRest = __webpack_require__(167);
/**
* Creates an object composed of the picked `object` properties.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The source object.
* @param {...(string|string[])} [paths] The property paths to pick.
* @returns {Object} Returns the new object.
* @example
*
* var object = { 'a': 1, 'b': '2', 'c': 3 };
*
* _.pick(object, ['a', 'c']);
* // => { 'a': 1, 'c': 3 }
*/
var pick = flatRest(function(object, paths) {
return object == null ? {} : basePick(object, paths);
});
module.exports = pick;
/***/ },
/* 164 */
/***/ function(module, exports, __webpack_require__) {
var basePickBy = __webpack_require__(165),
hasIn = __webpack_require__(109);
/**
* The base implementation of `_.pick` without support for individual
* property identifiers.
*
* @private
* @param {Object} object The source object.
* @param {string[]} paths The property paths to pick.
* @returns {Object} Returns the new object.
*/
function basePick(object, paths) {
object = Object(object);
return basePickBy(object, paths, function(value, path) {
return hasIn(object, path);
});
}
module.exports = basePick;
/***/ },
/* 165 */
/***/ function(module, exports, __webpack_require__) {
var baseGet = __webpack_require__(99),
baseSet = __webpack_require__(166),
castPath = __webpack_require__(100);
/**
* The base implementation of `_.pickBy` without support for iteratee shorthands.
*
* @private
* @param {Object} object The source object.
* @param {string[]} paths The property paths to pick.
* @param {Function} predicate The function invoked per property.
* @returns {Object} Returns the new object.
*/
function basePickBy(object, paths, predicate) {
var index = -1,
length = paths.length,
result = {};
while (++index < length) {
var path = paths[index],
value = baseGet(object, path);
if (predicate(value, path)) {
baseSet(result, castPath(path, object), value);
}
}
return result;
}
module.exports = basePickBy;
/***/ },
/* 166 */
/***/ function(module, exports, __webpack_require__) {
var assignValue = __webpack_require__(158),
castPath = __webpack_require__(100),
isIndex = __webpack_require__(78),
isObject = __webpack_require__(35),
toKey = __webpack_require__(108);
/**
* The base implementation of `_.set`.
*
* @private
* @param {Object} object The object to modify.
* @param {Array|string} path The path of the property to set.
* @param {*} value The value to set.
* @param {Function} [customizer] The function to customize path creation.
* @returns {Object} Returns `object`.
*/
function baseSet(object, path, value, customizer) {
if (!isObject(object)) {
return object;
}
path = castPath(path, object);
var index = -1,
length = path.length,
lastIndex = length - 1,
nested = object;
while (nested != null && ++index < length) {
var key = toKey(path[index]),
newValue = value;
if (index != lastIndex) {
var objValue = nested[key];
newValue = customizer ? customizer(objValue, key, nested) : undefined;
if (newValue === undefined) {
newValue = isObject(objValue)
? objValue
: (isIndex(path[index + 1]) ? [] : {});
}
}
assignValue(nested, key, newValue);
nested = nested[key];
}
return object;
}
module.exports = baseSet;
/***/ },
/* 167 */
/***/ function(module, exports, __webpack_require__) {
var flatten = __webpack_require__(168),
overRest = __webpack_require__(141),
setToString = __webpack_require__(143);
/**
* A specialized version of `baseRest` which flattens the rest array.
*
* @private
* @param {Function} func The function to apply a rest parameter to.
* @returns {Function} Returns the new function.
*/
function flatRest(func) {
return setToString(overRest(func, undefined, flatten), func + '');
}
module.exports = flatRest;
/***/ },
/* 168 */
/***/ function(module, exports, __webpack_require__) {
var baseFlatten = __webpack_require__(133);
/**
* Flattens `array` a single level deep.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to flatten.
* @returns {Array} Returns the new flattened array.
* @example
*
* _.flatten([1, [2, [3, [4]], 5]]);
* // => [1, 2, [3, [4]], 5]
*/
function flatten(array) {
var length = array == null ? 0 : array.length;
return length ? baseFlatten(array, 1) : [];
}
module.exports = flatten;
/***/ },
/* 169 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
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; }; })();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
var _uniqueId = __webpack_require__(170);
var RowProperties = (function () {
function RowProperties() {
var rowMetadata = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
var rowComponent = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1];
var isCustom = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2];
_classCallCheck(this, RowProperties);
this.rowMetadata = rowMetadata;
this.rowComponent = rowComponent;
this.isCustom = isCustom;
// assign unique Id to each griddle instance
}
_createClass(RowProperties, [{
key: 'getRowKey',
value: function getRowKey(row, key) {
var uniqueId;
if (this.hasRowMetadataKey()) {
uniqueId = row[this.rowMetadata.key];
} else {
uniqueId = _uniqueId("grid_row");
}
//todo: add error handling
return uniqueId;
}
}, {
key: 'hasRowMetadataKey',
value: function hasRowMetadataKey() {
return this.hasRowMetadata() && this.rowMetadata.key !== null && this.rowMetadata.key !== undefined;
}
}, {
key: 'getBodyRowMetadataClass',
value: function getBodyRowMetadataClass(rowData) {
if (this.hasRowMetadata() && this.rowMetadata.bodyCssClassName !== null && this.rowMetadata.bodyCssClassName !== undefined) {
if (typeof this.rowMetadata.bodyCssClassName === 'function') {
return this.rowMetadata.bodyCssClassName(rowData);
} else {
return this.rowMetadata.bodyCssClassName;
}
}
return null;
}
}, {
key: 'getHeaderRowMetadataClass',
value: function getHeaderRowMetadataClass() {
return this.hasRowMetadata() && this.rowMetadata.headerCssClassName !== null && this.rowMetadata.headerCssClassName !== undefined ? this.rowMetadata.headerCssClassName : null;
}
}, {
key: 'hasRowMetadata',
value: function hasRowMetadata() {
return this.rowMetadata !== null;
}
}]);
return RowProperties;
})();
module.exports = RowProperties;
/***/ },
/* 170 */
/***/ function(module, exports, __webpack_require__) {
var toString = __webpack_require__(106);
/** Used to generate unique IDs. */
var idCounter = 0;
/**
* Generates a unique ID. If `prefix` is given, the ID is appended to it.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Util
* @param {string} [prefix=''] The value to prefix the ID with.
* @returns {string} Returns the unique ID.
* @example
*
* _.uniqueId('contact_');
* // => 'contact_104'
*
* _.uniqueId();
* // => '105'
*/
function uniqueId(prefix) {
var id = ++idCounter;
return toString(prefix) + id;
}
module.exports = uniqueId;
/***/ },
/* 171 */
/***/ function(module, exports, __webpack_require__) {
/*
See License / Disclaimer https://raw.githubusercontent.com/DynamicTyped/Griddle/master/LICENSE
*/
"use strict";
var React = __webpack_require__(2);
var GridFilter = React.createClass({
displayName: "GridFilter",
getDefaultProps: function getDefaultProps() {
return {
"placeholderText": ""
};
},
handleChange: function handleChange(event) {
this.props.changeFilter(event.target.value);
},
render: function render() {
return React.createElement("div", { className: "filter-container" }, React.createElement("input", { type: "text", name: "filter", placeholder: this.props.placeholderText, className: "form-control", onChange: this.handleChange }));
}
});
module.exports = GridFilter;
/***/ },
/* 172 */
/***/ function(module, exports, __webpack_require__) {
/*
See License / Disclaimer https://raw.githubusercontent.com/DynamicTyped/Griddle/master/LICENSE
*/
'use strict';
var React = __webpack_require__(2);
var assign = __webpack_require__(157);
//needs props maxPage, currentPage, nextFunction, prevFunction
var GridPagination = React.createClass({
displayName: 'GridPagination',
getDefaultProps: function getDefaultProps() {
return {
"maxPage": 0,
"nextText": "",
"previousText": "",
"currentPage": 0,
"useGriddleStyles": true,
"nextClassName": "griddle-next",
"previousClassName": "griddle-previous",
"nextIconComponent": null,
"previousIconComponent": null
};
},
pageChange: function pageChange(event) {
this.props.setPage(parseInt(event.target.value, 10) - 1);
},
render: function render() {
var previous = "";
var next = "";
if (this.props.currentPage > 0) {
previous = React.createElement('button', { type: 'button', onClick: this.props.previous, style: this.props.useGriddleStyles ? { "color": "#222", border: "none", background: "none", margin: "0 0 0 10px" } : null }, this.props.previousIconComponent, this.props.previousText);
}
if (this.props.currentPage !== this.props.maxPage - 1) {
next = React.createElement('button', { type: 'button', onClick: this.props.next, style: this.props.useGriddleStyles ? { "color": "#222", border: "none", background: "none", margin: "0 10px 0 0" } : null }, this.props.nextText, this.props.nextIconComponent);
}
var leftStyle = null;
var middleStyle = null;
var rightStyle = null;
if (this.props.useGriddleStyles === true) {
var baseStyle = {
"float": "left",
minHeight: "1px",
marginTop: "5px"
};
rightStyle = assign({ textAlign: "right", width: "34%" }, baseStyle);
middleStyle = assign({ textAlign: "center", width: "33%" }, baseStyle);
leftStyle = assign({ width: "33%" }, baseStyle);
}
var options = [];
for (var i = 1; i <= this.props.maxPage; i++) {
options.push(React.createElement('option', { value: i, key: i }, i));
}
return React.createElement('div', { style: this.props.useGriddleStyles ? { minHeight: "35px" } : null }, React.createElement('div', { className: this.props.previousClassName, style: leftStyle }, previous), React.createElement('div', { className: 'griddle-page', style: middleStyle }, React.createElement('select', { value: this.props.currentPage + 1, onChange: this.pageChange }, options), ' / ', this.props.maxPage), React.createElement('div', { className: this.props.nextClassName, style: rightStyle }, next));
}
});
module.exports = GridPagination;
/***/ },
/* 173 */
/***/ function(module, exports, __webpack_require__) {
/*
See License / Disclaimer https://raw.githubusercontent.com/DynamicTyped/Griddle/master/LICENSE
*/
'use strict';
var React = __webpack_require__(2);
var includes = __webpack_require__(174);
var without = __webpack_require__(178);
var find = __webpack_require__(125);
var GridSettings = React.createClass({
displayName: 'GridSettings',
getDefaultProps: function getDefaultProps() {
return {
"columns": [],
"columnMetadata": [],
"selectedColumns": [],
"settingsText": "",
"maxRowsText": "",
"resultsPerPage": 0,
"enableToggleCustom": false,
"useCustomComponent": false,
"useGriddleStyles": true,
"toggleCustomComponent": function toggleCustomComponent() {}
};
},
setPageSize: function setPageSize(event) {
var value = parseInt(event.target.value, 10);
this.props.setPageSize(value);
},
handleChange: function handleChange(event) {
var columnName = event.target.dataset ? event.target.dataset.name : event.target.getAttribute('data-name');
if (event.target.checked === true && includes(this.props.selectedColumns, columnName) === false) {
this.props.selectedColumns.push(columnName);
this.props.setColumns(this.props.selectedColumns);
} else {
/* redraw with the selected columns minus the one just unchecked */
this.props.setColumns(without(this.props.selectedColumns, columnName));
}
},
render: function render() {
var that = this;
var nodes = [];
//don't show column selector if we're on a custom component
if (that.props.useCustomComponent === false) {
nodes = this.props.columns.map(function (col, index) {
var checked = includes(that.props.selectedColumns, col);
//check column metadata -- if this one is locked make it disabled and don't put an onChange event
var meta = find(that.props.columnMetadata, { columnName: col });
var displayName = col;
if (typeof meta !== "undefined" && typeof meta.displayName !== "undefined" && meta.displayName != null) {
displayName = meta.displayName;
}
if (typeof meta !== "undefined" && meta != null && meta.locked) {
return React.createElement('div', { className: 'column checkbox' }, React.createElement('label', null, React.createElement('input', { type: 'checkbox', disabled: true, name: 'check', checked: checked, 'data-name': col }), displayName));
} else if (typeof meta !== "undefined" && meta != null && typeof meta.visible !== "undefined" && meta.visible === false) {
return null;
}
return React.createElement('div', { className: 'griddle-column-selection checkbox', key: col, style: that.props.useGriddleStyles ? { "float": "left", width: "20%" } : null }, React.createElement('label', null, React.createElement('input', { type: 'checkbox', name: 'check', onChange: that.handleChange, checked: checked, 'data-name': col }), displayName));
});
}
var toggleCustom = that.props.enableToggleCustom ? React.createElement('div', { className: 'form-group' }, React.createElement('label', { htmlFor: 'maxRows' }, React.createElement('input', { type: 'checkbox', checked: this.props.useCustomComponent, onChange: this.props.toggleCustomComponent }), ' ', this.props.enableCustomFormatText)) : "";
var setPageSize = this.props.showSetPageSize ? React.createElement('div', null, React.createElement('label', { htmlFor: 'maxRows' }, this.props.maxRowsText, ':', React.createElement('select', { onChange: this.setPageSize, value: this.props.resultsPerPage }, React.createElement('option', { value: '5' }, '5'), React.createElement('option', { value: '10' }, '10'), React.createElement('option', { value: '25' }, '25'), React.createElement('option', { value: '50' }, '50'), React.createElement('option', { value: '100' }, '100')))) : "";
return React.createElement('div', { className: 'griddle-settings', style: this.props.useGriddleStyles ? { backgroundColor: "#FFF", border: "1px solid #DDD", color: "#222", padding: "10px", marginBottom: "10px" } : null }, React.createElement('h6', null, this.props.settingsText), React.createElement('div', { className: 'griddle-columns', style: this.props.useGriddleStyles ? { clear: "both", display: "table", width: "100%", borderBottom: "1px solid #EDEDED", marginBottom: "10px" } : null }, nodes), setPageSize, toggleCustom);
}
});
module.exports = GridSettings;
/***/ },
/* 174 */
/***/ function(module, exports, __webpack_require__) {
var baseIndexOf = __webpack_require__(152),
isArrayLike = __webpack_require__(88),
isString = __webpack_require__(175),
toInteger = __webpack_require__(129),
values = __webpack_require__(176);
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max;
/**
* Checks if `value` is in `collection`. If `collection` is a string, it's
* checked for a substring of `value`, otherwise
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* is used for equality comparisons. If `fromIndex` is negative, it's used as
* the offset from the end of `collection`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object|string} collection The collection to inspect.
* @param {*} value The value to search for.
* @param {number} [fromIndex=0] The index to search from.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
* @returns {boolean} Returns `true` if `value` is found, else `false`.
* @example
*
* _.includes([1, 2, 3], 1);
* // => true
*
* _.includes([1, 2, 3], 1, 2);
* // => false
*
* _.includes({ 'a': 1, 'b': 2 }, 1);
* // => true
*
* _.includes('abcd', 'bc');
* // => true
*/
function includes(collection, value, fromIndex, guard) {
collection = isArrayLike(collection) ? collection : values(collection);
fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
var length = collection.length;
if (fromIndex < 0) {
fromIndex = nativeMax(length + fromIndex, 0);
}
return isString(collection)
? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
: (!!length && baseIndexOf(collection, value, fromIndex) > -1);
}
module.exports = includes;
/***/ },
/* 175 */
/***/ function(module, exports, __webpack_require__) {
var baseGetTag = __webpack_require__(29),
isArray = __webpack_require__(74),
isObjectLike = __webpack_require__(73);
/** `Object#toString` result references. */
var stringTag = '[object String]';
/**
* Checks if `value` is classified as a `String` primitive or object.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a string, else `false`.
* @example
*
* _.isString('abc');
* // => true
*
* _.isString(1);
* // => false
*/
function isString(value) {
return typeof value == 'string' ||
(!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
}
module.exports = isString;
/***/ },
/* 176 */
/***/ function(module, exports, __webpack_require__) {
var baseValues = __webpack_require__(177),
keys = __webpack_require__(68);
/**
* Creates an array of the own enumerable string keyed property values of `object`.
*
* **Note:** Non-object values are coerced to objects.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property values.
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.values(new Foo);
* // => [1, 2] (iteration order is not guaranteed)
*
* _.values('hi');
* // => ['h', 'i']
*/
function values(object) {
return object == null ? [] : baseValues(object, keys(object));
}
module.exports = values;
/***/ },
/* 177 */
/***/ function(module, exports, __webpack_require__) {
var arrayMap = __webpack_require__(7);
/**
* The base implementation of `_.values` and `_.valuesIn` which creates an
* array of `object` property values corresponding to the property names
* of `props`.
*
* @private
* @param {Object} object The object to query.
* @param {Array} props The property names to get values for.
* @returns {Object} Returns the array of property values.
*/
function baseValues(object, props) {
return arrayMap(props, function(key) {
return object[key];
});
}
module.exports = baseValues;
/***/ },
/* 178 */
/***/ function(module, exports, __webpack_require__) {
var baseDifference = __webpack_require__(150),
baseRest = __webpack_require__(140),
isArrayLikeObject = __webpack_require__(156);
/**
* Creates an array excluding all given values using
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons.
*
* **Note:** Unlike `_.pull`, this method returns a new array.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to inspect.
* @param {...*} [values] The values to exclude.
* @returns {Array} Returns the new array of filtered values.
* @see _.difference, _.xor
* @example
*
* _.without([2, 1, 2, 3], 1, 2);
* // => [3]
*/
var without = baseRest(function(array, values) {
return isArrayLikeObject(array)
? baseDifference(array, values)
: [];
});
module.exports = without;
/***/ },
/* 179 */
/***/ function(module, exports, __webpack_require__) {
/*
See License / Disclaimer https://raw.githubusercontent.com/DynamicTyped/Griddle/master/LICENSE
*/
"use strict";
var React = __webpack_require__(2);
var GridNoData = React.createClass({
displayName: "GridNoData",
getDefaultProps: function getDefaultProps() {
return {
"noDataMessage": "No Data"
};
},
render: function render() {
var that = this;
return React.createElement("div", null, this.props.noDataMessage);
}
});
module.exports = GridNoData;
/***/ },
/* 180 */
/***/ function(module, exports, __webpack_require__) {
/*
See License / Disclaimer https://raw.githubusercontent.com/DynamicTyped/Griddle/master/LICENSE
*/
'use strict';
var React = __webpack_require__(2);
var ColumnProperties = __webpack_require__(5);
var deep = __webpack_require__(181);
var isFunction = __webpack_require__(28);
var zipObject = __webpack_require__(188);
var assign = __webpack_require__(157);
var defaults = __webpack_require__(190);
var toPairs = __webpack_require__(196);
var without = __webpack_require__(178);
var GridRow = React.createClass({
displayName: 'GridRow',
getDefaultProps: function getDefaultProps() {
return {
"isChildRow": false,
"showChildren": false,
"data": {},
"columnSettings": null,
"rowSettings": null,
"hasChildren": false,
"useGriddleStyles": true,
"useGriddleIcons": true,
"isSubGriddle": false,
"paddingHeight": null,
"rowHeight": null,
"parentRowCollapsedClassName": "parent-row",
"parentRowExpandedClassName": "parent-row expanded",
"parentRowCollapsedComponent": "▶",
"parentRowExpandedComponent": "▼",
"onRowClick": null,
"multipleSelectionSettings": null
};
},
handleClick: function handleClick(e) {
if (this.props.onRowClick !== null && isFunction(this.props.onRowClick)) {
this.props.onRowClick(this, e);
} else if (this.props.hasChildren) {
this.props.toggleChildren();
}
},
handleSelectionChange: function handleSelectionChange(e) {
//hack to get around warning that's not super useful in this case
return;
},
handleSelectClick: function handleSelectClick(e) {
if (this.props.multipleSelectionSettings.isMultipleSelection) {
if (e.target.type === "checkbox") {
this.props.multipleSelectionSettings.toggleSelectRow(this.props.data, this.refs.selected.checked);
} else {
this.props.multipleSelectionSettings.toggleSelectRow(this.props.data, !this.refs.selected.checked);
}
}
},
verifyProps: function verifyProps() {
if (this.props.columnSettings === null) {
console.error("gridRow: The columnSettings prop is null and it shouldn't be");
}
},
formatData: function formatData(data) {
if (typeof data === 'boolean') {
return String(data);
}
return data;
},
render: function render() {
var _this = this;
this.verifyProps();
var that = this;
var columnStyles = null;
if (this.props.useGriddleStyles) {
columnStyles = {
margin: "0px",
padding: that.props.paddingHeight + "px 5px " + that.props.paddingHeight + "px 5px",
height: that.props.rowHeight ? this.props.rowHeight - that.props.paddingHeight * 2 + "px" : null,
backgroundColor: "#FFF",
borderTopColor: "#DDD",
color: "#222"
};
}
var columns = this.props.columnSettings.getColumns();
// make sure that all the columns we need have default empty values
// otherwise they will get clipped
var defaultValues = zipObject(columns, []);
// creates a 'view' on top the data so we will not alter the original data but will allow us to add default values to missing columns
var dataView = assign({}, this.props.data);
defaults(dataView, defaultValues);
var data = toPairs(deep.pick(dataView, without(columns, 'children')));
var nodes = data.map(function (col, index) {
var returnValue = null;
var meta = _this.props.columnSettings.getColumnMetadataByName(col[0]);
//todo: Make this not as ridiculous looking
var firstColAppend = index === 0 && _this.props.hasChildren && _this.props.showChildren === false && _this.props.useGriddleIcons ? React.createElement('span', { style: _this.props.useGriddleStyles ? { fontSize: "10px", marginRight: "5px" } : null }, _this.props.parentRowCollapsedComponent) : index === 0 && _this.props.hasChildren && _this.props.showChildren && _this.props.useGriddleIcons ? React.createElement('span', { style: _this.props.useGriddleStyles ? { fontSize: "10px" } : null }, _this.props.parentRowExpandedComponent) : "";
if (index === 0 && _this.props.isChildRow && _this.props.useGriddleStyles) {
columnStyles = assign(columnStyles, { paddingLeft: 10 });
}
if (_this.props.columnSettings.hasColumnMetadata() && typeof meta !== 'undefined' && meta !== null) {
if (typeof meta.customComponent !== 'undefined' && meta.customComponent !== null) {
var customComponent = React.createElement(meta.customComponent, { data: col[1], rowData: dataView, metadata: meta });
returnValue = React.createElement('td', { onClick: _this.handleClick, className: meta.cssClassName, key: index, style: columnStyles }, customComponent);
} else {
returnValue = React.createElement('td', { onClick: _this.handleClick, className: meta.cssClassName, key: index, style: columnStyles }, firstColAppend, _this.formatData(col[1]));
}
}
return returnValue || React.createElement('td', { onClick: _this.handleClick, key: index, style: columnStyles }, firstColAppend, col[1]);
});
// Don't compete with onRowClick, but if no onRowClick function then
// clicking on the row should trigger select
var trOnClick, tdOnClick;
if (this.props.onRowClick !== null && isFunction(this.props.onRowClick)) {
trOnClick = null;
tdOnClick = this.handleSelectClick;
} else {
if (this.props.multipleSelectionSettings && this.props.multipleSelectionSettings.isMultipleSelection) {
trOnClick = this.handleSelectClick;
tdOnClick = null;
} else {
trOnClick = null;
tdOnClick = null;
}
}
if (nodes && this.props.multipleSelectionSettings && this.props.multipleSelectionSettings.isMultipleSelection) {
var selectedRowIds = this.props.multipleSelectionSettings.getSelectedRowIds();
nodes.unshift(React.createElement('td', {
key: 'selection',
style: columnStyles,
className: 'griddle-select griddle-select-cell',
onClick: tdOnClick
}, React.createElement('input', {
type: 'checkbox',
checked: this.props.multipleSelectionSettings.getIsRowChecked(dataView),
onChange: this.handleSelectionChange,
ref: 'selected'
})));
}
//Get the row from the row settings.
var className = that.props.rowSettings && that.props.rowSettings.getBodyRowMetadataClass(that.props.data) || "standard-row";
if (that.props.isChildRow) {
className = "child-row";
} else if (that.props.hasChildren) {
className = that.props.showChildren ? this.props.parentRowExpandedClassName : this.props.parentRowCollapsedClassName;
}
return React.createElement('tr', { onClick: trOnClick, className: className }, nodes);
}
});
module.exports = GridRow;
/***/ },
/* 181 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var forEach = __webpack_require__(182);
var isObject = __webpack_require__(35);
var isArray = __webpack_require__(74);
var isFunction = __webpack_require__(28);
var isPlainObject = __webpack_require__(185);
var forOwn = __webpack_require__(187);
// Credits: https://github.com/documentcloud/underscore-contrib
// Sub module: underscore.object.selectors
// License: MIT (https://github.com/documentcloud/underscore-contrib/blob/master/LICENSE)
// https://github.com/documentcloud/underscore-contrib/blob/master/underscore.object.selectors.js
// Will take a path like 'element[0][1].subElement["Hey!.What?"]["[hey]"]'
// and return ["element", "0", "1", "subElement", "Hey!.What?", "[hey]"]
function keysFromPath(path) {
// from http://codereview.stackexchange.com/a/63010/8176
/**
* Repeatedly capture either:
* - a bracketed expression, discarding optional matching quotes inside, or
* - an unbracketed expression, delimited by a dot or a bracket.
*/
var re = /\[("|')(.+)\1\]|([^.\[\]]+)/g;
var elements = [];
var result;
while ((result = re.exec(path)) !== null) {
elements.push(result[2] || result[3]);
}
return elements;
}
// Gets the value at any depth in a nested object based on the
// path described by the keys given. Keys may be given as an array
// or as a dot-separated string.
function getPath(obj, ks) {
if (typeof ks == "string") {
if (obj[ks] !== undefined) {
return obj[ks];
}
ks = keysFromPath(ks);
}
var i = -1,
length = ks.length;
// If the obj is null or undefined we have to break as
// a TypeError will result trying to access any property
// Otherwise keep incrementally access the next property in
// ks until complete
while (++i < length && obj != null) {
obj = obj[ks[i]];
}
return i === length ? obj : void 0;
}
// Based on the origin underscore _.pick function
// Credit: https://github.com/jashkenas/underscore/blob/master/underscore.js
function powerPick(object, keys) {
var result = {},
obj = object,
iteratee;
iteratee = function (key, obj) {
return key in obj;
};
obj = Object(obj);
for (var i = 0, length = keys.length; i < length; i++) {
var key = keys[i];
if (iteratee(key, obj)) result[key] = getPath(obj, key);
}
return result;
}
// Gets all the keys for a flattened object structure.
// Doesn't flatten arrays.
// Input:
// {
// a: {
// x: 1,
// y: 2
// },
// b: [3, 4],
// c: 5
// }
// Output:
// [
// "a.x",
// "a.y",
// "b",
// "c"
// ]
function getKeys(obj, prefix) {
var keys = [];
forEach(obj, function (value, key) {
var fullKey = prefix ? prefix + "." + key : key;
if (isObject(value) && !isArray(value) && !isFunction(value) && !(value instanceof Date)) {
keys = keys.concat(getKeys(value, fullKey));
} else {
keys.push(fullKey);
}
});
return keys;
}
// Recursivly traverse plain objects and arrays calling `fn` on each
// non-object/non-array leaf node.
function iterObject(thing, fn) {
if (isArray(thing)) {
forEach(thing, function (item) {
iterObject(item, fn);
});
} else if (isPlainObject(thing)) {
forOwn(thing, function (item) {
iterObject(item, fn);
});
} else {
fn(thing);
}
}
// Recursivly traverse plain objects and arrays and build a list of all
// non-object/non-array leaf nodes.
//
// Input:
// { "array": [1, "two", {"tree": 3}], "string": "a string" }
//
// Output:
// [1, 'two', 3, 'a string']
//
function getObjectValues(thing) {
var results = [];
iterObject(thing, function (value) {
results.push(value);
});
return results;
}
module.exports = {
pick: powerPick,
getAt: getPath,
keys: getKeys,
getObjectValues: getObjectValues
};
/***/ },
/* 182 */
/***/ function(module, exports, __webpack_require__) {
var arrayEach = __webpack_require__(183),
baseEach = __webpack_require__(117),
castFunction = __webpack_require__(184),
isArray = __webpack_require__(74);
/**
* Iterates over elements of `collection` and invokes `iteratee` for each element.
* The iteratee is invoked with three arguments: (value, index|key, collection).
* Iteratee functions may exit iteration early by explicitly returning `false`.
*
* **Note:** As with other "Collections" methods, objects with a "length"
* property are iterated like arrays. To avoid this behavior use `_.forIn`
* or `_.forOwn` for object iteration.
*
* @static
* @memberOf _
* @since 0.1.0
* @alias each
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Array|Object} Returns `collection`.
* @see _.forEachRight
* @example
*
* _.forEach([1, 2], function(value) {
* console.log(value);
* });
* // => Logs `1` then `2`.
*
* _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
* console.log(key);
* });
* // => Logs 'a' then 'b' (iteration order is not guaranteed).
*/
function forEach(collection, iteratee) {
var func = isArray(collection) ? arrayEach : baseEach;
return func(collection, castFunction(iteratee));
}
module.exports = forEach;
/***/ },
/* 183 */
/***/ function(module, exports) {
/**
* A specialized version of `_.forEach` for arrays without support for
* iteratee shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns `array`.
*/
function arrayEach(array, iteratee) {
var index = -1,
length = array == null ? 0 : array.length;
while (++index < length) {
if (iteratee(array[index], index, array) === false) {
break;
}
}
return array;
}
module.exports = arrayEach;
/***/ },
/* 184 */
/***/ function(module, exports, __webpack_require__) {
var identity = __webpack_require__(112);
/**
* Casts `value` to `identity` if it's not a function.
*
* @private
* @param {*} value The value to inspect.
* @returns {Function} Returns cast function.
*/
function castFunction(value) {
return typeof value == 'function' ? value : identity;
}
module.exports = castFunction;
/***/ },
/* 185 */
/***/ function(module, exports, __webpack_require__) {
var baseGetTag = __webpack_require__(29),
getPrototype = __webpack_require__(186),
isObjectLike = __webpack_require__(73);
/** `Object#toString` result references. */
var objectTag = '[object Object]';
/** Used for built-in method references. */
var funcProto = Function.prototype,
objectProto = Object.prototype;
/** Used to resolve the decompiled source of functions. */
var funcToString = funcProto.toString;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/** Used to infer the `Object` constructor. */
var objectCtorString = funcToString.call(Object);
/**
* Checks if `value` is a plain object, that is, an object created by the
* `Object` constructor or one with a `[[Prototype]]` of `null`.
*
* @static
* @memberOf _
* @since 0.8.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
* @example
*
* function Foo() {
* this.a = 1;
* }
*
* _.isPlainObject(new Foo);
* // => false
*
* _.isPlainObject([1, 2, 3]);
* // => false
*
* _.isPlainObject({ 'x': 0, 'y': 0 });
* // => true
*
* _.isPlainObject(Object.create(null));
* // => true
*/
function isPlainObject(value) {
if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
return false;
}
var proto = getPrototype(value);
if (proto === null) {
return true;
}
var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
return typeof Ctor == 'function' && Ctor instanceof Ctor &&
funcToString.call(Ctor) == objectCtorString;
}
module.exports = isPlainObject;
/***/ },
/* 186 */
/***/ function(module, exports, __webpack_require__) {
var overArg = __webpack_require__(87);
/** Built-in value references. */
var getPrototype = overArg(Object.getPrototypeOf, Object);
module.exports = getPrototype;
/***/ },
/* 187 */
/***/ function(module, exports, __webpack_require__) {
var baseForOwn = __webpack_require__(118),
castFunction = __webpack_require__(184);
/**
* Iterates over own enumerable string keyed properties of an object and
* invokes `iteratee` for each property. The iteratee is invoked with three
* arguments: (value, key, object). Iteratee functions may exit iteration
* early by explicitly returning `false`.
*
* @static
* @memberOf _
* @since 0.3.0
* @category Object
* @param {Object} object The object to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Object} Returns `object`.
* @see _.forOwnRight
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.forOwn(new Foo, function(value, key) {
* console.log(key);
* });
* // => Logs 'a' then 'b' (iteration order is not guaranteed).
*/
function forOwn(object, iteratee) {
return object && baseForOwn(object, castFunction(iteratee));
}
module.exports = forOwn;
/***/ },
/* 188 */
/***/ function(module, exports, __webpack_require__) {
var assignValue = __webpack_require__(158),
baseZipObject = __webpack_require__(189);
/**
* This method is like `_.fromPairs` except that it accepts two arrays,
* one of property identifiers and one of corresponding values.
*
* @static
* @memberOf _
* @since 0.4.0
* @category Array
* @param {Array} [props=[]] The property identifiers.
* @param {Array} [values=[]] The property values.
* @returns {Object} Returns the new object.
* @example
*
* _.zipObject(['a', 'b'], [1, 2]);
* // => { 'a': 1, 'b': 2 }
*/
function zipObject(props, values) {
return baseZipObject(props || [], values || [], assignValue);
}
module.exports = zipObject;
/***/ },
/* 189 */
/***/ function(module, exports) {
/**
* This base implementation of `_.zipObject` which assigns values using `assignFunc`.
*
* @private
* @param {Array} props The property identifiers.
* @param {Array} values The property values.
* @param {Function} assignFunc The function to assign values.
* @returns {Object} Returns the new object.
*/
function baseZipObject(props, values, assignFunc) {
var index = -1,
length = props.length,
valsLength = values.length,
result = {};
while (++index < length) {
var value = index < valsLength ? values[index] : undefined;
assignFunc(result, props[index], value);
}
return result;
}
module.exports = baseZipObject;
/***/ },
/* 190 */
/***/ function(module, exports, __webpack_require__) {
var apply = __webpack_require__(142),
assignInDefaults = __webpack_require__(191),
assignInWith = __webpack_require__(192),
baseRest = __webpack_require__(140);
/**
* Assigns own and inherited enumerable string keyed properties of source
* objects to the destination object for all destination properties that
* resolve to `undefined`. Source objects are applied from left to right.
* Once a property is set, additional values of the same property are ignored.
*
* **Note:** This method mutates `object`.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The destination object.
* @param {...Object} [sources] The source objects.
* @returns {Object} Returns `object`.
* @see _.defaultsDeep
* @example
*
* _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
* // => { 'a': 1, 'b': 2 }
*/
var defaults = baseRest(function(args) {
args.push(undefined, assignInDefaults);
return apply(assignInWith, undefined, args);
});
module.exports = defaults;
/***/ },
/* 191 */
/***/ function(module, exports, __webpack_require__) {
var eq = __webpack_require__(16);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Used by `_.defaults` to customize its `_.assignIn` use.
*
* @private
* @param {*} objValue The destination value.
* @param {*} srcValue The source value.
* @param {string} key The key of the property to assign.
* @param {Object} object The parent object of `objValue`.
* @returns {*} Returns the value to assign.
*/
function assignInDefaults(objValue, srcValue, key, object) {
if (objValue === undefined ||
(eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
return srcValue;
}
return objValue;
}
module.exports = assignInDefaults;
/***/ },
/* 192 */
/***/ function(module, exports, __webpack_require__) {
var copyObject = __webpack_require__(160),
createAssigner = __webpack_require__(161),
keysIn = __webpack_require__(193);
/**
* This method is like `_.assignIn` except that it accepts `customizer`
* which is invoked to produce the assigned values. If `customizer` returns
* `undefined`, assignment is handled by the method instead. The `customizer`
* is invoked with five arguments: (objValue, srcValue, key, object, source).
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @alias extendWith
* @category Object
* @param {Object} object The destination object.
* @param {...Object} sources The source objects.
* @param {Function} [customizer] The function to customize assigned values.
* @returns {Object} Returns `object`.
* @see _.assignWith
* @example
*
* function customizer(objValue, srcValue) {
* return _.isUndefined(objValue) ? srcValue : objValue;
* }
*
* var defaults = _.partialRight(_.assignInWith, customizer);
*
* defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
* // => { 'a': 1, 'b': 2 }
*/
var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
copyObject(source, keysIn(source), object, customizer);
});
module.exports = assignInWith;
/***/ },
/* 193 */
/***/ function(module, exports, __webpack_require__) {
var arrayLikeKeys = __webpack_require__(69),
baseKeysIn = __webpack_require__(194),
isArrayLike = __webpack_require__(88);
/**
* Creates an array of the own and inherited enumerable property names of `object`.
*
* **Note:** Non-object values are coerced to objects.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Object
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.keysIn(new Foo);
* // => ['a', 'b', 'c'] (iteration order is not guaranteed)
*/
function keysIn(object) {
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
}
module.exports = keysIn;
/***/ },
/* 194 */
/***/ function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(35),
isPrototype = __webpack_require__(85),
nativeKeysIn = __webpack_require__(195);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
*/
function baseKeysIn(object) {
if (!isObject(object)) {
return nativeKeysIn(object);
}
var isProto = isPrototype(object),
result = [];
for (var key in object) {
if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
result.push(key);
}
}
return result;
}
module.exports = baseKeysIn;
/***/ },
/* 195 */
/***/ function(module, exports) {
/**
* This function is like
* [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
* except that it includes inherited enumerable properties.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
*/
function nativeKeysIn(object) {
var result = [];
if (object != null) {
for (var key in Object(object)) {
result.push(key);
}
}
return result;
}
module.exports = nativeKeysIn;
/***/ },
/* 196 */
/***/ function(module, exports, __webpack_require__) {
var createToPairs = __webpack_require__(197),
keys = __webpack_require__(68);
/**
* Creates an array of own enumerable string keyed-value pairs for `object`
* which can be consumed by `_.fromPairs`. If `object` is a map or set, its
* entries are returned.
*
* @static
* @memberOf _
* @since 4.0.0
* @alias entries
* @category Object
* @param {Object} object The object to query.
* @returns {Array} Returns the key-value pairs.
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.toPairs(new Foo);
* // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
*/
var toPairs = createToPairs(keys);
module.exports = toPairs;
/***/ },
/* 197 */
/***/ function(module, exports, __webpack_require__) {
var baseToPairs = __webpack_require__(198),
getTag = __webpack_require__(89),
mapToArray = __webpack_require__(65),
setToPairs = __webpack_require__(199);
/** `Object#toString` result references. */
var mapTag = '[object Map]',
setTag = '[object Set]';
/**
* Creates a `_.toPairs` or `_.toPairsIn` function.
*
* @private
* @param {Function} keysFunc The function to get the keys of a given object.
* @returns {Function} Returns the new pairs function.
*/
function createToPairs(keysFunc) {
return function(object) {
var tag = getTag(object);
if (tag == mapTag) {
return mapToArray(object);
}
if (tag == setTag) {
return setToPairs(object);
}
return baseToPairs(object, keysFunc(object));
};
}
module.exports = createToPairs;
/***/ },
/* 198 */
/***/ function(module, exports, __webpack_require__) {
var arrayMap = __webpack_require__(7);
/**
* The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
* of key-value pairs for `object` corresponding to the property names of `props`.
*
* @private
* @param {Object} object The object to query.
* @param {Array} props The property names to get values for.
* @returns {Object} Returns the key-value pairs.
*/
function baseToPairs(object, props) {
return arrayMap(props, function(key) {
return [key, object[key]];
});
}
module.exports = baseToPairs;
/***/ },
/* 199 */
/***/ function(module, exports) {
/**
* Converts `set` to its value-value pairs.
*
* @private
* @param {Object} set The set to convert.
* @returns {Array} Returns the value-value pairs.
*/
function setToPairs(set) {
var index = -1,
result = Array(set.size);
set.forEach(function(value) {
result[++index] = [value, value];
});
return result;
}
module.exports = setToPairs;
/***/ },
/* 200 */
/***/ function(module, exports, __webpack_require__) {
/*
Griddle - Simple Grid Component for React
https://github.com/DynamicTyped/Griddle
Copyright (c) 2014 Ryan Lanciaux | DynamicTyped
See License / Disclaimer https://raw.githubusercontent.com/DynamicTyped/Griddle/master/LICENSE
*/
"use strict";
var React = __webpack_require__(2);
var CustomRowComponentContainer = React.createClass({
displayName: "CustomRowComponentContainer",
getDefaultProps: function getDefaultProps() {
return {
"data": [],
"metadataColumns": [],
"className": "",
"customComponent": {},
"globalData": {}
};
},
render: function render() {
var that = this;
if (typeof that.props.customComponent !== 'function') {
console.log("Couldn't find valid template.");
return React.createElement("div", { className: this.props.className });
}
var nodes = this.props.data.map(function (row, index) {
return React.createElement(that.props.customComponent, { data: row, metadataColumns: that.props.metadataColumns, key: index, globalData: that.props.globalData });
});
var footer = this.props.showPager && this.props.pagingContent;
return React.createElement("div", { className: this.props.className, style: this.props.style }, nodes);
}
});
module.exports = CustomRowComponentContainer;
/***/ },
/* 201 */
/***/ function(module, exports, __webpack_require__) {
/*
Griddle - Simple Grid Component for React
https://github.com/DynamicTyped/Griddle
Copyright (c) 2014 Ryan Lanciaux | DynamicTyped
See License / Disclaimer https://raw.githubusercontent.com/DynamicTyped/Griddle/master/LICENSE
*/
"use strict";
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;
};
var React = __webpack_require__(2);
var CustomPaginationContainer = React.createClass({
displayName: "CustomPaginationContainer",
getDefaultProps: function getDefaultProps() {
return {
"maxPage": 0,
"nextText": "",
"previousText": "",
"currentPage": 0,
"customPagerComponent": {},
"customPagerComponentOptions": {}
};
},
render: function render() {
var that = this;
if (typeof that.props.customPagerComponent !== 'function') {
console.log("Couldn't find valid template.");
return React.createElement("div", null);
}
return React.createElement(that.props.customPagerComponent, _extends({}, this.props.customPagerComponentOptions, { maxPage: this.props.maxPage, nextText: this.props.nextText, previousText: this.props.previousText, currentPage: this.props.currentPage, setPage: this.props.setPage, previous: this.props.previous, next: this.props.next }));
}
});
module.exports = CustomPaginationContainer;
/***/ },
/* 202 */
/***/ function(module, exports, __webpack_require__) {
/*
See License / Disclaimer https://raw.githubusercontent.com/DynamicTyped/Griddle/master/LICENSE
*/
"use strict";
var React = __webpack_require__(2);
var CustomFilterContainer = React.createClass({
displayName: "CustomFilterContainer",
getDefaultProps: function getDefaultProps() {
return {
"placeholderText": ""
};
},
render: function render() {
var that = this;
if (typeof that.props.customFilterComponent !== 'function') {
console.log("Couldn't find valid template.");
return React.createElement("div", null);
}
return React.createElement(that.props.customFilterComponent, {
changeFilter: this.props.changeFilter,
results: this.props.results,
currentResults: this.props.currentResults,
placeholderText: this.props.placeholderText });
}
});
module.exports = CustomFilterContainer;
/***/ },
/* 203 */
/***/ function(module, exports, __webpack_require__) {
var baseSlice = __webpack_require__(204),
toInteger = __webpack_require__(129);
/**
* Creates a slice of `array` with `n` elements dropped from the beginning.
*
* @static
* @memberOf _
* @since 0.5.0
* @category Array
* @param {Array} array The array to query.
* @param {number} [n=1] The number of elements to drop.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Array} Returns the slice of `array`.
* @example
*
* _.drop([1, 2, 3]);
* // => [2, 3]
*
* _.drop([1, 2, 3], 2);
* // => [3]
*
* _.drop([1, 2, 3], 5);
* // => []
*
* _.drop([1, 2, 3], 0);
* // => [1, 2, 3]
*/
function drop(array, n, guard) {
var length = array == null ? 0 : array.length;
if (!length) {
return [];
}
n = (guard || n === undefined) ? 1 : toInteger(n);
return baseSlice(array, n < 0 ? 0 : n, length);
}
module.exports = drop;
/***/ },
/* 204 */
/***/ function(module, exports) {
/**
* The base implementation of `_.slice` without an iteratee call guard.
*
* @private
* @param {Array} array The array to slice.
* @param {number} [start=0] The start position.
* @param {number} [end=array.length] The end position.
* @returns {Array} Returns the slice of `array`.
*/
function baseSlice(array, start, end) {
var index = -1,
length = array.length;
if (start < 0) {
start = -start > length ? 0 : (length + start);
}
end = end > length ? length : end;
if (end < 0) {
end += length;
}
length = start > end ? 0 : ((end - start) >>> 0);
start >>>= 0;
var result = Array(length);
while (++index < length) {
result[index] = array[index + start];
}
return result;
}
module.exports = baseSlice;
/***/ },
/* 205 */
/***/ function(module, exports, __webpack_require__) {
var baseSlice = __webpack_require__(204),
toInteger = __webpack_require__(129);
/**
* Creates a slice of `array` with `n` elements dropped from the end.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Array
* @param {Array} array The array to query.
* @param {number} [n=1] The number of elements to drop.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Array} Returns the slice of `array`.
* @example
*
* _.dropRight([1, 2, 3]);
* // => [1, 2]
*
* _.dropRight([1, 2, 3], 2);
* // => [1]
*
* _.dropRight([1, 2, 3], 5);
* // => []
*
* _.dropRight([1, 2, 3], 0);
* // => [1, 2, 3]
*/
function dropRight(array, n, guard) {
var length = array == null ? 0 : array.length;
if (!length) {
return [];
}
n = (guard || n === undefined) ? 1 : toInteger(n);
n = length - n;
return baseSlice(array, 0, n < 0 ? 0 : n);
}
module.exports = dropRight;
/***/ },
/* 206 */
/***/ function(module, exports, __webpack_require__) {
var baseSlice = __webpack_require__(204),
toInteger = __webpack_require__(129);
/**
* Creates a slice of `array` with `n` elements taken from the beginning.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to query.
* @param {number} [n=1] The number of elements to take.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Array} Returns the slice of `array`.
* @example
*
* _.take([1, 2, 3]);
* // => [1]
*
* _.take([1, 2, 3], 2);
* // => [1, 2]
*
* _.take([1, 2, 3], 5);
* // => [1, 2, 3]
*
* _.take([1, 2, 3], 0);
* // => []
*/
function take(array, n, guard) {
if (!(array && array.length)) {
return [];
}
n = (guard || n === undefined) ? 1 : toInteger(n);
return baseSlice(array, 0, n < 0 ? 0 : n);
}
module.exports = take;
/***/ },
/* 207 */
/***/ function(module, exports, __webpack_require__) {
var baseSlice = __webpack_require__(204);
/**
* Gets all but the last element of `array`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to query.
* @returns {Array} Returns the slice of `array`.
* @example
*
* _.initial([1, 2, 3]);
* // => [1, 2]
*/
function initial(array) {
var length = array == null ? 0 : array.length;
return length ? baseSlice(array, 0, -1) : [];
}
module.exports = initial;
/***/ },
/* 208 */
/***/ function(module, exports, __webpack_require__) {
var arrayMap = __webpack_require__(7),
baseIntersection = __webpack_require__(209),
baseRest = __webpack_require__(140),
castArrayLikeObject = __webpack_require__(210);
/**
* Creates an array of unique values that are included in all given arrays
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons. The order and references of result values are
* determined by the first array.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {...Array} [arrays] The arrays to inspect.
* @returns {Array} Returns the new array of intersecting values.
* @example
*
* _.intersection([2, 1], [2, 3]);
* // => [2]
*/
var intersection = baseRest(function(arrays) {
var mapped = arrayMap(arrays, castArrayLikeObject);
return (mapped.length && mapped[0] === arrays[0])
? baseIntersection(mapped)
: [];
});
module.exports = intersection;
/***/ },
/* 209 */
/***/ function(module, exports, __webpack_require__) {
var SetCache = __webpack_require__(58),
arrayIncludes = __webpack_require__(151),
arrayIncludesWith = __webpack_require__(155),
arrayMap = __webpack_require__(7),
baseUnary = __webpack_require__(82),
cacheHas = __webpack_require__(62);
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMin = Math.min;
/**
* The base implementation of methods like `_.intersection`, without support
* for iteratee shorthands, that accepts an array of arrays to inspect.
*
* @private
* @param {Array} arrays The arrays to inspect.
* @param {Function} [iteratee] The iteratee invoked per element.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new array of shared values.
*/
function baseIntersection(arrays, iteratee, comparator) {
var includes = comparator ? arrayIncludesWith : arrayIncludes,
length = arrays[0].length,
othLength = arrays.length,
othIndex = othLength,
caches = Array(othLength),
maxLength = Infinity,
result = [];
while (othIndex--) {
var array = arrays[othIndex];
if (othIndex && iteratee) {
array = arrayMap(array, baseUnary(iteratee));
}
maxLength = nativeMin(array.length, maxLength);
caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
? new SetCache(othIndex && array)
: undefined;
}
array = arrays[0];
var index = -1,
seen = caches[0];
outer:
while (++index < length && result.length < maxLength) {
var value = array[index],
computed = iteratee ? iteratee(value) : value;
value = (comparator || value !== 0) ? value : 0;
if (!(seen
? cacheHas(seen, computed)
: includes(result, computed, comparator)
)) {
othIndex = othLength;
while (--othIndex) {
var cache = caches[othIndex];
if (!(cache
? cacheHas(cache, computed)
: includes(arrays[othIndex], computed, comparator))
) {
continue outer;
}
}
if (seen) {
seen.push(computed);
}
result.push(value);
}
}
return result;
}
module.exports = baseIntersection;
/***/ },
/* 210 */
/***/ function(module, exports, __webpack_require__) {
var isArrayLikeObject = __webpack_require__(156);
/**
* Casts `value` to an empty array if it's not an array like object.
*
* @private
* @param {*} value The value to inspect.
* @returns {Array|Object} Returns the cast array-like object.
*/
function castArrayLikeObject(value) {
return isArrayLikeObject(value) ? value : [];
}
module.exports = castArrayLikeObject;
/***/ },
/* 211 */
/***/ function(module, exports, __webpack_require__) {
var baseKeys = __webpack_require__(84),
getTag = __webpack_require__(89),
isArguments = __webpack_require__(71),
isArray = __webpack_require__(74),
isArrayLike = __webpack_require__(88),
isBuffer = __webpack_require__(75),
isPrototype = __webpack_require__(85),
isTypedArray = __webpack_require__(79);
/** `Object#toString` result references. */
var mapTag = '[object Map]',
setTag = '[object Set]';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Checks if `value` is an empty object, collection, map, or set.
*
* Objects are considered empty if they have no own enumerable string keyed
* properties.
*
* Array-like values such as `arguments` objects, arrays, buffers, strings, or
* jQuery-like collections are considered empty if they have a `length` of `0`.
* Similarly, maps and sets are considered empty if they have a `size` of `0`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is empty, else `false`.
* @example
*
* _.isEmpty(null);
* // => true
*
* _.isEmpty(true);
* // => true
*
* _.isEmpty(1);
* // => true
*
* _.isEmpty([1, 2, 3]);
* // => false
*
* _.isEmpty({ 'a': 1 });
* // => false
*/
function isEmpty(value) {
if (value == null) {
return true;
}
if (isArrayLike(value) &&
(isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
isBuffer(value) || isTypedArray(value) || isArguments(value))) {
return !value.length;
}
var tag = getTag(value);
if (tag == mapTag || tag == setTag) {
return !value.size;
}
if (isPrototype(value)) {
return !baseKeys(value).length;
}
for (var key in value) {
if (hasOwnProperty.call(value, key)) {
return false;
}
}
return true;
}
module.exports = isEmpty;
/***/ },
/* 212 */
/***/ function(module, exports) {
/**
* Checks if `value` is `null`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is `null`, else `false`.
* @example
*
* _.isNull(null);
* // => true
*
* _.isNull(void 0);
* // => false
*/
function isNull(value) {
return value === null;
}
module.exports = isNull;
/***/ },
/* 213 */
/***/ function(module, exports) {
/**
* Checks if `value` is `undefined`.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
* @example
*
* _.isUndefined(void 0);
* // => true
*
* _.isUndefined(null);
* // => false
*/
function isUndefined(value) {
return value === undefined;
}
module.exports = isUndefined;
/***/ },
/* 214 */
/***/ function(module, exports, __webpack_require__) {
var arrayMap = __webpack_require__(7),
baseClone = __webpack_require__(215),
baseUnset = __webpack_require__(242),
castPath = __webpack_require__(100),
copyObject = __webpack_require__(160),
flatRest = __webpack_require__(167),
getAllKeysIn = __webpack_require__(227);
/** Used to compose bitmasks for cloning. */
var CLONE_DEEP_FLAG = 1,
CLONE_FLAT_FLAG = 2,
CLONE_SYMBOLS_FLAG = 4;
/**
* The opposite of `_.pick`; this method creates an object composed of the
* own and inherited enumerable property paths of `object` that are not omitted.
*
* **Note:** This method is considerably slower than `_.pick`.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The source object.
* @param {...(string|string[])} [paths] The property paths to omit.
* @returns {Object} Returns the new object.
* @example
*
* var object = { 'a': 1, 'b': '2', 'c': 3 };
*
* _.omit(object, ['a', 'c']);
* // => { 'b': '2' }
*/
var omit = flatRest(function(object, paths) {
var result = {};
if (object == null) {
return result;
}
var isDeep = false;
paths = arrayMap(paths, function(path) {
path = castPath(path, object);
isDeep || (isDeep = path.length > 1);
return path;
});
copyObject(object, getAllKeysIn(object), result);
if (isDeep) {
result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG);
}
var length = paths.length;
while (length--) {
baseUnset(result, paths[length]);
}
return result;
});
module.exports = omit;
/***/ },
/* 215 */
/***/ function(module, exports, __webpack_require__) {
var Stack = __webpack_require__(11),
arrayEach = __webpack_require__(183),
assignValue = __webpack_require__(158),
baseAssign = __webpack_require__(216),
baseAssignIn = __webpack_require__(217),
cloneBuffer = __webpack_require__(218),
copyArray = __webpack_require__(219),
copySymbols = __webpack_require__(220),
copySymbolsIn = __webpack_require__(223),
getAllKeys = __webpack_require__(225),
getAllKeysIn = __webpack_require__(227),
getTag = __webpack_require__(89),
initCloneArray = __webpack_require__(228),
initCloneByTag = __webpack_require__(229),
initCloneObject = __webpack_require__(240),
isArray = __webpack_require__(74),
isBuffer = __webpack_require__(75),
isObject = __webpack_require__(35),
keys = __webpack_require__(68);
/** Used to compose bitmasks for cloning. */
var CLONE_DEEP_FLAG = 1,
CLONE_FLAT_FLAG = 2,
CLONE_SYMBOLS_FLAG = 4;
/** `Object#toString` result references. */
var argsTag = '[object Arguments]',
arrayTag = '[object Array]',
boolTag = '[object Boolean]',
dateTag = '[object Date]',
errorTag = '[object Error]',
funcTag = '[object Function]',
genTag = '[object GeneratorFunction]',
mapTag = '[object Map]',
numberTag = '[object Number]',
objectTag = '[object Object]',
regexpTag = '[object RegExp]',
setTag = '[object Set]',
stringTag = '[object String]',
symbolTag = '[object Symbol]',
weakMapTag = '[object WeakMap]';
var arrayBufferTag = '[object ArrayBuffer]',
dataViewTag = '[object DataView]',
float32Tag = '[object Float32Array]',
float64Tag = '[object Float64Array]',
int8Tag = '[object Int8Array]',
int16Tag = '[object Int16Array]',
int32Tag = '[object Int32Array]',
uint8Tag = '[object Uint8Array]',
uint8ClampedTag = '[object Uint8ClampedArray]',
uint16Tag = '[object Uint16Array]',
uint32Tag = '[object Uint32Array]';
/** Used to identify `toStringTag` values supported by `_.clone`. */
var cloneableTags = {};
cloneableTags[argsTag] = cloneableTags[arrayTag] =
cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
cloneableTags[boolTag] = cloneableTags[dateTag] =
cloneableTags[float32Tag] = cloneableTags[float64Tag] =
cloneableTags[int8Tag] = cloneableTags[int16Tag] =
cloneableTags[int32Tag] = cloneableTags[mapTag] =
cloneableTags[numberTag] = cloneableTags[objectTag] =
cloneableTags[regexpTag] = cloneableTags[setTag] =
cloneableTags[stringTag] = cloneableTags[symbolTag] =
cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
cloneableTags[errorTag] = cloneableTags[funcTag] =
cloneableTags[weakMapTag] = false;
/**
* The base implementation of `_.clone` and `_.cloneDeep` which tracks
* traversed objects.
*
* @private
* @param {*} value The value to clone.
* @param {boolean} bitmask The bitmask flags.
* 1 - Deep clone
* 2 - Flatten inherited properties
* 4 - Clone symbols
* @param {Function} [customizer] The function to customize cloning.
* @param {string} [key] The key of `value`.
* @param {Object} [object] The parent object of `value`.
* @param {Object} [stack] Tracks traversed objects and their clone counterparts.
* @returns {*} Returns the cloned value.
*/
function baseClone(value, bitmask, customizer, key, object, stack) {
var result,
isDeep = bitmask & CLONE_DEEP_FLAG,
isFlat = bitmask & CLONE_FLAT_FLAG,
isFull = bitmask & CLONE_SYMBOLS_FLAG;
if (customizer) {
result = object ? customizer(value, key, object, stack) : customizer(value);
}
if (result !== undefined) {
return result;
}
if (!isObject(value)) {
return value;
}
var isArr = isArray(value);
if (isArr) {
result = initCloneArray(value);
if (!isDeep) {
return copyArray(value, result);
}
} else {
var tag = getTag(value),
isFunc = tag == funcTag || tag == genTag;
if (isBuffer(value)) {
return cloneBuffer(value, isDeep);
}
if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
result = (isFlat || isFunc) ? {} : initCloneObject(value);
if (!isDeep) {
return isFlat
? copySymbolsIn(value, baseAssignIn(result, value))
: copySymbols(value, baseAssign(result, value));
}
} else {
if (!cloneableTags[tag]) {
return object ? value : {};
}
result = initCloneByTag(value, tag, baseClone, isDeep);
}
}
// Check for circular references and return its corresponding clone.
stack || (stack = new Stack);
var stacked = stack.get(value);
if (stacked) {
return stacked;
}
stack.set(value, result);
var keysFunc = isFull
? (isFlat ? getAllKeysIn : getAllKeys)
: (isFlat ? keysIn : keys);
var props = isArr ? undefined : keysFunc(value);
arrayEach(props || value, function(subValue, key) {
if (props) {
key = subValue;
subValue = value[key];
}
// Recursively populate clone (susceptible to call stack limits).
assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
});
return result;
}
module.exports = baseClone;
/***/ },
/* 216 */
/***/ function(module, exports, __webpack_require__) {
var copyObject = __webpack_require__(160),
keys = __webpack_require__(68);
/**
* The base implementation of `_.assign` without support for multiple sources
* or `customizer` functions.
*
* @private
* @param {Object} object The destination object.
* @param {Object} source The source object.
* @returns {Object} Returns `object`.
*/
function baseAssign(object, source) {
return object && copyObject(source, keys(source), object);
}
module.exports = baseAssign;
/***/ },
/* 217 */
/***/ function(module, exports, __webpack_require__) {
var copyObject = __webpack_require__(160),
keysIn = __webpack_require__(193);
/**
* The base implementation of `_.assignIn` without support for multiple sources
* or `customizer` functions.
*
* @private
* @param {Object} object The destination object.
* @param {Object} source The source object.
* @returns {Object} Returns `object`.
*/
function baseAssignIn(object, source) {
return object && copyObject(source, keysIn(source), object);
}
module.exports = baseAssignIn;
/***/ },
/* 218 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(31);
/** Detect free variable `exports`. */
var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
/** Detect free variable `module`. */
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports = freeModule && freeModule.exports === freeExports;
/** Built-in value references. */
var Buffer = moduleExports ? root.Buffer : undefined,
allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
/**
* Creates a clone of `buffer`.
*
* @private
* @param {Buffer} buffer The buffer to clone.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Buffer} Returns the cloned buffer.
*/
function cloneBuffer(buffer, isDeep) {
if (isDeep) {
return buffer.slice();
}
var length = buffer.length,
result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
buffer.copy(result);
return result;
}
module.exports = cloneBuffer;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(76)(module)))
/***/ },
/* 219 */
/***/ function(module, exports) {
/**
* Copies the values of `source` to `array`.
*
* @private
* @param {Array} source The array to copy values from.
* @param {Array} [array=[]] The array to copy values to.
* @returns {Array} Returns `array`.
*/
function copyArray(source, array) {
var index = -1,
length = source.length;
array || (array = Array(length));
while (++index < length) {
array[index] = source[index];
}
return array;
}
module.exports = copyArray;
/***/ },
/* 220 */
/***/ function(module, exports, __webpack_require__) {
var copyObject = __webpack_require__(160),
getSymbols = __webpack_require__(221);
/**
* Copies own symbols of `source` to `object`.
*
* @private
* @param {Object} source The object to copy symbols from.
* @param {Object} [object={}] The object to copy symbols to.
* @returns {Object} Returns `object`.
*/
function copySymbols(source, object) {
return copyObject(source, getSymbols(source), object);
}
module.exports = copySymbols;
/***/ },
/* 221 */
/***/ function(module, exports, __webpack_require__) {
var overArg = __webpack_require__(87),
stubArray = __webpack_require__(222);
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeGetSymbols = Object.getOwnPropertySymbols;
/**
* Creates an array of the own enumerable symbols of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of symbols.
*/
var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;
module.exports = getSymbols;
/***/ },
/* 222 */
/***/ function(module, exports) {
/**
* This method returns a new empty array.
*
* @static
* @memberOf _
* @since 4.13.0
* @category Util
* @returns {Array} Returns the new empty array.
* @example
*
* var arrays = _.times(2, _.stubArray);
*
* console.log(arrays);
* // => [[], []]
*
* console.log(arrays[0] === arrays[1]);
* // => false
*/
function stubArray() {
return [];
}
module.exports = stubArray;
/***/ },
/* 223 */
/***/ function(module, exports, __webpack_require__) {
var copyObject = __webpack_require__(160),
getSymbolsIn = __webpack_require__(224);
/**
* Copies own and inherited symbols of `source` to `object`.
*
* @private
* @param {Object} source The object to copy symbols from.
* @param {Object} [object={}] The object to copy symbols to.
* @returns {Object} Returns `object`.
*/
function copySymbolsIn(source, object) {
return copyObject(source, getSymbolsIn(source), object);
}
module.exports = copySymbolsIn;
/***/ },
/* 224 */
/***/ function(module, exports, __webpack_require__) {
var arrayPush = __webpack_require__(134),
getPrototype = __webpack_require__(186),
getSymbols = __webpack_require__(221),
stubArray = __webpack_require__(222);
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeGetSymbols = Object.getOwnPropertySymbols;
/**
* Creates an array of the own and inherited enumerable symbols of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of symbols.
*/
var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
var result = [];
while (object) {
arrayPush(result, getSymbols(object));
object = getPrototype(object);
}
return result;
};
module.exports = getSymbolsIn;
/***/ },
/* 225 */
/***/ function(module, exports, __webpack_require__) {
var baseGetAllKeys = __webpack_require__(226),
getSymbols = __webpack_require__(221),
keys = __webpack_require__(68);
/**
* Creates an array of own enumerable property names and symbols of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names and symbols.
*/
function getAllKeys(object) {
return baseGetAllKeys(object, keys, getSymbols);
}
module.exports = getAllKeys;
/***/ },
/* 226 */
/***/ function(module, exports, __webpack_require__) {
var arrayPush = __webpack_require__(134),
isArray = __webpack_require__(74);
/**
* The base implementation of `getAllKeys` and `getAllKeysIn` which uses
* `keysFunc` and `symbolsFunc` to get the enumerable property names and
* symbols of `object`.
*
* @private
* @param {Object} object The object to query.
* @param {Function} keysFunc The function to get the keys of `object`.
* @param {Function} symbolsFunc The function to get the symbols of `object`.
* @returns {Array} Returns the array of property names and symbols.
*/
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
var result = keysFunc(object);
return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
}
module.exports = baseGetAllKeys;
/***/ },
/* 227 */
/***/ function(module, exports, __webpack_require__) {
var baseGetAllKeys = __webpack_require__(226),
getSymbolsIn = __webpack_require__(224),
keysIn = __webpack_require__(193);
/**
* Creates an array of own and inherited enumerable property names and
* symbols of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names and symbols.
*/
function getAllKeysIn(object) {
return baseGetAllKeys(object, keysIn, getSymbolsIn);
}
module.exports = getAllKeysIn;
/***/ },
/* 228 */
/***/ function(module, exports) {
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Initializes an array clone.
*
* @private
* @param {Array} array The array to clone.
* @returns {Array} Returns the initialized clone.
*/
function initCloneArray(array) {
var length = array.length,
result = array.constructor(length);
// Add properties assigned by `RegExp#exec`.
if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
result.index = array.index;
result.input = array.input;
}
return result;
}
module.exports = initCloneArray;
/***/ },
/* 229 */
/***/ function(module, exports, __webpack_require__) {
var cloneArrayBuffer = __webpack_require__(230),
cloneDataView = __webpack_require__(231),
cloneMap = __webpack_require__(232),
cloneRegExp = __webpack_require__(235),
cloneSet = __webpack_require__(236),
cloneSymbol = __webpack_require__(238),
cloneTypedArray = __webpack_require__(239);
/** `Object#toString` result references. */
var boolTag = '[object Boolean]',
dateTag = '[object Date]',
mapTag = '[object Map]',
numberTag = '[object Number]',
regexpTag = '[object RegExp]',
setTag = '[object Set]',
stringTag = '[object String]',
symbolTag = '[object Symbol]';
var arrayBufferTag = '[object ArrayBuffer]',
dataViewTag = '[object DataView]',
float32Tag = '[object Float32Array]',
float64Tag = '[object Float64Array]',
int8Tag = '[object Int8Array]',
int16Tag = '[object Int16Array]',
int32Tag = '[object Int32Array]',
uint8Tag = '[object Uint8Array]',
uint8ClampedTag = '[object Uint8ClampedArray]',
uint16Tag = '[object Uint16Array]',
uint32Tag = '[object Uint32Array]';
/**
* Initializes an object clone based on its `toStringTag`.
*
* **Note:** This function only supports cloning values with tags of
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
*
* @private
* @param {Object} object The object to clone.
* @param {string} tag The `toStringTag` of the object to clone.
* @param {Function} cloneFunc The function to clone values.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Object} Returns the initialized clone.
*/
function initCloneByTag(object, tag, cloneFunc, isDeep) {
var Ctor = object.constructor;
switch (tag) {
case arrayBufferTag:
return cloneArrayBuffer(object);
case boolTag:
case dateTag:
return new Ctor(+object);
case dataViewTag:
return cloneDataView(object, isDeep);
case float32Tag: case float64Tag:
case int8Tag: case int16Tag: case int32Tag:
case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
return cloneTypedArray(object, isDeep);
case mapTag:
return cloneMap(object, isDeep, cloneFunc);
case numberTag:
case stringTag:
return new Ctor(object);
case regexpTag:
return cloneRegExp(object);
case setTag:
return cloneSet(object, isDeep, cloneFunc);
case symbolTag:
return cloneSymbol(object);
}
}
module.exports = initCloneByTag;
/***/ },
/* 230 */
/***/ function(module, exports, __webpack_require__) {
var Uint8Array = __webpack_require__(64);
/**
* Creates a clone of `arrayBuffer`.
*
* @private
* @param {ArrayBuffer} arrayBuffer The array buffer to clone.
* @returns {ArrayBuffer} Returns the cloned array buffer.
*/
function cloneArrayBuffer(arrayBuffer) {
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
new Uint8Array(result).set(new Uint8Array(arrayBuffer));
return result;
}
module.exports = cloneArrayBuffer;
/***/ },
/* 231 */
/***/ function(module, exports, __webpack_require__) {
var cloneArrayBuffer = __webpack_require__(230);
/**
* Creates a clone of `dataView`.
*
* @private
* @param {Object} dataView The data view to clone.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Object} Returns the cloned data view.
*/
function cloneDataView(dataView, isDeep) {
var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
}
module.exports = cloneDataView;
/***/ },
/* 232 */
/***/ function(module, exports, __webpack_require__) {
var addMapEntry = __webpack_require__(233),
arrayReduce = __webpack_require__(234),
mapToArray = __webpack_require__(65);
/** Used to compose bitmasks for cloning. */
var CLONE_DEEP_FLAG = 1;
/**
* Creates a clone of `map`.
*
* @private
* @param {Object} map The map to clone.
* @param {Function} cloneFunc The function to clone values.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Object} Returns the cloned map.
*/
function cloneMap(map, isDeep, cloneFunc) {
var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map);
return arrayReduce(array, addMapEntry, new map.constructor);
}
module.exports = cloneMap;
/***/ },
/* 233 */
/***/ function(module, exports) {
/**
* Adds the key-value `pair` to `map`.
*
* @private
* @param {Object} map The map to modify.
* @param {Array} pair The key-value pair to add.
* @returns {Object} Returns `map`.
*/
function addMapEntry(map, pair) {
// Don't return `map.set` because it's not chainable in IE 11.
map.set(pair[0], pair[1]);
return map;
}
module.exports = addMapEntry;
/***/ },
/* 234 */
/***/ function(module, exports) {
/**
* A specialized version of `_.reduce` for arrays without support for
* iteratee shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @param {*} [accumulator] The initial value.
* @param {boolean} [initAccum] Specify using the first element of `array` as
* the initial value.
* @returns {*} Returns the accumulated value.
*/
function arrayReduce(array, iteratee, accumulator, initAccum) {
var index = -1,
length = array == null ? 0 : array.length;
if (initAccum && length) {
accumulator = array[++index];
}
while (++index < length) {
accumulator = iteratee(accumulator, array[index], index, array);
}
return accumulator;
}
module.exports = arrayReduce;
/***/ },
/* 235 */
/***/ function(module, exports) {
/** Used to match `RegExp` flags from their coerced string values. */
var reFlags = /\w*$/;
/**
* Creates a clone of `regexp`.
*
* @private
* @param {Object} regexp The regexp to clone.
* @returns {Object} Returns the cloned regexp.
*/
function cloneRegExp(regexp) {
var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
result.lastIndex = regexp.lastIndex;
return result;
}
module.exports = cloneRegExp;
/***/ },
/* 236 */
/***/ function(module, exports, __webpack_require__) {
var addSetEntry = __webpack_require__(237),
arrayReduce = __webpack_require__(234),
setToArray = __webpack_require__(66);
/** Used to compose bitmasks for cloning. */
var CLONE_DEEP_FLAG = 1;
/**
* Creates a clone of `set`.
*
* @private
* @param {Object} set The set to clone.
* @param {Function} cloneFunc The function to clone values.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Object} Returns the cloned set.
*/
function cloneSet(set, isDeep, cloneFunc) {
var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set);
return arrayReduce(array, addSetEntry, new set.constructor);
}
module.exports = cloneSet;
/***/ },
/* 237 */
/***/ function(module, exports) {
/**
* Adds `value` to `set`.
*
* @private
* @param {Object} set The set to modify.
* @param {*} value The value to add.
* @returns {Object} Returns `set`.
*/
function addSetEntry(set, value) {
// Don't return `set.add` because it's not chainable in IE 11.
set.add(value);
return set;
}
module.exports = addSetEntry;
/***/ },
/* 238 */
/***/ function(module, exports, __webpack_require__) {
var Symbol = __webpack_require__(30);
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
/**
* Creates a clone of the `symbol` object.
*
* @private
* @param {Object} symbol The symbol object to clone.
* @returns {Object} Returns the cloned symbol object.
*/
function cloneSymbol(symbol) {
return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
}
module.exports = cloneSymbol;
/***/ },
/* 239 */
/***/ function(module, exports, __webpack_require__) {
var cloneArrayBuffer = __webpack_require__(230);
/**
* Creates a clone of `typedArray`.
*
* @private
* @param {Object} typedArray The typed array to clone.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Object} Returns the cloned typed array.
*/
function cloneTypedArray(typedArray, isDeep) {
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
}
module.exports = cloneTypedArray;
/***/ },
/* 240 */
/***/ function(module, exports, __webpack_require__) {
var baseCreate = __webpack_require__(241),
getPrototype = __webpack_require__(186),
isPrototype = __webpack_require__(85);
/**
* Initializes an object clone.
*
* @private
* @param {Object} object The object to clone.
* @returns {Object} Returns the initialized clone.
*/
function initCloneObject(object) {
return (typeof object.constructor == 'function' && !isPrototype(object))
? baseCreate(getPrototype(object))
: {};
}
module.exports = initCloneObject;
/***/ },
/* 241 */
/***/ function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(35);
/** Built-in value references. */
var objectCreate = Object.create;
/**
* The base implementation of `_.create` without support for assigning
* properties to the created object.
*
* @private
* @param {Object} proto The object to inherit from.
* @returns {Object} Returns the new object.
*/
var baseCreate = (function() {
function object() {}
return function(proto) {
if (!isObject(proto)) {
return {};
}
if (objectCreate) {
return objectCreate(proto);
}
object.prototype = proto;
var result = new object;
object.prototype = undefined;
return result;
};
}());
module.exports = baseCreate;
/***/ },
/* 242 */
/***/ function(module, exports, __webpack_require__) {
var castPath = __webpack_require__(100),
last = __webpack_require__(243),
parent = __webpack_require__(244),
toKey = __webpack_require__(108);
/**
* The base implementation of `_.unset`.
*
* @private
* @param {Object} object The object to modify.
* @param {Array|string} path The property path to unset.
* @returns {boolean} Returns `true` if the property is deleted, else `false`.
*/
function baseUnset(object, path) {
path = castPath(path, object);
object = parent(object, path);
return object == null || delete object[toKey(last(path))];
}
module.exports = baseUnset;
/***/ },
/* 243 */
/***/ function(module, exports) {
/**
* Gets the last element of `array`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to query.
* @returns {*} Returns the last element of `array`.
* @example
*
* _.last([1, 2, 3]);
* // => 3
*/
function last(array) {
var length = array == null ? 0 : array.length;
return length ? array[length - 1] : undefined;
}
module.exports = last;
/***/ },
/* 244 */
/***/ function(module, exports, __webpack_require__) {
var baseGet = __webpack_require__(99),
baseSlice = __webpack_require__(204);
/**
* Gets the parent value at `path` of `object`.
*
* @private
* @param {Object} object The object to query.
* @param {Array} path The path to get the parent value of.
* @returns {*} Returns the parent value.
*/
function parent(object, path) {
return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
}
module.exports = parent;
/***/ },
/* 245 */
/***/ function(module, exports, __webpack_require__) {
var baseOrderBy = __webpack_require__(136),
isArray = __webpack_require__(74);
/**
* This method is like `_.sortBy` except that it allows specifying the sort
* orders of the iteratees to sort by. If `orders` is unspecified, all values
* are sorted in ascending order. Otherwise, specify an order of "desc" for
* descending or "asc" for ascending sort order of corresponding values.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
* The iteratees to sort by.
* @param {string[]} [orders] The sort orders of `iteratees`.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
* @returns {Array} Returns the new sorted array.
* @example
*
* var users = [
* { 'user': 'fred', 'age': 48 },
* { 'user': 'barney', 'age': 34 },
* { 'user': 'fred', 'age': 40 },
* { 'user': 'barney', 'age': 36 }
* ];
*
* // Sort by `user` in ascending order and by `age` in descending order.
* _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
*/
function orderBy(collection, iteratees, orders, guard) {
if (collection == null) {
return [];
}
if (!isArray(iteratees)) {
iteratees = iteratees == null ? [] : [iteratees];
}
orders = guard ? undefined : orders;
if (!isArray(orders)) {
orders = orders == null ? [] : [orders];
}
return baseOrderBy(collection, iteratees, orders);
}
module.exports = orderBy;
/***/ }
/******/ ])
});
; | BenjaminVanRyseghem/cdnjs | ajax/libs/griddle-react/0.7.1/Griddle.js | JavaScript | mit | 302,743 |
/*
Copyright (c) jQuery Foundation, Inc. and Contributors, All Rights Reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*jslint browser:true node:true */
/*global esprima:true, testFixture:true */
var runTests;
function NotMatchingError(expected, actual) {
'use strict';
Error.call(this, 'Expected ');
this.expected = expected;
this.actual = actual;
}
NotMatchingError.prototype = new Error();
function errorToObject(e) {
'use strict';
var msg = e.toString();
// Opera 9.64 produces an non-standard string in toString().
if (msg.substr(0, 6) !== 'Error:') {
if (typeof e.message === 'string') {
msg = 'Error: ' + e.message;
}
}
return {
index: e.index,
lineNumber: e.lineNumber,
column: e.column,
message: msg
};
}
function sortedObject(o) {
if (o === null) {
return o;
}
if (Array.isArray(o)) {
return o.map(sortedObject);
}
if (typeof o !== 'object') {
return o;
}
if (o instanceof RegExp) {
return o;
}
var keys = Object.keys(o);
var result = {
range: undefined,
loc: undefined
};
keys.forEach(function (key) {
if (o.hasOwnProperty(key)){
result[key] = sortedObject(o[key]);
}
});
return result;
}
function hasAttachedComment(syntax) {
var key;
for (key in syntax) {
if (key === 'leadingComments' || key === 'trailingComments') {
return true;
}
if (typeof syntax[key] === 'object' && syntax[key] !== null) {
if (hasAttachedComment(syntax[key])) {
return true;
}
}
}
return false;
}
function testParse(esprima, code, syntax) {
'use strict';
var expected, tree, actual, options, StringObject, i, len;
// alias, so that JSLint does not complain.
StringObject = String;
options = {
comment: (typeof syntax.comments !== 'undefined'),
range: true,
loc: true,
tokens: (typeof syntax.tokens !== 'undefined'),
raw: true,
tolerant: (typeof syntax.errors !== 'undefined'),
source: null,
sourceType: syntax.sourceType
};
if (options.comment) {
options.attachComment = hasAttachedComment(syntax);
}
if (typeof syntax.tokens !== 'undefined') {
if (syntax.tokens.length > 0) {
options.range = (typeof syntax.tokens[0].range !== 'undefined');
options.loc = (typeof syntax.tokens[0].loc !== 'undefined');
}
}
if (typeof syntax.comments !== 'undefined') {
if (syntax.comments.length > 0) {
options.range = (typeof syntax.comments[0].range !== 'undefined');
options.loc = (typeof syntax.comments[0].loc !== 'undefined');
}
}
if (options.loc) {
options.source = syntax.loc.source;
}
syntax = sortedObject(syntax);
expected = JSON.stringify(syntax, null, 4);
try {
// Some variations of the options.
tree = esprima.parse(code, { tolerant: options.tolerant, sourceType: options.sourceType });
tree = esprima.parse(code, { tolerant: options.tolerant, sourceType: options.sourceType, range: true });
tree = esprima.parse(code, { tolerant: options.tolerant, sourceType: options.sourceType, loc: true });
tree = esprima.parse(code, options);
if (options.tolerant) {
for (i = 0, len = tree.errors.length; i < len; i += 1) {
tree.errors[i] = errorToObject(tree.errors[i]);
}
}
tree = sortedObject(tree);
actual = JSON.stringify(tree, null, 4);
// Only to ensure that there is no error when using string object.
esprima.parse(new StringObject(code), options);
} catch (e) {
throw new NotMatchingError(expected, e.toString());
}
if (expected !== actual) {
throw new NotMatchingError(expected, actual);
}
function filter(key, value) {
return (key === 'loc' || key === 'range') ? undefined : value;
}
if (options.tolerant) {
return;
}
// Check again without any location info.
options.range = false;
options.loc = false;
syntax = sortedObject(syntax);
expected = JSON.stringify(syntax, filter, 4);
try {
tree = esprima.parse(code, options);
if (options.tolerant) {
for (i = 0, len = tree.errors.length; i < len; i += 1) {
tree.errors[i] = errorToObject(tree.errors[i]);
}
}
tree = sortedObject(tree);
actual = JSON.stringify(tree, filter, 4);
} catch (e) {
throw new NotMatchingError(expected, e.toString());
}
if (expected !== actual) {
throw new NotMatchingError(expected, actual);
}
}
function testTokenize(esprima, code, tokens) {
'use strict';
var options, expected, actual, tree;
options = {
comment: true,
tolerant: true,
loc: true,
range: true
};
expected = JSON.stringify(tokens, null, 4);
try {
tree = esprima.tokenize(code, options);
actual = JSON.stringify(tree, null, 4);
} catch (e) {
throw new NotMatchingError(expected, e.toString());
}
if (expected !== actual) {
throw new NotMatchingError(expected, actual);
}
}
function testModule(esprima, code, exception) {
'use strict';
var i, options, expected, actual, err, handleInvalidRegexFlag, tokenize;
// Different parsing options should give the same error.
options = [
{ sourceType: 'module' },
{ sourceType: 'module', comment: true },
{ sourceType: 'module', raw: true },
{ sourceType: 'module', raw: true, comment: true }
];
if (!exception.message) {
exception.message = 'Error: Line 1: ' + exception.description;
}
exception.description = exception.message.replace(/Error: Line [0-9]+: /, '');
expected = JSON.stringify(exception);
for (i = 0; i < options.length; i += 1) {
try {
esprima.parse(code, options[i]);
} catch (e) {
err = errorToObject(e);
err.description = e.description;
actual = JSON.stringify(err);
}
if (expected !== actual) {
// Compensate for old V8 which does not handle invalid flag.
if (exception.message.indexOf('Invalid regular expression') > 0) {
if (typeof actual === 'undefined' && !handleInvalidRegexFlag) {
return;
}
}
throw new NotMatchingError(expected, actual);
}
}
}
function testError(esprima, code, exception) {
'use strict';
var i, options, expected, actual, err, handleInvalidRegexFlag, tokenize;
// Different parsing options should give the same error.
options = [
{},
{ comment: true },
{ raw: true },
{ raw: true, comment: true }
];
// If handleInvalidRegexFlag is true, an invalid flag in a regular expression
// will throw an exception. In some old version of V8, this is not the case
// and hence handleInvalidRegexFlag is false.
handleInvalidRegexFlag = false;
try {
'test'.match(new RegExp('[a-z]', 'x'));
} catch (e) {
handleInvalidRegexFlag = true;
}
exception.description = exception.message.replace(/Error: Line [0-9]+: /, '');
if (exception.tokenize) {
tokenize = true;
exception.tokenize = undefined;
}
expected = JSON.stringify(exception);
for (i = 0; i < options.length; i += 1) {
try {
if (tokenize) {
esprima.tokenize(code, options[i]);
} else {
esprima.parse(code, options[i]);
}
} catch (e) {
err = errorToObject(e);
err.description = e.description;
actual = JSON.stringify(err);
}
if (expected !== actual) {
// Compensate for old V8 which does not handle invalid flag.
if (exception.message.indexOf('Invalid regular expression') > 0) {
if (typeof actual === 'undefined' && !handleInvalidRegexFlag) {
return;
}
}
throw new NotMatchingError(expected, actual);
}
}
}
function testAPI(esprima, code, expected) {
var result;
// API test.
expected = JSON.stringify(expected, null, 4);
try {
result = eval(code);
result = JSON.stringify(result, null, 4);
} catch (e) {
throw new NotMatchingError(expected, e.toString());
}
if (expected !== result) {
throw new NotMatchingError(expected, result);
}
}
function generateTestCase(esprima, testCase) {
var tree, fileName = testCase.key + ".tree.json";
try {
tree = esprima.parse(testCase.case, {loc: true, range: true});
tree = JSON.stringify(tree, null, 4);
} catch (e) {
if (typeof e.index === 'undefined') {
console.error("Failed to generate test result.");
throw e;
}
tree = errorToObject(e);
tree.description = e.description;
tree = JSON.stringify(tree);
fileName = testCase.key + ".failure.json";
}
require('fs').writeFileSync(fileName, tree);
console.error("Done.");
}
if (typeof window === 'undefined') {
(function () {
'use strict';
var esprima = require('../esprima'),
vm = require('vm'),
fs = require('fs'),
diff = require('json-diff').diffString,
total = 0,
result,
failures = [],
cases = {},
context = {source: '', result: null},
tick = new Date(),
expected,
testCase,
header;
function enumerateFixtures(root) {
var dirs = fs.readdirSync(root), key, kind,
kinds = ['case', 'source', 'module', 'run', 'tree', 'tokens', 'failure', 'result'],
suffices = ['js', 'js', 'json', 'js', 'json', 'json', 'json', 'json'];
dirs.forEach(function (item) {
var i;
if (fs.statSync(root + '/' + item).isDirectory()) {
enumerateFixtures(root + '/' + item);
} else {
kind = 'case';
key = item.slice(0, -3);
for (i = 1; i < kinds.length; i++) {
var suffix = '.' + kinds[i] + '.' + suffices[i];
if (item.slice(-suffix.length) === suffix) {
key = item.slice(0, -suffix.length);
kind = kinds[i];
}
}
key = root + '/' + key;
if (!cases[key]) {
total++;
cases[key] = { key: key };
}
cases[key][kind] = fs.readFileSync(root + '/' + item, 'utf-8');
}
});
}
enumerateFixtures(__dirname + '/fixtures');
for (var key in cases) {
if (cases.hasOwnProperty(key)) {
testCase = cases[key];
if (testCase.hasOwnProperty('source')) {
testCase.case = eval(testCase.source + ';source');
}
try {
if (testCase.hasOwnProperty('module')) {
testModule(esprima, testCase.case, JSON.parse(testCase.module));
} else if (testCase.hasOwnProperty('tree')) {
testParse(esprima, testCase.case, JSON.parse(testCase.tree));
} else if (testCase.hasOwnProperty('tokens')) {
testTokenize(esprima, testCase.case, JSON.parse(testCase.tokens));
} else if (testCase.hasOwnProperty('failure')) {
testError(esprima, testCase.case, JSON.parse(testCase.failure));
} else if (testCase.hasOwnProperty('result')) {
testAPI(esprima, testCase.run, JSON.parse(testCase.result));
} else {
console.error('Incomplete test case:' + testCase.key + '. Generating test result...');
generateTestCase(esprima, testCase);
}
} catch (e) {
if (!e.expected) {
throw e;
}
e.source = testCase.case || testCase.key;
failures.push(e);
}
}
}
tick = (new Date()) - tick;
header = total + ' tests. ' + failures.length + ' failures. ' +
tick + ' ms';
if (failures.length) {
console.error(header);
failures.forEach(function (failure) {
try {
var expectedObject = JSON.parse(failure.expected);
var actualObject = JSON.parse(failure.actual);
console.error(failure.source + ': Expected\n ' +
failure.expected.split('\n').join('\n ') +
'\nto match\n ' + failure.actual + '\nDiff:\n' +
diff(expectedObject, actualObject));
} catch (ex) {
console.error(failure.source + ': Expected\n ' +
failure.expected.split('\n').join('\n ') +
'\nto match\n ' + failure.actual);
}
});
} else {
console.log(header);
}
process.exit(failures.length === 0 ? 0 : 1);
}());
}
| cosminatomei/bestguides.ro | node_modules/mailgun-js/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/pac-resolver/node_modules/degenerator/node_modules/esprima/test/runner.js | JavaScript | mit | 15,142 |
<!DOCTYPE html
PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!--
This HTML was auto-generated from MATLAB code.
To make changes, update the MATLAB code and republish this document.
--><title>Fit a mixture of Gaussians and mixture of Students to some data</title><meta name="generator" content="MATLAB 7.12"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.date" content="2012-03-27"><meta name="DC.source" content="mixStudentBankruptcyDemo.m"><style type="text/css">
body {
background-color: white;
margin:10px;
}
h1 {
color: #990000;
font-size: x-large;
}
h2 {
color: #990000;
font-size: medium;
}
/* Make the text shrink to fit narrow windows, but not stretch too far in
wide windows. */
p,h1,h2,div.content div {
max-width: 600px;
/* Hack for IE6 */
width: auto !important; width: 600px;
}
pre.codeinput {
background: #EEEEEE;
padding: 10px;
}
@media print {
pre.codeinput {word-wrap:break-word; width:100%;}
}
span.keyword {color: #0000FF}
span.comment {color: #228B22}
span.string {color: #A020F0}
span.untermstring {color: #B20000}
span.syscmd {color: #B28C00}
pre.codeoutput {
color: #666666;
padding: 10px;
}
pre.error {
color: red;
}
p.footer {
text-align: right;
font-size: xx-small;
font-weight: lighter;
font-style: italic;
color: gray;
}
</style></head><body><div class="content"><h1>Fit a mixture of Gaussians and mixture of Students to some data</h1><p>and use the resulting models to classify This example is based on fig 3.3 of Kenneth Lo's PhD thesis, "Statistical methods for high throughput genomics", UBC 2009</p><pre class="codeinput"><span class="comment">%PMTKauthor Hannes Bretschneider</span>
</pre><pre class="codeinput"><span class="comment">% This file is from pmtk3.googlecode.com</span>
<span class="keyword">function</span> mixStudentBankruptcyDemo()
setSeed(0);
bank = loadData(<span class="string">'bankruptcy'</span>);
Y = bank.data(:,1); <span class="comment">% 0,1</span>
X = bank.data(:,2:3);
[N, D] = size(X);
X = standardizeCols(X);
K = 2;
[model] = mixStudentFit(X, K);
pz = mixStudentInferLatent(model, X);
[~, zhat] = max(pz, [], 2);
figure;
process(model, zhat, X, Y, <span class="string">'student'</span>);
printPmtkFigure(<span class="string">'robustMixStudentBankruptcy'</span>)
[model] = mixGaussFit(X, K);
pz = mixGaussInferLatent(model, X);
[~, zhat] = max(pz, [], 2);
figure;
process(model, zhat, X, Y, <span class="string">'gauss'</span>);
printPmtkFigure(<span class="string">'robustMixGaussBankruptcy'</span>)
<span class="keyword">end</span>
<span class="keyword">function</span> process(model, classes, X, Y, name)
K = model.nmix;
<span class="comment">% Plot class conditional densities</span>
hold <span class="string">on</span>;
<span class="keyword">for</span> c=1:K
gaussPlot2d(model.cpd.mu(:,c), model.cpd.Sigma(:,:,c));
<span class="keyword">end</span>
<span class="comment">% Check whether class 1 should be bankrupt or otherwise</span>
idx1 = find(classes == 1);
idx2 = find(classes == 2);
error1 = sum(Y(idx1) ~= 1) + sum(Y(idx2) ~= 0);
error2 = sum(Y(idx1) ~= 0) + sum(Y(idx2) ~= 1);
nerror = error1;
<span class="keyword">if</span> (error2 < error1)
<span class="comment">% swap the label of classes == 1 and classes == 2</span>
classes = classes + (classes == 1) - (classes == 2);
nerror = error2;
<span class="keyword">end</span>
<span class="comment">% indices of true and false positive/ negatives</span>
idxbankrupt1 = find(Y == 0 & classes(:) == 2);
idxbankrupt2 = find(Y == 0 & classes(:) == 1);
idxsolvent1 = find(Y == 1 & classes(:) == 1);
idxsolvent2 = find(Y == 1 & classes(:) == 2);
<span class="comment">% Plot data and predictions</span>
h1 = plot(X(idxbankrupt1, 1), X(idxbankrupt1,2), <span class="string">'bo'</span>);
plot(X(idxbankrupt2, 1), X(idxbankrupt2,2), <span class="string">'ro'</span>);
h2 = plot(X(idxsolvent1, 1), X(idxsolvent1,2), <span class="string">'b^'</span>);
plot(X(idxsolvent2, 1), X(idxsolvent2,2), <span class="string">'r^'</span>);
title(sprintf(<span class="string">'%d errors using %s (red=error)'</span>, nerror, name ));
legend([h1 h2], <span class="string">'Bankrupt'</span>, <span class="string">'Solvent'</span>, <span class="string">'location'</span>, <span class="string">'southeast'</span>);
fprintf(<span class="string">'Num Errors using %s: %d\n'</span> , name, nerror);
<span class="keyword">end</span>
</pre><pre class="codeoutput">initializing model for EM
1 loglik: -124.115
2 loglik: -122.705
3 loglik: -121.873
4 loglik: -121.049
5 loglik: -120.423
6 loglik: -119.939
7 loglik: -119.559
8 loglik: -119.244
9 loglik: -118.961
10 loglik: -118.685
11 loglik: -118.399
12 loglik: -118.092
13 loglik: -117.768
14 loglik: -117.444
15 loglik: -117.141
16 loglik: -116.874
17 loglik: -116.651
18 loglik: -116.471
19 loglik: -116.326
20 loglik: -116.209
21 loglik: -116.111
22 loglik: -116.024
23 loglik: -115.942
24 loglik: -115.862
25 loglik: -115.779
26 loglik: -115.693
27 loglik: -115.6
28 loglik: -115.501
29 loglik: -115.395
30 loglik: -115.282
31 loglik: -115.161
32 loglik: -115.031
33 loglik: -114.891
34 loglik: -114.74
35 loglik: -114.576
36 loglik: -114.398
37 loglik: -114.211
38 loglik: -114.017
39 loglik: -113.826
40 loglik: -113.646
41 loglik: -113.484
42 loglik: -113.342
43 loglik: -113.221
44 loglik: -113.117
45 loglik: -113.03
46 loglik: -112.956
47 loglik: -112.893
48 loglik: -112.841
49 loglik: -112.797
50 loglik: -112.761
51 loglik: -112.732
Num Errors using student: 3
initializing model for EM
1 loglik: -148.053
2 loglik: -144.906
3 loglik: -144.518
4 loglik: -144.203
5 loglik: -143.941
6 loglik: -143.729
7 loglik: -143.556
8 loglik: -143.408
9 loglik: -143.273
10 loglik: -143.148
11 loglik: -143.031
12 loglik: -142.926
13 loglik: -142.835
14 loglik: -142.761
15 loglik: -142.703
16 loglik: -142.659
17 loglik: -142.626
18 loglik: -142.601
19 loglik: -142.584
20 loglik: -142.571
Num Errors using gauss: 14
</pre><img vspace="5" hspace="5" src="mixStudentBankruptcyDemo_01.png" alt=""> <img vspace="5" hspace="5" src="mixStudentBankruptcyDemo_02.png" alt=""> <p class="footer"><br>
Published with MATLAB® 7.12<br></p></div><!--
##### SOURCE BEGIN #####
%% Fit a mixture of Gaussians and mixture of Students to some data
% and use the resulting models to classify
% This example is based on fig 3.3 of Kenneth Lo's PhD thesis,
% "Statistical methods for high throughput genomics", UBC 2009
%PMTKauthor Hannes Bretschneider
%%
% This file is from pmtk3.googlecode.com
function mixStudentBankruptcyDemo()
setSeed(0);
bank = loadData('bankruptcy');
Y = bank.data(:,1); % 0,1
X = bank.data(:,2:3);
[N, D] = size(X);
X = standardizeCols(X);
K = 2;
[model] = mixStudentFit(X, K);
pz = mixStudentInferLatent(model, X);
[~, zhat] = max(pz, [], 2);
figure;
process(model, zhat, X, Y, 'student');
printPmtkFigure('robustMixStudentBankruptcy')
[model] = mixGaussFit(X, K);
pz = mixGaussInferLatent(model, X);
[~, zhat] = max(pz, [], 2);
figure;
process(model, zhat, X, Y, 'gauss');
printPmtkFigure('robustMixGaussBankruptcy')
end
function process(model, classes, X, Y, name)
K = model.nmix;
% Plot class conditional densities
hold on;
for c=1:K
gaussPlot2d(model.cpd.mu(:,c), model.cpd.Sigma(:,:,c));
end
% Check whether class 1 should be bankrupt or otherwise
idx1 = find(classes == 1);
idx2 = find(classes == 2);
error1 = sum(Y(idx1) ~= 1) + sum(Y(idx2) ~= 0);
error2 = sum(Y(idx1) ~= 0) + sum(Y(idx2) ~= 1);
nerror = error1;
if (error2 < error1)
% swap the label of classes == 1 and classes == 2
classes = classes + (classes == 1) - (classes == 2);
nerror = error2;
end
% indices of true and false positive/ negatives
idxbankrupt1 = find(Y == 0 & classes(:) == 2);
idxbankrupt2 = find(Y == 0 & classes(:) == 1);
idxsolvent1 = find(Y == 1 & classes(:) == 1);
idxsolvent2 = find(Y == 1 & classes(:) == 2);
% Plot data and predictions
h1 = plot(X(idxbankrupt1, 1), X(idxbankrupt1,2), 'bo');
plot(X(idxbankrupt2, 1), X(idxbankrupt2,2), 'ro');
h2 = plot(X(idxsolvent1, 1), X(idxsolvent1,2), 'b^');
plot(X(idxsolvent2, 1), X(idxsolvent2,2), 'r^');
title(sprintf('%d errors using %s (red=error)', nerror, name ));
legend([h1 h2], 'Bankrupt', 'Solvent', 'location', 'southeast');
fprintf('Num Errors using %s: %d\n' , name, nerror);
end
##### SOURCE END #####
--></body></html> | gorillayue/pmtk3 | docs/demoOutput/bookDemos/(11)-Mixture_models_and_the_EM_algorithm/mixStudentBankruptcyDemo.html | HTML | mit | 8,537 |
<div style="font-weight: bold;margin-left:15px;">pieex3.php</div><link rel="stylesheet" href="../phphl.css" type="text/css"><div class="hl-main"><table class="hl-table" width="100%"><tr><td class="hl-gutter" align="right" valign="top"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
</pre></td><td class="hl-main" valign="top"><pre><span class="hl-inlinetags"><?php</span><span class="hl-code"> </span><span class="hl-comment">//</span><span class="hl-comment"> content="text/plain; charset=utf-8"</span><span class="hl-comment"></span><span class="hl-code">
</span><span class="hl-reserved">require_once</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-quotes">'</span><span class="hl-string">jpgraph/jpgraph.php</span><span class="hl-quotes">'</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-reserved">require_once</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-quotes">'</span><span class="hl-string">jpgraph/jpgraph_pie.php</span><span class="hl-quotes">'</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-comment">//</span><span class="hl-comment"> Some data</span><span class="hl-comment"></span><span class="hl-code">
</span><span class="hl-var">$data</span><span class="hl-code"> = </span><span class="hl-reserved">array</span><span class="hl-brackets">(</span><span class="hl-number">40</span><span class="hl-code">,</span><span class="hl-number">21</span><span class="hl-code">,</span><span class="hl-number">17</span><span class="hl-code">,</span><span class="hl-number">14</span><span class="hl-code">,</span><span class="hl-number">23</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-comment">//</span><span class="hl-comment"> Create the Pie Graph.</span><span class="hl-comment"></span><span class="hl-code">
</span><span class="hl-var">$graph</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">PieGraph</span><span class="hl-brackets">(</span><span class="hl-number">350</span><span class="hl-code">,</span><span class="hl-number">300</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-var">$graph</span><span class="hl-code">-></span><span class="hl-identifier">SetShadow</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-comment">//</span><span class="hl-comment"> Set A title for the plot</span><span class="hl-comment"></span><span class="hl-code">
</span><span class="hl-var">$graph</span><span class="hl-code">-></span><span class="hl-identifier">title</span><span class="hl-code">-></span><span class="hl-identifier">Set</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">Multiple - Pie plot</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-var">$graph</span><span class="hl-code">-></span><span class="hl-identifier">title</span><span class="hl-code">-></span><span class="hl-identifier">SetFont</span><span class="hl-brackets">(</span><span class="hl-identifier">FF_FONT1</span><span class="hl-code">,</span><span class="hl-identifier">FS_BOLD</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-comment">//</span><span class="hl-comment"> Create plots</span><span class="hl-comment"></span><span class="hl-code">
</span><span class="hl-var">$size</span><span class="hl-code">=</span><span class="hl-number">0</span><span class="hl-number">.13</span><span class="hl-code">;
</span><span class="hl-var">$p1</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">PiePlot</span><span class="hl-brackets">(</span><span class="hl-var">$data</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-var">$p1</span><span class="hl-code">-></span><span class="hl-identifier">SetLegends</span><span class="hl-brackets">(</span><span class="hl-reserved">array</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">Jan</span><span class="hl-quotes">"</span><span class="hl-code">,</span><span class="hl-quotes">"</span><span class="hl-string">Feb</span><span class="hl-quotes">"</span><span class="hl-code">,</span><span class="hl-quotes">"</span><span class="hl-string">Mar</span><span class="hl-quotes">"</span><span class="hl-code">,</span><span class="hl-quotes">"</span><span class="hl-string">Apr</span><span class="hl-quotes">"</span><span class="hl-code">,</span><span class="hl-quotes">"</span><span class="hl-string">May</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-var">$p1</span><span class="hl-code">-></span><span class="hl-identifier">SetSize</span><span class="hl-brackets">(</span><span class="hl-var">$size</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-var">$p1</span><span class="hl-code">-></span><span class="hl-identifier">SetCenter</span><span class="hl-brackets">(</span><span class="hl-number">0</span><span class="hl-number">.25</span><span class="hl-code">,</span><span class="hl-number">0</span><span class="hl-number">.32</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-var">$p1</span><span class="hl-code">-></span><span class="hl-identifier">value</span><span class="hl-code">-></span><span class="hl-identifier">SetFont</span><span class="hl-brackets">(</span><span class="hl-identifier">FF_FONT0</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-var">$p1</span><span class="hl-code">-></span><span class="hl-identifier">title</span><span class="hl-code">-></span><span class="hl-identifier">Set</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">2001</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-var">$p2</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">PiePlot</span><span class="hl-brackets">(</span><span class="hl-var">$data</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-var">$p2</span><span class="hl-code">-></span><span class="hl-identifier">SetSize</span><span class="hl-brackets">(</span><span class="hl-var">$size</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-var">$p2</span><span class="hl-code">-></span><span class="hl-identifier">SetCenter</span><span class="hl-brackets">(</span><span class="hl-number">0</span><span class="hl-number">.65</span><span class="hl-code">,</span><span class="hl-number">0</span><span class="hl-number">.32</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-var">$p2</span><span class="hl-code">-></span><span class="hl-identifier">value</span><span class="hl-code">-></span><span class="hl-identifier">SetFont</span><span class="hl-brackets">(</span><span class="hl-identifier">FF_FONT0</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-var">$p2</span><span class="hl-code">-></span><span class="hl-identifier">title</span><span class="hl-code">-></span><span class="hl-identifier">Set</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">2002</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-var">$p3</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">PiePlot</span><span class="hl-brackets">(</span><span class="hl-var">$data</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-var">$p3</span><span class="hl-code">-></span><span class="hl-identifier">SetSize</span><span class="hl-brackets">(</span><span class="hl-var">$size</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-var">$p3</span><span class="hl-code">-></span><span class="hl-identifier">SetCenter</span><span class="hl-brackets">(</span><span class="hl-number">0</span><span class="hl-number">.25</span><span class="hl-code">,</span><span class="hl-number">0</span><span class="hl-number">.75</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-var">$p3</span><span class="hl-code">-></span><span class="hl-identifier">value</span><span class="hl-code">-></span><span class="hl-identifier">SetFont</span><span class="hl-brackets">(</span><span class="hl-identifier">FF_FONT0</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-var">$p3</span><span class="hl-code">-></span><span class="hl-identifier">title</span><span class="hl-code">-></span><span class="hl-identifier">Set</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">2003</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-var">$p4</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">PiePlot</span><span class="hl-brackets">(</span><span class="hl-var">$data</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-var">$p4</span><span class="hl-code">-></span><span class="hl-identifier">SetSize</span><span class="hl-brackets">(</span><span class="hl-var">$size</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-var">$p4</span><span class="hl-code">-></span><span class="hl-identifier">SetCenter</span><span class="hl-brackets">(</span><span class="hl-number">0</span><span class="hl-number">.65</span><span class="hl-code">,</span><span class="hl-number">0</span><span class="hl-number">.75</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-var">$p4</span><span class="hl-code">-></span><span class="hl-identifier">value</span><span class="hl-code">-></span><span class="hl-identifier">SetFont</span><span class="hl-brackets">(</span><span class="hl-identifier">FF_FONT0</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-var">$p4</span><span class="hl-code">-></span><span class="hl-identifier">title</span><span class="hl-code">-></span><span class="hl-identifier">Set</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">2004</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-var">$graph</span><span class="hl-code">-></span><span class="hl-identifier">Add</span><span class="hl-brackets">(</span><span class="hl-var">$p1</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-var">$graph</span><span class="hl-code">-></span><span class="hl-identifier">Add</span><span class="hl-brackets">(</span><span class="hl-var">$p2</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-var">$graph</span><span class="hl-code">-></span><span class="hl-identifier">Add</span><span class="hl-brackets">(</span><span class="hl-var">$p3</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-var">$graph</span><span class="hl-code">-></span><span class="hl-identifier">Add</span><span class="hl-brackets">(</span><span class="hl-var">$p4</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-var">$graph</span><span class="hl-code">-></span><span class="hl-identifier">Stroke</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-inlinetags">?></span></pre></td></tr></table></div>
| manu7772/assoRDS | app/Resources/classes/jpgraph/docs/chunkhtml/example_src/pieex3.html | HTML | mit | 12,568 |
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Translation;
use Symfony\Component\Config\Resource\ResourceInterface;
/**
* MessageCatalogueInterface.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/
interface MessageCatalogueInterface
{
/**
* Gets the catalogue locale.
*
* @return string The locale
*
* @api
*/
public function getLocale();
/**
* Gets the domains.
*
* @return array An array of domains
*
* @api
*/
public function getDomains();
/**
* Gets the messages within a given domain.
*
* If $domain is null, it returns all messages.
*
* @param string $domain The domain name
*
* @return array An array of messages
*
* @api
*/
public function all($domain = null);
/**
* Sets a message translation.
*
* @param string $id The message id
* @param string $translation The messages translation
* @param string $domain The domain name
*
* @api
*/
public function set($id, $translation, $domain = 'messages');
/**
* Checks if a message has a translation.
*
* @param string $id The message id
* @param string $domain The domain name
*
* @return Boolean true if the message has a translation, false otherwise
*
* @api
*/
public function has($id, $domain = 'messages');
/**
* Checks if a message has a translation (it does not take into account the fallback mechanism).
*
* @param string $id The message id
* @param string $domain The domain name
*
* @return Boolean true if the message has a translation, false otherwise
*
* @api
*/
public function defines($id, $domain = 'messages');
/**
* Gets a message translation.
*
* @param string $id The message id
* @param string $domain The domain name
*
* @return string The message translation
*
* @api
*/
public function get($id, $domain = 'messages');
/**
* Sets translations for a given domain.
*
* @param string $messages An array of translations
* @param string $domain The domain name
*
* @api
*/
public function replace($messages, $domain = 'messages');
/**
* Adds translations for a given domain.
*
* @param string $messages An array of translations
* @param string $domain The domain name
*
* @api
*/
public function add($messages, $domain = 'messages');
/**
* Merges translations from the given Catalogue into the current one.
*
* The two catalogues must have the same locale.
*
* @param MessageCatalogueInterface $catalogue A MessageCatalogueInterface instance
*
* @api
*/
public function addCatalogue(MessageCatalogueInterface $catalogue);
/**
* Merges translations from the given Catalogue into the current one
* only when the translation does not exist.
*
* This is used to provide default translations when they do not exist for the current locale.
*
* @param MessageCatalogueInterface $catalogue A MessageCatalogueInterface instance
*
* @api
*/
public function addFallbackCatalogue(MessageCatalogueInterface $catalogue);
/**
* Gets the fallback catalogue.
*
* @return MessageCatalogueInterface A MessageCatalogueInterface instance
*
* @api
*/
public function getFallbackCatalogue();
/**
* Returns an array of resources loaded to build this collection.
*
* @return ResourceInterface[] An array of resources
*
* @api
*/
public function getResources();
/**
* Adds a resource for this collection.
*
* @param ResourceInterface $resource A resource instance
*
* @api
*/
public function addResource(ResourceInterface $resource);
}
| oldmill1/illtxtu | vendor/symfony/symfony/src/Symfony/Component/Translation/MessageCatalogueInterface.php | PHP | mit | 4,208 |
/*
* # Semantic UI - 1.9.0
* https://github.com/Semantic-Org/Semantic-UI
* http://www.semantic-ui.com/
*
* Copyright 2014 Contributors
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
*/
/*******************************
Transitions
*******************************/
.transition {
-webkit-animation-iteration-count: 1;
animation-iteration-count: 1;
-webkit-animation-duration: 300ms;
animation-duration: 300ms;
-webkit-animation-timing-function: ease;
animation-timing-function: ease;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
/*******************************
States
*******************************/
/* Animating */
.animating.transition {
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
-webkit-transform: translateZ(0);
transform: translateZ(0);
visibility: visible !important;
}
/* Loading */
.loading.transition {
position: absolute;
top: -99999px;
left: -99999px;
}
/* Hidden */
.hidden.transition {
display: none;
visibility: hidden;
}
/* Visible */
.visible.transition {
display: block !important;
visibility: visible !important;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
-webkit-transform: translateZ(0);
transform: translateZ(0);
}
/* Disabled */
.disabled.transition {
-webkit-animation-play-state: paused;
animation-play-state: paused;
}
/*******************************
Variations
*******************************/
.looping.transition {
-webkit-animation-iteration-count: infinite;
animation-iteration-count: infinite;
}
/*******************************
Transitions
*******************************/
/*
Some transitions adapted from Animate CSS
https://github.com/daneden/animate.css
Additional transitions adapted from Glide
by Nick Pettit - https://github.com/nickpettit/glide
*/
/*--------------
Browse
---------------*/
.transition.browse.in {
-webkit-animation-name: browseIn;
animation-name: browseIn;
}
.transition.browse.out,
.transition.browse.left.out {
-webkit-animation-name: browseOutLeft;
animation-name: browseOutLeft;
}
.transition.browse.right.out {
-webkit-animation-name: browseOutRight;
animation-name: browseOutRight;
}
/* In */
@-webkit-keyframes browseIn {
0% {
-webkit-transform: scale(0.8) translateZ(0px);
transform: scale(0.8) translateZ(0px);
z-index: -1;
}
10% {
-webkit-transform: scale(0.8) translateZ(0px);
transform: scale(0.8) translateZ(0px);
z-index: -1;
opacity: 0.7;
}
80% {
-webkit-transform: scale(1.05) translateZ(0px);
transform: scale(1.05) translateZ(0px);
opacity: 1;
z-index: 999;
}
100% {
-webkit-transform: scale(1) translateZ(0px);
transform: scale(1) translateZ(0px);
z-index: 999;
}
}
@keyframes browseIn {
0% {
-webkit-transform: scale(0.8) translateZ(0px);
transform: scale(0.8) translateZ(0px);
z-index: -1;
}
10% {
-webkit-transform: scale(0.8) translateZ(0px);
transform: scale(0.8) translateZ(0px);
z-index: -1;
opacity: 0.7;
}
80% {
-webkit-transform: scale(1.05) translateZ(0px);
transform: scale(1.05) translateZ(0px);
opacity: 1;
z-index: 999;
}
100% {
-webkit-transform: scale(1) translateZ(0px);
transform: scale(1) translateZ(0px);
z-index: 999;
}
}
/* Out */
@-webkit-keyframes browseOutLeft {
0% {
z-index: 999;
-webkit-transform: translateX(0%) rotateY(0deg) rotateX(0deg);
transform: translateX(0%) rotateY(0deg) rotateX(0deg);
}
50% {
z-index: -1;
-webkit-transform: translateX(-105%) rotateY(35deg) rotateX(10deg) translateZ(-10px);
transform: translateX(-105%) rotateY(35deg) rotateX(10deg) translateZ(-10px);
}
80% {
opacity: 1;
}
100% {
z-index: -1;
-webkit-transform: translateX(0%) rotateY(0deg) rotateX(0deg) translateZ(-10px);
transform: translateX(0%) rotateY(0deg) rotateX(0deg) translateZ(-10px);
opacity: 0;
}
}
@keyframes browseOutLeft {
0% {
z-index: 999;
-webkit-transform: translateX(0%) rotateY(0deg) rotateX(0deg);
transform: translateX(0%) rotateY(0deg) rotateX(0deg);
}
50% {
z-index: -1;
-webkit-transform: translateX(-105%) rotateY(35deg) rotateX(10deg) translateZ(-10px);
transform: translateX(-105%) rotateY(35deg) rotateX(10deg) translateZ(-10px);
}
80% {
opacity: 1;
}
100% {
z-index: -1;
-webkit-transform: translateX(0%) rotateY(0deg) rotateX(0deg) translateZ(-10px);
transform: translateX(0%) rotateY(0deg) rotateX(0deg) translateZ(-10px);
opacity: 0;
}
}
@-webkit-keyframes browseOutRight {
0% {
z-index: 999;
-webkit-transform: translateX(0%) rotateY(0deg) rotateX(0deg);
transform: translateX(0%) rotateY(0deg) rotateX(0deg);
}
50% {
z-index: 1;
-webkit-transform: translateX(105%) rotateY(35deg) rotateX(10deg) translateZ(-10px);
transform: translateX(105%) rotateY(35deg) rotateX(10deg) translateZ(-10px);
}
80% {
opacity: 1;
}
100% {
z-index: 1;
-webkit-transform: translateX(0%) rotateY(0deg) rotateX(0deg) translateZ(-10px);
transform: translateX(0%) rotateY(0deg) rotateX(0deg) translateZ(-10px);
opacity: 0;
}
}
@keyframes browseOutRight {
0% {
z-index: 999;
-webkit-transform: translateX(0%) rotateY(0deg) rotateX(0deg);
transform: translateX(0%) rotateY(0deg) rotateX(0deg);
}
50% {
z-index: 1;
-webkit-transform: translateX(105%) rotateY(35deg) rotateX(10deg) translateZ(-10px);
transform: translateX(105%) rotateY(35deg) rotateX(10deg) translateZ(-10px);
}
80% {
opacity: 1;
}
100% {
z-index: 1;
-webkit-transform: translateX(0%) rotateY(0deg) rotateX(0deg) translateZ(-10px);
transform: translateX(0%) rotateY(0deg) rotateX(0deg) translateZ(-10px);
opacity: 0;
}
}
/*--------------
Drop
---------------*/
.drop.transition {
-webkit-transform-origin: top center;
-ms-transform-origin: top center;
transform-origin: top center;
-webkit-animation-duration: 0.5s;
animation-duration: 0.5s;
-webkit-animation-timing-function: cubic-bezier(0.34, 1.61, 0.7, 1);
animation-timing-function: cubic-bezier(0.34, 1.61, 0.7, 1);
}
.drop.transition.in {
-webkit-animation-name: dropIn;
animation-name: dropIn;
}
.drop.transition.out {
-webkit-animation-name: dropOut;
animation-name: dropOut;
}
/* Drop */
@-webkit-keyframes dropIn {
0% {
opacity: 0;
-webkit-transform: scale(0);
transform: scale(0);
}
100% {
opacity: 1;
-webkit-transform: scale(1);
transform: scale(1);
}
}
@keyframes dropIn {
0% {
opacity: 0;
-webkit-transform: scale(0);
transform: scale(0);
}
100% {
opacity: 1;
-webkit-transform: scale(1);
transform: scale(1);
}
}
@-webkit-keyframes dropOut {
0% {
opacity: 1;
-webkit-transform: scale(1);
transform: scale(1);
}
100% {
opacity: 0;
-webkit-transform: scale(0);
transform: scale(0);
}
}
@keyframes dropOut {
0% {
opacity: 1;
-webkit-transform: scale(1);
transform: scale(1);
}
100% {
opacity: 0;
-webkit-transform: scale(0);
transform: scale(0);
}
}
/*--------------
Fade
---------------*/
.transition.fade.in {
-webkit-animation-name: fadeIn;
animation-name: fadeIn;
}
.transition[class*="fade up"].in {
-webkit-animation-name: fadeInUp;
animation-name: fadeInUp;
}
.transition[class*="fade down"].in {
-webkit-animation-name: fadeInDown;
animation-name: fadeInDown;
}
.transition[class*="fade left"].in {
-webkit-animation-name: fadeInLeft;
animation-name: fadeInLeft;
}
.transition[class*="fade right"].in {
-webkit-animation-name: fadeInRight;
animation-name: fadeInRight;
}
.transition.fade.out {
-webkit-animation-name: fadeOut;
animation-name: fadeOut;
}
.transition[class*="fade up"].out {
-webkit-animation-name: fadeOutUp;
animation-name: fadeOutUp;
}
.transition[class*="fade down"].out {
-webkit-animation-name: fadeOutDown;
animation-name: fadeOutDown;
}
.transition[class*="fade left"].out {
-webkit-animation-name: fadeOutLeft;
animation-name: fadeOutLeft;
}
.transition[class*="fade right"].out {
-webkit-animation-name: fadeOutRight;
animation-name: fadeOutRight;
}
/* In */
@-webkit-keyframes fadeIn {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes fadeIn {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@-webkit-keyframes fadeInUp {
0% {
opacity: 0;
-webkit-transform: translateY(10%);
transform: translateY(10%);
}
100% {
opacity: 1;
-webkit-transform: translateY(0%);
transform: translateY(0%);
}
}
@keyframes fadeInUp {
0% {
opacity: 0;
-webkit-transform: translateY(10%);
transform: translateY(10%);
}
100% {
opacity: 1;
-webkit-transform: translateY(0%);
transform: translateY(0%);
}
}
@-webkit-keyframes fadeInDown {
0% {
opacity: 0;
-webkit-transform: translateY(-10%);
transform: translateY(-10%);
}
100% {
opacity: 1;
-webkit-transform: translateY(0%);
transform: translateY(0%);
}
}
@keyframes fadeInDown {
0% {
opacity: 0;
-webkit-transform: translateY(-10%);
transform: translateY(-10%);
}
100% {
opacity: 1;
-webkit-transform: translateY(0%);
transform: translateY(0%);
}
}
@-webkit-keyframes fadeInLeft {
0% {
opacity: 0;
-webkit-transform: translateX(10%);
transform: translateX(10%);
}
100% {
opacity: 1;
-webkit-transform: translateX(0%);
transform: translateX(0%);
}
}
@keyframes fadeInLeft {
0% {
opacity: 0;
-webkit-transform: translateX(10%);
transform: translateX(10%);
}
100% {
opacity: 1;
-webkit-transform: translateX(0%);
transform: translateX(0%);
}
}
@-webkit-keyframes fadeInRight {
0% {
opacity: 0;
-webkit-transform: translateX(-10%);
transform: translateX(-10%);
}
100% {
opacity: 1;
-webkit-transform: translateX(0%);
transform: translateX(0%);
}
}
@keyframes fadeInRight {
0% {
opacity: 0;
-webkit-transform: translateX(-10%);
transform: translateX(-10%);
}
100% {
opacity: 1;
-webkit-transform: translateX(0%);
transform: translateX(0%);
}
}
/* Out */
@-webkit-keyframes fadeOut {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@keyframes fadeOut {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@-webkit-keyframes fadeOutUp {
0% {
opacity: 1;
-webkit-transform: translateY(0%);
transform: translateY(0%);
}
100% {
opacity: 0;
-webkit-transform: translateY(10%);
transform: translateY(10%);
}
}
@keyframes fadeOutUp {
0% {
opacity: 1;
-webkit-transform: translateY(0%);
transform: translateY(0%);
}
100% {
opacity: 0;
-webkit-transform: translateY(10%);
transform: translateY(10%);
}
}
@-webkit-keyframes fadeOutDown {
0% {
opacity: 1;
-webkit-transform: translateY(0%);
transform: translateY(0%);
}
100% {
opacity: 0;
-webkit-transform: translateY(-10%);
transform: translateY(-10%);
}
}
@keyframes fadeOutDown {
0% {
opacity: 1;
-webkit-transform: translateY(0%);
transform: translateY(0%);
}
100% {
opacity: 0;
-webkit-transform: translateY(-10%);
transform: translateY(-10%);
}
}
@-webkit-keyframes fadeOutLeft {
0% {
opacity: 1;
-webkit-transform: translateX(0%);
transform: translateX(0%);
}
100% {
opacity: 0;
-webkit-transform: translateX(10%);
transform: translateX(10%);
}
}
@keyframes fadeOutLeft {
0% {
opacity: 1;
-webkit-transform: translateX(0%);
transform: translateX(0%);
}
100% {
opacity: 0;
-webkit-transform: translateX(10%);
transform: translateX(10%);
}
}
@-webkit-keyframes fadeOutRight {
0% {
opacity: 1;
-webkit-transform: translateX(0%);
transform: translateX(0%);
}
100% {
opacity: 0;
-webkit-transform: translateX(-10%);
transform: translateX(-10%);
}
}
@keyframes fadeOutRight {
0% {
opacity: 1;
-webkit-transform: translateX(0%);
transform: translateX(0%);
}
100% {
opacity: 0;
-webkit-transform: translateX(-10%);
transform: translateX(-10%);
}
}
/*--------------
Flips
---------------*/
.flip.transition.in,
.flip.transition.out {
-webkit-perspective: 2000px;
perspective: 2000px;
}
.horizontal.flip.transition.in {
-webkit-animation-name: horizontalFlipIn;
animation-name: horizontalFlipIn;
}
.horizontal.flip.transition.out {
-webkit-animation-name: horizontalFlipOut;
animation-name: horizontalFlipOut;
}
.vertical.flip.transition.in {
-webkit-animation-name: verticalFlipIn;
animation-name: verticalFlipIn;
}
.vertical.flip.transition.out {
-webkit-animation-name: verticalFlipOut;
animation-name: verticalFlipOut;
}
/* In */
@-webkit-keyframes horizontalFlipIn {
0% {
-webkit-transform: perspective(2000px) rotateY(-90deg);
transform: perspective(2000px) rotateY(-90deg);
opacity: 0;
}
100% {
-webkit-transform: perspective(2000px) rotateY(0deg);
transform: perspective(2000px) rotateY(0deg);
opacity: 1;
}
}
@keyframes horizontalFlipIn {
0% {
-webkit-transform: perspective(2000px) rotateY(-90deg);
transform: perspective(2000px) rotateY(-90deg);
opacity: 0;
}
100% {
-webkit-transform: perspective(2000px) rotateY(0deg);
transform: perspective(2000px) rotateY(0deg);
opacity: 1;
}
}
@-webkit-keyframes verticalFlipIn {
0% {
-webkit-transform: perspective(2000px) rotateX(-90deg);
transform: perspective(2000px) rotateX(-90deg);
opacity: 0;
}
100% {
-webkit-transform: perspective(2000px) rotateX(0deg);
transform: perspective(2000px) rotateX(0deg);
opacity: 1;
}
}
@keyframes verticalFlipIn {
0% {
-webkit-transform: perspective(2000px) rotateX(-90deg);
transform: perspective(2000px) rotateX(-90deg);
opacity: 0;
}
100% {
-webkit-transform: perspective(2000px) rotateX(0deg);
transform: perspective(2000px) rotateX(0deg);
opacity: 1;
}
}
/* Out */
@-webkit-keyframes horizontalFlipOut {
0% {
-webkit-transform: perspective(2000px) rotateY(0deg);
transform: perspective(2000px) rotateY(0deg);
opacity: 1;
}
100% {
-webkit-transform: perspective(2000px) rotateY(90deg);
transform: perspective(2000px) rotateY(90deg);
opacity: 0;
}
}
@keyframes horizontalFlipOut {
0% {
-webkit-transform: perspective(2000px) rotateY(0deg);
transform: perspective(2000px) rotateY(0deg);
opacity: 1;
}
100% {
-webkit-transform: perspective(2000px) rotateY(90deg);
transform: perspective(2000px) rotateY(90deg);
opacity: 0;
}
}
@-webkit-keyframes verticalFlipOut {
0% {
-webkit-transform: perspective(2000px) rotateX(0deg);
transform: perspective(2000px) rotateX(0deg);
opacity: 1;
}
100% {
-webkit-transform: perspective(2000px) rotateX(-90deg);
transform: perspective(2000px) rotateX(-90deg);
opacity: 0;
}
}
@keyframes verticalFlipOut {
0% {
-webkit-transform: perspective(2000px) rotateX(0deg);
transform: perspective(2000px) rotateX(0deg);
opacity: 1;
}
100% {
-webkit-transform: perspective(2000px) rotateX(-90deg);
transform: perspective(2000px) rotateX(-90deg);
opacity: 0;
}
}
/*--------------
Scale
---------------*/
.scale.transition.in {
-webkit-animation-name: scaleIn;
animation-name: scaleIn;
}
.scale.transition.out {
-webkit-animation-name: scaleOut;
animation-name: scaleOut;
}
/* In */
@-webkit-keyframes scaleIn {
0% {
opacity: 0;
-webkit-transform: scale(0.7);
transform: scale(0.7);
}
100% {
opacity: 1;
-webkit-transform: scale(1);
transform: scale(1);
}
}
@keyframes scaleIn {
0% {
opacity: 0;
-webkit-transform: scale(0.7);
transform: scale(0.7);
}
100% {
opacity: 1;
-webkit-transform: scale(1);
transform: scale(1);
}
}
/* Out */
@-webkit-keyframes scaleOut {
0% {
opacity: 1;
-webkit-transform: scale(1);
transform: scale(1);
}
100% {
opacity: 0;
-webkit-transform: scale(0.7);
transform: scale(0.7);
}
}
@keyframes scaleOut {
0% {
opacity: 1;
-webkit-transform: scale(1);
transform: scale(1);
}
100% {
opacity: 0;
-webkit-transform: scale(0.7);
transform: scale(0.7);
}
}
/*--------------
Fly
---------------*/
/* Inward */
.transition.fly {
-webkit-animation-duration: 0.6s;
animation-duration: 0.6s;
-webkit-transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}
.transition.fly.in {
-webkit-animation-name: flyIn;
animation-name: flyIn;
}
.transition[class*="fly up"].in {
-webkit-animation-name: flyInUp;
animation-name: flyInUp;
}
.transition[class*="fly down"].in {
-webkit-animation-name: flyInDown;
animation-name: flyInDown;
}
.transition[class*="fly left"].in {
-webkit-animation-name: flyInLeft;
animation-name: flyInLeft;
}
.transition[class*="fly right"].in {
-webkit-animation-name: flyInRight;
animation-name: flyInRight;
}
/* Outward */
.transition.fly.out {
-webkit-animation-name: flyOut;
animation-name: flyOut;
}
.transition[class*="fly up"].out {
-webkit-animation-name: flyOutUp;
animation-name: flyOutUp;
}
.transition[class*="fly down"].out {
-webkit-animation-name: flyOutDown;
animation-name: flyOutDown;
}
.transition[class*="fly left"].out {
-webkit-animation-name: flyOutLeft;
animation-name: flyOutLeft;
}
.transition[class*="fly right"].out {
-webkit-animation-name: flyOutRight;
animation-name: flyOutRight;
}
/* In */
@-webkit-keyframes flyIn {
0% {
opacity: 0;
-webkit-transform: scale3d(0.3, 0.3, 0.3);
transform: scale3d(0.3, 0.3, 0.3);
}
20% {
-webkit-transform: scale3d(1.1, 1.1, 1.1);
transform: scale3d(1.1, 1.1, 1.1);
}
40% {
-webkit-transform: scale3d(0.9, 0.9, 0.9);
transform: scale3d(0.9, 0.9, 0.9);
}
60% {
opacity: 1;
-webkit-transform: scale3d(1.03, 1.03, 1.03);
transform: scale3d(1.03, 1.03, 1.03);
}
80% {
-webkit-transform: scale3d(0.97, 0.97, 0.97);
transform: scale3d(0.97, 0.97, 0.97);
}
100% {
opacity: 1;
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
}
@keyframes flyIn {
0% {
opacity: 0;
-webkit-transform: scale3d(0.3, 0.3, 0.3);
transform: scale3d(0.3, 0.3, 0.3);
}
20% {
-webkit-transform: scale3d(1.1, 1.1, 1.1);
transform: scale3d(1.1, 1.1, 1.1);
}
40% {
-webkit-transform: scale3d(0.9, 0.9, 0.9);
transform: scale3d(0.9, 0.9, 0.9);
}
60% {
opacity: 1;
-webkit-transform: scale3d(1.03, 1.03, 1.03);
transform: scale3d(1.03, 1.03, 1.03);
}
80% {
-webkit-transform: scale3d(0.97, 0.97, 0.97);
transform: scale3d(0.97, 0.97, 0.97);
}
100% {
opacity: 1;
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
}
@-webkit-keyframes flyInUp {
0% {
opacity: 0;
-webkit-transform: translate3d(0, 1500px, 0);
transform: translate3d(0, 1500px, 0);
}
60% {
opacity: 1;
-webkit-transform: translate3d(0, -20px, 0);
transform: translate3d(0, -20px, 0);
}
75% {
-webkit-transform: translate3d(0, 10px, 0);
transform: translate3d(0, 10px, 0);
}
90% {
-webkit-transform: translate3d(0, -5px, 0);
transform: translate3d(0, -5px, 0);
}
100% {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes flyInUp {
0% {
opacity: 0;
-webkit-transform: translate3d(0, 1500px, 0);
transform: translate3d(0, 1500px, 0);
}
60% {
opacity: 1;
-webkit-transform: translate3d(0, -20px, 0);
transform: translate3d(0, -20px, 0);
}
75% {
-webkit-transform: translate3d(0, 10px, 0);
transform: translate3d(0, 10px, 0);
}
90% {
-webkit-transform: translate3d(0, -5px, 0);
transform: translate3d(0, -5px, 0);
}
100% {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@-webkit-keyframes flyInDown {
0% {
opacity: 0;
-webkit-transform: translate3d(0, -1500px, 0);
transform: translate3d(0, -1500px, 0);
}
60% {
opacity: 1;
-webkit-transform: translate3d(0, 25px, 0);
transform: translate3d(0, 25px, 0);
}
75% {
-webkit-transform: translate3d(0, -10px, 0);
transform: translate3d(0, -10px, 0);
}
90% {
-webkit-transform: translate3d(0, 5px, 0);
transform: translate3d(0, 5px, 0);
}
100% {
-webkit-transform: none;
transform: none;
}
}
@keyframes flyInDown {
0% {
opacity: 0;
-webkit-transform: translate3d(0, -1500px, 0);
transform: translate3d(0, -1500px, 0);
}
60% {
opacity: 1;
-webkit-transform: translate3d(0, 25px, 0);
transform: translate3d(0, 25px, 0);
}
75% {
-webkit-transform: translate3d(0, -10px, 0);
transform: translate3d(0, -10px, 0);
}
90% {
-webkit-transform: translate3d(0, 5px, 0);
transform: translate3d(0, 5px, 0);
}
100% {
-webkit-transform: none;
transform: none;
}
}
@-webkit-keyframes flyInLeft {
0% {
opacity: 0;
-webkit-transform: translate3d(1500px, 0, 0);
transform: translate3d(1500px, 0, 0);
}
60% {
opacity: 1;
-webkit-transform: translate3d(-25px, 0, 0);
transform: translate3d(-25px, 0, 0);
}
75% {
-webkit-transform: translate3d(10px, 0, 0);
transform: translate3d(10px, 0, 0);
}
90% {
-webkit-transform: translate3d(-5px, 0, 0);
transform: translate3d(-5px, 0, 0);
}
100% {
-webkit-transform: none;
transform: none;
}
}
@keyframes flyInLeft {
0% {
opacity: 0;
-webkit-transform: translate3d(1500px, 0, 0);
transform: translate3d(1500px, 0, 0);
}
60% {
opacity: 1;
-webkit-transform: translate3d(-25px, 0, 0);
transform: translate3d(-25px, 0, 0);
}
75% {
-webkit-transform: translate3d(10px, 0, 0);
transform: translate3d(10px, 0, 0);
}
90% {
-webkit-transform: translate3d(-5px, 0, 0);
transform: translate3d(-5px, 0, 0);
}
100% {
-webkit-transform: none;
transform: none;
}
}
@-webkit-keyframes flyInRight {
0% {
opacity: 0;
-webkit-transform: translate3d(-1500px, 0, 0);
transform: translate3d(-1500px, 0, 0);
}
60% {
opacity: 1;
-webkit-transform: translate3d(25px, 0, 0);
transform: translate3d(25px, 0, 0);
}
75% {
-webkit-transform: translate3d(-10px, 0, 0);
transform: translate3d(-10px, 0, 0);
}
90% {
-webkit-transform: translate3d(5px, 0, 0);
transform: translate3d(5px, 0, 0);
}
100% {
-webkit-transform: none;
transform: none;
}
}
@keyframes flyInRight {
0% {
opacity: 0;
-webkit-transform: translate3d(-1500px, 0, 0);
transform: translate3d(-1500px, 0, 0);
}
60% {
opacity: 1;
-webkit-transform: translate3d(25px, 0, 0);
transform: translate3d(25px, 0, 0);
}
75% {
-webkit-transform: translate3d(-10px, 0, 0);
transform: translate3d(-10px, 0, 0);
}
90% {
-webkit-transform: translate3d(5px, 0, 0);
transform: translate3d(5px, 0, 0);
}
100% {
-webkit-transform: none;
transform: none;
}
}
/* Out */
@-webkit-keyframes flyOut {
20% {
-webkit-transform: scale3d(0.9, 0.9, 0.9);
transform: scale3d(0.9, 0.9, 0.9);
}
50%,
55% {
opacity: 1;
-webkit-transform: scale3d(1.1, 1.1, 1.1);
transform: scale3d(1.1, 1.1, 1.1);
}
100% {
opacity: 0;
-webkit-transform: scale3d(0.3, 0.3, 0.3);
transform: scale3d(0.3, 0.3, 0.3);
}
}
@keyframes flyOut {
20% {
-webkit-transform: scale3d(0.9, 0.9, 0.9);
transform: scale3d(0.9, 0.9, 0.9);
}
50%,
55% {
opacity: 1;
-webkit-transform: scale3d(1.1, 1.1, 1.1);
transform: scale3d(1.1, 1.1, 1.1);
}
100% {
opacity: 0;
-webkit-transform: scale3d(0.3, 0.3, 0.3);
transform: scale3d(0.3, 0.3, 0.3);
}
}
@-webkit-keyframes flyOutUp {
20% {
-webkit-transform: translate3d(0, 10px, 0);
transform: translate3d(0, 10px, 0);
}
40%,
45% {
opacity: 1;
-webkit-transform: translate3d(0, -20px, 0);
transform: translate3d(0, -20px, 0);
}
100% {
opacity: 0;
-webkit-transform: translate3d(0, 2000px, 0);
transform: translate3d(0, 2000px, 0);
}
}
@keyframes flyOutUp {
20% {
-webkit-transform: translate3d(0, 10px, 0);
transform: translate3d(0, 10px, 0);
}
40%,
45% {
opacity: 1;
-webkit-transform: translate3d(0, -20px, 0);
transform: translate3d(0, -20px, 0);
}
100% {
opacity: 0;
-webkit-transform: translate3d(0, 2000px, 0);
transform: translate3d(0, 2000px, 0);
}
}
@-webkit-keyframes flyOutDown {
20% {
-webkit-transform: translate3d(0, -10px, 0);
transform: translate3d(0, -10px, 0);
}
40%,
45% {
opacity: 1;
-webkit-transform: translate3d(0, 20px, 0);
transform: translate3d(0, 20px, 0);
}
100% {
opacity: 0;
-webkit-transform: translate3d(0, -2000px, 0);
transform: translate3d(0, -2000px, 0);
}
}
@keyframes flyOutDown {
20% {
-webkit-transform: translate3d(0, -10px, 0);
transform: translate3d(0, -10px, 0);
}
40%,
45% {
opacity: 1;
-webkit-transform: translate3d(0, 20px, 0);
transform: translate3d(0, 20px, 0);
}
100% {
opacity: 0;
-webkit-transform: translate3d(0, -2000px, 0);
transform: translate3d(0, -2000px, 0);
}
}
@-webkit-keyframes flyOutRight {
20% {
opacity: 1;
-webkit-transform: translate3d(20px, 0, 0);
transform: translate3d(20px, 0, 0);
}
100% {
opacity: 0;
-webkit-transform: translate3d(-2000px, 0, 0);
transform: translate3d(-2000px, 0, 0);
}
}
@keyframes flyOutRight {
20% {
opacity: 1;
-webkit-transform: translate3d(20px, 0, 0);
transform: translate3d(20px, 0, 0);
}
100% {
opacity: 0;
-webkit-transform: translate3d(-2000px, 0, 0);
transform: translate3d(-2000px, 0, 0);
}
}
@-webkit-keyframes flyOutLeft {
20% {
opacity: 1;
-webkit-transform: translate3d(-20px, 0, 0);
transform: translate3d(-20px, 0, 0);
}
100% {
opacity: 0;
-webkit-transform: translate3d(2000px, 0, 0);
transform: translate3d(2000px, 0, 0);
}
}
@keyframes flyOutLeft {
20% {
opacity: 1;
-webkit-transform: translate3d(-20px, 0, 0);
transform: translate3d(-20px, 0, 0);
}
100% {
opacity: 0;
-webkit-transform: translate3d(2000px, 0, 0);
transform: translate3d(2000px, 0, 0);
}
}
/*--------------
Slide
---------------*/
.transition.slide.in,
.transition[class*="slide down"].in {
-webkit-animation-name: slideInY;
animation-name: slideInY;
-webkit-transform-origin: top center;
-ms-transform-origin: top center;
transform-origin: top center;
}
.transition[class*="slide up"].in {
-webkit-animation-name: slideInY;
animation-name: slideInY;
-webkit-transform-origin: bottom center;
-ms-transform-origin: bottom center;
transform-origin: bottom center;
}
.transition[class*="slide left"].in {
-webkit-animation-name: slideInX;
animation-name: slideInX;
-webkit-transform-origin: center right;
-ms-transform-origin: center right;
transform-origin: center right;
}
.transition[class*="slide right"].in {
-webkit-animation-name: slideInX;
animation-name: slideInX;
-webkit-transform-origin: center left;
-ms-transform-origin: center left;
transform-origin: center left;
}
.transition.slide.out,
.transition[class*="slide down"].out {
-webkit-animation-name: slideOutY;
animation-name: slideOutY;
-webkit-transform-origin: top center;
-ms-transform-origin: top center;
transform-origin: top center;
}
.transition[class*="slide up"].out {
-webkit-animation-name: slideOutY;
animation-name: slideOutY;
-webkit-transform-origin: bottom center;
-ms-transform-origin: bottom center;
transform-origin: bottom center;
}
.transition[class*="slide left"].out {
-webkit-animation-name: slideOutX;
animation-name: slideOutX;
-webkit-transform-origin: center right;
-ms-transform-origin: center right;
transform-origin: center right;
}
.transition[class*="slide right"].out {
-webkit-animation-name: slideOutX;
animation-name: slideOutX;
-webkit-transform-origin: center left;
-ms-transform-origin: center left;
transform-origin: center left;
}
/* In */
@-webkit-keyframes slideInY {
0% {
opacity: 0;
-webkit-transform: scaleY(0);
transform: scaleY(0);
}
100% {
opacity: 1;
-webkit-transform: scaleY(1);
transform: scaleY(1);
}
}
@keyframes slideInY {
0% {
opacity: 0;
-webkit-transform: scaleY(0);
transform: scaleY(0);
}
100% {
opacity: 1;
-webkit-transform: scaleY(1);
transform: scaleY(1);
}
}
@-webkit-keyframes slideInX {
0% {
opacity: 0;
-webkit-transform: scaleX(0);
transform: scaleX(0);
}
100% {
opacity: 1;
-webkit-transform: scaleX(1);
transform: scaleX(1);
}
}
@keyframes slideInX {
0% {
opacity: 0;
-webkit-transform: scaleX(0);
transform: scaleX(0);
}
100% {
opacity: 1;
-webkit-transform: scaleX(1);
transform: scaleX(1);
}
}
/* Out */
@-webkit-keyframes slideOutY {
0% {
opacity: 1;
-webkit-transform: scaleY(1);
transform: scaleY(1);
}
100% {
opacity: 0;
-webkit-transform: scaleY(0);
transform: scaleY(0);
}
}
@keyframes slideOutY {
0% {
opacity: 1;
-webkit-transform: scaleY(1);
transform: scaleY(1);
}
100% {
opacity: 0;
-webkit-transform: scaleY(0);
transform: scaleY(0);
}
}
@-webkit-keyframes slideOutX {
0% {
opacity: 1;
-webkit-transform: scaleX(1);
transform: scaleX(1);
}
100% {
opacity: 0;
-webkit-transform: scaleX(0);
transform: scaleX(0);
}
}
@keyframes slideOutX {
0% {
opacity: 1;
-webkit-transform: scaleX(1);
transform: scaleX(1);
}
100% {
opacity: 0;
-webkit-transform: scaleX(0);
transform: scaleX(0);
}
}
/*--------------
Swing
---------------*/
.transition.swing.in,
.transition[class*="swing down"].in {
-webkit-animation-name: swingInY;
animation-name: swingInY;
-webkit-transform-origin: top center;
-ms-transform-origin: top center;
transform-origin: top center;
}
.transition[class*="swing up"].in {
-webkit-animation-name: swingInY;
animation-name: swingInY;
-webkit-transform-origin: bottom center;
-ms-transform-origin: bottom center;
transform-origin: bottom center;
}
.transition[class*="swing left"].in {
-webkit-animation-name: swingInX;
animation-name: swingInX;
-webkit-transform-origin: center right;
-ms-transform-origin: center right;
transform-origin: center right;
}
.transition[class*="swing right"].in {
-webkit-animation-name: swingInX;
animation-name: swingInX;
-webkit-transform-origin: center left;
-ms-transform-origin: center left;
transform-origin: center left;
}
.transition.swing.out,
.transition[class*="swing down"].out {
-webkit-animation-name: swingOutY;
animation-name: swingOutY;
-webkit-transform-origin: top center;
-ms-transform-origin: top center;
transform-origin: top center;
}
.transition[class*="swing up"].out {
-webkit-animation-name: swingOutY;
animation-name: swingOutY;
-webkit-transform-origin: bottom center;
-ms-transform-origin: bottom center;
transform-origin: bottom center;
}
.transition[class*="swing left"].out {
-webkit-animation-name: swingOutX;
animation-name: swingOutX;
-webkit-transform-origin: center right;
-ms-transform-origin: center right;
transform-origin: center right;
}
.transition[class*="swing right"].out {
-webkit-animation-name: swingOutX;
animation-name: swingOutX;
-webkit-transform-origin: center left;
-ms-transform-origin: center left;
transform-origin: center left;
}
/* In */
@-webkit-keyframes swingInX {
0% {
-webkit-transform: perspective(1000px) rotateX(90deg);
transform: perspective(1000px) rotateX(90deg);
opacity: 0;
}
40% {
-webkit-transform: perspective(1000px) rotateX(-20deg);
transform: perspective(1000px) rotateX(-20deg);
}
60% {
-webkit-transform: perspective(1000px) rotateX(10deg);
transform: perspective(1000px) rotateX(10deg);
}
80% {
-webkit-transform: perspective(1000px) rotateX(-5deg);
transform: perspective(1000px) rotateX(-5deg);
opacity: 1;
}
100% {
-webkit-transform: perspective(1000px) rotateX(0deg);
transform: perspective(1000px) rotateX(0deg);
}
}
@keyframes swingInX {
0% {
-webkit-transform: perspective(1000px) rotateX(90deg);
transform: perspective(1000px) rotateX(90deg);
opacity: 0;
}
40% {
-webkit-transform: perspective(1000px) rotateX(-20deg);
transform: perspective(1000px) rotateX(-20deg);
}
60% {
-webkit-transform: perspective(1000px) rotateX(10deg);
transform: perspective(1000px) rotateX(10deg);
}
80% {
-webkit-transform: perspective(1000px) rotateX(-5deg);
transform: perspective(1000px) rotateX(-5deg);
opacity: 1;
}
100% {
-webkit-transform: perspective(1000px) rotateX(0deg);
transform: perspective(1000px) rotateX(0deg);
}
}
@-webkit-keyframes swingInY {
0% {
-webkit-transform: perspective(1000px) rotateY(-90deg);
transform: perspective(1000px) rotateY(-90deg);
opacity: 0;
}
40% {
-webkit-transform: perspective(1000px) rotateY(20deg);
transform: perspective(1000px) rotateY(20deg);
}
60% {
-webkit-transform: perspective(1000px) rotateY(-10deg);
transform: perspective(1000px) rotateY(-10deg);
}
80% {
-webkit-transform: perspective(1000px) rotateY(5deg);
transform: perspective(1000px) rotateY(5deg);
opacity: 1;
}
100% {
-webkit-transform: perspective(1000px) rotateY(0deg);
transform: perspective(1000px) rotateY(0deg);
}
}
@keyframes swingInY {
0% {
-webkit-transform: perspective(1000px) rotateY(-90deg);
transform: perspective(1000px) rotateY(-90deg);
opacity: 0;
}
40% {
-webkit-transform: perspective(1000px) rotateY(20deg);
transform: perspective(1000px) rotateY(20deg);
}
60% {
-webkit-transform: perspective(1000px) rotateY(-10deg);
transform: perspective(1000px) rotateY(-10deg);
}
80% {
-webkit-transform: perspective(1000px) rotateY(5deg);
transform: perspective(1000px) rotateY(5deg);
opacity: 1;
}
100% {
-webkit-transform: perspective(1000px) rotateY(0deg);
transform: perspective(1000px) rotateY(0deg);
}
}
/* Out */
@-webkit-keyframes swingOutUp {
0% {
-webkit-transform: perspective(1000px) rotateX(0deg);
transform: perspective(1000px) rotateX(0deg);
}
30% {
-webkit-transform: perspective(1000px) rotateX(-20deg);
transform: perspective(1000px) rotateX(-20deg);
opacity: 1;
}
100% {
-webkit-transform: perspective(1000px) rotateX(90deg);
transform: perspective(1000px) rotateX(90deg);
opacity: 0;
}
}
@keyframes swingOutUp {
0% {
-webkit-transform: perspective(1000px) rotateX(0deg);
transform: perspective(1000px) rotateX(0deg);
}
30% {
-webkit-transform: perspective(1000px) rotateX(-20deg);
transform: perspective(1000px) rotateX(-20deg);
opacity: 1;
}
100% {
-webkit-transform: perspective(1000px) rotateX(90deg);
transform: perspective(1000px) rotateX(90deg);
opacity: 0;
}
}
@-webkit-keyframes swingOutDown {
0% {
-webkit-transform: perspective(1000px) rotateX(0deg);
transform: perspective(1000px) rotateX(0deg);
}
30% {
-webkit-transform: perspective(1000px) rotateX(20deg);
transform: perspective(1000px) rotateX(20deg);
opacity: 1;
}
100% {
-webkit-transform: perspective(1000px) rotateX(-90deg);
transform: perspective(1000px) rotateX(-90deg);
opacity: 0;
}
}
@keyframes swingOutDown {
0% {
-webkit-transform: perspective(1000px) rotateX(0deg);
transform: perspective(1000px) rotateX(0deg);
}
30% {
-webkit-transform: perspective(1000px) rotateX(20deg);
transform: perspective(1000px) rotateX(20deg);
opacity: 1;
}
100% {
-webkit-transform: perspective(1000px) rotateX(-90deg);
transform: perspective(1000px) rotateX(-90deg);
opacity: 0;
}
}
@-webkit-keyframes swingOutLeft {
0% {
-webkit-transform: perspective(1000px) rotateY(0deg);
transform: perspective(1000px) rotateY(0deg);
}
30% {
-webkit-transform: perspective(1000px) rotateY(20deg);
transform: perspective(1000px) rotateY(20deg);
opacity: 1;
}
100% {
-webkit-transform: perspective(1000px) rotateY(-90deg);
transform: perspective(1000px) rotateY(-90deg);
opacity: 0;
}
}
@keyframes swingOutLeft {
0% {
-webkit-transform: perspective(1000px) rotateY(0deg);
transform: perspective(1000px) rotateY(0deg);
}
30% {
-webkit-transform: perspective(1000px) rotateY(20deg);
transform: perspective(1000px) rotateY(20deg);
opacity: 1;
}
100% {
-webkit-transform: perspective(1000px) rotateY(-90deg);
transform: perspective(1000px) rotateY(-90deg);
opacity: 0;
}
}
@-webkit-keyframes swingOutRight {
0% {
-webkit-transform: perspective(1000px) rotateY(0deg);
transform: perspective(1000px) rotateY(0deg);
}
30% {
-webkit-transform: perspective(1000px) rotateY(-20deg);
transform: perspective(1000px) rotateY(-20deg);
opacity: 1;
}
100% {
-webkit-transform: perspective(1000px) rotateY(90deg);
transform: perspective(1000px) rotateY(90deg);
opacity: 0;
}
}
@keyframes swingOutRight {
0% {
-webkit-transform: perspective(1000px) rotateY(0deg);
transform: perspective(1000px) rotateY(0deg);
}
30% {
-webkit-transform: perspective(1000px) rotateY(-20deg);
transform: perspective(1000px) rotateY(-20deg);
opacity: 1;
}
100% {
-webkit-transform: perspective(1000px) rotateY(90deg);
transform: perspective(1000px) rotateY(90deg);
opacity: 0;
}
}
/*******************************
Static Animations
*******************************/
/*--------------
Emphasis
---------------*/
.flash.transition {
-webkit-animation-name: flash;
animation-name: flash;
}
.shake.transition {
-webkit-animation-name: shake;
animation-name: shake;
}
.bounce.transition {
-webkit-animation-name: bounce;
animation-name: bounce;
}
.tada.transition {
-webkit-animation-name: tada;
animation-name: tada;
}
.pulse.transition {
-webkit-animation-name: pulse;
animation-name: pulse;
}
.jiggle.transition {
-webkit-animation-name: jiggle;
animation-name: jiggle;
}
/* Flash */
@-webkit-keyframes flash {
0%,
50%,
100% {
opacity: 1;
}
25%,
75% {
opacity: 0;
}
}
@keyframes flash {
0%,
50%,
100% {
opacity: 1;
}
25%,
75% {
opacity: 0;
}
}
/* Shake */
@-webkit-keyframes shake {
0%,
100% {
-webkit-transform: translateX(0);
transform: translateX(0);
}
10%,
30%,
50%,
70%,
90% {
-webkit-transform: translateX(-10px);
transform: translateX(-10px);
}
20%,
40%,
60%,
80% {
-webkit-transform: translateX(10px);
transform: translateX(10px);
}
}
@keyframes shake {
0%,
100% {
-webkit-transform: translateX(0);
transform: translateX(0);
}
10%,
30%,
50%,
70%,
90% {
-webkit-transform: translateX(-10px);
transform: translateX(-10px);
}
20%,
40%,
60%,
80% {
-webkit-transform: translateX(10px);
transform: translateX(10px);
}
}
/* Bounce */
@-webkit-keyframes bounce {
0%,
20%,
50%,
80%,
100% {
-webkit-transform: translateY(0);
transform: translateY(0);
}
40% {
-webkit-transform: translateY(-30px);
transform: translateY(-30px);
}
60% {
-webkit-transform: translateY(-15px);
transform: translateY(-15px);
}
}
@keyframes bounce {
0%,
20%,
50%,
80%,
100% {
-webkit-transform: translateY(0);
transform: translateY(0);
}
40% {
-webkit-transform: translateY(-30px);
transform: translateY(-30px);
}
60% {
-webkit-transform: translateY(-15px);
transform: translateY(-15px);
}
}
/* Tada */
@-webkit-keyframes tada {
0% {
-webkit-transform: scale(1);
transform: scale(1);
}
10%,
20% {
-webkit-transform: scale(0.9) rotate(-3deg);
transform: scale(0.9) rotate(-3deg);
}
30%,
50%,
70%,
90% {
-webkit-transform: scale(1.1) rotate(3deg);
transform: scale(1.1) rotate(3deg);
}
40%,
60%,
80% {
-webkit-transform: scale(1.1) rotate(-3deg);
transform: scale(1.1) rotate(-3deg);
}
100% {
-webkit-transform: scale(1) rotate(0);
transform: scale(1) rotate(0);
}
}
@keyframes tada {
0% {
-webkit-transform: scale(1);
transform: scale(1);
}
10%,
20% {
-webkit-transform: scale(0.9) rotate(-3deg);
transform: scale(0.9) rotate(-3deg);
}
30%,
50%,
70%,
90% {
-webkit-transform: scale(1.1) rotate(3deg);
transform: scale(1.1) rotate(3deg);
}
40%,
60%,
80% {
-webkit-transform: scale(1.1) rotate(-3deg);
transform: scale(1.1) rotate(-3deg);
}
100% {
-webkit-transform: scale(1) rotate(0);
transform: scale(1) rotate(0);
}
}
/* Pulse */
@-webkit-keyframes pulse {
0% {
-webkit-transform: scale(1);
transform: scale(1);
opacity: 1;
}
50% {
-webkit-transform: scale(0.9);
transform: scale(0.9);
opacity: 0.7;
}
100% {
-webkit-transform: scale(1);
transform: scale(1);
opacity: 1;
}
}
@keyframes pulse {
0% {
-webkit-transform: scale(1);
transform: scale(1);
opacity: 1;
}
50% {
-webkit-transform: scale(0.9);
transform: scale(0.9);
opacity: 0.7;
}
100% {
-webkit-transform: scale(1);
transform: scale(1);
opacity: 1;
}
}
/* Rubberband */
@-webkit-keyframes jiggle {
0% {
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
30% {
-webkit-transform: scale3d(1.25, 0.75, 1);
transform: scale3d(1.25, 0.75, 1);
}
40% {
-webkit-transform: scale3d(0.75, 1.25, 1);
transform: scale3d(0.75, 1.25, 1);
}
50% {
-webkit-transform: scale3d(1.15, 0.85, 1);
transform: scale3d(1.15, 0.85, 1);
}
65% {
-webkit-transform: scale3d(0.95, 1.05, 1);
transform: scale3d(0.95, 1.05, 1);
}
75% {
-webkit-transform: scale3d(1.05, 0.95, 1);
transform: scale3d(1.05, 0.95, 1);
}
100% {
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
}
@keyframes jiggle {
0% {
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
30% {
-webkit-transform: scale3d(1.25, 0.75, 1);
transform: scale3d(1.25, 0.75, 1);
}
40% {
-webkit-transform: scale3d(0.75, 1.25, 1);
transform: scale3d(0.75, 1.25, 1);
}
50% {
-webkit-transform: scale3d(1.15, 0.85, 1);
transform: scale3d(1.15, 0.85, 1);
}
65% {
-webkit-transform: scale3d(0.95, 1.05, 1);
transform: scale3d(0.95, 1.05, 1);
}
75% {
-webkit-transform: scale3d(1.05, 0.95, 1);
transform: scale3d(1.05, 0.95, 1);
}
100% {
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
}
/*******************************
Site Overrides
*******************************/
| emmansun/cdnjs | ajax/libs/semantic-ui/1.9.0/components/transition.css | CSS | mit | 46,417 |
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
dist: {
src: ['lib/melonJS-<%= pkg.version %>.js', 'lib/plugins/*.js', 'js/game.js', 'js/resources.js','js/**/*.js'],
dest: 'build/js/app.js'
}
},
copy: {
dist: {
files: [{
src: 'index.css',
dest: 'build/index.css'
},{
src: 'data/**/*',
dest: 'build/'
}]
}
},
processhtml: {
dist: {
options: {
process: true,
data: {
title: 'My app',
message: 'This is production distribution'
}
},
files: {
'build/index.html': ['index.html']
}
}
},
uglify: {
options: {
report: 'min',
preserveComments: 'some'
},
dist: {
files: {
'build/js/app.min.js': [
'build/js/app.js'
]
}
}
},
connect: {
server: {
options: {
port: 8000,
keepalive: true
}
}
},
});
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-processhtml');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.registerTask('default', ['concat', 'uglify', 'copy', 'processhtml']);
} | DylanMiller/Awesomenauts | Gruntfile.js | JavaScript | mit | 1,446 |
/*! Flight v1.0.10 | (c) Twitter, Inc. | MIT License */
(function(context) {
var factories = {}, loaded = {};
var isArray = Array.isArray || function(obj) {
return obj.constructor == Array;
};
var map = Array.map || function(arr, fn, scope) {
for (var i = 0, len = arr.length, result = []; i < len; i++) {
result.push(fn.call(scope, arr[i]));
}
return result;
};
function define() {
var args = Array.prototype.slice.call(arguments), dependencies = [], id, factory;
if (typeof args[0] == 'string') {
id = args.shift();
}
if (isArray(args[0])) {
dependencies = args.shift();
}
factory = args.shift();
factories[id] = [dependencies, factory];
}
function require(id) {
function resolve(dep) {
var relativeParts = id.split('/'), depParts = dep.split('/'), relative = false;
relativeParts.pop();
while (depParts[0] == '..' && relativeParts.length) {
relativeParts.pop();
depParts.shift();
relative = true;
}
if (depParts[0] == '.') {
depParts.shift();
relative = true;
}
if (relative) {
depParts = relativeParts.concat(depParts);
}
return depParts.join('/');
}
var unresolved, factory, dependencies;
if (typeof loaded[id] == 'undefined') {
unresolved = factories[id];
if (unresolved) {
dependencies = unresolved[0];
factory = unresolved[1];
loaded[id] = factory.apply(undefined, map(dependencies, function(id) {
return require(resolve(id));
}));
}
}
return loaded[id];
}
// ==========================================
// Copyright 2013 Twitter, Inc
// Licensed under The MIT License
// http://opensource.org/licenses/MIT
// ==========================================
define('lib/utils', [], function () {
var arry = [];
var DEFAULT_INTERVAL = 100;
var utils = {
isDomObj: function (obj) {
return !!(obj.nodeType || obj === window);
},
toArray: function (obj, from) {
return arry.slice.call(obj, from);
},
merge: function () {
// unpacking arguments by hand benchmarked faster
var l = arguments.length, i = 0, args = new Array(l + 1);
for (; i < l; i++)
args[i + 1] = arguments[i];
if (l === 0) {
return {};
}
//start with empty object so a copy is created
args[0] = {};
if (args[args.length - 1] === true) {
//jquery extend requires deep copy as first arg
args.pop();
args.unshift(true);
}
return $.extend.apply(undefined, args);
},
push: function (base, extra, protect) {
if (base) {
Object.keys(extra || {}).forEach(function (key) {
if (base[key] && protect) {
throw Error('utils.push attempted to overwrite \'' + key + '\' while running in protected mode');
}
if (typeof base[key] == 'object' && typeof extra[key] == 'object') {
//recurse
this.push(base[key], extra[key]);
} else {
//no protect, so extra wins
base[key] = extra[key];
}
}, this);
}
return base;
},
isEnumerable: function (obj, property) {
return Object.keys(obj).indexOf(property) > -1;
},
compose: function () {
var funcs = arguments;
return function () {
var args = arguments;
for (var i = funcs.length - 1; i >= 0; i--) {
args = [funcs[i].apply(this, args)];
}
return args[0];
};
},
uniqueArray: function (array) {
var u = {}, a = [];
for (var i = 0, l = array.length; i < l; ++i) {
if (u.hasOwnProperty(array[i])) {
continue;
}
a.push(array[i]);
u[array[i]] = 1;
}
return a;
},
debounce: function (func, wait, immediate) {
if (typeof wait != 'number') {
wait = DEFAULT_INTERVAL;
}
var timeout, result;
return function () {
var context = this, args = arguments;
var later = function () {
timeout = null;
if (!immediate) {
result = func.apply(context, args);
}
};
var callNow = immediate && !timeout;
clearTimeout(timeout);
timeout = setTimeout(later, wait);
if (callNow) {
result = func.apply(context, args);
}
return result;
};
},
throttle: function (func, wait) {
if (typeof wait != 'number') {
wait = DEFAULT_INTERVAL;
}
var context, args, timeout, throttling, more, result;
var whenDone = this.debounce(function () {
more = throttling = false;
}, wait);
return function () {
context = this;
args = arguments;
var later = function () {
timeout = null;
if (more) {
result = func.apply(context, args);
}
whenDone();
};
if (!timeout) {
timeout = setTimeout(later, wait);
}
if (throttling) {
more = true;
} else {
throttling = true;
result = func.apply(context, args);
}
whenDone();
return result;
};
},
countThen: function (num, base) {
return function () {
if (!--num) {
return base.apply(this, arguments);
}
};
},
delegate: function (rules) {
return function (e, data) {
var target = $(e.target), parent;
Object.keys(rules).forEach(function (selector) {
if ((parent = target.closest(selector)).length) {
data = data || {};
data.el = parent[0];
return rules[selector].apply(this, [
e,
data
]);
}
}, this);
};
}
};
return utils;
});
define('lib/debug', [], function () {
var logFilter;
//******************************************************************************************
// Search object model
//******************************************************************************************
function traverse(util, searchTerm, options) {
var options = options || {};
var obj = options.obj || window;
var path = options.path || (obj == window ? 'window' : '');
var props = Object.keys(obj);
props.forEach(function (prop) {
if ((tests[util] || util)(searchTerm, obj, prop)) {
console.log([
path,
'.',
prop
].join(''), '->', [
'(',
typeof obj[prop],
')'
].join(''), obj[prop]);
}
if (Object.prototype.toString.call(obj[prop]) == '[object Object]' && obj[prop] != obj && path.split('.').indexOf(prop) == -1) {
traverse(util, searchTerm, {
obj: obj[prop],
path: [
path,
prop
].join('.')
});
}
});
}
function search(util, expected, searchTerm, options) {
if (!expected || typeof searchTerm == expected) {
traverse(util, searchTerm, options);
} else {
console.error([
searchTerm,
'must be',
expected
].join(' '));
}
}
var tests = {
'name': function (searchTerm, obj, prop) {
return searchTerm == prop;
},
'nameContains': function (searchTerm, obj, prop) {
return prop.indexOf(searchTerm) > -1;
},
'type': function (searchTerm, obj, prop) {
return obj[prop] instanceof searchTerm;
},
'value': function (searchTerm, obj, prop) {
return obj[prop] === searchTerm;
},
'valueCoerced': function (searchTerm, obj, prop) {
return obj[prop] == searchTerm;
}
};
function byName(searchTerm, options) {
search('name', 'string', searchTerm, options);
}
;
function byNameContains(searchTerm, options) {
search('nameContains', 'string', searchTerm, options);
}
;
function byType(searchTerm, options) {
search('type', 'function', searchTerm, options);
}
;
function byValue(searchTerm, options) {
search('value', null, searchTerm, options);
}
;
function byValueCoerced(searchTerm, options) {
search('valueCoerced', null, searchTerm, options);
}
;
function custom(fn, options) {
traverse(fn, null, options);
}
;
//******************************************************************************************
// Event logging
//******************************************************************************************
var ALL = 'all';
//no filter
//no logging by default
var defaultEventNamesFilter = [];
var defaultActionsFilter = [];
var logFilter = retrieveLogFilter();
function filterEventLogsByAction() {
var actions = [].slice.call(arguments);
logFilter.eventNames.length || (logFilter.eventNames = ALL);
logFilter.actions = actions.length ? actions : ALL;
saveLogFilter();
}
function filterEventLogsByName() {
var eventNames = [].slice.call(arguments);
logFilter.actions.length || (logFilter.actions = ALL);
logFilter.eventNames = eventNames.length ? eventNames : ALL;
saveLogFilter();
}
function hideAllEventLogs() {
logFilter.actions = [];
logFilter.eventNames = [];
saveLogFilter();
}
function showAllEventLogs() {
logFilter.actions = ALL;
logFilter.eventNames = ALL;
saveLogFilter();
}
function saveLogFilter() {
if (window.localStorage) {
localStorage.setItem('logFilter_eventNames', logFilter.eventNames);
localStorage.setItem('logFilter_actions', logFilter.actions);
}
}
function retrieveLogFilter() {
var result = {
eventNames: window.localStorage && localStorage.getItem('logFilter_eventNames') || defaultEventNamesFilter,
actions: window.localStorage && localStorage.getItem('logFilter_actions') || defaultActionsFilter
};
//reconstitute arrays
Object.keys(result).forEach(function (k) {
var thisProp = result[k];
if (typeof thisProp == 'string' && thisProp !== ALL) {
result[k] = thisProp.split(',');
}
});
return result;
}
return {
enable: function (enable) {
this.enabled = !!enable;
if (enable && window.console) {
console.info('Booting in DEBUG mode');
console.info('You can configure event logging with DEBUG.events.logAll()/logNone()/logByName()/logByAction()');
}
window.DEBUG = this;
},
find: {
byName: byName,
byNameContains: byNameContains,
byType: byType,
byValue: byValue,
byValueCoerced: byValueCoerced,
custom: custom
},
events: {
logFilter: logFilter,
logByAction: filterEventLogsByAction,
logByName: filterEventLogsByName,
logAll: showAllEventLogs,
logNone: hideAllEventLogs
}
};
});
// ==========================================
// Copyright 2013 Twitter, Inc
// Licensed under The MIT License
// http://opensource.org/licenses/MIT
// ==========================================
define('lib/compose', [
'./utils',
'./debug'
], function (util, debug) {
//enumerables are shims - getOwnPropertyDescriptor shim doesn't work
var canWriteProtect = debug.enabled && !util.isEnumerable(Object, 'getOwnPropertyDescriptor');
//whitelist of unlockable property names
var dontLock = ['mixedIn'];
if (canWriteProtect) {
//IE8 getOwnPropertyDescriptor is built-in but throws exeption on non DOM objects
try {
Object.getOwnPropertyDescriptor(Object, 'keys');
} catch (e) {
canWriteProtect = false;
}
}
function setPropertyWritability(obj, isWritable) {
if (!canWriteProtect) {
return;
}
var props = Object.create(null);
Object.keys(obj).forEach(function (key) {
if (dontLock.indexOf(key) < 0) {
var desc = Object.getOwnPropertyDescriptor(obj, key);
desc.writable = isWritable;
props[key] = desc;
}
});
Object.defineProperties(obj, props);
}
function unlockProperty(obj, prop, op) {
var writable;
if (!canWriteProtect || !obj.hasOwnProperty(prop)) {
op.call(obj);
return;
}
writable = Object.getOwnPropertyDescriptor(obj, prop).writable;
Object.defineProperty(obj, prop, { writable: true });
op.call(obj);
Object.defineProperty(obj, prop, { writable: writable });
}
function mixin(base, mixins) {
base.mixedIn = base.hasOwnProperty('mixedIn') ? base.mixedIn : [];
mixins.forEach(function (mixin) {
if (base.mixedIn.indexOf(mixin) == -1) {
setPropertyWritability(base, false);
mixin.call(base);
base.mixedIn.push(mixin);
}
});
setPropertyWritability(base, true);
}
return {
mixin: mixin,
unlockProperty: unlockProperty
};
});
// ==========================================
// Copyright 2013 Twitter, Inc
// Licensed under The MIT License
// http://opensource.org/licenses/MIT
// ==========================================
define('lib/advice', [
'./utils',
'./compose'
], function (util, compose) {
var advice = {
around: function (base, wrapped) {
return function composedAround() {
// unpacking arguments by hand benchmarked faster
var i = 0, l = arguments.length, args = new Array(l + 1);
args[0] = base.bind(this);
for (; i < l; i++)
args[i + 1] = arguments[i];
return wrapped.apply(this, args);
};
},
before: function (base, before) {
var beforeFn = typeof before == 'function' ? before : before.obj[before.fnName];
return function composedBefore() {
beforeFn.apply(this, arguments);
return base.apply(this, arguments);
};
},
after: function (base, after) {
var afterFn = typeof after == 'function' ? after : after.obj[after.fnName];
return function composedAfter() {
var res = (base.unbound || base).apply(this, arguments);
afterFn.apply(this, arguments);
return res;
};
},
withAdvice: function () {
[
'before',
'after',
'around'
].forEach(function (m) {
this[m] = function (method, fn) {
compose.unlockProperty(this, method, function () {
if (typeof this[method] == 'function') {
return this[method] = advice[m](this[method], fn);
} else {
return this[method] = fn;
}
});
};
}, this);
}
};
return advice;
});
// ==========================================
// Copyright 2013 Twitter, Inc
// Licensed under The MIT License
// http://opensource.org/licenses/MIT
// ==========================================
define('lib/registry', ['./utils'], function (util) {
function parseEventArgs(instance, args) {
var element, type, callback;
var end = args.length;
if (typeof args[end - 1] === 'function') {
end -= 1;
callback = args[end];
}
if (typeof args[end - 1] === 'object') {
end -= 1;
}
if (end == 2) {
element = args[0];
type = args[1];
} else {
element = instance.node;
type = args[0];
}
return {
element: element,
type: type,
callback: callback
};
}
function matchEvent(a, b) {
return a.element == b.element && a.type == b.type && (b.callback == null || a.callback == b.callback);
}
function Registry() {
var registry = this;
(this.reset = function () {
this.components = [];
this.allInstances = {};
this.events = [];
}).call(this);
function ComponentInfo(component) {
this.component = component;
this.attachedTo = [];
this.instances = {};
this.addInstance = function (instance) {
var instanceInfo = new InstanceInfo(instance);
this.instances[instance.identity] = instanceInfo;
this.attachedTo.push(instance.node);
return instanceInfo;
};
this.removeInstance = function (instance) {
delete this.instances[instance.identity];
var indexOfNode = this.attachedTo.indexOf(instance.node);
indexOfNode > -1 && this.attachedTo.splice(indexOfNode, 1);
if (!Object.keys(this.instances).length) {
//if I hold no more instances remove me from registry
registry.removeComponentInfo(this);
}
};
this.isAttachedTo = function (node) {
return this.attachedTo.indexOf(node) > -1;
};
}
function InstanceInfo(instance) {
this.instance = instance;
this.events = [];
this.addBind = function (event) {
this.events.push(event);
registry.events.push(event);
};
this.removeBind = function (event) {
for (var i = 0, e; e = this.events[i]; i++) {
if (matchEvent(e, event)) {
this.events.splice(i, 1);
}
}
};
}
this.addInstance = function (instance) {
var component = this.findComponentInfo(instance);
if (!component) {
component = new ComponentInfo(instance.constructor);
this.components.push(component);
}
var inst = component.addInstance(instance);
this.allInstances[instance.identity] = inst;
return component;
};
this.removeInstance = function (instance) {
var index, instInfo = this.findInstanceInfo(instance);
//remove from component info
var componentInfo = this.findComponentInfo(instance);
componentInfo && componentInfo.removeInstance(instance);
//remove from registry
delete this.allInstances[instance.identity];
};
this.removeComponentInfo = function (componentInfo) {
var index = this.components.indexOf(componentInfo);
index > -1 && this.components.splice(index, 1);
};
this.findComponentInfo = function (which) {
var component = which.attachTo ? which : which.constructor;
for (var i = 0, c; c = this.components[i]; i++) {
if (c.component === component) {
return c;
}
}
return null;
};
this.findInstanceInfo = function (instance) {
return this.allInstances[instance.identity] || null;
};
this.findInstanceInfoByNode = function (node) {
var result = [];
Object.keys(this.allInstances).forEach(function (k) {
var thisInstanceInfo = this.allInstances[k];
if (thisInstanceInfo.instance.node === node) {
result.push(thisInstanceInfo);
}
}, this);
return result;
};
this.on = function (componentOn) {
var instance = registry.findInstanceInfo(this), boundCallback;
// unpacking arguments by hand benchmarked faster
var l = arguments.length, i = 1;
var otherArgs = new Array(l - 1);
for (; i < l; i++)
otherArgs[i - 1] = arguments[i];
if (instance) {
boundCallback = componentOn.apply(null, otherArgs);
if (boundCallback) {
otherArgs[otherArgs.length - 1] = boundCallback;
}
var event = parseEventArgs(this, otherArgs);
instance.addBind(event);
}
};
this.off = function (el, type, callback) {
var event = parseEventArgs(this, arguments), instance = registry.findInstanceInfo(this);
if (instance) {
instance.removeBind(event);
}
//remove from global event registry
for (var i = 0, e; e = registry.events[i]; i++) {
if (matchEvent(e, event)) {
registry.events.splice(i, 1);
}
}
};
//debug tools may want to add advice to trigger
registry.trigger = new Function();
this.teardown = function () {
registry.removeInstance(this);
};
this.withRegistration = function () {
this.after('initialize', function () {
registry.addInstance(this);
});
this.around('on', registry.on);
this.after('off', registry.off);
//debug tools may want to add advice to trigger
window.DEBUG && DEBUG.enabled && this.after('trigger', registry.trigger);
this.after('teardown', {
obj: registry,
fnName: 'teardown'
});
};
}
return new Registry();
});
define('lib/base', [
'./utils',
'./registry',
'./debug'
], function (utils, registry, debug) {
//common mixin allocates basic functionality - used by all component prototypes
//callback context is bound to component
var componentId = 0;
function teardownInstance(instanceInfo) {
instanceInfo.events.slice().forEach(function (event) {
var args = [event.type];
event.element && args.unshift(event.element);
typeof event.callback == 'function' && args.push(event.callback);
this.off.apply(this, args);
}, instanceInfo.instance);
}
function checkSerializable(type, data) {
try {
window.postMessage(data, '*');
} catch (e) {
console.log('unserializable data for event', type, ':', data);
throw new Error([
'The event',
type,
'on component',
this.toString(),
'was triggered with non-serializable data'
].join(' '));
}
}
function withBase() {
// delegate trigger, bind and unbind to an element
// if $element not supplied, use component's node
// other arguments are passed on
// event can be either a string specifying the type
// of the event, or a hash specifying both the type
// and a default function to be called.
this.trigger = function () {
var $element, type, data, event, defaultFn;
var lastIndex = arguments.length - 1, lastArg = arguments[lastIndex];
if (typeof lastArg != 'string' && !(lastArg && lastArg.defaultBehavior)) {
lastIndex--;
data = lastArg;
}
if (lastIndex == 1) {
$element = $(arguments[0]);
event = arguments[1];
} else {
$element = this.$node;
event = arguments[0];
}
if (event.defaultBehavior) {
defaultFn = event.defaultBehavior;
event = $.Event(event.type);
}
type = event.type || event;
if (debug.enabled && window.postMessage) {
checkSerializable.call(this, type, data);
}
if (typeof this.attr.eventData === 'object') {
data = $.extend(true, {}, this.attr.eventData, data);
}
$element.trigger(event || type, data);
if (defaultFn && !event.isDefaultPrevented()) {
(this[defaultFn] || defaultFn).call(this);
}
return $element;
};
this.on = function () {
var $element, type, callback, originalCb;
var lastIndex = arguments.length - 1, origin = arguments[lastIndex];
if (typeof origin == 'object') {
//delegate callback
originalCb = utils.delegate(this.resolveDelegateRules(origin));
} else {
originalCb = origin;
}
if (lastIndex == 2) {
$element = $(arguments[0]);
type = arguments[1];
} else {
$element = this.$node;
type = arguments[0];
}
if (typeof originalCb != 'function' && typeof originalCb != 'object') {
throw new Error('Unable to bind to \'' + type + '\' because the given callback is not a function or an object');
}
callback = originalCb.bind(this);
callback.target = originalCb;
// if the original callback is already branded by jQuery's guid, copy it to the context-bound version
if (originalCb.guid) {
callback.guid = originalCb.guid;
}
$element.on(type, callback);
// get jquery's guid from our bound fn, so unbinding will work
originalCb.guid = callback.guid;
return callback;
};
this.off = function () {
var $element, type, callback;
var lastIndex = arguments.length - 1;
if (typeof arguments[lastIndex] == 'function') {
callback = arguments[lastIndex];
lastIndex -= 1;
}
if (lastIndex == 1) {
$element = $(arguments[0]);
type = arguments[1];
} else {
$element = this.$node;
type = arguments[0];
}
return $element.off(type, callback);
};
this.resolveDelegateRules = function (ruleInfo) {
var rules = {};
Object.keys(ruleInfo).forEach(function (r) {
if (!(r in this.attr)) {
throw new Error('Component "' + this.toString() + '" wants to listen on "' + r + '" but no such attribute was defined.');
}
rules[this.attr[r]] = ruleInfo[r];
}, this);
return rules;
};
this.defaultAttrs = function (defaults) {
utils.push(this.defaults, defaults, true) || (this.defaults = defaults);
};
this.select = function (attributeKey) {
return this.$node.find(this.attr[attributeKey]);
};
this.initialize = function (node, attrs) {
attrs = attrs || {};
this.identity = componentId++;
if (!node) {
throw new Error('Component needs a node');
}
if (node.jquery) {
this.node = node[0];
this.$node = node;
} else {
this.node = node;
this.$node = $(node);
}
//merge defaults with supplied options
//put options in attr.__proto__ to avoid merge overhead
var attr = Object.create(attrs);
for (var key in this.defaults) {
if (!attrs.hasOwnProperty(key)) {
attr[key] = this.defaults[key];
}
}
this.attr = attr;
Object.keys(this.defaults || {}).forEach(function (key) {
if (this.defaults[key] === null && this.attr[key] === null) {
throw new Error('Required attribute "' + key + '" not specified in attachTo for component "' + this.toString() + '".');
}
}, this);
return this;
};
this.teardown = function () {
teardownInstance(registry.findInstanceInfo(this));
};
}
return withBase;
});
// ==========================================
// Copyright 2013 Twitter, Inc
// Licensed under The MIT License
// http://opensource.org/licenses/MIT
// ==========================================
define('lib/logger', [
'./compose',
'./utils'
], function (compose, util) {
var actionSymbols = {
on: '<-',
trigger: '->',
off: 'x '
};
function elemToString(elem) {
var tagStr = elem.tagName ? elem.tagName.toLowerCase() : elem.toString();
var classStr = elem.className ? '.' + elem.className : '';
var result = tagStr + classStr;
return elem.tagName ? [
'\'',
'\''
].join(result) : result;
}
function log(action, component, eventArgs) {
var name, elem, fn, fnName, logFilter, toRegExp, actionLoggable, nameLoggable;
if (typeof eventArgs[eventArgs.length - 1] == 'function') {
fn = eventArgs.pop();
fn = fn.unbound || fn; //use unbound version if any (better info)
}
if (typeof eventArgs[eventArgs.length - 1] == 'object') {
eventArgs.pop(); //trigger data arg - not logged right now
}
if (eventArgs.length == 2) {
elem = eventArgs[0];
name = eventArgs[1];
} else {
elem = component.$node[0];
name = eventArgs[0];
}
if (window.DEBUG && window.DEBUG.enabled) {
logFilter = DEBUG.events.logFilter;
// no regex for you, actions...
actionLoggable = logFilter.actions == 'all' || logFilter.actions.indexOf(action) > -1;
// event name filter allow wildcards or regex...
toRegExp = function (expr) {
return expr.test ? expr : new RegExp('^' + expr.replace(/\*/g, '.*') + '$');
};
nameLoggable = logFilter.eventNames == 'all' || logFilter.eventNames.some(function (e) {
return toRegExp(e).test(name);
});
if (actionLoggable && nameLoggable) {
console.info(actionSymbols[action], action, '[' + name + ']', elemToString(elem), component.constructor.describe.split(' ').slice(0, 3).join(' '));
}
}
}
function withLogging() {
this.before('trigger', function () {
log('trigger', this, util.toArray(arguments));
});
this.before('on', function () {
log('on', this, util.toArray(arguments));
});
this.before('off', function (eventArgs) {
log('off', this, util.toArray(arguments));
});
}
return withLogging;
});
// ==========================================
// Copyright 2013 Twitter, Inc
// Licensed under The MIT License
// http://opensource.org/licenses/MIT
// ==========================================
define('lib/component', [
'./advice',
'./utils',
'./compose',
'./base',
'./registry',
'./logger',
'./debug'
], function (advice, utils, compose, withBase, registry, withLogging, debug) {
var functionNameRegEx = /function (.*?)\s?\(/;
//teardown for all instances of this constructor
function teardownAll() {
var componentInfo = registry.findComponentInfo(this);
componentInfo && Object.keys(componentInfo.instances).forEach(function (k) {
var info = componentInfo.instances[k];
info.instance.teardown();
});
}
function checkSerializable(type, data) {
try {
window.postMessage(data, '*');
} catch (e) {
console.log('unserializable data for event', type, ':', data);
throw new Error([
'The event',
type,
'on component',
this.toString(),
'was triggered with non-serializable data'
].join(' '));
}
}
function attachTo(selector) {
// unpacking arguments by hand benchmarked faster
var l = arguments.length;
var args = new Array(l - 1);
for (var i = 1; i < l; i++)
args[i - 1] = arguments[i];
if (!selector) {
throw new Error('Component needs to be attachTo\'d a jQuery object, native node or selector string');
}
var options = utils.merge.apply(utils, args);
$(selector).each(function (i, node) {
var rawNode = node.jQuery ? node[0] : node;
var componentInfo = registry.findComponentInfo(this);
if (componentInfo && componentInfo.isAttachedTo(rawNode)) {
//already attached
return;
}
new this().initialize(node, options);
}.bind(this));
}
// define the constructor for a custom component type
// takes an unlimited number of mixin functions as arguments
// typical api call with 3 mixins: define(timeline, withTweetCapability, withScrollCapability);
function define() {
// unpacking arguments by hand benchmarked faster
var l = arguments.length;
var mixins = new Array(l + 3);
//add three for common mixins
for (var i = 0; i < l; i++)
mixins[i] = arguments[i];
var Component = function () {
};
Component.toString = Component.prototype.toString = function () {
var prettyPrintMixins = mixins.map(function (mixin) {
if (mixin.name == null) {
//function name property not supported by this browser, use regex
var m = mixin.toString().match(functionNameRegEx);
return m && m[1] ? m[1] : '';
} else {
return mixin.name != 'withBase' ? mixin.name : '';
}
}).filter(Boolean).join(', ');
return prettyPrintMixins;
};
if (debug.enabled) {
Component.describe = Component.prototype.describe = Component.toString();
}
//'options' is optional hash to be merged with 'defaults' in the component definition
Component.attachTo = attachTo;
Component.teardownAll = teardownAll;
// prepend common mixins to supplied list, then mixin all flavors
if (debug.enabled) {
mixins.unshift(withLogging);
}
mixins.unshift(withBase, advice.withAdvice, registry.withRegistration);
compose.mixin(Component.prototype, mixins);
return Component;
}
define.teardownAll = function () {
registry.components.slice().forEach(function (c) {
c.component.teardownAll();
});
registry.reset();
};
return define;
});
// ==========================================
// Copyright 2013 Twitter, Inc
// Licensed under The MIT License
// http://opensource.org/licenses/MIT
// ==========================================
define('lib/index', [
'./advice',
'./component',
'./compose',
'./logger',
'./registry',
'./utils'
], function (advice, component, compose, logger, registry, utils) {
return {
advice: advice,
component: component,
compose: compose,
logger: logger,
registry: registry,
utils: utils
};
});
context.flight = require('lib/index');
}(this));
| mkoryak/cdnjs | ajax/libs/flight/1.0.10/flight.js | JavaScript | mit | 38,308 |
/**
* angular-strap
* @version v2.1.6 - 2015-01-11
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
"use strict";angular.module("mgcrea.ngStrap.tab",[]).provider("$tab",function(){var e=this.defaults={animation:"am-fade",template:"tab/tab.tpl.html",navClass:"nav-tabs",activeClass:"active"},a=this.controller=function(a,n,t){var s=this;s.$options=angular.copy(e),angular.forEach(["animation","navClass","activeClass"],function(e){angular.isDefined(t[e])&&(s.$options[e]=t[e])}),a.$navClass=s.$options.navClass,a.$activeClass=s.$options.activeClass,s.$panes=a.$panes=[],s.$activePaneChangeListeners=s.$viewChangeListeners=[],s.$push=function(e){s.$panes.push(e)},s.$remove=function(e){var a=s.$panes.indexOf(e),n=s.$panes.$active;s.$panes.splice(a,1),n>a?n--:a===n&&n===s.$panes.length&&n--,s.$setActive(n)},s.$panes.$active=0,s.$setActive=a.$setActive=function(e){s.$panes.$active=e,s.$activePaneChangeListeners.forEach(function(e){e()})}};this.$get=function(){var n={};return n.defaults=e,n.controller=a,n}}).directive("bsTabs",["$window","$animate","$tab","$parse",function(e,a,n,t){var s=n.defaults;return{require:["?ngModel","bsTabs"],transclude:!0,scope:!0,controller:["$scope","$element","$attrs",n.controller],templateUrl:function(e,a){return a.template||s.template},link:function(e,a,n,s){var i=s[0],o=s[1];if(i&&(console.warn("Usage of ngModel is deprecated, please use bsActivePane instead!"),o.$activePaneChangeListeners.push(function(){i.$setViewValue(o.$panes.$active)}),i.$formatters.push(function(e){return o.$setActive(1*e),e})),n.bsActivePane){var c=t(n.bsActivePane);o.$activePaneChangeListeners.push(function(){c.assign(e,o.$panes.$active)}),e.$watch(n.bsActivePane,function(e){o.$setActive(1*e)},!0)}}}}]).directive("bsPane",["$window","$animate","$sce",function(e,a,n){return{require:["^?ngModel","^bsTabs"],scope:!0,link:function(e,t,s,i){function o(){var n=c.$panes.indexOf(e),s=c.$panes.$active;a[n===s?"addClass":"removeClass"](t,c.$options.activeClass)}var c=(i[0],i[1]);t.addClass("tab-pane"),s.$observe("title",function(a){e.title=n.trustAsHtml(a)}),c.$options.animation&&t.addClass(c.$options.animation),c.$push(e),e.$on("$destroy",function(){c.$remove(e)}),c.$activePaneChangeListeners.push(function(){o()}),o()}}}]);
//# sourceMappingURL=tab.min.js.map | wenzhixin/cdnjs | ajax/libs/angular-strap/2.2.0/modules/tab.min.js | JavaScript | mit | 2,402 |
(function(e){"function"==typeof define&&define.amd?define(["jquery","moment"],e):e(jQuery,moment)})(function(e,t){function n(e,t,n,a){var r=e;switch(n){case"s":return a||t?"néhány másodperc":"néhány másodperce";case"m":return"egy"+(a||t?" perc":" perce");case"mm":return r+(a||t?" perc":" perce");case"h":return"egy"+(a||t?" óra":" órája");case"hh":return r+(a||t?" óra":" órája");case"d":return"egy"+(a||t?" nap":" napja");case"dd":return r+(a||t?" nap":" napja");case"M":return"egy"+(a||t?" hónap":" hónapja");case"MM":return r+(a||t?" hónap":" hónapja");case"y":return"egy"+(a||t?" év":" éve");case"yy":return r+(a||t?" év":" éve")}return""}function a(e){return(e?"":"[múlt] ")+"["+r[this.day()]+"] LT[-kor]"}var r="vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" ");t.lang("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"),weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D., LT",LLLL:"YYYY. MMMM D., dddd LT"},meridiem:function(e,t,n){return 12>e?n===!0?"de":"DE":n===!0?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return a.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return a.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},ordinal:"%d.",week:{dow:1,doy:7}}),e.fullCalendar.datepickerLang("hu","hu",{closeText:"bezár",prevText:"vissza",nextText:"előre",currentText:"ma",monthNames:["Január","Február","Március","Április","Május","Június","Július","Augusztus","Szeptember","Október","November","December"],monthNamesShort:["Jan","Feb","Már","Ápr","Máj","Jún","Júl","Aug","Szep","Okt","Nov","Dec"],dayNames:["Vasárnap","Hétfő","Kedd","Szerda","Csütörtök","Péntek","Szombat"],dayNamesShort:["Vas","Hét","Ked","Sze","Csü","Pén","Szo"],dayNamesMin:["V","H","K","Sze","Cs","P","Szo"],weekHeader:"Hét",dateFormat:"yy.mm.dd.",firstDay:1,isRTL:!1,showMonthAfterYear:!0,yearSuffix:""}),e.fullCalendar.lang("hu",{defaultButtonText:{month:"Hónap",week:"Hét",day:"Nap",list:"Napló"},allDayText:"Egész nap"})}); | osxi/jsdelivr | files/fullcalendar/2.0.0/lang/hu.js | JavaScript | mit | 2,504 |
/*
* jQuery File Upload Processing Plugin 1.2.2
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2012, Sebastian Tschan
* https://blueimp.net
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/MIT
*/
/*jslint nomen: true, unparam: true */
/*global define, window */
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
// Register as an anonymous AMD module:
define([
'jquery',
'./jquery.fileupload'
], factory);
} else {
// Browser globals:
factory(
window.jQuery
);
}
}(function ($) {
'use strict';
var originalAdd = $.blueimp.fileupload.prototype.options.add;
// The File Upload Processing plugin extends the fileupload widget
// with file processing functionality:
$.widget('blueimp.fileupload', $.blueimp.fileupload, {
options: {
// The list of processing actions:
processQueue: [
/*
{
action: 'log',
type: 'debug'
}
*/
],
add: function (e, data) {
var $this = $(this);
data.process(function () {
return $this.fileupload('process', data);
});
originalAdd.call(this, e, data);
}
},
processActions: {
/*
log: function (data, options) {
console[options.type](
'Processing "' + data.files[data.index].name + '"'
);
}
*/
},
_processFile: function (data) {
var that = this,
dfd = $.Deferred().resolveWith(that, [data]),
chain = dfd.promise();
this._trigger('process', null, data);
$.each(data.processQueue, function (i, settings) {
var func = function (data) {
return that.processActions[settings.action].call(
that,
data,
settings
);
};
chain = chain.pipe(func, settings.always && func);
});
chain
.done(function () {
that._trigger('processdone', null, data);
that._trigger('processalways', null, data);
})
.fail(function () {
that._trigger('processfail', null, data);
that._trigger('processalways', null, data);
});
return chain;
},
// Replaces the settings of each processQueue item that
// are strings starting with an "@", using the remaining
// substring as key for the option map,
// e.g. "@autoUpload" is replaced with options.autoUpload:
_transformProcessQueue: function (options) {
var processQueue = [];
$.each(options.processQueue, function () {
var settings = {},
action = this.action,
prefix = this.prefix === true ? action : this.prefix;
$.each(this, function (key, value) {
if ($.type(value) === 'string' &&
value.charAt(0) === '@') {
settings[key] = options[
value.slice(1) || (prefix ? prefix +
key.charAt(0).toUpperCase() + key.slice(1) : key)
];
} else {
settings[key] = value;
}
});
processQueue.push(settings);
});
options.processQueue = processQueue;
},
// Returns the number of files currently in the processsing queue:
processing: function () {
return this._processing;
},
// Processes the files given as files property of the data parameter,
// returns a Promise object that allows to bind callbacks:
process: function (data) {
var that = this,
options = $.extend({}, this.options, data);
if (options.processQueue && options.processQueue.length) {
this._transformProcessQueue(options);
if (this._processing === 0) {
this._trigger('processstart');
}
$.each(data.files, function (index) {
var opts = index ? $.extend({}, options) : options,
func = function () {
return that._processFile(opts);
};
opts.index = index;
that._processing += 1;
that._processingQueue = that._processingQueue.pipe(func, func)
.always(function () {
that._processing -= 1;
if (that._processing === 0) {
that._trigger('processstop');
}
});
});
}
return this._processingQueue;
},
_create: function () {
this._super();
this._processing = 0;
this._processingQueue = $.Deferred().resolveWith(this)
.promise();
}
});
}));
| dpellier/jsdelivr | files/jquery.fileupload/8.4.2/js/jquery.fileupload-process.js | JavaScript | mit | 5,573 |
/*!
* # Semantic UI 2.0.0 - Video
* http://github.com/semantic-org/semantic-ui/
*
*
* Copyright 2014 Contributors
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
*/
/*******************************
Video
*******************************/
.ui.video {
background-color: #dddddd;
position: relative;
max-width: 100%;
padding-bottom: 56.25%;
height: 0px;
overflow: hidden;
}
/*--------------
Content
---------------*/
/* Placeholder Image */
.ui.video .placeholder {
background-color: #333333;
}
/* Play Icon Overlay */
.ui.video .play {
cursor: pointer;
position: absolute;
top: 0px;
left: 0px;
z-index: 10;
width: 100%;
height: 100%;
background: transparent;
-webkit-transition: background 0.2s ease;
transition: background 0.2s ease;
}
.ui.video .play.icon:before {
position: absolute;
top: 50%;
left: 50%;
z-index: 11;
-webkit-transform: translateX(-50%) translateY(-50%);
-ms-transform: translateX(-50%) translateY(-50%);
transform: translateX(-50%) translateY(-50%);
color: rgba(255, 255, 255, 0.7);
font-size: 7rem;
text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.15);
-webkit-transition: color 0.2s ease;
transition: color 0.2s ease;
}
.ui.video .placeholder {
position: absolute;
top: 0px;
left: 0px;
display: block;
width: 100%;
height: 100%;
}
/* IFrame Embed */
.ui.video .embed iframe,
.ui.video .embed embed,
.ui.video .embed object {
position: absolute;
border: none;
width: 100%;
height: 100%;
top: 0px;
left: 0px;
margin: 0em;
padding: 0em;
}
/*******************************
States
*******************************/
/*--------------
Hover
---------------*/
.ui.video .play:hover {
background: rgba(0, 0, 0, 0);
}
.ui.video .play:hover:before {
color: #ffffff;
}
/*--------------
Active
---------------*/
.ui.active.video .play,
.ui.active.video .placeholder {
display: none;
}
.ui.active.video .embed {
display: inline;
}
/*******************************
Video Overrides
*******************************/
/*******************************
Site Overrides
*******************************/
| dc-js/cdnjs | ajax/libs/semantic-ui/2.0.3/components/video.css | CSS | mit | 2,221 |
/*************************************************************
*
* MathJax/fonts/HTML-CSS/TeX/png/SansSerif/Regular/Main.js
*
* Defines the image size data needed for the HTML-CSS OutputJax
* to display mathematics using fallback images when the fonts
* are not availble to the client browser.
*
* ---------------------------------------------------------------------
*
* Copyright (c) 2009-2013 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
MathJax.OutputJax["HTML-CSS"].defineImageData({
"MathJax_SansSerif": {
}
});
MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].imgDir+"/SansSerif/Regular"+
MathJax.OutputJax["HTML-CSS"].imgPacked+"/Main.js");
| khasinski/cdnjs | ajax/libs/mathjax/2.4.0/fonts/HTML-CSS/TeX/png/SansSerif/Regular/unpacked/Main.js | JavaScript | mit | 1,247 |
/*************************************************************
*
* MathJax/fonts/HTML-CSS/TeX/png/SansSerif/Regular/Main.js
*
* Defines the image size data needed for the HTML-CSS OutputJax
* to display mathematics using fallback images when the fonts
* are not availble to the client browser.
*
* ---------------------------------------------------------------------
*
* Copyright (c) 2009-2013 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
MathJax.OutputJax["HTML-CSS"].defineImageData({
"MathJax_SansSerif": {
}
});
MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].imgDir+"/SansSerif/Regular"+
MathJax.OutputJax["HTML-CSS"].imgPacked+"/Main.js");
| calabozo/calabozo.github.com | assets/MathJax-2.7.0/fonts/HTML-CSS/TeX/png/SansSerif/Regular/unpacked/Main.js | JavaScript | mit | 1,247 |
/*************************************************************
*
* MathJax/fonts/HTML-CSS/TeX/png/SansSerif/Regular/Main.js
*
* Defines the image size data needed for the HTML-CSS OutputJax
* to display mathematics using fallback images when the fonts
* are not availble to the client browser.
*
* ---------------------------------------------------------------------
*
* Copyright (c) 2009-2013 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
MathJax.OutputJax["HTML-CSS"].defineImageData({
"MathJax_SansSerif": {
}
});
MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].imgDir+"/SansSerif/Regular"+
MathJax.OutputJax["HTML-CSS"].imgPacked+"/Main.js");
| qrohlf/cdnjs | ajax/libs/mathjax/2.4.0/fonts/HTML-CSS/TeX/png/SansSerif/Regular/unpacked/Main.js | JavaScript | mit | 1,247 |
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
"use strict";
CodeMirror.defineMode("ebnf", function (config) {
var commentType = {slash: 0, parenthesis: 1};
var stateType = {comment: 0, _string: 1, characterClass: 2};
var bracesMode = null;
if (config.bracesMode)
bracesMode = CodeMirror.getMode(config, config.bracesMode);
return {
startState: function () {
return {
stringType: null,
commentType: null,
braced: 0,
lhs: true,
localState: null,
stack: [],
inDefinition: false
};
},
token: function (stream, state) {
if (!stream) return;
//check for state changes
if (state.stack.length === 0) {
//strings
if ((stream.peek() == '"') || (stream.peek() == "'")) {
state.stringType = stream.peek();
stream.next(); // Skip quote
state.stack.unshift(stateType._string);
} else if (stream.match(/^\/\*/)) { //comments starting with /*
state.stack.unshift(stateType.comment);
state.commentType = commentType.slash;
} else if (stream.match(/^\(\*/)) { //comments starting with (*
state.stack.unshift(stateType.comment);
state.commentType = commentType.parenthesis;
}
}
//return state
//stack has
switch (state.stack[0]) {
case stateType._string:
while (state.stack[0] === stateType._string && !stream.eol()) {
if (stream.peek() === state.stringType) {
stream.next(); // Skip quote
state.stack.shift(); // Clear flag
} else if (stream.peek() === "\\") {
stream.next();
stream.next();
} else {
stream.match(/^.[^\\\"\']*/);
}
}
return state.lhs ? "property string" : "string"; // Token style
case stateType.comment:
while (state.stack[0] === stateType.comment && !stream.eol()) {
if (state.commentType === commentType.slash && stream.match(/\*\//)) {
state.stack.shift(); // Clear flag
state.commentType = null;
} else if (state.commentType === commentType.parenthesis && stream.match(/\*\)/)) {
state.stack.shift(); // Clear flag
state.commentType = null;
} else {
stream.match(/^.[^\*]*/);
}
}
return "comment";
case stateType.characterClass:
while (state.stack[0] === stateType.characterClass && !stream.eol()) {
if (!(stream.match(/^[^\]\\]+/) || stream.match(/^\\./))) {
state.stack.shift();
}
}
return "operator";
}
var peek = stream.peek();
if (bracesMode !== null && (state.braced || peek === "{")) {
if (state.localState === null)
state.localState = bracesMode.startState();
var token = bracesMode.token(stream, state.localState),
text = stream.current();
if (!token) {
for (var i = 0; i < text.length; i++) {
if (text[i] === "{") {
if (state.braced === 0) {
token = "matchingbracket";
}
state.braced++;
} else if (text[i] === "}") {
state.braced--;
if (state.braced === 0) {
token = "matchingbracket";
}
}
}
}
return token;
}
//no stack
switch (peek) {
case "[":
stream.next();
state.stack.unshift(stateType.characterClass);
return "bracket";
case ":":
case "|":
case ";":
stream.next();
return "operator";
case "%":
if (stream.match("%%")) {
return "header";
} else if (stream.match(/[%][A-Za-z]+/)) {
return "keyword";
} else if (stream.match(/[%][}]/)) {
return "matchingbracket";
}
break;
case "/":
if (stream.match(/[\/][A-Za-z]+/)) {
return "keyword";
}
case "\\":
if (stream.match(/[\][a-z]+/)) {
return "string-2";
}
case ".":
if (stream.match(".")) {
return "atom";
}
case "*":
case "-":
case "+":
case "^":
if (stream.match(peek)) {
return "atom";
}
case "$":
if (stream.match("$$")) {
return "builtin";
} else if (stream.match(/[$][0-9]+/)) {
return "variable-3";
}
case "<":
if (stream.match(/<<[a-zA-Z_]+>>/)) {
return "builtin";
}
}
if (stream.match(/^\/\//)) {
stream.skipToEnd();
return "comment";
} else if (stream.match(/return/)) {
return "operator";
} else if (stream.match(/^[a-zA-Z_][a-zA-Z0-9_]*/)) {
if (stream.match(/(?=[\(.])/)) {
return "variable";
} else if (stream.match(/(?=[\s\n]*[:=])/)) {
return "def";
}
return "variable-2";
} else if (["[", "]", "(", ")"].indexOf(stream.peek()) != -1) {
stream.next();
return "bracket";
} else if (!stream.eatSpace()) {
stream.next();
}
return null;
}
};
});
CodeMirror.defineMIME("text/x-ebnf", "ebnf");
});
| shelsonjava/cdnjs | ajax/libs/codemirror/4.13.0/mode/ebnf/ebnf.js | JavaScript | mit | 6,075 |
(function(){
/**
* Non-plugin implementation of cross-browser DOM ready event
* Based on OzJS's built-in module -- 'finish'
*
* using AMD (Asynchronous Module Definition) API with OzJS
* see http://ozjs.org for details
*
* Copyright (C) 2010-2012, Dexter.Yy, MIT License
* vim: et:ts=4:sw=4:sts=4
*/
var finish = require('finish');
var loaded,
w = this,
doc = w.document,
ADD = "addEventListener",
IEADD = "attachEvent",
READY = "DOMContentLoaded",
CHANGE = "onreadystatechange";
if (doc.readyState === "complete") {
setTimeout(finish, 1);
} else {
if (doc[ADD]){
loaded = function(){
doc.removeEventListener("READY", loaded, false);
finish();
};
doc[ADD](READY, loaded, false);
w[ADD]("load", finish, false);
} else if (doc[IEADD]) {
loaded = function(){
if (doc.readyState === "complete") {
doc.detachEvent(CHANGE, loaded);
finish();
}
};
doc[IEADD](CHANGE, loaded);
w[IEADD]("load", finish);
var toplevel = false;
try {
toplevel = w.frameElement == null;
} catch(e) {}
if (doc.documentElement.doScroll && toplevel) {
var check = function(){
try {
doc.documentElement.doScroll("left");
} catch(e) {
setTimeout(check, 1);
return;
}
finish();
};
check();
}
}
}
})(); | wackyapples/cdnjs | ajax/libs/mo/1.5.4/domready.js | JavaScript | mit | 1,755 |
/*!
* Quill Editor v1.1.1
* https://quilljs.com/
* Copyright (c) 2014, Jason Chen
* Copyright (c) 2013, salesforce.com
*/
.ql-container {
box-sizing: border-box;
font-family: Helvetica, Arial, sans-serif;
font-size: 13px;
height: 100%;
margin: 0px;
position: relative;
}
.ql-container.ql-disabled .ql-tooltip {
visibility: hidden;
}
.ql-clipboard {
left: -100000px;
height: 1px;
overflow-y: hidden;
position: absolute;
top: 50%;
}
.ql-clipboard p {
margin: 0;
padding: 0;
}
.ql-editor {
box-sizing: border-box;
cursor: text;
line-height: 1.42;
height: 100%;
outline: none;
overflow-y: auto;
padding: 12px 15px;
tab-size: 4;
-moz-tab-size: 4;
text-align: left;
white-space: pre-wrap;
word-wrap: break-word;
}
.ql-editor p,
.ql-editor ol,
.ql-editor ul,
.ql-editor pre,
.ql-editor blockquote,
.ql-editor h1,
.ql-editor h2,
.ql-editor h3,
.ql-editor h4,
.ql-editor h5,
.ql-editor h6 {
margin: 0;
padding: 0;
counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol,
.ql-editor ul {
padding-left: 1.5em;
}
.ql-editor ol > li,
.ql-editor ul > li {
list-style-type: none;
}
.ql-editor ul > li::before {
content: '\25CF';
}
.ql-editor li::before {
display: inline-block;
margin-right: 0.3em;
text-align: right;
white-space: nowrap;
width: 1.2em;
}
.ql-editor li:not(.ql-direction-rtl)::before {
margin-left: -1.5em;
}
.ql-editor ol li,
.ql-editor ul li {
padding-left: 1.5em;
}
.ql-editor ol li {
counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
counter-increment: list-num;
}
.ql-editor ol li:before {
content: counter(list-num, decimal) '. ';
}
.ql-editor ol li.ql-indent-1 {
counter-increment: list-1;
}
.ql-editor ol li.ql-indent-1:before {
content: counter(list-1, lower-alpha) '. ';
}
.ql-editor ol li.ql-indent-1 {
counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-2 {
counter-increment: list-2;
}
.ql-editor ol li.ql-indent-2:before {
content: counter(list-2, lower-roman) '. ';
}
.ql-editor ol li.ql-indent-2 {
counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-3 {
counter-increment: list-3;
}
.ql-editor ol li.ql-indent-3:before {
content: counter(list-3, decimal) '. ';
}
.ql-editor ol li.ql-indent-3 {
counter-reset: list-4 list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-4 {
counter-increment: list-4;
}
.ql-editor ol li.ql-indent-4:before {
content: counter(list-4, lower-alpha) '. ';
}
.ql-editor ol li.ql-indent-4 {
counter-reset: list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-5 {
counter-increment: list-5;
}
.ql-editor ol li.ql-indent-5:before {
content: counter(list-5, lower-roman) '. ';
}
.ql-editor ol li.ql-indent-5 {
counter-reset: list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-6 {
counter-increment: list-6;
}
.ql-editor ol li.ql-indent-6:before {
content: counter(list-6, decimal) '. ';
}
.ql-editor ol li.ql-indent-6 {
counter-reset: list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-7 {
counter-increment: list-7;
}
.ql-editor ol li.ql-indent-7:before {
content: counter(list-7, lower-alpha) '. ';
}
.ql-editor ol li.ql-indent-7 {
counter-reset: list-8 list-9;
}
.ql-editor ol li.ql-indent-8 {
counter-increment: list-8;
}
.ql-editor ol li.ql-indent-8:before {
content: counter(list-8, lower-roman) '. ';
}
.ql-editor ol li.ql-indent-8 {
counter-reset: list-9;
}
.ql-editor ol li.ql-indent-9 {
counter-increment: list-9;
}
.ql-editor ol li.ql-indent-9:before {
content: counter(list-9, decimal) '. ';
}
.ql-editor .ql-indent-1:not(.ql-direction-rtl) {
padding-left: 3em;
}
.ql-editor li.ql-indent-1:not(.ql-direction-rtl) {
padding-left: 4.5em;
}
.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right {
padding-right: 3em;
}
.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right {
padding-right: 4.5em;
}
.ql-editor .ql-indent-2:not(.ql-direction-rtl) {
padding-left: 6em;
}
.ql-editor li.ql-indent-2:not(.ql-direction-rtl) {
padding-left: 7.5em;
}
.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right {
padding-right: 6em;
}
.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right {
padding-right: 7.5em;
}
.ql-editor .ql-indent-3:not(.ql-direction-rtl) {
padding-left: 9em;
}
.ql-editor li.ql-indent-3:not(.ql-direction-rtl) {
padding-left: 10.5em;
}
.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right {
padding-right: 9em;
}
.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right {
padding-right: 10.5em;
}
.ql-editor .ql-indent-4:not(.ql-direction-rtl) {
padding-left: 12em;
}
.ql-editor li.ql-indent-4:not(.ql-direction-rtl) {
padding-left: 13.5em;
}
.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right {
padding-right: 12em;
}
.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right {
padding-right: 13.5em;
}
.ql-editor .ql-indent-5:not(.ql-direction-rtl) {
padding-left: 15em;
}
.ql-editor li.ql-indent-5:not(.ql-direction-rtl) {
padding-left: 16.5em;
}
.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right {
padding-right: 15em;
}
.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right {
padding-right: 16.5em;
}
.ql-editor .ql-indent-6:not(.ql-direction-rtl) {
padding-left: 18em;
}
.ql-editor li.ql-indent-6:not(.ql-direction-rtl) {
padding-left: 19.5em;
}
.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right {
padding-right: 18em;
}
.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right {
padding-right: 19.5em;
}
.ql-editor .ql-indent-7:not(.ql-direction-rtl) {
padding-left: 21em;
}
.ql-editor li.ql-indent-7:not(.ql-direction-rtl) {
padding-left: 22.5em;
}
.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right {
padding-right: 21em;
}
.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right {
padding-right: 22.5em;
}
.ql-editor .ql-indent-8:not(.ql-direction-rtl) {
padding-left: 24em;
}
.ql-editor li.ql-indent-8:not(.ql-direction-rtl) {
padding-left: 25.5em;
}
.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right {
padding-right: 24em;
}
.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right {
padding-right: 25.5em;
}
.ql-editor .ql-indent-9:not(.ql-direction-rtl) {
padding-left: 27em;
}
.ql-editor li.ql-indent-9:not(.ql-direction-rtl) {
padding-left: 28.5em;
}
.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right {
padding-right: 27em;
}
.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right {
padding-right: 28.5em;
}
.ql-editor .ql-video {
display: block;
max-width: 100%;
}
.ql-editor .ql-video.ql-align-center {
margin: 0 auto;
}
.ql-editor .ql-video.ql-align-right {
margin: 0 0 0 auto;
}
.ql-editor .ql-bg-black {
background-color: #000;
}
.ql-editor .ql-bg-red {
background-color: #e60000;
}
.ql-editor .ql-bg-orange {
background-color: #f90;
}
.ql-editor .ql-bg-yellow {
background-color: #ff0;
}
.ql-editor .ql-bg-green {
background-color: #008a00;
}
.ql-editor .ql-bg-blue {
background-color: #06c;
}
.ql-editor .ql-bg-purple {
background-color: #93f;
}
.ql-editor .ql-color-white {
color: #fff;
}
.ql-editor .ql-color-red {
color: #e60000;
}
.ql-editor .ql-color-orange {
color: #f90;
}
.ql-editor .ql-color-yellow {
color: #ff0;
}
.ql-editor .ql-color-green {
color: #008a00;
}
.ql-editor .ql-color-blue {
color: #06c;
}
.ql-editor .ql-color-purple {
color: #93f;
}
.ql-editor .ql-font-serif {
font-family: Georgia, Times New Roman, serif;
}
.ql-editor .ql-font-monospace {
font-family: Monaco, Courier New, monospace;
}
.ql-editor .ql-size-small {
font-size: 0.75em;
}
.ql-editor .ql-size-large {
font-size: 1.5em;
}
.ql-editor .ql-size-huge {
font-size: 2.5em;
}
.ql-editor .ql-direction-rtl {
direction: rtl;
text-align: inherit;
}
.ql-editor .ql-align-center {
text-align: center;
}
.ql-editor .ql-align-justify {
text-align: justify;
}
.ql-editor .ql-align-right {
text-align: right;
}
.ql-editor.ql-blank::before {
color: rgba(0,0,0,0.6);
content: attr(data-placeholder);
font-style: italic;
pointer-events: none;
position: absolute;
}
.ql-snow.ql-toolbar:after,
.ql-snow .ql-toolbar:after {
clear: both;
content: '';
display: table;
}
.ql-snow.ql-toolbar button,
.ql-snow .ql-toolbar button {
background: none;
border: none;
cursor: pointer;
display: inline-block;
float: left;
height: 24px;
padding: 3px 5px;
width: 28px;
}
.ql-snow.ql-toolbar button svg,
.ql-snow .ql-toolbar button svg {
float: left;
height: 100%;
}
.ql-snow.ql-toolbar input.ql-image[type=file],
.ql-snow .ql-toolbar input.ql-image[type=file] {
display: none;
}
.ql-snow.ql-toolbar button:hover,
.ql-snow .ql-toolbar button:hover,
.ql-snow.ql-toolbar button.ql-active,
.ql-snow .ql-toolbar button.ql-active,
.ql-snow.ql-toolbar .ql-picker-label:hover,
.ql-snow .ql-toolbar .ql-picker-label:hover,
.ql-snow.ql-toolbar .ql-picker-label.ql-active,
.ql-snow .ql-toolbar .ql-picker-label.ql-active,
.ql-snow.ql-toolbar .ql-picker-item:hover,
.ql-snow .ql-toolbar .ql-picker-item:hover,
.ql-snow.ql-toolbar .ql-picker-item.ql-selected,
.ql-snow .ql-toolbar .ql-picker-item.ql-selected {
color: #06c;
}
.ql-snow.ql-toolbar button:hover .ql-fill,
.ql-snow .ql-toolbar button:hover .ql-fill,
.ql-snow.ql-toolbar button.ql-active .ql-fill,
.ql-snow .ql-toolbar button.ql-active .ql-fill,
.ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill,
.ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill,
.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill,
.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill,
.ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill,
.ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill,
.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill,
.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill,
.ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill,
.ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill,
.ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill,
.ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill,
.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,
.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,
.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,
.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,
.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,
.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,
.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,
.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill {
fill: #06c;
}
.ql-snow.ql-toolbar button:hover .ql-stroke,
.ql-snow .ql-toolbar button:hover .ql-stroke,
.ql-snow.ql-toolbar button.ql-active .ql-stroke,
.ql-snow .ql-toolbar button.ql-active .ql-stroke,
.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke,
.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke,
.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,
.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke,
.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke,
.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke,
.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,
.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,
.ql-snow.ql-toolbar button:hover .ql-stroke-miter,
.ql-snow .ql-toolbar button:hover .ql-stroke-miter,
.ql-snow.ql-toolbar button.ql-active .ql-stroke-miter,
.ql-snow .ql-toolbar button.ql-active .ql-stroke-miter,
.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,
.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,
.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,
.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,
.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,
.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,
.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,
.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter {
stroke: #06c;
}
.ql-snow {
box-sizing: border-box;
}
.ql-snow * {
box-sizing: border-box;
}
.ql-snow .ql-hidden {
display: none;
}
.ql-snow .ql-out-bottom,
.ql-snow .ql-out-top {
visibility: hidden;
}
.ql-snow .ql-tooltip {
position: absolute;
}
.ql-snow .ql-tooltip a {
cursor: pointer;
text-decoration: none;
}
.ql-snow .ql-formats {
display: inline-block;
vertical-align: middle;
}
.ql-snow .ql-formats:after {
clear: both;
content: '';
display: table;
}
.ql-snow .ql-stroke {
fill: none;
stroke: #444;
stroke-linecap: round;
stroke-linejoin: round;
stroke-width: 2;
}
.ql-snow .ql-stroke-miter {
fill: none;
stroke: #444;
stroke-miterlimit: 10;
stroke-width: 2;
}
.ql-snow .ql-fill,
.ql-snow .ql-stroke.ql-fill {
fill: #444;
}
.ql-snow .ql-empty {
fill: none;
}
.ql-snow .ql-even {
fill-rule: evenodd;
}
.ql-snow .ql-thin,
.ql-snow .ql-stroke.ql-thin {
stroke-width: 1;
}
.ql-snow .ql-transparent {
opacity: 0.4;
}
.ql-snow .ql-direction svg:last-child {
display: none;
}
.ql-snow .ql-direction.ql-active svg:last-child {
display: inline;
}
.ql-snow .ql-direction.ql-active svg:first-child {
display: none;
}
.ql-snow .ql-editor h1 {
font-size: 2em;
}
.ql-snow .ql-editor h2 {
font-size: 1.5em;
}
.ql-snow .ql-editor h3 {
font-size: 1.17em;
}
.ql-snow .ql-editor h4 {
font-size: 1em;
}
.ql-snow .ql-editor h5 {
font-size: 0.83em;
}
.ql-snow .ql-editor h6 {
font-size: 0.67em;
}
.ql-snow .ql-editor a {
text-decoration: underline;
}
.ql-snow .ql-editor blockquote {
border-left: 4px solid #ccc;
margin-bottom: 5px;
margin-top: 5px;
padding-left: 16px;
}
.ql-snow .ql-editor code,
.ql-snow .ql-editor pre {
background-color: #f0f0f0;
border-radius: 3px;
}
.ql-snow .ql-editor pre {
white-space: pre-wrap;
margin-bottom: 5px;
margin-top: 5px;
padding: 5px 10px;
}
.ql-snow .ql-editor code {
font-size: 85%;
padding-bottom: 2px;
padding-top: 2px;
}
.ql-snow .ql-editor code:before,
.ql-snow .ql-editor code:after {
content: "\A0";
letter-spacing: -2px;
}
.ql-snow .ql-editor pre.ql-syntax {
background-color: #23241f;
color: #f8f8f2;
overflow: visible;
}
.ql-snow .ql-editor img {
max-width: 100%;
}
.ql-snow .ql-picker {
color: #444;
display: inline-block;
float: left;
font-size: 14px;
font-weight: 500;
height: 24px;
position: relative;
vertical-align: middle;
}
.ql-snow .ql-picker-label {
cursor: pointer;
display: inline-block;
height: 100%;
padding-left: 8px;
padding-right: 2px;
position: relative;
width: 100%;
}
.ql-snow .ql-picker-label::before {
display: inline-block;
line-height: 22px;
}
.ql-snow .ql-picker-options {
background-color: #fff;
display: none;
min-width: 100%;
padding: 4px 8px;
position: absolute;
white-space: nowrap;
}
.ql-snow .ql-picker-options .ql-picker-item {
cursor: pointer;
display: block;
padding-bottom: 5px;
padding-top: 5px;
}
.ql-snow .ql-picker.ql-expanded .ql-picker-label {
color: #ccc;
z-index: 2;
}
.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill {
fill: #ccc;
}
.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke {
stroke: #ccc;
}
.ql-snow .ql-picker.ql-expanded .ql-picker-options {
display: block;
margin-top: -1px;
top: 100%;
z-index: 1;
}
.ql-snow .ql-color-picker,
.ql-snow .ql-icon-picker {
width: 28px;
}
.ql-snow .ql-color-picker .ql-picker-label,
.ql-snow .ql-icon-picker .ql-picker-label {
padding: 2px 4px;
}
.ql-snow .ql-color-picker .ql-picker-label svg,
.ql-snow .ql-icon-picker .ql-picker-label svg {
right: 4px;
}
.ql-snow .ql-icon-picker .ql-picker-options {
padding: 4px 0px;
}
.ql-snow .ql-icon-picker .ql-picker-item {
height: 24px;
width: 24px;
padding: 2px 4px;
}
.ql-snow .ql-color-picker .ql-picker-options {
padding: 3px 5px;
width: 152px;
}
.ql-snow .ql-color-picker .ql-picker-item {
border: 1px solid transparent;
float: left;
height: 16px;
margin: 2px;
padding: 0px;
width: 16px;
}
.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg {
position: absolute;
margin-top: -9px;
right: 0;
top: 50%;
width: 18px;
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=''])::before,
.ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=''])::before,
.ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=''])::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=''])::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=''])::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=''])::before {
content: attr(data-label);
}
.ql-snow .ql-picker.ql-header {
width: 98px;
}
.ql-snow .ql-picker.ql-header .ql-picker-label::before,
.ql-snow .ql-picker.ql-header .ql-picker-item::before {
content: 'Normal';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
content: 'Heading 1';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
content: 'Heading 2';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
content: 'Heading 3';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
content: 'Heading 4';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {
content: 'Heading 5';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
content: 'Heading 6';
}
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
font-size: 2em;
}
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
font-size: 1.5em;
}
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
font-size: 1.17em;
}
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
font-size: 1em;
}
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {
font-size: 0.83em;
}
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
font-size: 0.67em;
}
.ql-snow .ql-picker.ql-font {
width: 108px;
}
.ql-snow .ql-picker.ql-font .ql-picker-label::before,
.ql-snow .ql-picker.ql-font .ql-picker-item::before {
content: 'Sans Serif';
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {
content: 'Serif';
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {
content: 'Monospace';
}
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {
font-family: Georgia, Times New Roman, serif;
}
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {
font-family: Monaco, Courier New, monospace;
}
.ql-snow .ql-picker.ql-size {
width: 98px;
}
.ql-snow .ql-picker.ql-size .ql-picker-label::before,
.ql-snow .ql-picker.ql-size .ql-picker-item::before {
content: 'Normal';
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before {
content: 'Small';
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before {
content: 'Large';
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {
content: 'Huge';
}
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before {
font-size: 10px;
}
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before {
font-size: 18px;
}
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {
font-size: 32px;
}
.ql-snow .ql-color-picker.ql-background .ql-picker-item {
background-color: #fff;
}
.ql-snow .ql-color-picker.ql-color .ql-picker-item {
background-color: #000;
}
.ql-toolbar.ql-snow {
border: 1px solid #ccc;
box-sizing: border-box;
font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
padding: 8px;
}
.ql-toolbar.ql-snow .ql-formats {
margin-right: 15px;
}
.ql-toolbar.ql-snow .ql-picker-label {
border: 1px solid transparent;
}
.ql-toolbar.ql-snow .ql-picker-options {
border: 1px solid transparent;
box-shadow: rgba(0,0,0,0.2) 0 2px 8px;
}
.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label {
border-color: #ccc;
}
.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options {
border-color: #ccc;
}
.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected,
.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover {
border-color: #000;
}
.ql-toolbar.ql-snow + .ql-container.ql-snow {
border-top: 0px;
}
.ql-snow .ql-tooltip {
background-color: #fff;
border: 1px solid #ccc;
box-shadow: 0px 0px 5px #ddd;
color: #444;
margin-top: 10px;
padding: 5px 12px;
white-space: nowrap;
}
.ql-snow .ql-tooltip::before {
content: "Visit URL:";
line-height: 26px;
margin-right: 8px;
}
.ql-snow .ql-tooltip input[type=text] {
display: none;
border: 1px solid #ccc;
font-size: 13px;
height: 26px;
margin: 0px;
padding: 3px 5px;
width: 170px;
}
.ql-snow .ql-tooltip a.ql-preview {
display: inline-block;
max-width: 200px;
overflow-x: hidden;
text-overflow: ellipsis;
vertical-align: top;
}
.ql-snow .ql-tooltip a.ql-action::after {
border-right: 1px solid #ccc;
content: 'Edit';
margin-left: 16px;
padding-right: 8px;
}
.ql-snow .ql-tooltip a.ql-remove::before {
content: 'Remove';
margin-left: 8px;
}
.ql-snow .ql-tooltip a {
line-height: 26px;
}
.ql-snow .ql-tooltip.ql-editing a.ql-preview,
.ql-snow .ql-tooltip.ql-editing a.ql-remove {
display: none;
}
.ql-snow .ql-tooltip.ql-editing input[type=text] {
display: inline-block;
}
.ql-snow .ql-tooltip.ql-editing a.ql-action::after {
border-right: 0px;
content: 'Save';
padding-right: 0px;
}
.ql-snow .ql-tooltip[data-mode=link]::before {
content: "Enter link:";
}
.ql-snow .ql-tooltip[data-mode=formula]::before {
content: "Enter formula:";
}
.ql-snow .ql-tooltip[data-mode=video]::before {
content: "Enter video:";
}
.ql-snow a {
color: #06c;
}
.ql-container.ql-snow {
border: 1px solid #ccc;
}
| BenjaminVanRyseghem/cdnjs | ajax/libs/quill/1.1.1/quill.snow.css | CSS | mit | 22,636 |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using Xunit;
namespace ManagedTests.DynamicCSharp.Conformance.dynamic.overloadResolution.Operators.Twoclass2operates.binary.overload001.overload001
{
using ManagedTests.DynamicCSharp.Conformance.dynamic.overloadResolution.Operators.Twoclass2operates.binary.overload001.overload001;
// <Title> Tests overload resolution for 2 class and 2 methods</Title>
// <Description>
// </Description>
// <RelatedBugs></RelatedBugs>
//<Expects Status=success></Expects>
// <Code>
//<Expects Status=warning>\(11,23\).*CS0649</Expects>
public class Base
{
public static int Status;
public static int operator +(short x, Base b)
{
return int.MinValue;
}
}
public class Derived : Base
{
public static int operator +(int x, Derived d)
{
return int.MaxValue;
}
}
public class Test
{
[Fact]
public static void DynamicCSharpRunTest()
{
Assert.Equal(0, MainMethod(null));
}
public static int MainMethod(string[] args)
{
dynamic d = new Derived();
short x = 3;
int xx = x + d;
if (xx == int.MaxValue)
return 0;
return 1;
}
}
// </Code>
}
namespace ManagedTests.DynamicCSharp.Conformance.dynamic.overloadResolution.Operators.Twoclass2operates.binary.overload002.overload002
{
using ManagedTests.DynamicCSharp.Conformance.dynamic.overloadResolution.Operators.Twoclass2operates.binary.overload002.overload002;
// <Title> Tests overload resolution for 2 class and 2 methods</Title>
// <Description>
// </Description>
// <RelatedBugs></RelatedBugs>
//<Expects Status=success></Expects>
// <Code>
public class Base
{
public static float operator -(short x, Base b)
{
return float.Epsilon;
}
}
public class Derived : Base
{
public static float operator -(int x, Derived d)
{
return float.NegativeInfinity;
}
}
public class Test
{
[Fact]
public static void DynamicCSharpRunTest()
{
Assert.Equal(0, MainMethod(null));
}
public static int MainMethod(string[] args)
{
dynamic d = new Derived();
int x = 3;
float f = x - d;
if (float.IsNegativeInfinity(f))
return 0;
return 1;
}
}
// </Code>
}
namespace ManagedTests.DynamicCSharp.Conformance.dynamic.overloadResolution.Operators.Twoclass2operates.binary.overload003.overload003
{
using ManagedTests.DynamicCSharp.Conformance.dynamic.overloadResolution.Operators.Twoclass2operates.binary.overload003.overload003;
// <Title> Tests overload resolution for 2 class and 2 methods</Title>
// <Description>
// Call methods with different accessibility level and selecting the right one.:)
// </Description>
// <RelatedBugs></RelatedBugs>
//<Expects Status=success></Expects>
// <Code>
public class Base
{
public static double operator *(Base b, short x)
{
return double.MinValue;
}
}
public class Derived : Base
{
public static double operator *(Derived d, int x)
{
return double.MaxValue;
}
}
public class Test
{
[Fact]
public static void DynamicCSharpRunTest()
{
Assert.Equal(0, MainMethod(null));
}
public static int MainMethod(string[] args)
{
dynamic d = new Derived();
int x = 3;
double dd = d * x;
if (dd == double.MaxValue)
return 0;
return 1;
}
}
// </Code>
}
namespace ManagedTests.DynamicCSharp.Conformance.dynamic.overloadResolution.Operators.Twoclass2operates.binary.overload004.overload004
{
using ManagedTests.DynamicCSharp.Conformance.dynamic.overloadResolution.Operators.Twoclass2operates.binary.overload004.overload004;
// <Title> Tests overload resolution for 2 class and 2 methods</Title>
// <Description>
// Call methods with different accessibility level and selecting the right one.:)
// </Description>
// <RelatedBugs></RelatedBugs>
//<Expects Status=success></Expects>
// <Code>
public class Base
{
public static short operator /(Base x, short d)
{
return short.MinValue;
}
}
public class Derived : Base
{
public static short operator /(Derived x, int d)
{
return short.MaxValue;
}
}
public class Test
{
[Fact]
public static void DynamicCSharpRunTest()
{
Assert.Equal(0, MainMethod(null));
}
public static int MainMethod(string[] args)
{
dynamic d = new Derived();
int x = 3;
short s = d / x;
if (s == short.MaxValue)
return 0;
return 1;
}
}
// </Code>
}
namespace ManagedTests.DynamicCSharp.Conformance.dynamic.overloadResolution.Operators.Twoclass2operates.binary.overload005.overload005
{
using ManagedTests.DynamicCSharp.Conformance.dynamic.overloadResolution.Operators.Twoclass2operates.binary.overload005.overload005;
// <Title> Tests overload resolution for 2 class and 2 methods</Title>
// <Description>
// Call methods with different accessibility level and selecting the right one.:)
// </Description>
// <RelatedBugs></RelatedBugs>
//<Expects Status=success></Expects>
// <Code>
public class Base
{
public static int?[] operator %(short x, Base b)
{
return new int?[]
{
1, 2, null
}
;
}
}
public class Derived : Base
{
public static int?[] operator %(int x, Derived d)
{
return new int?[]
{
null, null
}
;
}
}
public class Test
{
[Fact]
public static void DynamicCSharpRunTest()
{
Assert.Equal(0, MainMethod(null));
}
public static int MainMethod(string[] args)
{
dynamic d = new Derived();
int x = 3;
int?[] xx = x % d;
if (xx.Length == 2)
return 0;
return 1;
}
}
// </Code>
}
namespace ManagedTests.DynamicCSharp.Conformance.dynamic.overloadResolution.Operators.Twoclass2operates.binary.overload006.overload006
{
using ManagedTests.DynamicCSharp.Conformance.dynamic.overloadResolution.Operators.Twoclass2operates.binary.overload006.overload006;
// <Title> Tests overload resolution for 2 class and 2 methods</Title>
// <Description>
// Call methods with different accessibility level and selecting the right one.:)
// </Description>
// <RelatedBugs></RelatedBugs>
//<Expects Status=success></Expects>
// <Code>
public class Base
{
public static string operator &(Base b, short x)
{
return string.Empty;
}
}
public class Derived : Base
{
public static string operator &(Derived d, int x)
{
return "foo";
}
}
public class Test
{
[Fact]
public static void DynamicCSharpRunTest()
{
Assert.Equal(0, MainMethod(null));
}
public static int MainMethod(string[] args)
{
dynamic d = new Derived();
int x = 3;
string s = d & x;
if (s == "foo")
return 0;
return 1;
}
}
// </Code>
}
namespace ManagedTests.DynamicCSharp.Conformance.dynamic.overloadResolution.Operators.Twoclass2operates.binary.overload007.overload007
{
using ManagedTests.DynamicCSharp.Conformance.dynamic.overloadResolution.Operators.Twoclass2operates.binary.overload007.overload007;
// <Title> Tests overload resolution for 2 class and 2 methods</Title>
// <Description>
// Call methods with different accessibility level and selecting the right one.:)
// </Description>
// <RelatedBugs></RelatedBugs>
//<Expects Status=success></Expects>
// <Code>
public class Base
{
public static byte[] operator |(short x, Base b)
{
return new byte[]
{
1, 2, 3
}
;
}
}
public class Derived : Base
{
public static byte[] operator |(int x, Derived d)
{
return new byte[]
{
1, 2
}
;
}
}
public class Test
{
[Fact]
public static void DynamicCSharpRunTest()
{
Assert.Equal(0, MainMethod(null));
}
public static int MainMethod(string[] args)
{
dynamic d = new Derived();
int x = 3;
byte[] b = x | d;
if (b.Length == 2)
return 0;
return 1;
}
}
// </Code>
}
namespace ManagedTests.DynamicCSharp.Conformance.dynamic.overloadResolution.Operators.Twoclass2operates.binary.overload008.overload008
{
using ManagedTests.DynamicCSharp.Conformance.dynamic.overloadResolution.Operators.Twoclass2operates.binary.overload008.overload008;
// <Title> Tests overload resolution for 2 class and 2 methods</Title>
// <Description>
// Select the best method to call.
// </Description>
// <RelatedBugs></RelatedBugs>
//<Expects Status=success></Expects>
// <Code>
public class Base
{
public static decimal operator ^(dynamic x, Base b)
{
return decimal.Zero;
}
public static decimal operator ^(short x, Base b)
{
return decimal.One;
}
}
public class Derived : Base
{
public static decimal operator ^(int x, Derived d)
{
return decimal.MinusOne;
}
}
public class Test
{
[Fact]
public static void DynamicCSharpRunTest()
{
Assert.Equal(0, MainMethod(null));
}
public static int MainMethod(string[] args)
{
dynamic d = new Derived();
dynamic x = 3;
decimal dec = x ^ d;
if (dec == decimal.MinusOne)
return 0;
return 1;
}
}
// </Code>
}
namespace ManagedTests.DynamicCSharp.Conformance.dynamic.overloadResolution.Operators.Twoclass2operates.binary.overload009.overload009
{
using ManagedTests.DynamicCSharp.Conformance.dynamic.overloadResolution.Operators.Twoclass2operates.binary.overload009.overload009;
// <Title> Tests overload resolution for 2 class and 2 methods</Title>
// <Description>
// Select the best method to call.
// </Description>
// <RelatedBugs></RelatedBugs>
//<Expects Status=success></Expects>
// <Code>
public class Base
{
public static decimal operator ^(dynamic x, Base b)
{
return decimal.Zero;
}
public static decimal operator ^(short x, Base b)
{
return decimal.One;
}
}
public class Derived : Base
{
public static decimal operator ^(int x, Derived d)
{
return decimal.MinusOne;
}
}
public class Test
{
[Fact]
public static void DynamicCSharpRunTest()
{
Assert.Equal(0, MainMethod(null));
}
public static int MainMethod(string[] args)
{
dynamic d = new Base();
dynamic x = 3;
decimal dec = x ^ d;
if (dec == decimal.Zero)
return 0;
return 1;
}
}
// </Code>
}
| dsplaisted/corefx | src/System.Dynamic.Runtime/tests/Dynamic.OverloadResolution/Conformance.dynamic.overloadResolution.Operators.2class2operators.binary.cs | C# | mit | 12,275 |
require 'spec_helper'
describe 'nginx::package' do
shared_examples 'redhat' do |operatingsystem|
let(:facts) {{ :operatingsystem => operatingsystem, :osfamily => 'RedHat', :operatingsystemmajrelease => '6' }}
context "using defaults" do
it { is_expected.to contain_package('nginx') }
it { is_expected.to contain_yumrepo('nginx-release').with(
'baseurl' => "http://nginx.org/packages/#{operatingsystem == 'CentOS' ? 'centos' : 'rhel'}/6/$basearch/",
'descr' => 'nginx repo',
'enabled' => '1',
'gpgcheck' => '1',
'priority' => '1',
'gpgkey' => 'http://nginx.org/keys/nginx_signing.key'
)}
it { is_expected.to contain_anchor('nginx::package::begin').that_comes_before('Class[nginx::package::redhat]') }
it { is_expected.to contain_anchor('nginx::package::end').that_requires('Class[nginx::package::redhat]') }
end
context "package_source => nginx-mainline" do
let(:params) {{ :package_source => 'nginx-mainline' }}
it { is_expected.to contain_yumrepo('nginx-release').with(
'baseurl' => "http://nginx.org/packages/mainline/#{operatingsystem == 'CentOS' ? 'centos' : 'rhel'}/6/$basearch/",
)}
end
context "manage_repo => false" do
let(:facts) {{ :operatingsystem => operatingsystem, :osfamily => 'RedHat', :operatingsystemmajrelease => '7' }}
let(:params) {{ :manage_repo => false }}
it { is_expected.to contain_package('nginx') }
it { is_expected.not_to contain_yumrepo('nginx-release') }
end
context "operatingsystemmajrelease = 5" do
let(:facts) {{ :operatingsystem => operatingsystem, :osfamily => 'RedHat', :operatingsystemmajrelease => '5' }}
it { is_expected.to contain_package('nginx') }
it { is_expected.to contain_yumrepo('nginx-release').with(
'baseurl' => "http://nginx.org/packages/#{operatingsystem == 'CentOS' ? 'centos' : 'rhel'}/5/$basearch/"
)}
end
describe 'installs the requested package version' do
let(:facts) {{ :operatingsystem => 'redhat', :osfamily => 'redhat', :operatingsystemmajrelease => '7'}}
let(:params) {{ :package_ensure => '3.0.0' }}
it 'installs 3.0.0 exactly' do
is_expected.to contain_package('nginx').with({
'ensure' => '3.0.0'
})
end
end
end
shared_examples 'debian' do |operatingsystem, lsbdistcodename, lsbdistid, operatingsystemmajrelease|
let(:facts) {{
:operatingsystem => operatingsystem,
:operatingsystemmajrelease => operatingsystemmajrelease,
:osfamily => 'Debian',
:lsbdistcodename => lsbdistcodename,
:lsbdistid => lsbdistid
}}
context "using defaults" do
it { is_expected.to contain_package('nginx') }
it { is_expected.not_to contain_package('passenger') }
it { is_expected.to contain_apt__source('nginx').with(
'location' => "http://nginx.org/packages/#{operatingsystem.downcase}",
'repos' => 'nginx',
'key' => '573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62',
)}
it { is_expected.to contain_anchor('nginx::package::begin').that_comes_before('Class[nginx::package::debian]') }
it { is_expected.to contain_anchor('nginx::package::end').that_requires('Class[nginx::package::debian]') }
end
context "package_source => nginx-mainline" do
let(:params) {{ :package_source => 'nginx-mainline' }}
it { is_expected.to contain_apt__source('nginx').with(
'location' => "http://nginx.org/packages/mainline/#{operatingsystem.downcase}",
)}
end
context "package_source => 'passenger'" do
let(:params) {{ :package_source => 'passenger' }}
it { is_expected.to contain_package('nginx') }
it { is_expected.to contain_package('passenger') }
it { is_expected.to contain_apt__source('nginx').with(
'location' => 'https://oss-binaries.phusionpassenger.com/apt/passenger',
'repos' => "main",
'key' => '16378A33A6EF16762922526E561F9B9CAC40B2F7',
)}
end
context "manage_repo => false" do
let(:params) {{ :manage_repo => false }}
it { is_expected.to contain_package('nginx') }
it { is_expected.not_to contain_apt__source('nginx') }
it { is_expected.not_to contain_package('passenger') }
end
end
context 'redhat' do
it_behaves_like 'redhat', 'CentOS'
it_behaves_like 'redhat', 'RedHat'
end
context 'debian' do
it_behaves_like 'debian', 'Debian', 'wheezy', 'Debian', '6'
it_behaves_like 'debian', 'Ubuntu', 'precise', 'Ubuntu', '12.04'
end
context 'other' do
let(:facts) {{ :operatingsystem => 'xxx', :osfamily => 'linux' }}
it { is_expected.to contain_package('nginx') }
end
end
| jhoblitt/puppet-nginx | spec/classes/package_spec.rb | Ruby | mit | 4,795 |
/**
* material-design-lite - Material Design Components in CSS, JS and HTML
* @version v1.2.0
* @license Apache-2.0
* @copyright 2015 Google, Inc.
* @link https://github.com/google/material-design-lite
*/
@charset "UTF-8";html{color:rgba(0,0,0,.87)}::-moz-selection{background:#b3d4fc;text-shadow:none}::selection{background:#b3d4fc;text-shadow:none}hr{display:block;height:1px;border:0;border-top:1px solid #ccc;margin:1em 0;padding:0}audio,canvas,iframe,img,svg,video{vertical-align:middle}fieldset{border:0;margin:0;padding:0}textarea{resize:vertical}.browserupgrade{margin:.2em 0;background:#ccc;color:#000;padding:.2em 0}.hidden{display:none!important}.visuallyhidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.visuallyhidden.focusable:active,.visuallyhidden.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.invisible{visibility:hidden}.clearfix:before,.clearfix:after{content:" ";display:table}.clearfix:after{clear:both}@media print{*,*:before,*:after,*:first-letter{background:transparent!important;color:#000!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href)")"}abbr[title]:after{content:" (" attr(title)")"}a[href^="#"]:after,a[href^="javascript:"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}}a,.mdl-accordion,.mdl-button,.mdl-card,.mdl-checkbox,.mdl-dropdown-menu,.mdl-icon-toggle,.mdl-item,.mdl-radio,.mdl-slider,.mdl-switch,.mdl-tabs__tab{-webkit-tap-highlight-color:transparent;-webkit-tap-highlight-color:rgba(255,255,255,0)}html{width:100%;height:100%;-ms-touch-action:manipulation;touch-action:manipulation}body{width:100%;min-height:100%}main{display:block}*[hidden]{display:none!important}html,body{font-family:"Helvetica","Arial",sans-serif;font-size:14px;font-weight:400;line-height:20px}h1,h2,h3,h4,h5,h6,p{padding:0}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-family:"Roboto","Helvetica","Arial",sans-serif;font-weight:400;line-height:1.35;letter-spacing:-.02em;opacity:.54;font-size:.6em}h1{font-size:56px;line-height:1.35;letter-spacing:-.02em;margin:24px 0}h1,h2{font-family:"Roboto","Helvetica","Arial",sans-serif;font-weight:400}h2{font-size:45px;line-height:48px}h2,h3{margin:24px 0}h3{font-size:34px;line-height:40px}h3,h4{font-family:"Roboto","Helvetica","Arial",sans-serif;font-weight:400}h4{font-size:24px;line-height:32px;-moz-osx-font-smoothing:grayscale;margin:24px 0 16px}h5{font-size:20px;font-weight:500;line-height:1;letter-spacing:.02em}h5,h6{font-family:"Roboto","Helvetica","Arial",sans-serif;margin:24px 0 16px}h6{font-size:16px;letter-spacing:.04em}h6,p{font-weight:400;line-height:24px}p{font-size:14px;letter-spacing:0;margin:0 0 16px}a{color:rgb(24,255,255);font-weight:500}blockquote{font-family:"Roboto","Helvetica","Arial",sans-serif;position:relative;font-size:24px;font-weight:300;font-style:italic;line-height:1.35;letter-spacing:.08em}blockquote:before{position:absolute;left:-.5em;content:'“'}blockquote:after{content:'”';margin-left:-.05em}mark{background-color:#f4ff81}dt{font-weight:700}address{font-size:12px;line-height:1;font-style:normal}address,ul,ol{font-weight:400;letter-spacing:0}ul,ol{font-size:14px;line-height:24px}.mdl-typography--display-4,.mdl-typography--display-4-color-contrast{font-family:"Roboto","Helvetica","Arial",sans-serif;font-size:112px;font-weight:300;line-height:1;letter-spacing:-.04em}.mdl-typography--display-4-color-contrast{opacity:.54}.mdl-typography--display-3,.mdl-typography--display-3-color-contrast{font-family:"Roboto","Helvetica","Arial",sans-serif;font-size:56px;font-weight:400;line-height:1.35;letter-spacing:-.02em}.mdl-typography--display-3-color-contrast{opacity:.54}.mdl-typography--display-2,.mdl-typography--display-2-color-contrast{font-family:"Roboto","Helvetica","Arial",sans-serif;font-size:45px;font-weight:400;line-height:48px}.mdl-typography--display-2-color-contrast{opacity:.54}.mdl-typography--display-1,.mdl-typography--display-1-color-contrast{font-family:"Roboto","Helvetica","Arial",sans-serif;font-size:34px;font-weight:400;line-height:40px}.mdl-typography--display-1-color-contrast{opacity:.54}.mdl-typography--headline,.mdl-typography--headline-color-contrast{font-family:"Roboto","Helvetica","Arial",sans-serif;font-size:24px;font-weight:400;line-height:32px;-moz-osx-font-smoothing:grayscale}.mdl-typography--headline-color-contrast{opacity:.87}.mdl-typography--title,.mdl-typography--title-color-contrast{font-family:"Roboto","Helvetica","Arial",sans-serif;font-size:20px;font-weight:500;line-height:1;letter-spacing:.02em}.mdl-typography--title-color-contrast{opacity:.87}.mdl-typography--subhead,.mdl-typography--subhead-color-contrast{font-family:"Roboto","Helvetica","Arial",sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:.04em}.mdl-typography--subhead-color-contrast{opacity:.87}.mdl-typography--body-2,.mdl-typography--body-2-color-contrast{font-size:14px;font-weight:700;line-height:24px;letter-spacing:0}.mdl-typography--body-2-color-contrast{opacity:.87}.mdl-typography--body-1,.mdl-typography--body-1-color-contrast{font-size:14px;font-weight:400;line-height:24px;letter-spacing:0}.mdl-typography--body-1-color-contrast{opacity:.87}.mdl-typography--body-2-force-preferred-font,.mdl-typography--body-2-force-preferred-font-color-contrast{font-family:"Roboto","Helvetica","Arial",sans-serif;font-size:14px;font-weight:500;line-height:24px;letter-spacing:0}.mdl-typography--body-2-force-preferred-font-color-contrast{opacity:.87}.mdl-typography--body-1-force-preferred-font,.mdl-typography--body-1-force-preferred-font-color-contrast{font-family:"Roboto","Helvetica","Arial",sans-serif;font-size:14px;font-weight:400;line-height:24px;letter-spacing:0}.mdl-typography--body-1-force-preferred-font-color-contrast{opacity:.87}.mdl-typography--caption,.mdl-typography--caption-force-preferred-font{font-size:12px;font-weight:400;line-height:1;letter-spacing:0}.mdl-typography--caption-force-preferred-font{font-family:"Roboto","Helvetica","Arial",sans-serif}.mdl-typography--caption-color-contrast,.mdl-typography--caption-force-preferred-font-color-contrast{font-size:12px;font-weight:400;line-height:1;letter-spacing:0;opacity:.54}.mdl-typography--caption-force-preferred-font-color-contrast,.mdl-typography--menu{font-family:"Roboto","Helvetica","Arial",sans-serif}.mdl-typography--menu{font-size:14px;font-weight:500;line-height:1;letter-spacing:0}.mdl-typography--menu-color-contrast{opacity:.87}.mdl-typography--menu-color-contrast,.mdl-typography--button,.mdl-typography--button-color-contrast{font-family:"Roboto","Helvetica","Arial",sans-serif;font-size:14px;font-weight:500;line-height:1;letter-spacing:0}.mdl-typography--button,.mdl-typography--button-color-contrast{text-transform:uppercase}.mdl-typography--button-color-contrast{opacity:.87}.mdl-typography--text-left{text-align:left}.mdl-typography--text-right{text-align:right}.mdl-typography--text-center{text-align:center}.mdl-typography--text-justify{text-align:justify}.mdl-typography--text-nowrap{white-space:nowrap}.mdl-typography--text-lowercase{text-transform:lowercase}.mdl-typography--text-uppercase{text-transform:uppercase}.mdl-typography--text-capitalize{text-transform:capitalize}.mdl-typography--font-thin{font-weight:200!important}.mdl-typography--font-light{font-weight:300!important}.mdl-typography--font-regular{font-weight:400!important}.mdl-typography--font-medium{font-weight:500!important}.mdl-typography--font-bold{font-weight:700!important}.mdl-typography--font-black{font-weight:900!important}.material-icons{font-family:'Material Icons';font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;word-wrap:normal;-moz-font-feature-settings:'liga';font-feature-settings:'liga';-webkit-font-feature-settings:'liga';-webkit-font-smoothing:antialiased}.mdl-color-text--red{color:#f44336 !important}.mdl-color--red{background-color:#f44336 !important}.mdl-color-text--red-50{color:#ffebee !important}.mdl-color--red-50{background-color:#ffebee !important}.mdl-color-text--red-100{color:#ffcdd2 !important}.mdl-color--red-100{background-color:#ffcdd2 !important}.mdl-color-text--red-200{color:#ef9a9a !important}.mdl-color--red-200{background-color:#ef9a9a !important}.mdl-color-text--red-300{color:#e57373 !important}.mdl-color--red-300{background-color:#e57373 !important}.mdl-color-text--red-400{color:#ef5350 !important}.mdl-color--red-400{background-color:#ef5350 !important}.mdl-color-text--red-500{color:#f44336 !important}.mdl-color--red-500{background-color:#f44336 !important}.mdl-color-text--red-600{color:#e53935 !important}.mdl-color--red-600{background-color:#e53935 !important}.mdl-color-text--red-700{color:#d32f2f !important}.mdl-color--red-700{background-color:#d32f2f !important}.mdl-color-text--red-800{color:#c62828 !important}.mdl-color--red-800{background-color:#c62828 !important}.mdl-color-text--red-900{color:#b71c1c !important}.mdl-color--red-900{background-color:#b71c1c !important}.mdl-color-text--red-A100{color:#ff8a80 !important}.mdl-color--red-A100{background-color:#ff8a80 !important}.mdl-color-text--red-A200{color:#ff5252 !important}.mdl-color--red-A200{background-color:#ff5252 !important}.mdl-color-text--red-A400{color:#ff1744 !important}.mdl-color--red-A400{background-color:#ff1744 !important}.mdl-color-text--red-A700{color:#d50000 !important}.mdl-color--red-A700{background-color:#d50000 !important}.mdl-color-text--pink{color:#e91e63 !important}.mdl-color--pink{background-color:#e91e63 !important}.mdl-color-text--pink-50{color:#fce4ec !important}.mdl-color--pink-50{background-color:#fce4ec !important}.mdl-color-text--pink-100{color:#f8bbd0 !important}.mdl-color--pink-100{background-color:#f8bbd0 !important}.mdl-color-text--pink-200{color:#f48fb1 !important}.mdl-color--pink-200{background-color:#f48fb1 !important}.mdl-color-text--pink-300{color:#f06292 !important}.mdl-color--pink-300{background-color:#f06292 !important}.mdl-color-text--pink-400{color:#ec407a !important}.mdl-color--pink-400{background-color:#ec407a !important}.mdl-color-text--pink-500{color:#e91e63 !important}.mdl-color--pink-500{background-color:#e91e63 !important}.mdl-color-text--pink-600{color:#d81b60 !important}.mdl-color--pink-600{background-color:#d81b60 !important}.mdl-color-text--pink-700{color:#c2185b !important}.mdl-color--pink-700{background-color:#c2185b !important}.mdl-color-text--pink-800{color:#ad1457 !important}.mdl-color--pink-800{background-color:#ad1457 !important}.mdl-color-text--pink-900{color:#880e4f !important}.mdl-color--pink-900{background-color:#880e4f !important}.mdl-color-text--pink-A100{color:#ff80ab !important}.mdl-color--pink-A100{background-color:#ff80ab !important}.mdl-color-text--pink-A200{color:#ff4081 !important}.mdl-color--pink-A200{background-color:#ff4081 !important}.mdl-color-text--pink-A400{color:#f50057 !important}.mdl-color--pink-A400{background-color:#f50057 !important}.mdl-color-text--pink-A700{color:#c51162 !important}.mdl-color--pink-A700{background-color:#c51162 !important}.mdl-color-text--purple{color:#9c27b0 !important}.mdl-color--purple{background-color:#9c27b0 !important}.mdl-color-text--purple-50{color:#f3e5f5 !important}.mdl-color--purple-50{background-color:#f3e5f5 !important}.mdl-color-text--purple-100{color:#e1bee7 !important}.mdl-color--purple-100{background-color:#e1bee7 !important}.mdl-color-text--purple-200{color:#ce93d8 !important}.mdl-color--purple-200{background-color:#ce93d8 !important}.mdl-color-text--purple-300{color:#ba68c8 !important}.mdl-color--purple-300{background-color:#ba68c8 !important}.mdl-color-text--purple-400{color:#ab47bc !important}.mdl-color--purple-400{background-color:#ab47bc !important}.mdl-color-text--purple-500{color:#9c27b0 !important}.mdl-color--purple-500{background-color:#9c27b0 !important}.mdl-color-text--purple-600{color:#8e24aa !important}.mdl-color--purple-600{background-color:#8e24aa !important}.mdl-color-text--purple-700{color:#7b1fa2 !important}.mdl-color--purple-700{background-color:#7b1fa2 !important}.mdl-color-text--purple-800{color:#6a1b9a !important}.mdl-color--purple-800{background-color:#6a1b9a !important}.mdl-color-text--purple-900{color:#4a148c !important}.mdl-color--purple-900{background-color:#4a148c !important}.mdl-color-text--purple-A100{color:#ea80fc !important}.mdl-color--purple-A100{background-color:#ea80fc !important}.mdl-color-text--purple-A200{color:#e040fb !important}.mdl-color--purple-A200{background-color:#e040fb !important}.mdl-color-text--purple-A400{color:#d500f9 !important}.mdl-color--purple-A400{background-color:#d500f9 !important}.mdl-color-text--purple-A700{color:#a0f !important}.mdl-color--purple-A700{background-color:#a0f !important}.mdl-color-text--deep-purple{color:#673ab7 !important}.mdl-color--deep-purple{background-color:#673ab7 !important}.mdl-color-text--deep-purple-50{color:#ede7f6 !important}.mdl-color--deep-purple-50{background-color:#ede7f6 !important}.mdl-color-text--deep-purple-100{color:#d1c4e9 !important}.mdl-color--deep-purple-100{background-color:#d1c4e9 !important}.mdl-color-text--deep-purple-200{color:#b39ddb !important}.mdl-color--deep-purple-200{background-color:#b39ddb !important}.mdl-color-text--deep-purple-300{color:#9575cd !important}.mdl-color--deep-purple-300{background-color:#9575cd !important}.mdl-color-text--deep-purple-400{color:#7e57c2 !important}.mdl-color--deep-purple-400{background-color:#7e57c2 !important}.mdl-color-text--deep-purple-500{color:#673ab7 !important}.mdl-color--deep-purple-500{background-color:#673ab7 !important}.mdl-color-text--deep-purple-600{color:#5e35b1 !important}.mdl-color--deep-purple-600{background-color:#5e35b1 !important}.mdl-color-text--deep-purple-700{color:#512da8 !important}.mdl-color--deep-purple-700{background-color:#512da8 !important}.mdl-color-text--deep-purple-800{color:#4527a0 !important}.mdl-color--deep-purple-800{background-color:#4527a0 !important}.mdl-color-text--deep-purple-900{color:#311b92 !important}.mdl-color--deep-purple-900{background-color:#311b92 !important}.mdl-color-text--deep-purple-A100{color:#b388ff !important}.mdl-color--deep-purple-A100{background-color:#b388ff !important}.mdl-color-text--deep-purple-A200{color:#7c4dff !important}.mdl-color--deep-purple-A200{background-color:#7c4dff !important}.mdl-color-text--deep-purple-A400{color:#651fff !important}.mdl-color--deep-purple-A400{background-color:#651fff !important}.mdl-color-text--deep-purple-A700{color:#6200ea !important}.mdl-color--deep-purple-A700{background-color:#6200ea !important}.mdl-color-text--indigo{color:#3f51b5 !important}.mdl-color--indigo{background-color:#3f51b5 !important}.mdl-color-text--indigo-50{color:#e8eaf6 !important}.mdl-color--indigo-50{background-color:#e8eaf6 !important}.mdl-color-text--indigo-100{color:#c5cae9 !important}.mdl-color--indigo-100{background-color:#c5cae9 !important}.mdl-color-text--indigo-200{color:#9fa8da !important}.mdl-color--indigo-200{background-color:#9fa8da !important}.mdl-color-text--indigo-300{color:#7986cb !important}.mdl-color--indigo-300{background-color:#7986cb !important}.mdl-color-text--indigo-400{color:#5c6bc0 !important}.mdl-color--indigo-400{background-color:#5c6bc0 !important}.mdl-color-text--indigo-500{color:#3f51b5 !important}.mdl-color--indigo-500{background-color:#3f51b5 !important}.mdl-color-text--indigo-600{color:#3949ab !important}.mdl-color--indigo-600{background-color:#3949ab !important}.mdl-color-text--indigo-700{color:#303f9f !important}.mdl-color--indigo-700{background-color:#303f9f !important}.mdl-color-text--indigo-800{color:#283593 !important}.mdl-color--indigo-800{background-color:#283593 !important}.mdl-color-text--indigo-900{color:#1a237e !important}.mdl-color--indigo-900{background-color:#1a237e !important}.mdl-color-text--indigo-A100{color:#8c9eff !important}.mdl-color--indigo-A100{background-color:#8c9eff !important}.mdl-color-text--indigo-A200{color:#536dfe !important}.mdl-color--indigo-A200{background-color:#536dfe !important}.mdl-color-text--indigo-A400{color:#3d5afe !important}.mdl-color--indigo-A400{background-color:#3d5afe !important}.mdl-color-text--indigo-A700{color:#304ffe !important}.mdl-color--indigo-A700{background-color:#304ffe !important}.mdl-color-text--blue{color:#2196f3 !important}.mdl-color--blue{background-color:#2196f3 !important}.mdl-color-text--blue-50{color:#e3f2fd !important}.mdl-color--blue-50{background-color:#e3f2fd !important}.mdl-color-text--blue-100{color:#bbdefb !important}.mdl-color--blue-100{background-color:#bbdefb !important}.mdl-color-text--blue-200{color:#90caf9 !important}.mdl-color--blue-200{background-color:#90caf9 !important}.mdl-color-text--blue-300{color:#64b5f6 !important}.mdl-color--blue-300{background-color:#64b5f6 !important}.mdl-color-text--blue-400{color:#42a5f5 !important}.mdl-color--blue-400{background-color:#42a5f5 !important}.mdl-color-text--blue-500{color:#2196f3 !important}.mdl-color--blue-500{background-color:#2196f3 !important}.mdl-color-text--blue-600{color:#1e88e5 !important}.mdl-color--blue-600{background-color:#1e88e5 !important}.mdl-color-text--blue-700{color:#1976d2 !important}.mdl-color--blue-700{background-color:#1976d2 !important}.mdl-color-text--blue-800{color:#1565c0 !important}.mdl-color--blue-800{background-color:#1565c0 !important}.mdl-color-text--blue-900{color:#0d47a1 !important}.mdl-color--blue-900{background-color:#0d47a1 !important}.mdl-color-text--blue-A100{color:#82b1ff !important}.mdl-color--blue-A100{background-color:#82b1ff !important}.mdl-color-text--blue-A200{color:#448aff !important}.mdl-color--blue-A200{background-color:#448aff !important}.mdl-color-text--blue-A400{color:#2979ff !important}.mdl-color--blue-A400{background-color:#2979ff !important}.mdl-color-text--blue-A700{color:#2962ff !important}.mdl-color--blue-A700{background-color:#2962ff !important}.mdl-color-text--light-blue{color:#03a9f4 !important}.mdl-color--light-blue{background-color:#03a9f4 !important}.mdl-color-text--light-blue-50{color:#e1f5fe !important}.mdl-color--light-blue-50{background-color:#e1f5fe !important}.mdl-color-text--light-blue-100{color:#b3e5fc !important}.mdl-color--light-blue-100{background-color:#b3e5fc !important}.mdl-color-text--light-blue-200{color:#81d4fa !important}.mdl-color--light-blue-200{background-color:#81d4fa !important}.mdl-color-text--light-blue-300{color:#4fc3f7 !important}.mdl-color--light-blue-300{background-color:#4fc3f7 !important}.mdl-color-text--light-blue-400{color:#29b6f6 !important}.mdl-color--light-blue-400{background-color:#29b6f6 !important}.mdl-color-text--light-blue-500{color:#03a9f4 !important}.mdl-color--light-blue-500{background-color:#03a9f4 !important}.mdl-color-text--light-blue-600{color:#039be5 !important}.mdl-color--light-blue-600{background-color:#039be5 !important}.mdl-color-text--light-blue-700{color:#0288d1 !important}.mdl-color--light-blue-700{background-color:#0288d1 !important}.mdl-color-text--light-blue-800{color:#0277bd !important}.mdl-color--light-blue-800{background-color:#0277bd !important}.mdl-color-text--light-blue-900{color:#01579b !important}.mdl-color--light-blue-900{background-color:#01579b !important}.mdl-color-text--light-blue-A100{color:#80d8ff !important}.mdl-color--light-blue-A100{background-color:#80d8ff !important}.mdl-color-text--light-blue-A200{color:#40c4ff !important}.mdl-color--light-blue-A200{background-color:#40c4ff !important}.mdl-color-text--light-blue-A400{color:#00b0ff !important}.mdl-color--light-blue-A400{background-color:#00b0ff !important}.mdl-color-text--light-blue-A700{color:#0091ea !important}.mdl-color--light-blue-A700{background-color:#0091ea !important}.mdl-color-text--cyan{color:#00bcd4 !important}.mdl-color--cyan{background-color:#00bcd4 !important}.mdl-color-text--cyan-50{color:#e0f7fa !important}.mdl-color--cyan-50{background-color:#e0f7fa !important}.mdl-color-text--cyan-100{color:#b2ebf2 !important}.mdl-color--cyan-100{background-color:#b2ebf2 !important}.mdl-color-text--cyan-200{color:#80deea !important}.mdl-color--cyan-200{background-color:#80deea !important}.mdl-color-text--cyan-300{color:#4dd0e1 !important}.mdl-color--cyan-300{background-color:#4dd0e1 !important}.mdl-color-text--cyan-400{color:#26c6da !important}.mdl-color--cyan-400{background-color:#26c6da !important}.mdl-color-text--cyan-500{color:#00bcd4 !important}.mdl-color--cyan-500{background-color:#00bcd4 !important}.mdl-color-text--cyan-600{color:#00acc1 !important}.mdl-color--cyan-600{background-color:#00acc1 !important}.mdl-color-text--cyan-700{color:#0097a7 !important}.mdl-color--cyan-700{background-color:#0097a7 !important}.mdl-color-text--cyan-800{color:#00838f !important}.mdl-color--cyan-800{background-color:#00838f !important}.mdl-color-text--cyan-900{color:#006064 !important}.mdl-color--cyan-900{background-color:#006064 !important}.mdl-color-text--cyan-A100{color:#84ffff !important}.mdl-color--cyan-A100{background-color:#84ffff !important}.mdl-color-text--cyan-A200{color:#18ffff !important}.mdl-color--cyan-A200{background-color:#18ffff !important}.mdl-color-text--cyan-A400{color:#00e5ff !important}.mdl-color--cyan-A400{background-color:#00e5ff !important}.mdl-color-text--cyan-A700{color:#00b8d4 !important}.mdl-color--cyan-A700{background-color:#00b8d4 !important}.mdl-color-text--teal{color:#009688 !important}.mdl-color--teal{background-color:#009688 !important}.mdl-color-text--teal-50{color:#e0f2f1 !important}.mdl-color--teal-50{background-color:#e0f2f1 !important}.mdl-color-text--teal-100{color:#b2dfdb !important}.mdl-color--teal-100{background-color:#b2dfdb !important}.mdl-color-text--teal-200{color:#80cbc4 !important}.mdl-color--teal-200{background-color:#80cbc4 !important}.mdl-color-text--teal-300{color:#4db6ac !important}.mdl-color--teal-300{background-color:#4db6ac !important}.mdl-color-text--teal-400{color:#26a69a !important}.mdl-color--teal-400{background-color:#26a69a !important}.mdl-color-text--teal-500{color:#009688 !important}.mdl-color--teal-500{background-color:#009688 !important}.mdl-color-text--teal-600{color:#00897b !important}.mdl-color--teal-600{background-color:#00897b !important}.mdl-color-text--teal-700{color:#00796b !important}.mdl-color--teal-700{background-color:#00796b !important}.mdl-color-text--teal-800{color:#00695c !important}.mdl-color--teal-800{background-color:#00695c !important}.mdl-color-text--teal-900{color:#004d40 !important}.mdl-color--teal-900{background-color:#004d40 !important}.mdl-color-text--teal-A100{color:#a7ffeb !important}.mdl-color--teal-A100{background-color:#a7ffeb !important}.mdl-color-text--teal-A200{color:#64ffda !important}.mdl-color--teal-A200{background-color:#64ffda !important}.mdl-color-text--teal-A400{color:#1de9b6 !important}.mdl-color--teal-A400{background-color:#1de9b6 !important}.mdl-color-text--teal-A700{color:#00bfa5 !important}.mdl-color--teal-A700{background-color:#00bfa5 !important}.mdl-color-text--green{color:#4caf50 !important}.mdl-color--green{background-color:#4caf50 !important}.mdl-color-text--green-50{color:#e8f5e9 !important}.mdl-color--green-50{background-color:#e8f5e9 !important}.mdl-color-text--green-100{color:#c8e6c9 !important}.mdl-color--green-100{background-color:#c8e6c9 !important}.mdl-color-text--green-200{color:#a5d6a7 !important}.mdl-color--green-200{background-color:#a5d6a7 !important}.mdl-color-text--green-300{color:#81c784 !important}.mdl-color--green-300{background-color:#81c784 !important}.mdl-color-text--green-400{color:#66bb6a !important}.mdl-color--green-400{background-color:#66bb6a !important}.mdl-color-text--green-500{color:#4caf50 !important}.mdl-color--green-500{background-color:#4caf50 !important}.mdl-color-text--green-600{color:#43a047 !important}.mdl-color--green-600{background-color:#43a047 !important}.mdl-color-text--green-700{color:#388e3c !important}.mdl-color--green-700{background-color:#388e3c !important}.mdl-color-text--green-800{color:#2e7d32 !important}.mdl-color--green-800{background-color:#2e7d32 !important}.mdl-color-text--green-900{color:#1b5e20 !important}.mdl-color--green-900{background-color:#1b5e20 !important}.mdl-color-text--green-A100{color:#b9f6ca !important}.mdl-color--green-A100{background-color:#b9f6ca !important}.mdl-color-text--green-A200{color:#69f0ae !important}.mdl-color--green-A200{background-color:#69f0ae !important}.mdl-color-text--green-A400{color:#00e676 !important}.mdl-color--green-A400{background-color:#00e676 !important}.mdl-color-text--green-A700{color:#00c853 !important}.mdl-color--green-A700{background-color:#00c853 !important}.mdl-color-text--light-green{color:#8bc34a !important}.mdl-color--light-green{background-color:#8bc34a !important}.mdl-color-text--light-green-50{color:#f1f8e9 !important}.mdl-color--light-green-50{background-color:#f1f8e9 !important}.mdl-color-text--light-green-100{color:#dcedc8 !important}.mdl-color--light-green-100{background-color:#dcedc8 !important}.mdl-color-text--light-green-200{color:#c5e1a5 !important}.mdl-color--light-green-200{background-color:#c5e1a5 !important}.mdl-color-text--light-green-300{color:#aed581 !important}.mdl-color--light-green-300{background-color:#aed581 !important}.mdl-color-text--light-green-400{color:#9ccc65 !important}.mdl-color--light-green-400{background-color:#9ccc65 !important}.mdl-color-text--light-green-500{color:#8bc34a !important}.mdl-color--light-green-500{background-color:#8bc34a !important}.mdl-color-text--light-green-600{color:#7cb342 !important}.mdl-color--light-green-600{background-color:#7cb342 !important}.mdl-color-text--light-green-700{color:#689f38 !important}.mdl-color--light-green-700{background-color:#689f38 !important}.mdl-color-text--light-green-800{color:#558b2f !important}.mdl-color--light-green-800{background-color:#558b2f !important}.mdl-color-text--light-green-900{color:#33691e !important}.mdl-color--light-green-900{background-color:#33691e !important}.mdl-color-text--light-green-A100{color:#ccff90 !important}.mdl-color--light-green-A100{background-color:#ccff90 !important}.mdl-color-text--light-green-A200{color:#b2ff59 !important}.mdl-color--light-green-A200{background-color:#b2ff59 !important}.mdl-color-text--light-green-A400{color:#76ff03 !important}.mdl-color--light-green-A400{background-color:#76ff03 !important}.mdl-color-text--light-green-A700{color:#64dd17 !important}.mdl-color--light-green-A700{background-color:#64dd17 !important}.mdl-color-text--lime{color:#cddc39 !important}.mdl-color--lime{background-color:#cddc39 !important}.mdl-color-text--lime-50{color:#f9fbe7 !important}.mdl-color--lime-50{background-color:#f9fbe7 !important}.mdl-color-text--lime-100{color:#f0f4c3 !important}.mdl-color--lime-100{background-color:#f0f4c3 !important}.mdl-color-text--lime-200{color:#e6ee9c !important}.mdl-color--lime-200{background-color:#e6ee9c !important}.mdl-color-text--lime-300{color:#dce775 !important}.mdl-color--lime-300{background-color:#dce775 !important}.mdl-color-text--lime-400{color:#d4e157 !important}.mdl-color--lime-400{background-color:#d4e157 !important}.mdl-color-text--lime-500{color:#cddc39 !important}.mdl-color--lime-500{background-color:#cddc39 !important}.mdl-color-text--lime-600{color:#c0ca33 !important}.mdl-color--lime-600{background-color:#c0ca33 !important}.mdl-color-text--lime-700{color:#afb42b !important}.mdl-color--lime-700{background-color:#afb42b !important}.mdl-color-text--lime-800{color:#9e9d24 !important}.mdl-color--lime-800{background-color:#9e9d24 !important}.mdl-color-text--lime-900{color:#827717 !important}.mdl-color--lime-900{background-color:#827717 !important}.mdl-color-text--lime-A100{color:#f4ff81 !important}.mdl-color--lime-A100{background-color:#f4ff81 !important}.mdl-color-text--lime-A200{color:#eeff41 !important}.mdl-color--lime-A200{background-color:#eeff41 !important}.mdl-color-text--lime-A400{color:#c6ff00 !important}.mdl-color--lime-A400{background-color:#c6ff00 !important}.mdl-color-text--lime-A700{color:#aeea00 !important}.mdl-color--lime-A700{background-color:#aeea00 !important}.mdl-color-text--yellow{color:#ffeb3b !important}.mdl-color--yellow{background-color:#ffeb3b !important}.mdl-color-text--yellow-50{color:#fffde7 !important}.mdl-color--yellow-50{background-color:#fffde7 !important}.mdl-color-text--yellow-100{color:#fff9c4 !important}.mdl-color--yellow-100{background-color:#fff9c4 !important}.mdl-color-text--yellow-200{color:#fff59d !important}.mdl-color--yellow-200{background-color:#fff59d !important}.mdl-color-text--yellow-300{color:#fff176 !important}.mdl-color--yellow-300{background-color:#fff176 !important}.mdl-color-text--yellow-400{color:#ffee58 !important}.mdl-color--yellow-400{background-color:#ffee58 !important}.mdl-color-text--yellow-500{color:#ffeb3b !important}.mdl-color--yellow-500{background-color:#ffeb3b !important}.mdl-color-text--yellow-600{color:#fdd835 !important}.mdl-color--yellow-600{background-color:#fdd835 !important}.mdl-color-text--yellow-700{color:#fbc02d !important}.mdl-color--yellow-700{background-color:#fbc02d !important}.mdl-color-text--yellow-800{color:#f9a825 !important}.mdl-color--yellow-800{background-color:#f9a825 !important}.mdl-color-text--yellow-900{color:#f57f17 !important}.mdl-color--yellow-900{background-color:#f57f17 !important}.mdl-color-text--yellow-A100{color:#ffff8d !important}.mdl-color--yellow-A100{background-color:#ffff8d !important}.mdl-color-text--yellow-A200{color:#ff0 !important}.mdl-color--yellow-A200{background-color:#ff0 !important}.mdl-color-text--yellow-A400{color:#ffea00 !important}.mdl-color--yellow-A400{background-color:#ffea00 !important}.mdl-color-text--yellow-A700{color:#ffd600 !important}.mdl-color--yellow-A700{background-color:#ffd600 !important}.mdl-color-text--amber{color:#ffc107 !important}.mdl-color--amber{background-color:#ffc107 !important}.mdl-color-text--amber-50{color:#fff8e1 !important}.mdl-color--amber-50{background-color:#fff8e1 !important}.mdl-color-text--amber-100{color:#ffecb3 !important}.mdl-color--amber-100{background-color:#ffecb3 !important}.mdl-color-text--amber-200{color:#ffe082 !important}.mdl-color--amber-200{background-color:#ffe082 !important}.mdl-color-text--amber-300{color:#ffd54f !important}.mdl-color--amber-300{background-color:#ffd54f !important}.mdl-color-text--amber-400{color:#ffca28 !important}.mdl-color--amber-400{background-color:#ffca28 !important}.mdl-color-text--amber-500{color:#ffc107 !important}.mdl-color--amber-500{background-color:#ffc107 !important}.mdl-color-text--amber-600{color:#ffb300 !important}.mdl-color--amber-600{background-color:#ffb300 !important}.mdl-color-text--amber-700{color:#ffa000 !important}.mdl-color--amber-700{background-color:#ffa000 !important}.mdl-color-text--amber-800{color:#ff8f00 !important}.mdl-color--amber-800{background-color:#ff8f00 !important}.mdl-color-text--amber-900{color:#ff6f00 !important}.mdl-color--amber-900{background-color:#ff6f00 !important}.mdl-color-text--amber-A100{color:#ffe57f !important}.mdl-color--amber-A100{background-color:#ffe57f !important}.mdl-color-text--amber-A200{color:#ffd740 !important}.mdl-color--amber-A200{background-color:#ffd740 !important}.mdl-color-text--amber-A400{color:#ffc400 !important}.mdl-color--amber-A400{background-color:#ffc400 !important}.mdl-color-text--amber-A700{color:#ffab00 !important}.mdl-color--amber-A700{background-color:#ffab00 !important}.mdl-color-text--orange{color:#ff9800 !important}.mdl-color--orange{background-color:#ff9800 !important}.mdl-color-text--orange-50{color:#fff3e0 !important}.mdl-color--orange-50{background-color:#fff3e0 !important}.mdl-color-text--orange-100{color:#ffe0b2 !important}.mdl-color--orange-100{background-color:#ffe0b2 !important}.mdl-color-text--orange-200{color:#ffcc80 !important}.mdl-color--orange-200{background-color:#ffcc80 !important}.mdl-color-text--orange-300{color:#ffb74d !important}.mdl-color--orange-300{background-color:#ffb74d !important}.mdl-color-text--orange-400{color:#ffa726 !important}.mdl-color--orange-400{background-color:#ffa726 !important}.mdl-color-text--orange-500{color:#ff9800 !important}.mdl-color--orange-500{background-color:#ff9800 !important}.mdl-color-text--orange-600{color:#fb8c00 !important}.mdl-color--orange-600{background-color:#fb8c00 !important}.mdl-color-text--orange-700{color:#f57c00 !important}.mdl-color--orange-700{background-color:#f57c00 !important}.mdl-color-text--orange-800{color:#ef6c00 !important}.mdl-color--orange-800{background-color:#ef6c00 !important}.mdl-color-text--orange-900{color:#e65100 !important}.mdl-color--orange-900{background-color:#e65100 !important}.mdl-color-text--orange-A100{color:#ffd180 !important}.mdl-color--orange-A100{background-color:#ffd180 !important}.mdl-color-text--orange-A200{color:#ffab40 !important}.mdl-color--orange-A200{background-color:#ffab40 !important}.mdl-color-text--orange-A400{color:#ff9100 !important}.mdl-color--orange-A400{background-color:#ff9100 !important}.mdl-color-text--orange-A700{color:#ff6d00 !important}.mdl-color--orange-A700{background-color:#ff6d00 !important}.mdl-color-text--deep-orange{color:#ff5722 !important}.mdl-color--deep-orange{background-color:#ff5722 !important}.mdl-color-text--deep-orange-50{color:#fbe9e7 !important}.mdl-color--deep-orange-50{background-color:#fbe9e7 !important}.mdl-color-text--deep-orange-100{color:#ffccbc !important}.mdl-color--deep-orange-100{background-color:#ffccbc !important}.mdl-color-text--deep-orange-200{color:#ffab91 !important}.mdl-color--deep-orange-200{background-color:#ffab91 !important}.mdl-color-text--deep-orange-300{color:#ff8a65 !important}.mdl-color--deep-orange-300{background-color:#ff8a65 !important}.mdl-color-text--deep-orange-400{color:#ff7043 !important}.mdl-color--deep-orange-400{background-color:#ff7043 !important}.mdl-color-text--deep-orange-500{color:#ff5722 !important}.mdl-color--deep-orange-500{background-color:#ff5722 !important}.mdl-color-text--deep-orange-600{color:#f4511e !important}.mdl-color--deep-orange-600{background-color:#f4511e !important}.mdl-color-text--deep-orange-700{color:#e64a19 !important}.mdl-color--deep-orange-700{background-color:#e64a19 !important}.mdl-color-text--deep-orange-800{color:#d84315 !important}.mdl-color--deep-orange-800{background-color:#d84315 !important}.mdl-color-text--deep-orange-900{color:#bf360c !important}.mdl-color--deep-orange-900{background-color:#bf360c !important}.mdl-color-text--deep-orange-A100{color:#ff9e80 !important}.mdl-color--deep-orange-A100{background-color:#ff9e80 !important}.mdl-color-text--deep-orange-A200{color:#ff6e40 !important}.mdl-color--deep-orange-A200{background-color:#ff6e40 !important}.mdl-color-text--deep-orange-A400{color:#ff3d00 !important}.mdl-color--deep-orange-A400{background-color:#ff3d00 !important}.mdl-color-text--deep-orange-A700{color:#dd2c00 !important}.mdl-color--deep-orange-A700{background-color:#dd2c00 !important}.mdl-color-text--brown{color:#795548 !important}.mdl-color--brown{background-color:#795548 !important}.mdl-color-text--brown-50{color:#efebe9 !important}.mdl-color--brown-50{background-color:#efebe9 !important}.mdl-color-text--brown-100{color:#d7ccc8 !important}.mdl-color--brown-100{background-color:#d7ccc8 !important}.mdl-color-text--brown-200{color:#bcaaa4 !important}.mdl-color--brown-200{background-color:#bcaaa4 !important}.mdl-color-text--brown-300{color:#a1887f !important}.mdl-color--brown-300{background-color:#a1887f !important}.mdl-color-text--brown-400{color:#8d6e63 !important}.mdl-color--brown-400{background-color:#8d6e63 !important}.mdl-color-text--brown-500{color:#795548 !important}.mdl-color--brown-500{background-color:#795548 !important}.mdl-color-text--brown-600{color:#6d4c41 !important}.mdl-color--brown-600{background-color:#6d4c41 !important}.mdl-color-text--brown-700{color:#5d4037 !important}.mdl-color--brown-700{background-color:#5d4037 !important}.mdl-color-text--brown-800{color:#4e342e !important}.mdl-color--brown-800{background-color:#4e342e !important}.mdl-color-text--brown-900{color:#3e2723 !important}.mdl-color--brown-900{background-color:#3e2723 !important}.mdl-color-text--grey{color:#9e9e9e !important}.mdl-color--grey{background-color:#9e9e9e !important}.mdl-color-text--grey-50{color:#fafafa !important}.mdl-color--grey-50{background-color:#fafafa !important}.mdl-color-text--grey-100{color:#f5f5f5 !important}.mdl-color--grey-100{background-color:#f5f5f5 !important}.mdl-color-text--grey-200{color:#eee !important}.mdl-color--grey-200{background-color:#eee !important}.mdl-color-text--grey-300{color:#e0e0e0 !important}.mdl-color--grey-300{background-color:#e0e0e0 !important}.mdl-color-text--grey-400{color:#bdbdbd !important}.mdl-color--grey-400{background-color:#bdbdbd !important}.mdl-color-text--grey-500{color:#9e9e9e !important}.mdl-color--grey-500{background-color:#9e9e9e !important}.mdl-color-text--grey-600{color:#757575 !important}.mdl-color--grey-600{background-color:#757575 !important}.mdl-color-text--grey-700{color:#616161 !important}.mdl-color--grey-700{background-color:#616161 !important}.mdl-color-text--grey-800{color:#424242 !important}.mdl-color--grey-800{background-color:#424242 !important}.mdl-color-text--grey-900{color:#212121 !important}.mdl-color--grey-900{background-color:#212121 !important}.mdl-color-text--blue-grey{color:#607d8b !important}.mdl-color--blue-grey{background-color:#607d8b !important}.mdl-color-text--blue-grey-50{color:#eceff1 !important}.mdl-color--blue-grey-50{background-color:#eceff1 !important}.mdl-color-text--blue-grey-100{color:#cfd8dc !important}.mdl-color--blue-grey-100{background-color:#cfd8dc !important}.mdl-color-text--blue-grey-200{color:#b0bec5 !important}.mdl-color--blue-grey-200{background-color:#b0bec5 !important}.mdl-color-text--blue-grey-300{color:#90a4ae !important}.mdl-color--blue-grey-300{background-color:#90a4ae !important}.mdl-color-text--blue-grey-400{color:#78909c !important}.mdl-color--blue-grey-400{background-color:#78909c !important}.mdl-color-text--blue-grey-500{color:#607d8b !important}.mdl-color--blue-grey-500{background-color:#607d8b !important}.mdl-color-text--blue-grey-600{color:#546e7a !important}.mdl-color--blue-grey-600{background-color:#546e7a !important}.mdl-color-text--blue-grey-700{color:#455a64 !important}.mdl-color--blue-grey-700{background-color:#455a64 !important}.mdl-color-text--blue-grey-800{color:#37474f !important}.mdl-color--blue-grey-800{background-color:#37474f !important}.mdl-color-text--blue-grey-900{color:#263238 !important}.mdl-color--blue-grey-900{background-color:#263238 !important}.mdl-color--black{background-color:#000 !important}.mdl-color-text--black{color:#000 !important}.mdl-color--white{background-color:#fff !important}.mdl-color-text--white{color:#fff !important}.mdl-color--primary{background-color:rgb(158,158,158)!important}.mdl-color--primary-contrast{background-color:rgb(66,66,66)!important}.mdl-color--primary-dark{background-color:rgb(97,97,97)!important}.mdl-color--accent{background-color:rgb(24,255,255)!important}.mdl-color--accent-contrast{background-color:rgb(66,66,66)!important}.mdl-color-text--primary{color:rgb(158,158,158)!important}.mdl-color-text--primary-contrast{color:rgb(66,66,66)!important}.mdl-color-text--primary-dark{color:rgb(97,97,97)!important}.mdl-color-text--accent{color:rgb(24,255,255)!important}.mdl-color-text--accent-contrast{color:rgb(66,66,66)!important}.mdl-ripple{background:#000;border-radius:50%;height:50px;left:0;opacity:0;pointer-events:none;position:absolute;top:0;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:50px;overflow:hidden}.mdl-ripple.is-animating{transition:transform .3s cubic-bezier(0,0,.2,1),width .3s cubic-bezier(0,0,.2,1),height .3s cubic-bezier(0,0,.2,1),opacity .6s cubic-bezier(0,0,.2,1);transition:transform .3s cubic-bezier(0,0,.2,1),width .3s cubic-bezier(0,0,.2,1),height .3s cubic-bezier(0,0,.2,1),opacity .6s cubic-bezier(0,0,.2,1),-webkit-transform .3s cubic-bezier(0,0,.2,1)}.mdl-ripple.is-visible{opacity:.3}.mdl-animation--default,.mdl-animation--fast-out-slow-in{transition-timing-function:cubic-bezier(.4,0,.2,1)}.mdl-animation--linear-out-slow-in{transition-timing-function:cubic-bezier(0,0,.2,1)}.mdl-animation--fast-out-linear-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.mdl-badge{position:relative;white-space:nowrap;margin-right:24px}.mdl-badge:not([data-badge]){margin-right:auto}.mdl-badge[data-badge]:after{content:attr(data-badge);display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-content:center;-ms-flex-line-pack:center;align-content:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;position:absolute;top:-11px;right:-24px;font-family:"Roboto","Helvetica","Arial",sans-serif;font-weight:600;font-size:12px;width:22px;height:22px;border-radius:50%;background:rgb(24,255,255);color:rgb(66,66,66)}.mdl-button .mdl-badge[data-badge]:after{top:-10px;right:-5px}.mdl-badge.mdl-badge--no-background[data-badge]:after{color:rgb(24,255,255);background:rgba(66,66,66,.2);box-shadow:0 0 1px gray}.mdl-badge.mdl-badge--overlap{margin-right:10px}.mdl-badge.mdl-badge--overlap:after{right:-10px}.mdl-button{background:0 0;border:none;border-radius:2px;color:#000;position:relative;height:36px;margin:0;min-width:64px;padding:0 16px;display:inline-block;font-family:"Roboto","Helvetica","Arial",sans-serif;font-size:14px;font-weight:500;text-transform:uppercase;letter-spacing:0;overflow:hidden;will-change:box-shadow;transition:box-shadow .2s cubic-bezier(.4,0,1,1),background-color .2s cubic-bezier(.4,0,.2,1),color .2s cubic-bezier(.4,0,.2,1);outline:none;cursor:pointer;text-decoration:none;text-align:center;line-height:36px;vertical-align:middle}.mdl-button::-moz-focus-inner{border:0}.mdl-button:hover{background-color:rgba(158,158,158,.2)}.mdl-button:focus:not(:active){background-color:rgba(0,0,0,.12)}.mdl-button:active{background-color:rgba(158,158,158,.4)}.mdl-button.mdl-button--colored{color:rgb(158,158,158)}.mdl-button.mdl-button--colored:focus:not(:active){background-color:rgba(0,0,0,.12)}input.mdl-button[type="submit"]{-webkit-appearance:none}.mdl-button--raised{background:rgba(158,158,158,.2);box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)}.mdl-button--raised:active{box-shadow:0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.2);background-color:rgba(158,158,158,.4)}.mdl-button--raised:focus:not(:active){box-shadow:0 0 8px rgba(0,0,0,.18),0 8px 16px rgba(0,0,0,.36);background-color:rgba(158,158,158,.4)}.mdl-button--raised.mdl-button--colored{background:rgb(158,158,158);color:rgb(66,66,66)}.mdl-button--raised.mdl-button--colored:hover{background-color:rgb(158,158,158)}.mdl-button--raised.mdl-button--colored:active{background-color:rgb(158,158,158)}.mdl-button--raised.mdl-button--colored:focus:not(:active){background-color:rgb(158,158,158)}.mdl-button--raised.mdl-button--colored .mdl-ripple{background:rgb(66,66,66)}.mdl-button--fab{border-radius:50%;font-size:24px;height:56px;margin:auto;min-width:56px;width:56px;padding:0;overflow:hidden;background:rgba(158,158,158,.2);box-shadow:0 1px 1.5px 0 rgba(0,0,0,.12),0 1px 1px 0 rgba(0,0,0,.24);position:relative;line-height:normal}.mdl-button--fab .material-icons{position:absolute;top:50%;left:50%;-webkit-transform:translate(-12px,-12px);transform:translate(-12px,-12px);line-height:24px;width:24px}.mdl-button--fab.mdl-button--mini-fab{height:40px;min-width:40px;width:40px}.mdl-button--fab .mdl-button__ripple-container{border-radius:50%;-webkit-mask-image:-webkit-radial-gradient(circle,#fff,#000)}.mdl-button--fab:active{box-shadow:0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.2);background-color:rgba(158,158,158,.4)}.mdl-button--fab:focus:not(:active){box-shadow:0 0 8px rgba(0,0,0,.18),0 8px 16px rgba(0,0,0,.36);background-color:rgba(158,158,158,.4)}.mdl-button--fab.mdl-button--colored{background:rgb(24,255,255);color:rgb(66,66,66)}.mdl-button--fab.mdl-button--colored:hover{background-color:rgb(24,255,255)}.mdl-button--fab.mdl-button--colored:focus:not(:active){background-color:rgb(24,255,255)}.mdl-button--fab.mdl-button--colored:active{background-color:rgb(24,255,255)}.mdl-button--fab.mdl-button--colored .mdl-ripple{background:rgb(66,66,66)}.mdl-button--icon{border-radius:50%;font-size:24px;height:32px;margin-left:0;margin-right:0;min-width:32px;width:32px;padding:0;overflow:hidden;color:inherit;line-height:normal}.mdl-button--icon .material-icons{position:absolute;top:50%;left:50%;-webkit-transform:translate(-12px,-12px);transform:translate(-12px,-12px);line-height:24px;width:24px}.mdl-button--icon.mdl-button--mini-icon{height:24px;min-width:24px;width:24px}.mdl-button--icon.mdl-button--mini-icon .material-icons{top:0;left:0}.mdl-button--icon .mdl-button__ripple-container{border-radius:50%;-webkit-mask-image:-webkit-radial-gradient(circle,#fff,#000)}.mdl-button__ripple-container{display:block;height:100%;left:0;position:absolute;top:0;width:100%;z-index:0;overflow:hidden}.mdl-button[disabled] .mdl-button__ripple-container .mdl-ripple,.mdl-button.mdl-button--disabled .mdl-button__ripple-container .mdl-ripple{background-color:transparent}.mdl-button--primary.mdl-button--primary{color:rgb(158,158,158)}.mdl-button--primary.mdl-button--primary .mdl-ripple{background:rgb(66,66,66)}.mdl-button--primary.mdl-button--primary.mdl-button--raised,.mdl-button--primary.mdl-button--primary.mdl-button--fab{color:rgb(66,66,66);background-color:rgb(158,158,158)}.mdl-button--accent.mdl-button--accent{color:rgb(24,255,255)}.mdl-button--accent.mdl-button--accent .mdl-ripple{background:rgb(66,66,66)}.mdl-button--accent.mdl-button--accent.mdl-button--raised,.mdl-button--accent.mdl-button--accent.mdl-button--fab{color:rgb(66,66,66);background-color:rgb(24,255,255)}.mdl-button[disabled][disabled],.mdl-button.mdl-button--disabled.mdl-button--disabled{color:rgba(0,0,0,.26);cursor:default;background-color:transparent}.mdl-button--fab[disabled][disabled],.mdl-button--fab.mdl-button--disabled.mdl-button--disabled{background-color:rgba(0,0,0,.12);color:rgba(0,0,0,.26)}.mdl-button--raised[disabled][disabled],.mdl-button--raised.mdl-button--disabled.mdl-button--disabled{background-color:rgba(0,0,0,.12);color:rgba(0,0,0,.26);box-shadow:none}.mdl-button--colored[disabled][disabled],.mdl-button--colored.mdl-button--disabled.mdl-button--disabled{color:rgba(0,0,0,.26)}.mdl-button .material-icons{vertical-align:middle}.mdl-card{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;font-size:16px;font-weight:400;min-height:200px;overflow:hidden;width:330px;z-index:1;position:relative;background:#fff;border-radius:2px;box-sizing:border-box}.mdl-card__media{background-color:rgb(24,255,255);background-repeat:repeat;background-position:50% 50%;background-size:cover;background-origin:padding-box;background-attachment:scroll;box-sizing:border-box}.mdl-card__title{-webkit-align-items:center;-ms-flex-align:center;align-items:center;color:#000;display:block;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:stretch;-ms-flex-pack:stretch;justify-content:stretch;line-height:normal;padding:16px;-webkit-perspective-origin:165px 56px;perspective-origin:165px 56px;-webkit-transform-origin:165px 56px;transform-origin:165px 56px;box-sizing:border-box}.mdl-card__title.mdl-card--border{border-bottom:1px solid rgba(0,0,0,.1)}.mdl-card__title-text{-webkit-align-self:flex-end;-ms-flex-item-align:end;align-self:flex-end;color:inherit;display:block;display:-webkit-flex;display:-ms-flexbox;display:flex;font-size:24px;font-weight:300;line-height:normal;overflow:hidden;-webkit-transform-origin:149px 48px;transform-origin:149px 48px;margin:0}.mdl-card__subtitle-text{font-size:14px;color:rgba(0,0,0,.54);margin:0}.mdl-card__supporting-text{color:rgba(0,0,0,.54);font-size:1rem;line-height:18px;overflow:hidden;padding:16px;width:90%}.mdl-card__actions{font-size:16px;line-height:normal;width:100%;background-color:transparent;padding:8px;box-sizing:border-box}.mdl-card__actions.mdl-card--border{border-top:1px solid rgba(0,0,0,.1)}.mdl-card--expand{-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1}.mdl-card__menu{position:absolute;right:16px;top:16px}.mdl-checkbox{position:relative;z-index:1;vertical-align:middle;display:inline-block;box-sizing:border-box;width:100%;height:24px;margin:0;padding:0}.mdl-checkbox.is-upgraded{padding-left:24px}.mdl-checkbox__input{line-height:24px}.mdl-checkbox.is-upgraded .mdl-checkbox__input{position:absolute;width:0;height:0;margin:0;padding:0;opacity:0;-ms-appearance:none;-moz-appearance:none;-webkit-appearance:none;appearance:none;border:none}.mdl-checkbox__box-outline{position:absolute;top:3px;left:0;display:inline-block;box-sizing:border-box;width:16px;height:16px;margin:0;cursor:pointer;overflow:hidden;border:2px solid rgba(0,0,0,.54);border-radius:2px;z-index:2}.mdl-checkbox.is-checked .mdl-checkbox__box-outline{border:2px solid rgb(158,158,158)}fieldset[disabled] .mdl-checkbox .mdl-checkbox__box-outline,.mdl-checkbox.is-disabled .mdl-checkbox__box-outline{border:2px solid rgba(0,0,0,.26);cursor:auto}.mdl-checkbox__focus-helper{position:absolute;top:3px;left:0;display:inline-block;box-sizing:border-box;width:16px;height:16px;border-radius:50%;background-color:transparent}.mdl-checkbox.is-focused .mdl-checkbox__focus-helper{box-shadow:0 0 0 8px rgba(0,0,0,.1);background-color:rgba(0,0,0,.1)}.mdl-checkbox.is-focused.is-checked .mdl-checkbox__focus-helper{box-shadow:0 0 0 8px rgba(158,158,158,.26);background-color:rgba(158,158,158,.26)}.mdl-checkbox__tick-outline{position:absolute;top:0;left:0;height:100%;width:100%;-webkit-mask:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgdmVyc2lvbj0iMS4xIgogICB2aWV3Qm94PSIwIDAgMSAxIgogICBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWluWU1pbiBtZWV0Ij4KICA8ZGVmcz4KICAgIDxjbGlwUGF0aCBpZD0iY2xpcCI+CiAgICAgIDxwYXRoCiAgICAgICAgIGQ9Ik0gMCwwIDAsMSAxLDEgMSwwIDAsMCB6IE0gMC44NTM0Mzc1LDAuMTY3MTg3NSAwLjk1OTY4NzUsMC4yNzMxMjUgMC40MjkzNzUsMC44MDM0Mzc1IDAuMzIzMTI1LDAuOTA5Njg3NSAwLjIxNzE4NzUsMC44MDM0Mzc1IDAuMDQwMzEyNSwwLjYyNjg3NSAwLjE0NjU2MjUsMC41MjA2MjUgMC4zMjMxMjUsMC42OTc1IDAuODUzNDM3NSwwLjE2NzE4NzUgeiIKICAgICAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZSIgLz4KICAgIDwvY2xpcFBhdGg+CiAgICA8bWFzayBpZD0ibWFzayIgbWFza1VuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgbWFza0NvbnRlbnRVbml0cz0ib2JqZWN0Qm91bmRpbmdCb3giPgogICAgICA8cGF0aAogICAgICAgICBkPSJNIDAsMCAwLDEgMSwxIDEsMCAwLDAgeiBNIDAuODUzNDM3NSwwLjE2NzE4NzUgMC45NTk2ODc1LDAuMjczMTI1IDAuNDI5Mzc1LDAuODAzNDM3NSAwLjMyMzEyNSwwLjkwOTY4NzUgMC4yMTcxODc1LDAuODAzNDM3NSAwLjA0MDMxMjUsMC42MjY4NzUgMC4xNDY1NjI1LDAuNTIwNjI1IDAuMzIzMTI1LDAuNjk3NSAwLjg1MzQzNzUsMC4xNjcxODc1IHoiCiAgICAgICAgIHN0eWxlPSJmaWxsOiNmZmZmZmY7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmUiIC8+CiAgICA8L21hc2s+CiAgPC9kZWZzPgogIDxyZWN0CiAgICAgd2lkdGg9IjEiCiAgICAgaGVpZ2h0PSIxIgogICAgIHg9IjAiCiAgICAgeT0iMCIKICAgICBjbGlwLXBhdGg9InVybCgjY2xpcCkiCiAgICAgc3R5bGU9ImZpbGw6IzAwMDAwMDtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZSIgLz4KPC9zdmc+Cg==");mask:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgdmVyc2lvbj0iMS4xIgogICB2aWV3Qm94PSIwIDAgMSAxIgogICBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWluWU1pbiBtZWV0Ij4KICA8ZGVmcz4KICAgIDxjbGlwUGF0aCBpZD0iY2xpcCI+CiAgICAgIDxwYXRoCiAgICAgICAgIGQ9Ik0gMCwwIDAsMSAxLDEgMSwwIDAsMCB6IE0gMC44NTM0Mzc1LDAuMTY3MTg3NSAwLjk1OTY4NzUsMC4yNzMxMjUgMC40MjkzNzUsMC44MDM0Mzc1IDAuMzIzMTI1LDAuOTA5Njg3NSAwLjIxNzE4NzUsMC44MDM0Mzc1IDAuMDQwMzEyNSwwLjYyNjg3NSAwLjE0NjU2MjUsMC41MjA2MjUgMC4zMjMxMjUsMC42OTc1IDAuODUzNDM3NSwwLjE2NzE4NzUgeiIKICAgICAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZSIgLz4KICAgIDwvY2xpcFBhdGg+CiAgICA8bWFzayBpZD0ibWFzayIgbWFza1VuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgbWFza0NvbnRlbnRVbml0cz0ib2JqZWN0Qm91bmRpbmdCb3giPgogICAgICA8cGF0aAogICAgICAgICBkPSJNIDAsMCAwLDEgMSwxIDEsMCAwLDAgeiBNIDAuODUzNDM3NSwwLjE2NzE4NzUgMC45NTk2ODc1LDAuMjczMTI1IDAuNDI5Mzc1LDAuODAzNDM3NSAwLjMyMzEyNSwwLjkwOTY4NzUgMC4yMTcxODc1LDAuODAzNDM3NSAwLjA0MDMxMjUsMC42MjY4NzUgMC4xNDY1NjI1LDAuNTIwNjI1IDAuMzIzMTI1LDAuNjk3NSAwLjg1MzQzNzUsMC4xNjcxODc1IHoiCiAgICAgICAgIHN0eWxlPSJmaWxsOiNmZmZmZmY7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmUiIC8+CiAgICA8L21hc2s+CiAgPC9kZWZzPgogIDxyZWN0CiAgICAgd2lkdGg9IjEiCiAgICAgaGVpZ2h0PSIxIgogICAgIHg9IjAiCiAgICAgeT0iMCIKICAgICBjbGlwLXBhdGg9InVybCgjY2xpcCkiCiAgICAgc3R5bGU9ImZpbGw6IzAwMDAwMDtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZSIgLz4KPC9zdmc+Cg==");background:0 0;transition-duration:.28s;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-property:background}.mdl-checkbox.is-checked .mdl-checkbox__tick-outline{background:rgb(158,158,158)url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgdmVyc2lvbj0iMS4xIgogICB2aWV3Qm94PSIwIDAgMSAxIgogICBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWluWU1pbiBtZWV0Ij4KICA8cGF0aAogICAgIGQ9Ik0gMC4wNDAzODA1OSwwLjYyNjc3NjcgMC4xNDY0NDY2MSwwLjUyMDcxMDY4IDAuNDI5Mjg5MzIsMC44MDM1NTMzOSAwLjMyMzIyMzMsMC45MDk2MTk0MSB6IE0gMC4yMTcxNTcyOSwwLjgwMzU1MzM5IDAuODUzNTUzMzksMC4xNjcxNTcyOSAwLjk1OTYxOTQxLDAuMjczMjIzMyAwLjMyMzIyMzMsMC45MDk2MTk0MSB6IgogICAgIGlkPSJyZWN0Mzc4MCIKICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lIiAvPgo8L3N2Zz4K")}fieldset[disabled] .mdl-checkbox.is-checked .mdl-checkbox__tick-outline,.mdl-checkbox.is-checked.is-disabled .mdl-checkbox__tick-outline{background:rgba(0,0,0,.26)url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgdmVyc2lvbj0iMS4xIgogICB2aWV3Qm94PSIwIDAgMSAxIgogICBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWluWU1pbiBtZWV0Ij4KICA8cGF0aAogICAgIGQ9Ik0gMC4wNDAzODA1OSwwLjYyNjc3NjcgMC4xNDY0NDY2MSwwLjUyMDcxMDY4IDAuNDI5Mjg5MzIsMC44MDM1NTMzOSAwLjMyMzIyMzMsMC45MDk2MTk0MSB6IE0gMC4yMTcxNTcyOSwwLjgwMzU1MzM5IDAuODUzNTUzMzksMC4xNjcxNTcyOSAwLjk1OTYxOTQxLDAuMjczMjIzMyAwLjMyMzIyMzMsMC45MDk2MTk0MSB6IgogICAgIGlkPSJyZWN0Mzc4MCIKICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lIiAvPgo8L3N2Zz4K")}.mdl-checkbox__label{position:relative;cursor:pointer;font-size:16px;line-height:24px;margin:0}fieldset[disabled] .mdl-checkbox .mdl-checkbox__label,.mdl-checkbox.is-disabled .mdl-checkbox__label{color:rgba(0,0,0,.26);cursor:auto}.mdl-checkbox__ripple-container{position:absolute;z-index:2;top:-6px;left:-10px;box-sizing:border-box;width:36px;height:36px;border-radius:50%;cursor:pointer;overflow:hidden;-webkit-mask-image:-webkit-radial-gradient(circle,#fff,#000)}.mdl-checkbox__ripple-container .mdl-ripple{background:rgb(158,158,158)}fieldset[disabled] .mdl-checkbox .mdl-checkbox__ripple-container,.mdl-checkbox.is-disabled .mdl-checkbox__ripple-container{cursor:auto}fieldset[disabled] .mdl-checkbox .mdl-checkbox__ripple-container .mdl-ripple,.mdl-checkbox.is-disabled .mdl-checkbox__ripple-container .mdl-ripple{background:0 0}.mdl-chip{height:32px;font-family:"Roboto","Helvetica","Arial",sans-serif;line-height:32px;padding:0 12px;border:0;border-radius:16px;background-color:#dedede;display:inline-block;color:rgba(0,0,0,.87);margin:2px 0;font-size:0;white-space:nowrap}.mdl-chip__text{font-size:13px;vertical-align:middle;display:inline-block}.mdl-chip__action{height:24px;width:24px;background:0 0;opacity:.54;cursor:pointer;padding:0;margin:0 0 0 4px;font-size:13px;text-decoration:none;color:rgba(0,0,0,.87);border:none;outline:none}.mdl-chip__action,.mdl-chip__contact{display:inline-block;vertical-align:middle;overflow:hidden;text-align:center}.mdl-chip__contact{height:32px;width:32px;border-radius:16px;margin-right:8px;font-size:18px;line-height:32px}.mdl-chip:focus{outline:0;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)}.mdl-chip:active{background-color:#d6d6d6}.mdl-chip--deletable{padding-right:4px}.mdl-chip--contact{padding-left:0}.mdl-data-table{position:relative;border:1px solid rgba(0,0,0,.12);border-collapse:collapse;white-space:nowrap;font-size:13px;background-color:#fff}.mdl-data-table thead{padding-bottom:3px}.mdl-data-table thead .mdl-data-table__select{margin-top:0}.mdl-data-table tbody tr{position:relative;height:48px;transition-duration:.28s;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-property:background-color}.mdl-data-table tbody tr.is-selected{background-color:#e0e0e0}.mdl-data-table tbody tr:hover{background-color:#eee}.mdl-data-table td{text-align:right}.mdl-data-table th{padding:0 18px 12px 18px;text-align:right}.mdl-data-table td:first-of-type,.mdl-data-table th:first-of-type{padding-left:24px}.mdl-data-table td:last-of-type,.mdl-data-table th:last-of-type{padding-right:24px}.mdl-data-table td{position:relative;height:48px;border-top:1px solid rgba(0,0,0,.12);border-bottom:1px solid rgba(0,0,0,.12);padding:12px 18px;box-sizing:border-box}.mdl-data-table td,.mdl-data-table td .mdl-data-table__select{vertical-align:middle}.mdl-data-table th{position:relative;vertical-align:bottom;text-overflow:ellipsis;font-weight:700;line-height:24px;letter-spacing:0;height:48px;font-size:12px;color:rgba(0,0,0,.54);padding-bottom:8px;box-sizing:border-box}.mdl-data-table th.mdl-data-table__header--sorted-ascending,.mdl-data-table th.mdl-data-table__header--sorted-descending{color:rgba(0,0,0,.87)}.mdl-data-table th.mdl-data-table__header--sorted-ascending:before,.mdl-data-table th.mdl-data-table__header--sorted-descending:before{font-family:'Material Icons';font-weight:400;font-style:normal;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;word-wrap:normal;-moz-font-feature-settings:'liga';font-feature-settings:'liga';-webkit-font-feature-settings:'liga';-webkit-font-smoothing:antialiased;font-size:16px;content:"\e5d8";margin-right:5px;vertical-align:sub}.mdl-data-table th.mdl-data-table__header--sorted-ascending:hover,.mdl-data-table th.mdl-data-table__header--sorted-descending:hover{cursor:pointer}.mdl-data-table th.mdl-data-table__header--sorted-ascending:hover:before,.mdl-data-table th.mdl-data-table__header--sorted-descending:hover:before{color:rgba(0,0,0,.26)}.mdl-data-table th.mdl-data-table__header--sorted-descending:before{content:"\e5db"}.mdl-data-table__select{width:16px}.mdl-data-table__cell--non-numeric.mdl-data-table__cell--non-numeric{text-align:left}.mdl-dialog{border:none;box-shadow:0 9px 46px 8px rgba(0,0,0,.14),0 11px 15px -7px rgba(0,0,0,.12),0 24px 38px 3px rgba(0,0,0,.2);width:280px}.mdl-dialog__title{padding:24px 24px 0;margin:0;font-size:2.5rem}.mdl-dialog__actions{padding:8px 8px 8px 24px;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row-reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.mdl-dialog__actions>*{margin-right:8px;height:36px}.mdl-dialog__actions>*:first-child{margin-right:0}.mdl-dialog__actions--full-width{padding:0 0 8px}.mdl-dialog__actions--full-width>*{height:48px;-webkit-flex:0 0 100%;-ms-flex:0 0 100%;flex:0 0 100%;padding-right:16px;margin-right:0;text-align:right}.mdl-dialog__content{padding:20px 24px 24px;color:rgba(0,0,0,.54)}.mdl-mega-footer{padding:16px 40px;color:#9e9e9e;background-color:#424242}.mdl-mega-footer--top-section:after,.mdl-mega-footer--middle-section:after,.mdl-mega-footer--bottom-section:after,.mdl-mega-footer__top-section:after,.mdl-mega-footer__middle-section:after,.mdl-mega-footer__bottom-section:after{content:'';display:block;clear:both}.mdl-mega-footer--left-section,.mdl-mega-footer__left-section,.mdl-mega-footer--right-section,.mdl-mega-footer__right-section{margin-bottom:16px}.mdl-mega-footer--right-section a,.mdl-mega-footer__right-section a{display:block;margin-bottom:16px;color:inherit;text-decoration:none}@media screen and (min-width:760px){.mdl-mega-footer--left-section,.mdl-mega-footer__left-section{float:left}.mdl-mega-footer--right-section,.mdl-mega-footer__right-section{float:right}.mdl-mega-footer--right-section a,.mdl-mega-footer__right-section a{display:inline-block;margin-left:16px;line-height:36px;vertical-align:middle}}.mdl-mega-footer--social-btn,.mdl-mega-footer__social-btn{width:36px;height:36px;padding:0;margin:0;background-color:#9e9e9e;border:none}.mdl-mega-footer--drop-down-section,.mdl-mega-footer__drop-down-section{display:block;position:relative}@media screen and (min-width:760px){.mdl-mega-footer--drop-down-section,.mdl-mega-footer__drop-down-section{width:33%}.mdl-mega-footer--drop-down-section:nth-child(1),.mdl-mega-footer--drop-down-section:nth-child(2),.mdl-mega-footer__drop-down-section:nth-child(1),.mdl-mega-footer__drop-down-section:nth-child(2){float:left}.mdl-mega-footer--drop-down-section:nth-child(3),.mdl-mega-footer__drop-down-section:nth-child(3){float:right}.mdl-mega-footer--drop-down-section:nth-child(3):after,.mdl-mega-footer__drop-down-section:nth-child(3):after{clear:right}.mdl-mega-footer--drop-down-section:nth-child(4),.mdl-mega-footer__drop-down-section:nth-child(4){clear:right;float:right}.mdl-mega-footer--middle-section:after,.mdl-mega-footer__middle-section:after{content:'';display:block;clear:both}.mdl-mega-footer--bottom-section,.mdl-mega-footer__bottom-section{padding-top:0}}@media screen and (min-width:1024px){.mdl-mega-footer--drop-down-section,.mdl-mega-footer--drop-down-section:nth-child(3),.mdl-mega-footer--drop-down-section:nth-child(4),.mdl-mega-footer__drop-down-section,.mdl-mega-footer__drop-down-section:nth-child(3),.mdl-mega-footer__drop-down-section:nth-child(4){width:24%;float:left}}.mdl-mega-footer--heading-checkbox,.mdl-mega-footer__heading-checkbox{position:absolute;width:100%;height:55.8px;padding:32px;margin:-16px 0 0;cursor:pointer;z-index:1;opacity:0}.mdl-mega-footer--heading-checkbox+.mdl-mega-footer--heading:after,.mdl-mega-footer--heading-checkbox+.mdl-mega-footer__heading:after,.mdl-mega-footer__heading-checkbox+.mdl-mega-footer--heading:after,.mdl-mega-footer__heading-checkbox+.mdl-mega-footer__heading:after{font-family:'Material Icons';content:'\E5CE'}.mdl-mega-footer--heading-checkbox:checked~.mdl-mega-footer--link-list,.mdl-mega-footer--heading-checkbox:checked~.mdl-mega-footer__link-list,.mdl-mega-footer--heading-checkbox:checked+.mdl-mega-footer--heading+.mdl-mega-footer--link-list,.mdl-mega-footer--heading-checkbox:checked+.mdl-mega-footer__heading+.mdl-mega-footer__link-list,.mdl-mega-footer__heading-checkbox:checked~.mdl-mega-footer--link-list,.mdl-mega-footer__heading-checkbox:checked~.mdl-mega-footer__link-list,.mdl-mega-footer__heading-checkbox:checked+.mdl-mega-footer--heading+.mdl-mega-footer--link-list,.mdl-mega-footer__heading-checkbox:checked+.mdl-mega-footer__heading+.mdl-mega-footer__link-list{display:none}.mdl-mega-footer--heading-checkbox:checked+.mdl-mega-footer--heading:after,.mdl-mega-footer--heading-checkbox:checked+.mdl-mega-footer__heading:after,.mdl-mega-footer__heading-checkbox:checked+.mdl-mega-footer--heading:after,.mdl-mega-footer__heading-checkbox:checked+.mdl-mega-footer__heading:after{font-family:'Material Icons';content:'\E5CF'}.mdl-mega-footer--heading,.mdl-mega-footer__heading{position:relative;width:100%;padding-right:39.8px;margin-bottom:16px;box-sizing:border-box;font-size:14px;line-height:23.8px;font-weight:500;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;color:#e0e0e0}.mdl-mega-footer--heading:after,.mdl-mega-footer__heading:after{content:'';position:absolute;top:0;right:0;display:block;width:23.8px;height:23.8px;background-size:cover}.mdl-mega-footer--link-list,.mdl-mega-footer__link-list{list-style:none;padding:0;margin:0 0 32px}.mdl-mega-footer--link-list:after,.mdl-mega-footer__link-list:after{clear:both;display:block;content:''}.mdl-mega-footer--link-list li,.mdl-mega-footer__link-list li{font-size:14px;font-weight:400;letter-spacing:0;line-height:20px}.mdl-mega-footer--link-list a,.mdl-mega-footer__link-list a{color:inherit;text-decoration:none;white-space:nowrap}@media screen and (min-width:760px){.mdl-mega-footer--heading-checkbox,.mdl-mega-footer__heading-checkbox{display:none}.mdl-mega-footer--heading-checkbox+.mdl-mega-footer--heading:after,.mdl-mega-footer--heading-checkbox+.mdl-mega-footer__heading:after,.mdl-mega-footer__heading-checkbox+.mdl-mega-footer--heading:after,.mdl-mega-footer__heading-checkbox+.mdl-mega-footer__heading:after{content:''}.mdl-mega-footer--heading-checkbox:checked~.mdl-mega-footer--link-list,.mdl-mega-footer--heading-checkbox:checked~.mdl-mega-footer__link-list,.mdl-mega-footer--heading-checkbox:checked+.mdl-mega-footer__heading+.mdl-mega-footer__link-list,.mdl-mega-footer--heading-checkbox:checked+.mdl-mega-footer--heading+.mdl-mega-footer--link-list,.mdl-mega-footer__heading-checkbox:checked~.mdl-mega-footer--link-list,.mdl-mega-footer__heading-checkbox:checked~.mdl-mega-footer__link-list,.mdl-mega-footer__heading-checkbox:checked+.mdl-mega-footer__heading+.mdl-mega-footer__link-list,.mdl-mega-footer__heading-checkbox:checked+.mdl-mega-footer--heading+.mdl-mega-footer--link-list{display:block}.mdl-mega-footer--heading-checkbox:checked+.mdl-mega-footer--heading:after,.mdl-mega-footer--heading-checkbox:checked+.mdl-mega-footer__heading:after,.mdl-mega-footer__heading-checkbox:checked+.mdl-mega-footer--heading:after,.mdl-mega-footer__heading-checkbox:checked+.mdl-mega-footer__heading:after{content:''}}.mdl-mega-footer--bottom-section,.mdl-mega-footer__bottom-section{padding-top:16px;margin-bottom:16px}.mdl-logo{margin-bottom:16px;color:#fff}.mdl-mega-footer--bottom-section .mdl-mega-footer--link-list li,.mdl-mega-footer__bottom-section .mdl-mega-footer__link-list li{float:left;margin-bottom:0;margin-right:16px}@media screen and (min-width:760px){.mdl-logo{float:left;margin-bottom:0;margin-right:16px}}.mdl-mini-footer{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;padding:32px 16px;color:#9e9e9e;background-color:#424242}.mdl-mini-footer:after{content:'';display:block}.mdl-mini-footer .mdl-logo{line-height:36px}.mdl-mini-footer--link-list,.mdl-mini-footer__link-list{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-flow:row nowrap;-ms-flex-flow:row nowrap;flex-flow:row nowrap;list-style:none;margin:0;padding:0}.mdl-mini-footer--link-list li,.mdl-mini-footer__link-list li{margin-bottom:0;margin-right:16px}@media screen and (min-width:760px){.mdl-mini-footer--link-list li,.mdl-mini-footer__link-list li{line-height:36px}}.mdl-mini-footer--link-list a,.mdl-mini-footer__link-list a{color:inherit;text-decoration:none;white-space:nowrap}.mdl-mini-footer--left-section,.mdl-mini-footer__left-section{display:inline-block;-webkit-order:0;-ms-flex-order:0;order:0}.mdl-mini-footer--right-section,.mdl-mini-footer__right-section{display:inline-block;-webkit-order:1;-ms-flex-order:1;order:1}.mdl-mini-footer--social-btn,.mdl-mini-footer__social-btn{width:36px;height:36px;padding:0;margin:0;background-color:#9e9e9e;border:none}.mdl-icon-toggle{position:relative;z-index:1;vertical-align:middle;display:inline-block;height:32px;margin:0;padding:0}.mdl-icon-toggle__input{line-height:32px}.mdl-icon-toggle.is-upgraded .mdl-icon-toggle__input{position:absolute;width:0;height:0;margin:0;padding:0;opacity:0;-ms-appearance:none;-moz-appearance:none;-webkit-appearance:none;appearance:none;border:none}.mdl-icon-toggle__label{display:inline-block;position:relative;cursor:pointer;height:32px;width:32px;min-width:32px;color:#616161;border-radius:50%;padding:0;margin-left:0;margin-right:0;text-align:center;background-color:transparent;will-change:background-color;transition:background-color .2s cubic-bezier(.4,0,.2,1),color .2s cubic-bezier(.4,0,.2,1)}.mdl-icon-toggle__label.material-icons{line-height:32px;font-size:24px}.mdl-icon-toggle.is-checked .mdl-icon-toggle__label{color:rgb(158,158,158)}.mdl-icon-toggle.is-disabled .mdl-icon-toggle__label{color:rgba(0,0,0,.26);cursor:auto;transition:none}.mdl-icon-toggle.is-focused .mdl-icon-toggle__label{background-color:rgba(0,0,0,.12)}.mdl-icon-toggle.is-focused.is-checked .mdl-icon-toggle__label{background-color:rgba(158,158,158,.26)}.mdl-icon-toggle__ripple-container{position:absolute;z-index:2;top:-2px;left:-2px;box-sizing:border-box;width:36px;height:36px;border-radius:50%;cursor:pointer;overflow:hidden;-webkit-mask-image:-webkit-radial-gradient(circle,#fff,#000)}.mdl-icon-toggle__ripple-container .mdl-ripple{background:#616161}.mdl-icon-toggle.is-disabled .mdl-icon-toggle__ripple-container{cursor:auto}.mdl-icon-toggle.is-disabled .mdl-icon-toggle__ripple-container .mdl-ripple{background:0 0}.mdl-list{display:block;padding:8px 0;list-style:none}.mdl-list__item{font-family:"Roboto","Helvetica","Arial",sans-serif;font-size:16px;font-weight:400;letter-spacing:.04em;line-height:1;min-height:48px;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;padding:16px;cursor:default;color:rgba(0,0,0,.87);overflow:hidden}.mdl-list__item,.mdl-list__item .mdl-list__item-primary-content{box-sizing:border-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.mdl-list__item .mdl-list__item-primary-content{-webkit-order:0;-ms-flex-order:0;order:0;-webkit-flex-grow:2;-ms-flex-positive:2;flex-grow:2;text-decoration:none}.mdl-list__item .mdl-list__item-primary-content .mdl-list__item-icon{margin-right:32px}.mdl-list__item .mdl-list__item-primary-content .mdl-list__item-avatar{margin-right:16px}.mdl-list__item .mdl-list__item-secondary-content{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-flow:column;-ms-flex-flow:column;flex-flow:column;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end;margin-left:16px}.mdl-list__item .mdl-list__item-secondary-content .mdl-list__item-secondary-action label{display:inline}.mdl-list__item .mdl-list__item-secondary-content .mdl-list__item-secondary-info{font-size:12px;font-weight:400;line-height:1;letter-spacing:0;color:rgba(0,0,0,.54)}.mdl-list__item .mdl-list__item-secondary-content .mdl-list__item-sub-header{padding:0 0 0 16px}.mdl-list__item-icon,.mdl-list__item-icon.material-icons{height:24px;width:24px;font-size:24px;box-sizing:border-box;color:#757575}.mdl-list__item-avatar,.mdl-list__item-avatar.material-icons{height:40px;width:40px;box-sizing:border-box;border-radius:50%;background-color:#757575;font-size:40px;color:#fff}.mdl-list__item--two-line{height:72px}.mdl-list__item--two-line .mdl-list__item-primary-content{height:36px;line-height:20px;display:block}.mdl-list__item--two-line .mdl-list__item-primary-content .mdl-list__item-avatar{float:left}.mdl-list__item--two-line .mdl-list__item-primary-content .mdl-list__item-icon{float:left;margin-top:6px}.mdl-list__item--two-line .mdl-list__item-primary-content .mdl-list__item-secondary-content{height:36px}.mdl-list__item--two-line .mdl-list__item-primary-content .mdl-list__item-sub-title{font-size:14px;font-weight:400;letter-spacing:0;line-height:18px;color:rgba(0,0,0,.54);display:block;padding:0}.mdl-list__item--three-line{height:88px}.mdl-list__item--three-line .mdl-list__item-primary-content{height:52px;line-height:20px;display:block}.mdl-list__item--three-line .mdl-list__item-primary-content .mdl-list__item-avatar,.mdl-list__item--three-line .mdl-list__item-primary-content .mdl-list__item-icon{float:left}.mdl-list__item--three-line .mdl-list__item-secondary-content{height:52px}.mdl-list__item--three-line .mdl-list__item-text-body{font-size:14px;font-weight:400;letter-spacing:0;line-height:18px;height:52px;color:rgba(0,0,0,.54);display:block;padding:0}.mdl-menu__container{display:block;margin:0;padding:0;border:none;position:absolute;overflow:visible;height:0;width:0;visibility:hidden;z-index:-1}.mdl-menu__container.is-visible,.mdl-menu__container.is-animating{z-index:999;visibility:visible}.mdl-menu__outline{display:block;background:#fff;margin:0;padding:0;border:none;border-radius:2px;position:absolute;top:0;left:0;overflow:hidden;opacity:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:0 0;transform-origin:0 0;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12);will-change:transform;transition:transform .3s cubic-bezier(.4,0,.2,1),opacity .2s cubic-bezier(.4,0,.2,1);transition:transform .3s cubic-bezier(.4,0,.2,1),opacity .2s cubic-bezier(.4,0,.2,1),-webkit-transform .3s cubic-bezier(.4,0,.2,1);z-index:-1}.mdl-menu__container.is-visible .mdl-menu__outline{opacity:1;-webkit-transform:scale(1);transform:scale(1);z-index:999}.mdl-menu__outline.mdl-menu--bottom-right{-webkit-transform-origin:100% 0;transform-origin:100% 0}.mdl-menu__outline.mdl-menu--top-left{-webkit-transform-origin:0 100%;transform-origin:0 100%}.mdl-menu__outline.mdl-menu--top-right{-webkit-transform-origin:100% 100%;transform-origin:100% 100%}.mdl-menu{position:absolute;list-style:none;top:0;left:0;height:auto;width:auto;min-width:124px;padding:8px 0;margin:0;opacity:0;clip:rect(0 0 0 0);z-index:-1}.mdl-menu__container.is-visible .mdl-menu{opacity:1;z-index:999}.mdl-menu.is-animating{transition:opacity .2s cubic-bezier(.4,0,.2,1),clip .3s cubic-bezier(.4,0,.2,1)}.mdl-menu.mdl-menu--bottom-right{left:auto;right:0}.mdl-menu.mdl-menu--top-left{top:auto;bottom:0}.mdl-menu.mdl-menu--top-right{top:auto;left:auto;bottom:0;right:0}.mdl-menu.mdl-menu--unaligned{top:auto;left:auto}.mdl-menu__item{display:block;border:none;color:rgba(0,0,0,.87);background-color:transparent;text-align:left;margin:0;padding:0 16px;outline-color:#bdbdbd;position:relative;overflow:hidden;font-size:14px;font-weight:400;letter-spacing:0;text-decoration:none;cursor:pointer;height:48px;line-height:48px;white-space:nowrap;opacity:0;transition:opacity .2s cubic-bezier(.4,0,.2,1);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mdl-menu__container.is-visible .mdl-menu__item{opacity:1}.mdl-menu__item::-moz-focus-inner{border:0}.mdl-menu__item--full-bleed-divider{border-bottom:1px solid rgba(0,0,0,.12)}.mdl-menu__item[disabled],.mdl-menu__item[data-mdl-disabled]{color:#bdbdbd;background-color:transparent;cursor:auto}.mdl-menu__item[disabled]:hover,.mdl-menu__item[data-mdl-disabled]:hover{background-color:transparent}.mdl-menu__item[disabled]:focus,.mdl-menu__item[data-mdl-disabled]:focus{background-color:transparent}.mdl-menu__item[disabled] .mdl-ripple,.mdl-menu__item[data-mdl-disabled] .mdl-ripple{background:0 0}.mdl-menu__item:hover{background-color:#eee}.mdl-menu__item:focus{outline:none;background-color:#eee}.mdl-menu__item:active{background-color:#e0e0e0}.mdl-menu__item--ripple-container{display:block;height:100%;left:0;position:absolute;top:0;width:100%;z-index:0;overflow:hidden}.mdl-progress{display:block;position:relative;height:4px;width:500px;max-width:100%}.mdl-progress>.bar{display:block;position:absolute;top:0;bottom:0;width:0%;transition:width .2s cubic-bezier(.4,0,.2,1)}.mdl-progress>.progressbar{background-color:rgb(158,158,158);z-index:1;left:0}.mdl-progress>.bufferbar{background-image:linear-gradient(to right,rgba(66,66,66,.7),rgba(66,66,66,.7)),linear-gradient(to right,rgb(158,158,158),rgb(158,158,158));z-index:0;left:0}.mdl-progress>.auxbar{right:0}@supports (-webkit-appearance:none){.mdl-progress:not(.mdl-progress--indeterminate):not(.mdl-progress--indeterminate)>.auxbar,.mdl-progress:not(.mdl-progress__indeterminate):not(.mdl-progress__indeterminate)>.auxbar{background-image:linear-gradient(to right,rgba(66,66,66,.7),rgba(66,66,66,.7)),linear-gradient(to right,rgb(158,158,158),rgb(158,158,158));-webkit-mask:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+Cjxzdmcgd2lkdGg9IjEyIiBoZWlnaHQ9IjQiIHZpZXdQb3J0PSIwIDAgMTIgNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxlbGxpcHNlIGN4PSIyIiBjeT0iMiIgcng9IjIiIHJ5PSIyIj4KICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9ImN4IiBmcm9tPSIyIiB0bz0iLTEwIiBkdXI9IjAuNnMiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPgogIDwvZWxsaXBzZT4KICA8ZWxsaXBzZSBjeD0iMTQiIGN5PSIyIiByeD0iMiIgcnk9IjIiIGNsYXNzPSJsb2FkZXIiPgogICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0iY3giIGZyb209IjE0IiB0bz0iMiIgZHVyPSIwLjZzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgLz4KICA8L2VsbGlwc2U+Cjwvc3ZnPgo=");mask:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+Cjxzdmcgd2lkdGg9IjEyIiBoZWlnaHQ9IjQiIHZpZXdQb3J0PSIwIDAgMTIgNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxlbGxpcHNlIGN4PSIyIiBjeT0iMiIgcng9IjIiIHJ5PSIyIj4KICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9ImN4IiBmcm9tPSIyIiB0bz0iLTEwIiBkdXI9IjAuNnMiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPgogIDwvZWxsaXBzZT4KICA8ZWxsaXBzZSBjeD0iMTQiIGN5PSIyIiByeD0iMiIgcnk9IjIiIGNsYXNzPSJsb2FkZXIiPgogICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0iY3giIGZyb209IjE0IiB0bz0iMiIgZHVyPSIwLjZzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgLz4KICA8L2VsbGlwc2U+Cjwvc3ZnPgo=")}}.mdl-progress:not(.mdl-progress--indeterminate)>.auxbar,.mdl-progress:not(.mdl-progress__indeterminate)>.auxbar{background-image:linear-gradient(to right,rgba(66,66,66,.9),rgba(66,66,66,.9)),linear-gradient(to right,rgb(158,158,158),rgb(158,158,158))}.mdl-progress.mdl-progress--indeterminate>.bar1,.mdl-progress.mdl-progress__indeterminate>.bar1{-webkit-animation-name:indeterminate1;animation-name:indeterminate1}.mdl-progress.mdl-progress--indeterminate>.bar1,.mdl-progress.mdl-progress__indeterminate>.bar1,.mdl-progress.mdl-progress--indeterminate>.bar3,.mdl-progress.mdl-progress__indeterminate>.bar3{background-color:rgb(158,158,158);-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:linear;animation-timing-function:linear}.mdl-progress.mdl-progress--indeterminate>.bar3,.mdl-progress.mdl-progress__indeterminate>.bar3{background-image:none;-webkit-animation-name:indeterminate2;animation-name:indeterminate2}@-webkit-keyframes indeterminate1{0%{left:0%;width:0%}50%{left:25%;width:75%}75%{left:100%;width:0%}}@keyframes indeterminate1{0%{left:0%;width:0%}50%{left:25%;width:75%}75%{left:100%;width:0%}}@-webkit-keyframes indeterminate2{0%,50%{left:0%;width:0%}75%{left:0%;width:25%}100%{left:100%;width:0%}}@keyframes indeterminate2{0%,50%{left:0%;width:0%}75%{left:0%;width:25%}100%{left:100%;width:0%}}.mdl-navigation{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;box-sizing:border-box}.mdl-navigation__link{color:#424242;text-decoration:none;margin:0;font-size:14px;font-weight:400;line-height:24px;letter-spacing:0;opacity:.87}.mdl-navigation__link .material-icons{vertical-align:middle}.mdl-layout{width:100%;height:100%;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;overflow-y:auto;overflow-x:hidden;position:relative;-webkit-overflow-scrolling:touch}.mdl-layout.is-small-screen .mdl-layout--large-screen-only{display:none}.mdl-layout:not(.is-small-screen) .mdl-layout--small-screen-only{display:none}.mdl-layout__container{position:absolute;width:100%;height:100%}.mdl-layout__title,.mdl-layout-title{display:block;position:relative;font-family:"Roboto","Helvetica","Arial",sans-serif;font-size:20px;line-height:1;letter-spacing:.02em;font-weight:400;box-sizing:border-box}.mdl-layout-spacer{-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1}.mdl-layout__drawer{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;width:240px;height:100%;max-height:100%;position:absolute;top:0;left:0;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12);box-sizing:border-box;border-right:1px solid #e0e0e0;background:#fafafa;-webkit-transform:translateX(-250px);transform:translateX(-250px);-webkit-transform-style:preserve-3d;transform-style:preserve-3d;will-change:transform;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-property:transform;transition-property:transform,-webkit-transform;color:#424242;overflow:visible;overflow-y:auto;z-index:5}.mdl-layout__drawer.is-visible{-webkit-transform:translateX(0);transform:translateX(0)}.mdl-layout__drawer.is-visible~.mdl-layout__content.mdl-layout__content{overflow:hidden}.mdl-layout__drawer>*{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0}.mdl-layout__drawer>.mdl-layout__title,.mdl-layout__drawer>.mdl-layout-title{line-height:64px;padding-left:40px}@media screen and (max-width:1024px){.mdl-layout__drawer>.mdl-layout__title,.mdl-layout__drawer>.mdl-layout-title{line-height:56px;padding-left:16px}}.mdl-layout__drawer .mdl-navigation{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:stretch;-ms-flex-align:stretch;-ms-grid-row-align:stretch;align-items:stretch;padding-top:16px}.mdl-layout__drawer .mdl-navigation .mdl-navigation__link{display:block;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;padding:16px 40px;margin:0;color:#757575}@media screen and (max-width:1024px){.mdl-layout__drawer .mdl-navigation .mdl-navigation__link{padding:16px}}.mdl-layout__drawer .mdl-navigation .mdl-navigation__link:hover{background-color:#e0e0e0}.mdl-layout__drawer .mdl-navigation .mdl-navigation__link--current{background-color:#e0e0e0;color:#000}@media screen and (min-width:1025px){.mdl-layout--fixed-drawer>.mdl-layout__drawer{-webkit-transform:translateX(0);transform:translateX(0)}}.mdl-layout__drawer-button{display:block;position:absolute;height:48px;width:48px;border:0;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;overflow:hidden;text-align:center;cursor:pointer;font-size:26px;line-height:56px;font-family:Helvetica,Arial,sans-serif;margin:10px 12px;top:0;left:0;color:rgb(66,66,66);z-index:4}.mdl-layout__header .mdl-layout__drawer-button{position:absolute;color:rgb(66,66,66);background-color:inherit}@media screen and (max-width:1024px){.mdl-layout__header .mdl-layout__drawer-button{margin:4px}}@media screen and (max-width:1024px){.mdl-layout__drawer-button{margin:4px;color:rgba(0,0,0,.5)}}@media screen and (min-width:1025px){.mdl-layout__drawer-button{line-height:64px}.mdl-layout--no-desktop-drawer-button .mdl-layout__drawer-button,.mdl-layout--fixed-drawer>.mdl-layout__drawer-button,.mdl-layout--no-drawer-button .mdl-layout__drawer-button{display:none}}.mdl-layout__header{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;box-sizing:border-box;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;width:100%;margin:0;padding:0;border:none;min-height:64px;max-height:1000px;z-index:3;background-color:rgb(158,158,158);color:rgb(66,66,66);box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12);transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-property:max-height,box-shadow}@media screen and (max-width:1024px){.mdl-layout__header{min-height:56px}}.mdl-layout--fixed-drawer.is-upgraded:not(.is-small-screen)>.mdl-layout__header{margin-left:240px;width:calc(100% - 240px)}@media screen and (min-width:1025px){.mdl-layout--fixed-drawer>.mdl-layout__header .mdl-layout__header-row{padding-left:40px}}.mdl-layout__header>.mdl-layout-icon{position:absolute;left:40px;top:16px;height:32px;width:32px;overflow:hidden;z-index:3;display:block}@media screen and (max-width:1024px){.mdl-layout__header>.mdl-layout-icon{left:16px;top:12px}}.mdl-layout.has-drawer .mdl-layout__header>.mdl-layout-icon{display:none}.mdl-layout__header.is-compact{max-height:64px}@media screen and (max-width:1024px){.mdl-layout__header.is-compact{max-height:56px}}.mdl-layout__header.is-compact.has-tabs{height:112px}@media screen and (max-width:1024px){.mdl-layout__header.is-compact.has-tabs{min-height:104px}}@media screen and (max-width:1024px){.mdl-layout__header{display:none}.mdl-layout--fixed-header>.mdl-layout__header{display:-webkit-flex;display:-ms-flexbox;display:flex}}.mdl-layout__header--transparent.mdl-layout__header--transparent{background-color:transparent;box-shadow:none}.mdl-layout__header--seamed,.mdl-layout__header--scroll{box-shadow:none}.mdl-layout__header--waterfall{box-shadow:none;overflow:hidden}.mdl-layout__header--waterfall.is-casting-shadow{box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)}.mdl-layout__header--waterfall.mdl-layout__header--waterfall-hide-top{-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}.mdl-layout__header-row{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;box-sizing:border-box;-webkit-align-self:stretch;-ms-flex-item-align:stretch;align-self:stretch;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:64px;margin:0;padding:0 40px 0 80px}.mdl-layout--no-drawer-button .mdl-layout__header-row{padding-left:40px}@media screen and (min-width:1025px){.mdl-layout--no-desktop-drawer-button .mdl-layout__header-row{padding-left:40px}}@media screen and (max-width:1024px){.mdl-layout__header-row{height:56px;padding:0 16px 0 72px}.mdl-layout--no-drawer-button .mdl-layout__header-row{padding-left:16px}}.mdl-layout__header-row>*{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0}.mdl-layout__header--scroll .mdl-layout__header-row{width:100%}.mdl-layout__header-row .mdl-navigation{margin:0;padding:0;height:64px;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-align-items:center;-ms-flex-align:center;-ms-grid-row-align:center;align-items:center}@media screen and (max-width:1024px){.mdl-layout__header-row .mdl-navigation{height:56px}}.mdl-layout__header-row .mdl-navigation__link{display:block;color:rgb(66,66,66);line-height:64px;padding:0 24px}@media screen and (max-width:1024px){.mdl-layout__header-row .mdl-navigation__link{line-height:56px;padding:0 16px}}.mdl-layout__obfuscator{background-color:transparent;position:absolute;top:0;left:0;height:100%;width:100%;z-index:4;visibility:hidden;transition-property:background-color;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.mdl-layout__obfuscator.is-visible{background-color:rgba(0,0,0,.5);visibility:visible}@supports (pointer-events:auto){.mdl-layout__obfuscator{background-color:rgba(0,0,0,.5);opacity:0;transition-property:opacity;visibility:visible;pointer-events:none}.mdl-layout__obfuscator.is-visible{pointer-events:auto;opacity:1}}.mdl-layout__content{-ms-flex:0 1 auto;position:relative;display:inline-block;overflow-y:auto;overflow-x:hidden;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;z-index:1;-webkit-overflow-scrolling:touch}.mdl-layout--fixed-drawer>.mdl-layout__content{margin-left:240px}.mdl-layout__container.has-scrolling-header .mdl-layout__content{overflow:visible}@media screen and (max-width:1024px){.mdl-layout--fixed-drawer>.mdl-layout__content{margin-left:0}.mdl-layout__container.has-scrolling-header .mdl-layout__content{overflow-y:auto;overflow-x:hidden}}.mdl-layout__tab-bar{height:96px;margin:0;width:calc(100% - 112px);padding:0 0 0 56px;display:-webkit-flex;display:-ms-flexbox;display:flex;background-color:rgb(158,158,158);overflow-y:hidden;overflow-x:scroll}.mdl-layout__tab-bar::-webkit-scrollbar{display:none}.mdl-layout--no-drawer-button .mdl-layout__tab-bar{padding-left:16px;width:calc(100% - 32px)}@media screen and (min-width:1025px){.mdl-layout--no-desktop-drawer-button .mdl-layout__tab-bar{padding-left:16px;width:calc(100% - 32px)}}@media screen and (max-width:1024px){.mdl-layout__tab-bar{width:calc(100% - 60px);padding:0 0 0 60px}.mdl-layout--no-drawer-button .mdl-layout__tab-bar{width:calc(100% - 8px);padding-left:4px}}.mdl-layout--fixed-tabs .mdl-layout__tab-bar{padding:0;overflow:hidden;width:100%}.mdl-layout__tab-bar-container{position:relative;height:48px;width:100%;border:none;margin:0;z-index:2;-webkit-flex-grow:0;-ms-flex-positive:0;flex-grow:0;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;overflow:hidden}.mdl-layout__container>.mdl-layout__tab-bar-container{position:absolute;top:0;left:0}.mdl-layout__tab-bar-button{display:inline-block;position:absolute;top:0;height:48px;width:56px;z-index:4;text-align:center;background-color:rgb(158,158,158);color:transparent;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mdl-layout--no-desktop-drawer-button .mdl-layout__tab-bar-button,.mdl-layout--no-drawer-button .mdl-layout__tab-bar-button{width:16px}.mdl-layout--no-desktop-drawer-button .mdl-layout__tab-bar-button .material-icons,.mdl-layout--no-drawer-button .mdl-layout__tab-bar-button .material-icons{position:relative;left:-4px}@media screen and (max-width:1024px){.mdl-layout__tab-bar-button{width:60px}}.mdl-layout--fixed-tabs .mdl-layout__tab-bar-button{display:none}.mdl-layout__tab-bar-button .material-icons{line-height:48px}.mdl-layout__tab-bar-button.is-active{color:rgb(66,66,66)}.mdl-layout__tab-bar-left-button{left:0}.mdl-layout__tab-bar-right-button{right:0}.mdl-layout__tab{margin:0;border:none;padding:0 24px;float:left;position:relative;display:block;-webkit-flex-grow:0;-ms-flex-positive:0;flex-grow:0;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;text-decoration:none;height:48px;line-height:48px;text-align:center;font-weight:500;font-size:14px;text-transform:uppercase;color:rgba(66,66,66,.6);overflow:hidden}@media screen and (max-width:1024px){.mdl-layout__tab{padding:0 12px}}.mdl-layout--fixed-tabs .mdl-layout__tab{float:none;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;padding:0}.mdl-layout.is-upgraded .mdl-layout__tab.is-active{color:rgb(66,66,66)}.mdl-layout.is-upgraded .mdl-layout__tab.is-active::after{height:2px;width:100%;display:block;content:" ";bottom:0;left:0;position:absolute;background:rgb(24,255,255);-webkit-animation:border-expand .2s cubic-bezier(.4,0,.4,1).01s alternate forwards;animation:border-expand .2s cubic-bezier(.4,0,.4,1).01s alternate forwards;transition:all 1s cubic-bezier(.4,0,1,1)}.mdl-layout__tab .mdl-layout__tab-ripple-container{display:block;position:absolute;height:100%;width:100%;left:0;top:0;z-index:1;overflow:hidden}.mdl-layout__tab .mdl-layout__tab-ripple-container .mdl-ripple{background-color:rgb(66,66,66)}.mdl-layout__tab-panel{display:block}.mdl-layout.is-upgraded .mdl-layout__tab-panel{display:none}.mdl-layout.is-upgraded .mdl-layout__tab-panel.is-active{display:block}.mdl-radio{position:relative;font-size:16px;line-height:24px;display:inline-block;box-sizing:border-box;margin:0;padding-left:0}.mdl-radio.is-upgraded{padding-left:24px}.mdl-radio__button{line-height:24px}.mdl-radio.is-upgraded .mdl-radio__button{position:absolute;width:0;height:0;margin:0;padding:0;opacity:0;-ms-appearance:none;-moz-appearance:none;-webkit-appearance:none;appearance:none;border:none}.mdl-radio__outer-circle{position:absolute;top:4px;left:0;display:inline-block;box-sizing:border-box;width:16px;height:16px;margin:0;cursor:pointer;border:2px solid rgba(0,0,0,.54);border-radius:50%;z-index:2}.mdl-radio.is-checked .mdl-radio__outer-circle{border:2px solid rgb(158,158,158)}.mdl-radio__outer-circle fieldset[disabled] .mdl-radio,.mdl-radio.is-disabled .mdl-radio__outer-circle{border:2px solid rgba(0,0,0,.26);cursor:auto}.mdl-radio__inner-circle{position:absolute;z-index:1;margin:0;top:8px;left:4px;box-sizing:border-box;width:8px;height:8px;cursor:pointer;transition-duration:.28s;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-property:transform;transition-property:transform,-webkit-transform;-webkit-transform:scale3d(0,0,0);transform:scale3d(0,0,0);border-radius:50%;background:rgb(158,158,158)}.mdl-radio.is-checked .mdl-radio__inner-circle{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}fieldset[disabled] .mdl-radio .mdl-radio__inner-circle,.mdl-radio.is-disabled .mdl-radio__inner-circle{background:rgba(0,0,0,.26);cursor:auto}.mdl-radio.is-focused .mdl-radio__inner-circle{box-shadow:0 0 0 10px rgba(0,0,0,.1)}.mdl-radio__label{cursor:pointer}fieldset[disabled] .mdl-radio .mdl-radio__label,.mdl-radio.is-disabled .mdl-radio__label{color:rgba(0,0,0,.26);cursor:auto}.mdl-radio__ripple-container{position:absolute;z-index:2;top:-9px;left:-13px;box-sizing:border-box;width:42px;height:42px;border-radius:50%;cursor:pointer;overflow:hidden;-webkit-mask-image:-webkit-radial-gradient(circle,#fff,#000)}.mdl-radio__ripple-container .mdl-ripple{background:rgb(158,158,158)}fieldset[disabled] .mdl-radio .mdl-radio__ripple-container,.mdl-radio.is-disabled .mdl-radio__ripple-container{cursor:auto}fieldset[disabled] .mdl-radio .mdl-radio__ripple-container .mdl-ripple,.mdl-radio.is-disabled .mdl-radio__ripple-container .mdl-ripple{background:0 0}_:-ms-input-placeholder,:root .mdl-slider.mdl-slider.is-upgraded{-ms-appearance:none;height:32px;margin:0}.mdl-slider{width:calc(100% - 40px);margin:0 20px}.mdl-slider.is-upgraded{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:2px;background:0 0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;outline:0;padding:0;color:rgb(158,158,158);-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;z-index:1;cursor:pointer}.mdl-slider.is-upgraded::-moz-focus-outer{border:0}.mdl-slider.is-upgraded::-ms-tooltip{display:none}.mdl-slider.is-upgraded::-webkit-slider-runnable-track{background:0 0}.mdl-slider.is-upgraded::-moz-range-track{background:0 0;border:none}.mdl-slider.is-upgraded::-ms-track{background:0 0;color:transparent;height:2px;width:100%;border:none}.mdl-slider.is-upgraded::-ms-fill-lower{padding:0;background:linear-gradient(to right,transparent,transparent 16px,rgb(158,158,158)16px,rgb(158,158,158)0)}.mdl-slider.is-upgraded::-ms-fill-upper{padding:0;background:linear-gradient(to left,transparent,transparent 16px,rgba(0,0,0,.26)16px,rgba(0,0,0,.26)0)}.mdl-slider.is-upgraded::-webkit-slider-thumb{-webkit-appearance:none;width:12px;height:12px;box-sizing:border-box;border-radius:50%;background:rgb(158,158,158);border:none;transition:transform .18s cubic-bezier(.4,0,.2,1),border .18s cubic-bezier(.4,0,.2,1),box-shadow .18s cubic-bezier(.4,0,.2,1),background .28s cubic-bezier(.4,0,.2,1);transition:transform .18s cubic-bezier(.4,0,.2,1),border .18s cubic-bezier(.4,0,.2,1),box-shadow .18s cubic-bezier(.4,0,.2,1),background .28s cubic-bezier(.4,0,.2,1),-webkit-transform .18s cubic-bezier(.4,0,.2,1)}.mdl-slider.is-upgraded::-moz-range-thumb{-moz-appearance:none;width:12px;height:12px;box-sizing:border-box;border-radius:50%;background-image:none;background:rgb(158,158,158);border:none}.mdl-slider.is-upgraded:focus:not(:active)::-webkit-slider-thumb{box-shadow:0 0 0 10px rgba(158,158,158,.26)}.mdl-slider.is-upgraded:focus:not(:active)::-moz-range-thumb{box-shadow:0 0 0 10px rgba(158,158,158,.26)}.mdl-slider.is-upgraded:active::-webkit-slider-thumb{background-image:none;background:rgb(158,158,158);-webkit-transform:scale(1.5);transform:scale(1.5)}.mdl-slider.is-upgraded:active::-moz-range-thumb{background-image:none;background:rgb(158,158,158);transform:scale(1.5)}.mdl-slider.is-upgraded::-ms-thumb{width:32px;height:32px;border:none;border-radius:50%;background:rgb(158,158,158);transform:scale(.375);transition:transform .18s cubic-bezier(.4,0,.2,1),background .28s cubic-bezier(.4,0,.2,1);transition:transform .18s cubic-bezier(.4,0,.2,1),background .28s cubic-bezier(.4,0,.2,1),-webkit-transform .18s cubic-bezier(.4,0,.2,1)}.mdl-slider.is-upgraded:focus:not(:active)::-ms-thumb{background:radial-gradient(circle closest-side,rgb(158,158,158)0%,rgb(158,158,158)37.5%,rgba(158,158,158,.26)37.5%,rgba(158,158,158,.26)100%);transform:scale(1)}.mdl-slider.is-upgraded:active::-ms-thumb{background:rgb(158,158,158);transform:scale(.5625)}.mdl-slider.is-upgraded.is-lowest-value::-webkit-slider-thumb{border:2px solid rgba(0,0,0,.26);background:0 0}.mdl-slider.is-upgraded.is-lowest-value::-moz-range-thumb{border:2px solid rgba(0,0,0,.26);background:0 0}.mdl-slider.is-upgraded.is-lowest-value+.mdl-slider__background-flex>.mdl-slider__background-upper{left:6px}.mdl-slider.is-upgraded.is-lowest-value:focus:not(:active)::-webkit-slider-thumb{box-shadow:0 0 0 10px rgba(0,0,0,.12);background:rgba(0,0,0,.12)}.mdl-slider.is-upgraded.is-lowest-value:focus:not(:active)::-moz-range-thumb{box-shadow:0 0 0 10px rgba(0,0,0,.12);background:rgba(0,0,0,.12)}.mdl-slider.is-upgraded.is-lowest-value:active::-webkit-slider-thumb{border:1.6px solid rgba(0,0,0,.26);-webkit-transform:scale(1.5);transform:scale(1.5)}.mdl-slider.is-upgraded.is-lowest-value:active+.mdl-slider__background-flex>.mdl-slider__background-upper{left:9px}.mdl-slider.is-upgraded.is-lowest-value:active::-moz-range-thumb{border:1.5px solid rgba(0,0,0,.26);transform:scale(1.5)}.mdl-slider.is-upgraded.is-lowest-value::-ms-thumb{background:radial-gradient(circle closest-side,transparent 0%,transparent 66.67%,rgba(0,0,0,.26)66.67%,rgba(0,0,0,.26)100%)}.mdl-slider.is-upgraded.is-lowest-value:focus:not(:active)::-ms-thumb{background:radial-gradient(circle closest-side,rgba(0,0,0,.12)0%,rgba(0,0,0,.12)25%,rgba(0,0,0,.26)25%,rgba(0,0,0,.26)37.5%,rgba(0,0,0,.12)37.5%,rgba(0,0,0,.12)100%);transform:scale(1)}.mdl-slider.is-upgraded.is-lowest-value:active::-ms-thumb{transform:scale(.5625);background:radial-gradient(circle closest-side,transparent 0%,transparent 77.78%,rgba(0,0,0,.26)77.78%,rgba(0,0,0,.26)100%)}.mdl-slider.is-upgraded.is-lowest-value::-ms-fill-lower{background:0 0}.mdl-slider.is-upgraded.is-lowest-value::-ms-fill-upper{margin-left:6px}.mdl-slider.is-upgraded.is-lowest-value:active::-ms-fill-upper{margin-left:9px}.mdl-slider.is-upgraded:disabled:focus::-webkit-slider-thumb,.mdl-slider.is-upgraded:disabled:active::-webkit-slider-thumb,.mdl-slider.is-upgraded:disabled::-webkit-slider-thumb{-webkit-transform:scale(.667);transform:scale(.667);background:rgba(0,0,0,.26)}.mdl-slider.is-upgraded:disabled:focus::-moz-range-thumb,.mdl-slider.is-upgraded:disabled:active::-moz-range-thumb,.mdl-slider.is-upgraded:disabled::-moz-range-thumb{transform:scale(.667);background:rgba(0,0,0,.26)}.mdl-slider.is-upgraded:disabled+.mdl-slider__background-flex>.mdl-slider__background-lower{background-color:rgba(0,0,0,.26);left:-6px}.mdl-slider.is-upgraded:disabled+.mdl-slider__background-flex>.mdl-slider__background-upper{left:6px}.mdl-slider.is-upgraded.is-lowest-value:disabled:focus::-webkit-slider-thumb,.mdl-slider.is-upgraded.is-lowest-value:disabled:active::-webkit-slider-thumb,.mdl-slider.is-upgraded.is-lowest-value:disabled::-webkit-slider-thumb{border:3px solid rgba(0,0,0,.26);background:0 0;-webkit-transform:scale(.667);transform:scale(.667)}.mdl-slider.is-upgraded.is-lowest-value:disabled:focus::-moz-range-thumb,.mdl-slider.is-upgraded.is-lowest-value:disabled:active::-moz-range-thumb,.mdl-slider.is-upgraded.is-lowest-value:disabled::-moz-range-thumb{border:3px solid rgba(0,0,0,.26);background:0 0;transform:scale(.667)}.mdl-slider.is-upgraded.is-lowest-value:disabled:active+.mdl-slider__background-flex>.mdl-slider__background-upper{left:6px}.mdl-slider.is-upgraded:disabled:focus::-ms-thumb,.mdl-slider.is-upgraded:disabled:active::-ms-thumb,.mdl-slider.is-upgraded:disabled::-ms-thumb{transform:scale(.25);background:rgba(0,0,0,.26)}.mdl-slider.is-upgraded.is-lowest-value:disabled:focus::-ms-thumb,.mdl-slider.is-upgraded.is-lowest-value:disabled:active::-ms-thumb,.mdl-slider.is-upgraded.is-lowest-value:disabled::-ms-thumb{transform:scale(.25);background:radial-gradient(circle closest-side,transparent 0%,transparent 50%,rgba(0,0,0,.26)50%,rgba(0,0,0,.26)100%)}.mdl-slider.is-upgraded:disabled::-ms-fill-lower{margin-right:6px;background:linear-gradient(to right,transparent,transparent 25px,rgba(0,0,0,.26)25px,rgba(0,0,0,.26)0)}.mdl-slider.is-upgraded:disabled::-ms-fill-upper{margin-left:6px}.mdl-slider.is-upgraded.is-lowest-value:disabled:active::-ms-fill-upper{margin-left:6px}.mdl-slider__ie-container{height:18px;overflow:visible;border:none;margin:none;padding:none}.mdl-slider__container{height:18px;position:relative;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.mdl-slider__container,.mdl-slider__background-flex{background:0 0;display:-webkit-flex;display:-ms-flexbox;display:flex}.mdl-slider__background-flex{position:absolute;height:2px;width:calc(100% - 52px);top:50%;left:0;margin:0 26px;overflow:hidden;border:0;padding:0;-webkit-transform:translate(0,-1px);transform:translate(0,-1px)}.mdl-slider__background-lower{background:rgb(158,158,158)}.mdl-slider__background-lower,.mdl-slider__background-upper{-webkit-flex:0;-ms-flex:0;flex:0;position:relative;border:0;padding:0}.mdl-slider__background-upper{background:rgba(0,0,0,.26);transition:left .18s cubic-bezier(.4,0,.2,1)}.mdl-snackbar{position:fixed;bottom:0;left:50%;cursor:default;background-color:#323232;z-index:3;display:block;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;font-family:"Roboto","Helvetica","Arial",sans-serif;will-change:transform;-webkit-transform:translate(0,80px);transform:translate(0,80px);transition:transform .25s cubic-bezier(.4,0,1,1);transition:transform .25s cubic-bezier(.4,0,1,1),-webkit-transform .25s cubic-bezier(.4,0,1,1);pointer-events:none}@media (max-width:479px){.mdl-snackbar{width:100%;left:0;min-height:48px;max-height:80px}}@media (min-width:480px){.mdl-snackbar{min-width:288px;max-width:568px;border-radius:2px;-webkit-transform:translate(-50%,80px);transform:translate(-50%,80px)}}.mdl-snackbar--active{-webkit-transform:translate(0,0);transform:translate(0,0);pointer-events:auto;transition:transform .25s cubic-bezier(0,0,.2,1);transition:transform .25s cubic-bezier(0,0,.2,1),-webkit-transform .25s cubic-bezier(0,0,.2,1)}@media (min-width:480px){.mdl-snackbar--active{-webkit-transform:translate(-50%,0);transform:translate(-50%,0)}}.mdl-snackbar__text{padding:14px 12px 14px 24px;vertical-align:middle;color:#fff;float:left}.mdl-snackbar__action{background:0 0;border:none;color:rgb(24,255,255);float:right;padding:14px 24px 14px 12px;font-family:"Roboto","Helvetica","Arial",sans-serif;font-size:14px;font-weight:500;text-transform:uppercase;line-height:1;letter-spacing:0;overflow:hidden;outline:none;opacity:0;pointer-events:none;cursor:pointer;text-decoration:none;text-align:center;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.mdl-snackbar__action::-moz-focus-inner{border:0}.mdl-snackbar__action:not([aria-hidden]){opacity:1;pointer-events:auto}.mdl-spinner{display:inline-block;position:relative;width:28px;height:28px}.mdl-spinner:not(.is-upgraded).is-active:after{content:"Loading..."}.mdl-spinner.is-upgraded.is-active{-webkit-animation:mdl-spinner__container-rotate 1568.23529412ms linear infinite;animation:mdl-spinner__container-rotate 1568.23529412ms linear infinite}@-webkit-keyframes mdl-spinner__container-rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes mdl-spinner__container-rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.mdl-spinner__layer{position:absolute;width:100%;height:100%;opacity:0}.mdl-spinner__layer-1{border-color:#42a5f5}.mdl-spinner--single-color .mdl-spinner__layer-1{border-color:rgb(158,158,158)}.mdl-spinner.is-active .mdl-spinner__layer-1{-webkit-animation:mdl-spinner__fill-unfill-rotate 5332ms cubic-bezier(.4,0,.2,1)infinite both,mdl-spinner__layer-1-fade-in-out 5332ms cubic-bezier(.4,0,.2,1)infinite both;animation:mdl-spinner__fill-unfill-rotate 5332ms cubic-bezier(.4,0,.2,1)infinite both,mdl-spinner__layer-1-fade-in-out 5332ms cubic-bezier(.4,0,.2,1)infinite both}.mdl-spinner__layer-2{border-color:#f44336}.mdl-spinner--single-color .mdl-spinner__layer-2{border-color:rgb(158,158,158)}.mdl-spinner.is-active .mdl-spinner__layer-2{-webkit-animation:mdl-spinner__fill-unfill-rotate 5332ms cubic-bezier(.4,0,.2,1)infinite both,mdl-spinner__layer-2-fade-in-out 5332ms cubic-bezier(.4,0,.2,1)infinite both;animation:mdl-spinner__fill-unfill-rotate 5332ms cubic-bezier(.4,0,.2,1)infinite both,mdl-spinner__layer-2-fade-in-out 5332ms cubic-bezier(.4,0,.2,1)infinite both}.mdl-spinner__layer-3{border-color:#fdd835}.mdl-spinner--single-color .mdl-spinner__layer-3{border-color:rgb(158,158,158)}.mdl-spinner.is-active .mdl-spinner__layer-3{-webkit-animation:mdl-spinner__fill-unfill-rotate 5332ms cubic-bezier(.4,0,.2,1)infinite both,mdl-spinner__layer-3-fade-in-out 5332ms cubic-bezier(.4,0,.2,1)infinite both;animation:mdl-spinner__fill-unfill-rotate 5332ms cubic-bezier(.4,0,.2,1)infinite both,mdl-spinner__layer-3-fade-in-out 5332ms cubic-bezier(.4,0,.2,1)infinite both}.mdl-spinner__layer-4{border-color:#4caf50}.mdl-spinner--single-color .mdl-spinner__layer-4{border-color:rgb(158,158,158)}.mdl-spinner.is-active .mdl-spinner__layer-4{-webkit-animation:mdl-spinner__fill-unfill-rotate 5332ms cubic-bezier(.4,0,.2,1)infinite both,mdl-spinner__layer-4-fade-in-out 5332ms cubic-bezier(.4,0,.2,1)infinite both;animation:mdl-spinner__fill-unfill-rotate 5332ms cubic-bezier(.4,0,.2,1)infinite both,mdl-spinner__layer-4-fade-in-out 5332ms cubic-bezier(.4,0,.2,1)infinite both}@-webkit-keyframes mdl-spinner__fill-unfill-rotate{12.5%{-webkit-transform:rotate(135deg);transform:rotate(135deg)}25%{-webkit-transform:rotate(270deg);transform:rotate(270deg)}37.5%{-webkit-transform:rotate(405deg);transform:rotate(405deg)}50%{-webkit-transform:rotate(540deg);transform:rotate(540deg)}62.5%{-webkit-transform:rotate(675deg);transform:rotate(675deg)}75%{-webkit-transform:rotate(810deg);transform:rotate(810deg)}87.5%{-webkit-transform:rotate(945deg);transform:rotate(945deg)}to{-webkit-transform:rotate(1080deg);transform:rotate(1080deg)}}@keyframes mdl-spinner__fill-unfill-rotate{12.5%{-webkit-transform:rotate(135deg);transform:rotate(135deg)}25%{-webkit-transform:rotate(270deg);transform:rotate(270deg)}37.5%{-webkit-transform:rotate(405deg);transform:rotate(405deg)}50%{-webkit-transform:rotate(540deg);transform:rotate(540deg)}62.5%{-webkit-transform:rotate(675deg);transform:rotate(675deg)}75%{-webkit-transform:rotate(810deg);transform:rotate(810deg)}87.5%{-webkit-transform:rotate(945deg);transform:rotate(945deg)}to{-webkit-transform:rotate(1080deg);transform:rotate(1080deg)}}@-webkit-keyframes mdl-spinner__layer-1-fade-in-out{from,25%{opacity:.99}26%,89%{opacity:0}90%,100%{opacity:.99}}@keyframes mdl-spinner__layer-1-fade-in-out{from,25%{opacity:.99}26%,89%{opacity:0}90%,100%{opacity:.99}}@-webkit-keyframes mdl-spinner__layer-2-fade-in-out{from,15%{opacity:0}25%,50%{opacity:.99}51%{opacity:0}}@keyframes mdl-spinner__layer-2-fade-in-out{from,15%{opacity:0}25%,50%{opacity:.99}51%{opacity:0}}@-webkit-keyframes mdl-spinner__layer-3-fade-in-out{from,40%{opacity:0}50%,75%{opacity:.99}76%{opacity:0}}@keyframes mdl-spinner__layer-3-fade-in-out{from,40%{opacity:0}50%,75%{opacity:.99}76%{opacity:0}}@-webkit-keyframes mdl-spinner__layer-4-fade-in-out{from,65%{opacity:0}75%,90%{opacity:.99}100%{opacity:0}}@keyframes mdl-spinner__layer-4-fade-in-out{from,65%{opacity:0}75%,90%{opacity:.99}100%{opacity:0}}.mdl-spinner__gap-patch{position:absolute;box-sizing:border-box;top:0;left:45%;width:10%;height:100%;overflow:hidden;border-color:inherit}.mdl-spinner__gap-patch .mdl-spinner__circle{width:1000%;left:-450%}.mdl-spinner__circle-clipper{display:inline-block;position:relative;width:50%;height:100%;overflow:hidden;border-color:inherit}.mdl-spinner__circle-clipper .mdl-spinner__circle{width:200%}.mdl-spinner__circle{box-sizing:border-box;height:100%;border-width:3px;border-style:solid;border-color:inherit;border-bottom-color:transparent!important;border-radius:50%;-webkit-animation:none;animation:none;position:absolute;top:0;right:0;bottom:0;left:0}.mdl-spinner__left .mdl-spinner__circle{border-right-color:transparent!important;-webkit-transform:rotate(129deg);transform:rotate(129deg)}.mdl-spinner.is-active .mdl-spinner__left .mdl-spinner__circle{-webkit-animation:mdl-spinner__left-spin 1333ms cubic-bezier(.4,0,.2,1)infinite both;animation:mdl-spinner__left-spin 1333ms cubic-bezier(.4,0,.2,1)infinite both}.mdl-spinner__right .mdl-spinner__circle{left:-100%;border-left-color:transparent!important;-webkit-transform:rotate(-129deg);transform:rotate(-129deg)}.mdl-spinner.is-active .mdl-spinner__right .mdl-spinner__circle{-webkit-animation:mdl-spinner__right-spin 1333ms cubic-bezier(.4,0,.2,1)infinite both;animation:mdl-spinner__right-spin 1333ms cubic-bezier(.4,0,.2,1)infinite both}@-webkit-keyframes mdl-spinner__left-spin{from{-webkit-transform:rotate(130deg);transform:rotate(130deg)}50%{-webkit-transform:rotate(-5deg);transform:rotate(-5deg)}to{-webkit-transform:rotate(130deg);transform:rotate(130deg)}}@keyframes mdl-spinner__left-spin{from{-webkit-transform:rotate(130deg);transform:rotate(130deg)}50%{-webkit-transform:rotate(-5deg);transform:rotate(-5deg)}to{-webkit-transform:rotate(130deg);transform:rotate(130deg)}}@-webkit-keyframes mdl-spinner__right-spin{from{-webkit-transform:rotate(-130deg);transform:rotate(-130deg)}50%{-webkit-transform:rotate(5deg);transform:rotate(5deg)}to{-webkit-transform:rotate(-130deg);transform:rotate(-130deg)}}@keyframes mdl-spinner__right-spin{from{-webkit-transform:rotate(-130deg);transform:rotate(-130deg)}50%{-webkit-transform:rotate(5deg);transform:rotate(5deg)}to{-webkit-transform:rotate(-130deg);transform:rotate(-130deg)}}.mdl-switch{position:relative;z-index:1;vertical-align:middle;display:inline-block;box-sizing:border-box;width:100%;height:24px;margin:0;padding:0;overflow:visible;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mdl-switch.is-upgraded{padding-left:28px}.mdl-switch__input{line-height:24px}.mdl-switch.is-upgraded .mdl-switch__input{position:absolute;width:0;height:0;margin:0;padding:0;opacity:0;-ms-appearance:none;-moz-appearance:none;-webkit-appearance:none;appearance:none;border:none}.mdl-switch__track{background:rgba(0,0,0,.26);position:absolute;left:0;top:5px;height:14px;width:36px;border-radius:14px;cursor:pointer}.mdl-switch.is-checked .mdl-switch__track{background:rgba(158,158,158,.5)}.mdl-switch__track fieldset[disabled] .mdl-switch,.mdl-switch.is-disabled .mdl-switch__track{background:rgba(0,0,0,.12);cursor:auto}.mdl-switch__thumb{background:#fafafa;position:absolute;left:0;top:2px;height:20px;width:20px;border-radius:50%;cursor:pointer;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12);transition-duration:.28s;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-property:left}.mdl-switch.is-checked .mdl-switch__thumb{background:rgb(158,158,158);left:16px;box-shadow:0 3px 4px 0 rgba(0,0,0,.14),0 3px 3px -2px rgba(0,0,0,.2),0 1px 8px 0 rgba(0,0,0,.12)}.mdl-switch__thumb fieldset[disabled] .mdl-switch,.mdl-switch.is-disabled .mdl-switch__thumb{background:#bdbdbd;cursor:auto}.mdl-switch__focus-helper{position:absolute;top:50%;left:50%;-webkit-transform:translate(-4px,-4px);transform:translate(-4px,-4px);display:inline-block;box-sizing:border-box;width:8px;height:8px;border-radius:50%;background-color:transparent}.mdl-switch.is-focused .mdl-switch__focus-helper{box-shadow:0 0 0 20px rgba(0,0,0,.1);background-color:rgba(0,0,0,.1)}.mdl-switch.is-focused.is-checked .mdl-switch__focus-helper{box-shadow:0 0 0 20px rgba(158,158,158,.26);background-color:rgba(158,158,158,.26)}.mdl-switch__label{position:relative;cursor:pointer;font-size:16px;line-height:24px;margin:0;left:24px}.mdl-switch__label fieldset[disabled] .mdl-switch,.mdl-switch.is-disabled .mdl-switch__label{color:#bdbdbd;cursor:auto}.mdl-switch__ripple-container{position:absolute;z-index:2;top:-12px;left:-14px;box-sizing:border-box;width:48px;height:48px;border-radius:50%;cursor:pointer;overflow:hidden;-webkit-mask-image:-webkit-radial-gradient(circle,#fff,#000);transition-duration:.4s;transition-timing-function:step-end;transition-property:left}.mdl-switch__ripple-container .mdl-ripple{background:rgb(158,158,158)}.mdl-switch__ripple-container fieldset[disabled] .mdl-switch,.mdl-switch.is-disabled .mdl-switch__ripple-container{cursor:auto}fieldset[disabled] .mdl-switch .mdl-switch__ripple-container .mdl-ripple,.mdl-switch.is-disabled .mdl-switch__ripple-container .mdl-ripple{background:0 0}.mdl-switch.is-checked .mdl-switch__ripple-container{left:2px}.mdl-tabs{display:block;width:100%}.mdl-tabs__tab-bar{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-content:space-between;-ms-flex-line-pack:justify;align-content:space-between;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;height:48px;padding:0;margin:0;border-bottom:1px solid #e0e0e0}.mdl-tabs__tab{margin:0;border:none;padding:0 24px;float:left;position:relative;display:block;text-decoration:none;height:48px;line-height:48px;text-align:center;font-weight:500;font-size:14px;text-transform:uppercase;color:rgba(0,0,0,.54);overflow:hidden}.mdl-tabs.is-upgraded .mdl-tabs__tab.is-active{color:rgba(0,0,0,.87)}.mdl-tabs.is-upgraded .mdl-tabs__tab.is-active:after{height:2px;width:100%;display:block;content:" ";bottom:0;left:0;position:absolute;background:rgb(158,158,158);-webkit-animation:border-expand .2s cubic-bezier(.4,0,.4,1).01s alternate forwards;animation:border-expand .2s cubic-bezier(.4,0,.4,1).01s alternate forwards;transition:all 1s cubic-bezier(.4,0,1,1)}.mdl-tabs__tab .mdl-tabs__ripple-container{display:block;position:absolute;height:100%;width:100%;left:0;top:0;z-index:1;overflow:hidden}.mdl-tabs__tab .mdl-tabs__ripple-container .mdl-ripple{background:rgb(158,158,158)}.mdl-tabs__panel{display:block}.mdl-tabs.is-upgraded .mdl-tabs__panel{display:none}.mdl-tabs.is-upgraded .mdl-tabs__panel.is-active{display:block}@-webkit-keyframes border-expand{0%{opacity:0;width:0}100%{opacity:1;width:100%}}@keyframes border-expand{0%{opacity:0;width:0}100%{opacity:1;width:100%}}.mdl-textfield{position:relative;font-size:16px;display:inline-block;box-sizing:border-box;width:300px;max-width:100%;margin:0;padding:20px 0}.mdl-textfield .mdl-button{position:absolute;bottom:20px}.mdl-textfield--align-right{text-align:right}.mdl-textfield--full-width{width:100%}.mdl-textfield--expandable{min-width:32px;width:auto;min-height:32px}.mdl-textfield--expandable .mdl-button--icon{top:16px}.mdl-textfield__input{border:none;border-bottom:1px solid rgba(0,0,0,.12);display:block;font-size:16px;font-family:"Helvetica","Arial",sans-serif;margin:0;padding:4px 0;width:100%;background:0 0;text-align:left;color:inherit}.mdl-textfield__input[type="number"]{-moz-appearance:textfield}.mdl-textfield__input[type="number"]::-webkit-inner-spin-button,.mdl-textfield__input[type="number"]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.mdl-textfield.is-focused .mdl-textfield__input{outline:none}.mdl-textfield.is-invalid .mdl-textfield__input{border-color:#d50000;box-shadow:none}fieldset[disabled] .mdl-textfield .mdl-textfield__input,.mdl-textfield.is-disabled .mdl-textfield__input{background-color:transparent;border-bottom:1px dotted rgba(0,0,0,.12);color:rgba(0,0,0,.26)}.mdl-textfield textarea.mdl-textfield__input{display:block}.mdl-textfield__label{bottom:0;color:rgba(0,0,0,.26);font-size:16px;left:0;right:0;pointer-events:none;position:absolute;display:block;top:24px;width:100%;overflow:hidden;white-space:nowrap;text-align:left}.mdl-textfield.is-dirty .mdl-textfield__label,.mdl-textfield.has-placeholder .mdl-textfield__label{visibility:hidden}.mdl-textfield--floating-label .mdl-textfield__label{transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.mdl-textfield--floating-label.has-placeholder .mdl-textfield__label{transition:none}fieldset[disabled] .mdl-textfield .mdl-textfield__label,.mdl-textfield.is-disabled.is-disabled .mdl-textfield__label{color:rgba(0,0,0,.26)}.mdl-textfield--floating-label.is-focused .mdl-textfield__label,.mdl-textfield--floating-label.is-dirty .mdl-textfield__label,.mdl-textfield--floating-label.has-placeholder .mdl-textfield__label{color:rgb(158,158,158);font-size:12px;top:4px;visibility:visible}.mdl-textfield--floating-label.is-focused .mdl-textfield__expandable-holder .mdl-textfield__label,.mdl-textfield--floating-label.is-dirty .mdl-textfield__expandable-holder .mdl-textfield__label,.mdl-textfield--floating-label.has-placeholder .mdl-textfield__expandable-holder .mdl-textfield__label{top:-16px}.mdl-textfield--floating-label.is-invalid .mdl-textfield__label{color:#d50000;font-size:12px}.mdl-textfield__label:after{background-color:rgb(158,158,158);bottom:20px;content:'';height:2px;left:45%;position:absolute;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1);visibility:hidden;width:10px}.mdl-textfield.is-focused .mdl-textfield__label:after{left:0;visibility:visible;width:100%}.mdl-textfield.is-invalid .mdl-textfield__label:after{background-color:#d50000}.mdl-textfield__error{color:#d50000;position:absolute;font-size:12px;margin-top:3px;visibility:hidden;display:block}.mdl-textfield.is-invalid .mdl-textfield__error{visibility:visible}.mdl-textfield__expandable-holder{display:inline-block;position:relative;margin-left:32px;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1);display:inline-block;max-width:.1px}.mdl-textfield.is-focused .mdl-textfield__expandable-holder,.mdl-textfield.is-dirty .mdl-textfield__expandable-holder{max-width:600px}.mdl-textfield__expandable-holder .mdl-textfield__label:after{bottom:0}.mdl-tooltip{-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top center;transform-origin:top center;z-index:999;background:rgba(97,97,97,.9);border-radius:2px;color:#fff;display:inline-block;font-size:10px;font-weight:500;line-height:14px;max-width:170px;position:fixed;top:-500px;left:-500px;padding:8px;text-align:center}.mdl-tooltip.is-active{-webkit-animation:pulse 200ms cubic-bezier(0,0,.2,1)forwards;animation:pulse 200ms cubic-bezier(0,0,.2,1)forwards}.mdl-tooltip--large{line-height:14px;font-size:14px;padding:16px}@-webkit-keyframes pulse{0%{-webkit-transform:scale(0);transform:scale(0);opacity:0}50%{-webkit-transform:scale(.99);transform:scale(.99)}100%{-webkit-transform:scale(1);transform:scale(1);opacity:1;visibility:visible}}@keyframes pulse{0%{-webkit-transform:scale(0);transform:scale(0);opacity:0}50%{-webkit-transform:scale(.99);transform:scale(.99)}100%{-webkit-transform:scale(1);transform:scale(1);opacity:1;visibility:visible}}.mdl-shadow--2dp{box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)}.mdl-shadow--3dp{box-shadow:0 3px 4px 0 rgba(0,0,0,.14),0 3px 3px -2px rgba(0,0,0,.2),0 1px 8px 0 rgba(0,0,0,.12)}.mdl-shadow--4dp{box-shadow:0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.2)}.mdl-shadow--6dp{box-shadow:0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12),0 3px 5px -1px rgba(0,0,0,.2)}.mdl-shadow--8dp{box-shadow:0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12),0 5px 5px -3px rgba(0,0,0,.2)}.mdl-shadow--16dp{box-shadow:0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12),0 8px 10px -5px rgba(0,0,0,.2)}.mdl-shadow--24dp{box-shadow:0 9px 46px 8px rgba(0,0,0,.14),0 11px 15px -7px rgba(0,0,0,.12),0 24px 38px 3px rgba(0,0,0,.2)}.mdl-grid{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap;margin:0 auto;-webkit-align-items:stretch;-ms-flex-align:stretch;align-items:stretch}.mdl-grid.mdl-grid--no-spacing{padding:0}.mdl-cell{box-sizing:border-box}.mdl-cell--top{-webkit-align-self:flex-start;-ms-flex-item-align:start;align-self:flex-start}.mdl-cell--middle{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.mdl-cell--bottom{-webkit-align-self:flex-end;-ms-flex-item-align:end;align-self:flex-end}.mdl-cell--stretch{-webkit-align-self:stretch;-ms-flex-item-align:stretch;align-self:stretch}.mdl-grid.mdl-grid--no-spacing>.mdl-cell{margin:0}.mdl-cell--order-1{-webkit-order:1;-ms-flex-order:1;order:1}.mdl-cell--order-2{-webkit-order:2;-ms-flex-order:2;order:2}.mdl-cell--order-3{-webkit-order:3;-ms-flex-order:3;order:3}.mdl-cell--order-4{-webkit-order:4;-ms-flex-order:4;order:4}.mdl-cell--order-5{-webkit-order:5;-ms-flex-order:5;order:5}.mdl-cell--order-6{-webkit-order:6;-ms-flex-order:6;order:6}.mdl-cell--order-7{-webkit-order:7;-ms-flex-order:7;order:7}.mdl-cell--order-8{-webkit-order:8;-ms-flex-order:8;order:8}.mdl-cell--order-9{-webkit-order:9;-ms-flex-order:9;order:9}.mdl-cell--order-10{-webkit-order:10;-ms-flex-order:10;order:10}.mdl-cell--order-11{-webkit-order:11;-ms-flex-order:11;order:11}.mdl-cell--order-12{-webkit-order:12;-ms-flex-order:12;order:12}@media (max-width:479px){.mdl-grid{padding:8px}.mdl-cell{margin:8px;width:calc(100% - 16px)}.mdl-grid--no-spacing>.mdl-cell{width:100%}.mdl-cell--hide-phone{display:none!important}.mdl-cell--order-1-phone.mdl-cell--order-1-phone{-webkit-order:1;-ms-flex-order:1;order:1}.mdl-cell--order-2-phone.mdl-cell--order-2-phone{-webkit-order:2;-ms-flex-order:2;order:2}.mdl-cell--order-3-phone.mdl-cell--order-3-phone{-webkit-order:3;-ms-flex-order:3;order:3}.mdl-cell--order-4-phone.mdl-cell--order-4-phone{-webkit-order:4;-ms-flex-order:4;order:4}.mdl-cell--order-5-phone.mdl-cell--order-5-phone{-webkit-order:5;-ms-flex-order:5;order:5}.mdl-cell--order-6-phone.mdl-cell--order-6-phone{-webkit-order:6;-ms-flex-order:6;order:6}.mdl-cell--order-7-phone.mdl-cell--order-7-phone{-webkit-order:7;-ms-flex-order:7;order:7}.mdl-cell--order-8-phone.mdl-cell--order-8-phone{-webkit-order:8;-ms-flex-order:8;order:8}.mdl-cell--order-9-phone.mdl-cell--order-9-phone{-webkit-order:9;-ms-flex-order:9;order:9}.mdl-cell--order-10-phone.mdl-cell--order-10-phone{-webkit-order:10;-ms-flex-order:10;order:10}.mdl-cell--order-11-phone.mdl-cell--order-11-phone{-webkit-order:11;-ms-flex-order:11;order:11}.mdl-cell--order-12-phone.mdl-cell--order-12-phone{-webkit-order:12;-ms-flex-order:12;order:12}.mdl-cell--1-col,.mdl-cell--1-col-phone.mdl-cell--1-col-phone{width:calc(25% - 16px)}.mdl-grid--no-spacing>.mdl-cell--1-col,.mdl-grid--no-spacing>.mdl-cell--1-col-phone.mdl-cell--1-col-phone{width:25%}.mdl-cell--2-col,.mdl-cell--2-col-phone.mdl-cell--2-col-phone{width:calc(50% - 16px)}.mdl-grid--no-spacing>.mdl-cell--2-col,.mdl-grid--no-spacing>.mdl-cell--2-col-phone.mdl-cell--2-col-phone{width:50%}.mdl-cell--3-col,.mdl-cell--3-col-phone.mdl-cell--3-col-phone{width:calc(75% - 16px)}.mdl-grid--no-spacing>.mdl-cell--3-col,.mdl-grid--no-spacing>.mdl-cell--3-col-phone.mdl-cell--3-col-phone{width:75%}.mdl-cell--4-col,.mdl-cell--4-col-phone.mdl-cell--4-col-phone{width:calc(100% - 16px)}.mdl-grid--no-spacing>.mdl-cell--4-col,.mdl-grid--no-spacing>.mdl-cell--4-col-phone.mdl-cell--4-col-phone{width:100%}.mdl-cell--5-col,.mdl-cell--5-col-phone.mdl-cell--5-col-phone{width:calc(100% - 16px)}.mdl-grid--no-spacing>.mdl-cell--5-col,.mdl-grid--no-spacing>.mdl-cell--5-col-phone.mdl-cell--5-col-phone{width:100%}.mdl-cell--6-col,.mdl-cell--6-col-phone.mdl-cell--6-col-phone{width:calc(100% - 16px)}.mdl-grid--no-spacing>.mdl-cell--6-col,.mdl-grid--no-spacing>.mdl-cell--6-col-phone.mdl-cell--6-col-phone{width:100%}.mdl-cell--7-col,.mdl-cell--7-col-phone.mdl-cell--7-col-phone{width:calc(100% - 16px)}.mdl-grid--no-spacing>.mdl-cell--7-col,.mdl-grid--no-spacing>.mdl-cell--7-col-phone.mdl-cell--7-col-phone{width:100%}.mdl-cell--8-col,.mdl-cell--8-col-phone.mdl-cell--8-col-phone{width:calc(100% - 16px)}.mdl-grid--no-spacing>.mdl-cell--8-col,.mdl-grid--no-spacing>.mdl-cell--8-col-phone.mdl-cell--8-col-phone{width:100%}.mdl-cell--9-col,.mdl-cell--9-col-phone.mdl-cell--9-col-phone{width:calc(100% - 16px)}.mdl-grid--no-spacing>.mdl-cell--9-col,.mdl-grid--no-spacing>.mdl-cell--9-col-phone.mdl-cell--9-col-phone{width:100%}.mdl-cell--10-col,.mdl-cell--10-col-phone.mdl-cell--10-col-phone{width:calc(100% - 16px)}.mdl-grid--no-spacing>.mdl-cell--10-col,.mdl-grid--no-spacing>.mdl-cell--10-col-phone.mdl-cell--10-col-phone{width:100%}.mdl-cell--11-col,.mdl-cell--11-col-phone.mdl-cell--11-col-phone{width:calc(100% - 16px)}.mdl-grid--no-spacing>.mdl-cell--11-col,.mdl-grid--no-spacing>.mdl-cell--11-col-phone.mdl-cell--11-col-phone{width:100%}.mdl-cell--12-col,.mdl-cell--12-col-phone.mdl-cell--12-col-phone{width:calc(100% - 16px)}.mdl-grid--no-spacing>.mdl-cell--12-col,.mdl-grid--no-spacing>.mdl-cell--12-col-phone.mdl-cell--12-col-phone{width:100%}.mdl-cell--1-offset,.mdl-cell--1-offset-phone.mdl-cell--1-offset-phone{margin-left:calc(25% + 8px)}.mdl-grid.mdl-grid--no-spacing>.mdl-cell--1-offset,.mdl-grid.mdl-grid--no-spacing>.mdl-cell--1-offset-phone.mdl-cell--1-offset-phone{margin-left:25%}.mdl-cell--2-offset,.mdl-cell--2-offset-phone.mdl-cell--2-offset-phone{margin-left:calc(50% + 8px)}.mdl-grid.mdl-grid--no-spacing>.mdl-cell--2-offset,.mdl-grid.mdl-grid--no-spacing>.mdl-cell--2-offset-phone.mdl-cell--2-offset-phone{margin-left:50%}.mdl-cell--3-offset,.mdl-cell--3-offset-phone.mdl-cell--3-offset-phone{margin-left:calc(75% + 8px)}.mdl-grid.mdl-grid--no-spacing>.mdl-cell--3-offset,.mdl-grid.mdl-grid--no-spacing>.mdl-cell--3-offset-phone.mdl-cell--3-offset-phone{margin-left:75%}}@media (min-width:480px) and (max-width:839px){.mdl-grid{padding:8px}.mdl-cell{margin:8px;width:calc(50% - 16px)}.mdl-grid--no-spacing>.mdl-cell{width:50%}.mdl-cell--hide-tablet{display:none!important}.mdl-cell--order-1-tablet.mdl-cell--order-1-tablet{-webkit-order:1;-ms-flex-order:1;order:1}.mdl-cell--order-2-tablet.mdl-cell--order-2-tablet{-webkit-order:2;-ms-flex-order:2;order:2}.mdl-cell--order-3-tablet.mdl-cell--order-3-tablet{-webkit-order:3;-ms-flex-order:3;order:3}.mdl-cell--order-4-tablet.mdl-cell--order-4-tablet{-webkit-order:4;-ms-flex-order:4;order:4}.mdl-cell--order-5-tablet.mdl-cell--order-5-tablet{-webkit-order:5;-ms-flex-order:5;order:5}.mdl-cell--order-6-tablet.mdl-cell--order-6-tablet{-webkit-order:6;-ms-flex-order:6;order:6}.mdl-cell--order-7-tablet.mdl-cell--order-7-tablet{-webkit-order:7;-ms-flex-order:7;order:7}.mdl-cell--order-8-tablet.mdl-cell--order-8-tablet{-webkit-order:8;-ms-flex-order:8;order:8}.mdl-cell--order-9-tablet.mdl-cell--order-9-tablet{-webkit-order:9;-ms-flex-order:9;order:9}.mdl-cell--order-10-tablet.mdl-cell--order-10-tablet{-webkit-order:10;-ms-flex-order:10;order:10}.mdl-cell--order-11-tablet.mdl-cell--order-11-tablet{-webkit-order:11;-ms-flex-order:11;order:11}.mdl-cell--order-12-tablet.mdl-cell--order-12-tablet{-webkit-order:12;-ms-flex-order:12;order:12}.mdl-cell--1-col,.mdl-cell--1-col-tablet.mdl-cell--1-col-tablet{width:calc(12.5% - 16px)}.mdl-grid--no-spacing>.mdl-cell--1-col,.mdl-grid--no-spacing>.mdl-cell--1-col-tablet.mdl-cell--1-col-tablet{width:12.5%}.mdl-cell--2-col,.mdl-cell--2-col-tablet.mdl-cell--2-col-tablet{width:calc(25% - 16px)}.mdl-grid--no-spacing>.mdl-cell--2-col,.mdl-grid--no-spacing>.mdl-cell--2-col-tablet.mdl-cell--2-col-tablet{width:25%}.mdl-cell--3-col,.mdl-cell--3-col-tablet.mdl-cell--3-col-tablet{width:calc(37.5% - 16px)}.mdl-grid--no-spacing>.mdl-cell--3-col,.mdl-grid--no-spacing>.mdl-cell--3-col-tablet.mdl-cell--3-col-tablet{width:37.5%}.mdl-cell--4-col,.mdl-cell--4-col-tablet.mdl-cell--4-col-tablet{width:calc(50% - 16px)}.mdl-grid--no-spacing>.mdl-cell--4-col,.mdl-grid--no-spacing>.mdl-cell--4-col-tablet.mdl-cell--4-col-tablet{width:50%}.mdl-cell--5-col,.mdl-cell--5-col-tablet.mdl-cell--5-col-tablet{width:calc(62.5% - 16px)}.mdl-grid--no-spacing>.mdl-cell--5-col,.mdl-grid--no-spacing>.mdl-cell--5-col-tablet.mdl-cell--5-col-tablet{width:62.5%}.mdl-cell--6-col,.mdl-cell--6-col-tablet.mdl-cell--6-col-tablet{width:calc(75% - 16px)}.mdl-grid--no-spacing>.mdl-cell--6-col,.mdl-grid--no-spacing>.mdl-cell--6-col-tablet.mdl-cell--6-col-tablet{width:75%}.mdl-cell--7-col,.mdl-cell--7-col-tablet.mdl-cell--7-col-tablet{width:calc(87.5% - 16px)}.mdl-grid--no-spacing>.mdl-cell--7-col,.mdl-grid--no-spacing>.mdl-cell--7-col-tablet.mdl-cell--7-col-tablet{width:87.5%}.mdl-cell--8-col,.mdl-cell--8-col-tablet.mdl-cell--8-col-tablet{width:calc(100% - 16px)}.mdl-grid--no-spacing>.mdl-cell--8-col,.mdl-grid--no-spacing>.mdl-cell--8-col-tablet.mdl-cell--8-col-tablet{width:100%}.mdl-cell--9-col,.mdl-cell--9-col-tablet.mdl-cell--9-col-tablet{width:calc(100% - 16px)}.mdl-grid--no-spacing>.mdl-cell--9-col,.mdl-grid--no-spacing>.mdl-cell--9-col-tablet.mdl-cell--9-col-tablet{width:100%}.mdl-cell--10-col,.mdl-cell--10-col-tablet.mdl-cell--10-col-tablet{width:calc(100% - 16px)}.mdl-grid--no-spacing>.mdl-cell--10-col,.mdl-grid--no-spacing>.mdl-cell--10-col-tablet.mdl-cell--10-col-tablet{width:100%}.mdl-cell--11-col,.mdl-cell--11-col-tablet.mdl-cell--11-col-tablet{width:calc(100% - 16px)}.mdl-grid--no-spacing>.mdl-cell--11-col,.mdl-grid--no-spacing>.mdl-cell--11-col-tablet.mdl-cell--11-col-tablet{width:100%}.mdl-cell--12-col,.mdl-cell--12-col-tablet.mdl-cell--12-col-tablet{width:calc(100% - 16px)}.mdl-grid--no-spacing>.mdl-cell--12-col,.mdl-grid--no-spacing>.mdl-cell--12-col-tablet.mdl-cell--12-col-tablet{width:100%}.mdl-cell--1-offset,.mdl-cell--1-offset-tablet.mdl-cell--1-offset-tablet{margin-left:calc(12.5% + 8px)}.mdl-grid.mdl-grid--no-spacing>.mdl-cell--1-offset,.mdl-grid.mdl-grid--no-spacing>.mdl-cell--1-offset-tablet.mdl-cell--1-offset-tablet{margin-left:12.5%}.mdl-cell--2-offset,.mdl-cell--2-offset-tablet.mdl-cell--2-offset-tablet{margin-left:calc(25% + 8px)}.mdl-grid.mdl-grid--no-spacing>.mdl-cell--2-offset,.mdl-grid.mdl-grid--no-spacing>.mdl-cell--2-offset-tablet.mdl-cell--2-offset-tablet{margin-left:25%}.mdl-cell--3-offset,.mdl-cell--3-offset-tablet.mdl-cell--3-offset-tablet{margin-left:calc(37.5% + 8px)}.mdl-grid.mdl-grid--no-spacing>.mdl-cell--3-offset,.mdl-grid.mdl-grid--no-spacing>.mdl-cell--3-offset-tablet.mdl-cell--3-offset-tablet{margin-left:37.5%}.mdl-cell--4-offset,.mdl-cell--4-offset-tablet.mdl-cell--4-offset-tablet{margin-left:calc(50% + 8px)}.mdl-grid.mdl-grid--no-spacing>.mdl-cell--4-offset,.mdl-grid.mdl-grid--no-spacing>.mdl-cell--4-offset-tablet.mdl-cell--4-offset-tablet{margin-left:50%}.mdl-cell--5-offset,.mdl-cell--5-offset-tablet.mdl-cell--5-offset-tablet{margin-left:calc(62.5% + 8px)}.mdl-grid.mdl-grid--no-spacing>.mdl-cell--5-offset,.mdl-grid.mdl-grid--no-spacing>.mdl-cell--5-offset-tablet.mdl-cell--5-offset-tablet{margin-left:62.5%}.mdl-cell--6-offset,.mdl-cell--6-offset-tablet.mdl-cell--6-offset-tablet{margin-left:calc(75% + 8px)}.mdl-grid.mdl-grid--no-spacing>.mdl-cell--6-offset,.mdl-grid.mdl-grid--no-spacing>.mdl-cell--6-offset-tablet.mdl-cell--6-offset-tablet{margin-left:75%}.mdl-cell--7-offset,.mdl-cell--7-offset-tablet.mdl-cell--7-offset-tablet{margin-left:calc(87.5% + 8px)}.mdl-grid.mdl-grid--no-spacing>.mdl-cell--7-offset,.mdl-grid.mdl-grid--no-spacing>.mdl-cell--7-offset-tablet.mdl-cell--7-offset-tablet{margin-left:87.5%}}@media (min-width:840px){.mdl-grid{padding:8px}.mdl-cell{margin:8px;width:calc(33.3333333333% - 16px)}.mdl-grid--no-spacing>.mdl-cell{width:33.3333333333%}.mdl-cell--hide-desktop{display:none!important}.mdl-cell--order-1-desktop.mdl-cell--order-1-desktop{-webkit-order:1;-ms-flex-order:1;order:1}.mdl-cell--order-2-desktop.mdl-cell--order-2-desktop{-webkit-order:2;-ms-flex-order:2;order:2}.mdl-cell--order-3-desktop.mdl-cell--order-3-desktop{-webkit-order:3;-ms-flex-order:3;order:3}.mdl-cell--order-4-desktop.mdl-cell--order-4-desktop{-webkit-order:4;-ms-flex-order:4;order:4}.mdl-cell--order-5-desktop.mdl-cell--order-5-desktop{-webkit-order:5;-ms-flex-order:5;order:5}.mdl-cell--order-6-desktop.mdl-cell--order-6-desktop{-webkit-order:6;-ms-flex-order:6;order:6}.mdl-cell--order-7-desktop.mdl-cell--order-7-desktop{-webkit-order:7;-ms-flex-order:7;order:7}.mdl-cell--order-8-desktop.mdl-cell--order-8-desktop{-webkit-order:8;-ms-flex-order:8;order:8}.mdl-cell--order-9-desktop.mdl-cell--order-9-desktop{-webkit-order:9;-ms-flex-order:9;order:9}.mdl-cell--order-10-desktop.mdl-cell--order-10-desktop{-webkit-order:10;-ms-flex-order:10;order:10}.mdl-cell--order-11-desktop.mdl-cell--order-11-desktop{-webkit-order:11;-ms-flex-order:11;order:11}.mdl-cell--order-12-desktop.mdl-cell--order-12-desktop{-webkit-order:12;-ms-flex-order:12;order:12}.mdl-cell--1-col,.mdl-cell--1-col-desktop.mdl-cell--1-col-desktop{width:calc(8.3333333333% - 16px)}.mdl-grid--no-spacing>.mdl-cell--1-col,.mdl-grid--no-spacing>.mdl-cell--1-col-desktop.mdl-cell--1-col-desktop{width:8.3333333333%}.mdl-cell--2-col,.mdl-cell--2-col-desktop.mdl-cell--2-col-desktop{width:calc(16.6666666667% - 16px)}.mdl-grid--no-spacing>.mdl-cell--2-col,.mdl-grid--no-spacing>.mdl-cell--2-col-desktop.mdl-cell--2-col-desktop{width:16.6666666667%}.mdl-cell--3-col,.mdl-cell--3-col-desktop.mdl-cell--3-col-desktop{width:calc(25% - 16px)}.mdl-grid--no-spacing>.mdl-cell--3-col,.mdl-grid--no-spacing>.mdl-cell--3-col-desktop.mdl-cell--3-col-desktop{width:25%}.mdl-cell--4-col,.mdl-cell--4-col-desktop.mdl-cell--4-col-desktop{width:calc(33.3333333333% - 16px)}.mdl-grid--no-spacing>.mdl-cell--4-col,.mdl-grid--no-spacing>.mdl-cell--4-col-desktop.mdl-cell--4-col-desktop{width:33.3333333333%}.mdl-cell--5-col,.mdl-cell--5-col-desktop.mdl-cell--5-col-desktop{width:calc(41.6666666667% - 16px)}.mdl-grid--no-spacing>.mdl-cell--5-col,.mdl-grid--no-spacing>.mdl-cell--5-col-desktop.mdl-cell--5-col-desktop{width:41.6666666667%}.mdl-cell--6-col,.mdl-cell--6-col-desktop.mdl-cell--6-col-desktop{width:calc(50% - 16px)}.mdl-grid--no-spacing>.mdl-cell--6-col,.mdl-grid--no-spacing>.mdl-cell--6-col-desktop.mdl-cell--6-col-desktop{width:50%}.mdl-cell--7-col,.mdl-cell--7-col-desktop.mdl-cell--7-col-desktop{width:calc(58.3333333333% - 16px)}.mdl-grid--no-spacing>.mdl-cell--7-col,.mdl-grid--no-spacing>.mdl-cell--7-col-desktop.mdl-cell--7-col-desktop{width:58.3333333333%}.mdl-cell--8-col,.mdl-cell--8-col-desktop.mdl-cell--8-col-desktop{width:calc(66.6666666667% - 16px)}.mdl-grid--no-spacing>.mdl-cell--8-col,.mdl-grid--no-spacing>.mdl-cell--8-col-desktop.mdl-cell--8-col-desktop{width:66.6666666667%}.mdl-cell--9-col,.mdl-cell--9-col-desktop.mdl-cell--9-col-desktop{width:calc(75% - 16px)}.mdl-grid--no-spacing>.mdl-cell--9-col,.mdl-grid--no-spacing>.mdl-cell--9-col-desktop.mdl-cell--9-col-desktop{width:75%}.mdl-cell--10-col,.mdl-cell--10-col-desktop.mdl-cell--10-col-desktop{width:calc(83.3333333333% - 16px)}.mdl-grid--no-spacing>.mdl-cell--10-col,.mdl-grid--no-spacing>.mdl-cell--10-col-desktop.mdl-cell--10-col-desktop{width:83.3333333333%}.mdl-cell--11-col,.mdl-cell--11-col-desktop.mdl-cell--11-col-desktop{width:calc(91.6666666667% - 16px)}.mdl-grid--no-spacing>.mdl-cell--11-col,.mdl-grid--no-spacing>.mdl-cell--11-col-desktop.mdl-cell--11-col-desktop{width:91.6666666667%}.mdl-cell--12-col,.mdl-cell--12-col-desktop.mdl-cell--12-col-desktop{width:calc(100% - 16px)}.mdl-grid--no-spacing>.mdl-cell--12-col,.mdl-grid--no-spacing>.mdl-cell--12-col-desktop.mdl-cell--12-col-desktop{width:100%}.mdl-cell--1-offset,.mdl-cell--1-offset-desktop.mdl-cell--1-offset-desktop{margin-left:calc(8.3333333333% + 8px)}.mdl-grid.mdl-grid--no-spacing>.mdl-cell--1-offset,.mdl-grid.mdl-grid--no-spacing>.mdl-cell--1-offset-desktop.mdl-cell--1-offset-desktop{margin-left:8.3333333333%}.mdl-cell--2-offset,.mdl-cell--2-offset-desktop.mdl-cell--2-offset-desktop{margin-left:calc(16.6666666667% + 8px)}.mdl-grid.mdl-grid--no-spacing>.mdl-cell--2-offset,.mdl-grid.mdl-grid--no-spacing>.mdl-cell--2-offset-desktop.mdl-cell--2-offset-desktop{margin-left:16.6666666667%}.mdl-cell--3-offset,.mdl-cell--3-offset-desktop.mdl-cell--3-offset-desktop{margin-left:calc(25% + 8px)}.mdl-grid.mdl-grid--no-spacing>.mdl-cell--3-offset,.mdl-grid.mdl-grid--no-spacing>.mdl-cell--3-offset-desktop.mdl-cell--3-offset-desktop{margin-left:25%}.mdl-cell--4-offset,.mdl-cell--4-offset-desktop.mdl-cell--4-offset-desktop{margin-left:calc(33.3333333333% + 8px)}.mdl-grid.mdl-grid--no-spacing>.mdl-cell--4-offset,.mdl-grid.mdl-grid--no-spacing>.mdl-cell--4-offset-desktop.mdl-cell--4-offset-desktop{margin-left:33.3333333333%}.mdl-cell--5-offset,.mdl-cell--5-offset-desktop.mdl-cell--5-offset-desktop{margin-left:calc(41.6666666667% + 8px)}.mdl-grid.mdl-grid--no-spacing>.mdl-cell--5-offset,.mdl-grid.mdl-grid--no-spacing>.mdl-cell--5-offset-desktop.mdl-cell--5-offset-desktop{margin-left:41.6666666667%}.mdl-cell--6-offset,.mdl-cell--6-offset-desktop.mdl-cell--6-offset-desktop{margin-left:calc(50% + 8px)}.mdl-grid.mdl-grid--no-spacing>.mdl-cell--6-offset,.mdl-grid.mdl-grid--no-spacing>.mdl-cell--6-offset-desktop.mdl-cell--6-offset-desktop{margin-left:50%}.mdl-cell--7-offset,.mdl-cell--7-offset-desktop.mdl-cell--7-offset-desktop{margin-left:calc(58.3333333333% + 8px)}.mdl-grid.mdl-grid--no-spacing>.mdl-cell--7-offset,.mdl-grid.mdl-grid--no-spacing>.mdl-cell--7-offset-desktop.mdl-cell--7-offset-desktop{margin-left:58.3333333333%}.mdl-cell--8-offset,.mdl-cell--8-offset-desktop.mdl-cell--8-offset-desktop{margin-left:calc(66.6666666667% + 8px)}.mdl-grid.mdl-grid--no-spacing>.mdl-cell--8-offset,.mdl-grid.mdl-grid--no-spacing>.mdl-cell--8-offset-desktop.mdl-cell--8-offset-desktop{margin-left:66.6666666667%}.mdl-cell--9-offset,.mdl-cell--9-offset-desktop.mdl-cell--9-offset-desktop{margin-left:calc(75% + 8px)}.mdl-grid.mdl-grid--no-spacing>.mdl-cell--9-offset,.mdl-grid.mdl-grid--no-spacing>.mdl-cell--9-offset-desktop.mdl-cell--9-offset-desktop{margin-left:75%}.mdl-cell--10-offset,.mdl-cell--10-offset-desktop.mdl-cell--10-offset-desktop{margin-left:calc(83.3333333333% + 8px)}.mdl-grid.mdl-grid--no-spacing>.mdl-cell--10-offset,.mdl-grid.mdl-grid--no-spacing>.mdl-cell--10-offset-desktop.mdl-cell--10-offset-desktop{margin-left:83.3333333333%}.mdl-cell--11-offset,.mdl-cell--11-offset-desktop.mdl-cell--11-offset-desktop{margin-left:calc(91.6666666667% + 8px)}.mdl-grid.mdl-grid--no-spacing>.mdl-cell--11-offset,.mdl-grid.mdl-grid--no-spacing>.mdl-cell--11-offset-desktop.mdl-cell--11-offset-desktop{margin-left:91.6666666667%}}body{margin:0}.styleguide-demo h1{margin:48px 24px 0}.styleguide-demo h1:after{content:'';display:block;width:100%;border-bottom:1px solid rgba(0,0,0,.5);margin-top:24px}.styleguide-demo{opacity:0;transition:opacity .6s ease}.styleguide-masthead{height:256px;background:#212121;padding:115px 16px 0}.styleguide-container{position:relative;max-width:960px;width:100%}.styleguide-title{color:#fff;bottom:auto;position:relative;font-size:56px;font-weight:300;line-height:1;letter-spacing:-.02em}.styleguide-title:after{border-bottom:0}.styleguide-title span{font-weight:300}.mdl-styleguide .mdl-layout__drawer .mdl-navigation__link{padding:10px 24px}.demosLoaded .styleguide-demo{opacity:1}iframe{display:block;width:100%;border:none}iframe.heightSet{overflow:hidden}.demo-wrapper{margin:24px}.demo-wrapper iframe{border:1px solid rgba(0,0,0,.5)} | x112358/cdnjs | ajax/libs/material-design-lite/1.2.0/material.grey-cyan.min.css | CSS | mit | 141,057 |
var gdpData = {
"AF": 16.63,
"AL": 11.58,
"DZ": 158.97,
"AO": 85.81,
"AG": 1.1,
"AR": 351.02,
"AM": 8.83,
"AU": 1219.72,
"AT": 366.26,
"AZ": 52.17,
"BS": 7.54,
"BH": 21.73,
"BD": 105.4,
"BB": 3.96,
"BY": 52.89,
"BE": 461.33,
"BZ": 1.43,
"BJ": 6.49,
"BT": 1.4,
"BO": 19.18,
"BA": 16.2,
"BW": 12.5,
"BR": 2023.53,
"BN": 11.96,
"BG": 44.84,
"BF": 8.67,
"BI": 1.47,
"KH": 11.36,
"CM": 21.88,
"CA": 1563.66,
"CV": 1.57,
"CF": 2.11,
"TD": 7.59,
"CL": 199.18,
"CN": 5745.13,
"CO": 283.11,
"KM": 0.56,
"CD": 12.6,
"CG": 11.88,
"CR": 35.02,
"CI": 22.38,
"HR": 59.92,
"CY": 22.75,
"CZ": 195.23,
"DK": 304.56,
"DJ": 1.14,
"DM": 0.38,
"DO": 50.87,
"EC": 61.49,
"EG": 216.83,
"SV": 21.8,
"GQ": 14.55,
"ER": 2.25,
"EE": 19.22,
"ET": 30.94,
"FJ": 3.15,
"FI": 231.98,
"FR": 2555.44,
"GA": 12.56,
"GM": 1.04,
"GE": 11.23,
"DE": 3305.9,
"GH": 18.06,
"GR": 305.01,
"GD": 0.65,
"GT": 40.77,
"GN": 4.34,
"GW": 0.83,
"GY": 2.2,
"HT": 6.5,
"HN": 15.34,
"HK": 226.49,
"HU": 132.28,
"IS": 12.77,
"IN": 1430.02,
"ID": 695.06,
"IR": 337.9,
"IQ": 84.14,
"IE": 204.14,
"IL": 201.25,
"IT": 2036.69,
"JM": 13.74,
"JP": 5390.9,
"JO": 27.13,
"KZ": 129.76,
"KE": 32.42,
"KI": 0.15,
"KR": 986.26,
"UNDEFINED": 5.73,
"KW": 117.32,
"KG": 4.44,
"LA": 6.34,
"LV": 23.39,
"LB": 39.15,
"LS": 1.8,
"LR": 0.98,
"LY": 77.91,
"LT": 35.73,
"LU": 52.43,
"MK": 9.58,
"MG": 8.33,
"MW": 5.04,
"MY": 218.95,
"MV": 1.43,
"ML": 9.08,
"MT": 7.8,
"MR": 3.49,
"MU": 9.43,
"MX": 1004.04,
"MD": 5.36,
"MN": 5.81,
"ME": 3.88,
"MA": 91.7,
"MZ": 10.21,
"MM": 35.65,
"NA": 11.45,
"NP": 15.11,
"NL": 770.31,
"NZ": 138,
"NI": 6.38,
"NE": 5.6,
"NG": 206.66,
"NO": 413.51,
"OM": 53.78,
"PK": 174.79,
"PA": 27.2,
"PG": 8.81,
"PY": 17.17,
"PE": 153.55,
"PH": 189.06,
"PL": 438.88,
"PT": 223.7,
"QA": 126.52,
"RO": 158.39,
"RU": 1476.91,
"RW": 5.69,
"WS": 0.55,
"ST": 0.19,
"SA": 434.44,
"SN": 12.66,
"RS": 38.92,
"SC": 0.92,
"SL": 1.9,
"SG": 217.38,
"SK": 86.26,
"SI": 46.44,
"SB": 0.67,
"ZA": 354.41,
"ES": 1374.78,
"LK": 48.24,
"KN": 0.56,
"LC": 1,
"VC": 0.58,
"SD": 65.93,
"SR": 3.3,
"SZ": 3.17,
"SE": 444.59,
"CH": 522.44,
"SY": 59.63,
"TW": 426.98,
"TJ": 5.58,
"TZ": 22.43,
"TH": 312.61,
"TL": 0.62,
"TG": 3.07,
"TO": 0.3,
"TT": 21.2,
"TN": 43.86,
"TR": 729.05,
"TM": 0,
"UG": 17.12,
"UA": 136.56,
"AE": 239.65,
"GB": 2258.57,
"US": 14624.18,
"UY": 40.71,
"UZ": 37.72,
"VU": 0.72,
"VE": 285.21,
"VN": 101.99,
"YE": 30.02,
"ZM": 15.69,
"ZW": 5.57
}; | Jiumiking/MingShop | manage/third_party/jvectormap/js/gdp-data.js | JavaScript | mit | 2,935 |
define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var DocCommentHighlightRules = function() {
this.$rules = {
"start" : [ {
token : "comment.doc.tag",
regex : "@[\\w\\d_]+" // TODO: fix email addresses
},
DocCommentHighlightRules.getTagRule(),
{
defaultToken : "comment.doc",
caseInsensitive: true
}]
};
};
oop.inherits(DocCommentHighlightRules, TextHighlightRules);
DocCommentHighlightRules.getTagRule = function(start) {
return {
token : "comment.doc.tag.storage.type",
regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
};
}
DocCommentHighlightRules.getStartRule = function(start) {
return {
token : "comment.doc", // doc comment
regex : "\\/\\*(?=\\*)",
next : start
};
};
DocCommentHighlightRules.getEndRule = function (start) {
return {
token : "comment.doc", // closing comment
regex : "\\*\\/",
next : start
};
};
exports.DocCommentHighlightRules = DocCommentHighlightRules;
});
define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
var JavaScriptHighlightRules = function(options) {
var keywordMapper = this.createKeywordMapper({
"variable.language":
"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
"Namespace|QName|XML|XMLList|" + // E4X
"ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
"Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
"Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
"SyntaxError|TypeError|URIError|" +
"decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
"isNaN|parseFloat|parseInt|" +
"JSON|Math|" + // Other
"this|arguments|prototype|window|document" , // Pseudo
"keyword":
"const|yield|import|get|set|async|await|" +
"break|case|catch|continue|default|delete|do|else|finally|for|function|" +
"if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
"__parent__|__count__|escape|unescape|with|__proto__|" +
"class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
"storage.type":
"const|let|var|function",
"constant.language":
"null|Infinity|NaN|undefined",
"support.function":
"alert",
"constant.language.boolean": "true|false"
}, "identifier");
var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
"u[0-9a-fA-F]{4}|" + // unicode
"u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
"[0-2][0-7]{0,2}|" + // oct
"3[0-7][0-7]?|" + // oct
"[4-7][0-7]?|" + //oct
".)";
this.$rules = {
"no_regex" : [
DocCommentHighlightRules.getStartRule("doc-start"),
comments("no_regex"),
{
token : "string",
regex : "'(?=.)",
next : "qstring"
}, {
token : "string",
regex : '"(?=.)',
next : "qqstring"
}, {
token : "constant.numeric", // hex
regex : /0(?:[xX][0-9a-fA-F]+|[bB][01]+)\b/
}, {
token : "constant.numeric", // float
regex : /[+-]?\d[\d_]*(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
}, {
token : [
"storage.type", "punctuation.operator", "support.function",
"punctuation.operator", "entity.name.function", "text","keyword.operator"
],
regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
next: "function_arguments"
}, {
token : [
"storage.type", "punctuation.operator", "entity.name.function", "text",
"keyword.operator", "text", "storage.type", "text", "paren.lparen"
],
regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
next: "function_arguments"
}, {
token : [
"entity.name.function", "text", "keyword.operator", "text", "storage.type",
"text", "paren.lparen"
],
regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
next: "function_arguments"
}, {
token : [
"storage.type", "punctuation.operator", "entity.name.function", "text",
"keyword.operator", "text",
"storage.type", "text", "entity.name.function", "text", "paren.lparen"
],
regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
next: "function_arguments"
}, {
token : [
"storage.type", "text", "entity.name.function", "text", "paren.lparen"
],
regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
next: "function_arguments"
}, {
token : [
"entity.name.function", "text", "punctuation.operator",
"text", "storage.type", "text", "paren.lparen"
],
regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
next: "function_arguments"
}, {
token : [
"text", "text", "storage.type", "text", "paren.lparen"
],
regex : "(:)(\\s*)(function)(\\s*)(\\()",
next: "function_arguments"
}, {
token : "keyword",
regex : "(?:" + kwBeforeRe + ")\\b",
next : "start"
}, {
token : ["support.constant"],
regex : /that\b/
}, {
token : ["storage.type", "punctuation.operator", "support.function.firebug"],
regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
}, {
token : keywordMapper,
regex : identifierRe
}, {
token : "punctuation.operator",
regex : /[.](?![.])/,
next : "property"
}, {
token : "keyword.operator",
regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
next : "start"
}, {
token : "punctuation.operator",
regex : /[?:,;.]/,
next : "start"
}, {
token : "paren.lparen",
regex : /[\[({]/,
next : "start"
}, {
token : "paren.rparen",
regex : /[\])}]/
}, {
token: "comment",
regex: /^#!.*$/
}
],
property: [{
token : "text",
regex : "\\s+"
}, {
token : [
"storage.type", "punctuation.operator", "entity.name.function", "text",
"keyword.operator", "text",
"storage.type", "text", "entity.name.function", "text", "paren.lparen"
],
regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",
next: "function_arguments"
}, {
token : "punctuation.operator",
regex : /[.](?![.])/
}, {
token : "support.function",
regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
}, {
token : "support.function.dom",
regex : /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
}, {
token : "support.constant",
regex : /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
}, {
token : "identifier",
regex : identifierRe
}, {
regex: "",
token: "empty",
next: "no_regex"
}
],
"start": [
DocCommentHighlightRules.getStartRule("doc-start"),
comments("start"),
{
token: "string.regexp",
regex: "\\/",
next: "regex"
}, {
token : "text",
regex : "\\s+|^$",
next : "start"
}, {
token: "empty",
regex: "",
next: "no_regex"
}
],
"regex": [
{
token: "regexp.keyword.operator",
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "string.regexp",
regex: "/[sxngimy]*",
next: "no_regex"
}, {
token : "invalid",
regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
}, {
token : "constant.language.escape",
regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
}, {
token : "constant.language.delimiter",
regex: /\|/
}, {
token: "constant.language.escape",
regex: /\[\^?/,
next: "regex_character_class"
}, {
token: "empty",
regex: "$",
next: "no_regex"
}, {
defaultToken: "string.regexp"
}
],
"regex_character_class": [
{
token: "regexp.charclass.keyword.operator",
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "constant.language.escape",
regex: "]",
next: "regex"
}, {
token: "constant.language.escape",
regex: "-"
}, {
token: "empty",
regex: "$",
next: "no_regex"
}, {
defaultToken: "string.regexp.charachterclass"
}
],
"function_arguments": [
{
token: "variable.parameter",
regex: identifierRe
}, {
token: "punctuation.operator",
regex: "[, ]+"
}, {
token: "punctuation.operator",
regex: "$"
}, {
token: "empty",
regex: "",
next: "no_regex"
}
],
"qqstring" : [
{
token : "constant.language.escape",
regex : escapedRe
}, {
token : "string",
regex : "\\\\$",
next : "qqstring"
}, {
token : "string",
regex : '"|$',
next : "no_regex"
}, {
defaultToken: "string"
}
],
"qstring" : [
{
token : "constant.language.escape",
regex : escapedRe
}, {
token : "string",
regex : "\\\\$",
next : "qstring"
}, {
token : "string",
regex : "'|$",
next : "no_regex"
}, {
defaultToken: "string"
}
]
};
if (!options || !options.noES6) {
this.$rules.no_regex.unshift({
regex: "[{}]", onMatch: function(val, state, stack) {
this.next = val == "{" ? this.nextState : "";
if (val == "{" && stack.length) {
stack.unshift("start", state);
}
else if (val == "}" && stack.length) {
stack.shift();
this.next = stack.shift();
if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
return "paren.quasi.end";
}
return val == "{" ? "paren.lparen" : "paren.rparen";
},
nextState: "start"
}, {
token : "string.quasi.start",
regex : /`/,
push : [{
token : "constant.language.escape",
regex : escapedRe
}, {
token : "paren.quasi.start",
regex : /\${/,
push : "start"
}, {
token : "string.quasi.end",
regex : /`/,
next : "pop"
}, {
defaultToken: "string.quasi"
}]
});
if (!options || options.jsx != false)
JSX.call(this);
}
this.embedRules(DocCommentHighlightRules, "doc-",
[ DocCommentHighlightRules.getEndRule("no_regex") ]);
this.normalizeRules();
};
oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
function JSX() {
var tagRegex = identifierRe.replace("\\d", "\\d\\-");
var jsxTag = {
onMatch : function(val, state, stack) {
var offset = val.charAt(1) == "/" ? 2 : 1;
if (offset == 1) {
if (state != this.nextState)
stack.unshift(this.next, this.nextState, 0);
else
stack.unshift(this.next);
stack[2]++;
} else if (offset == 2) {
if (state == this.nextState) {
stack[1]--;
if (!stack[1] || stack[1] < 0) {
stack.shift();
stack.shift();
}
}
}
return [{
type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
value: val.slice(0, offset)
}, {
type: "meta.tag.tag-name.xml",
value: val.substr(offset)
}];
},
regex : "</?" + tagRegex + "",
next: "jsxAttributes",
nextState: "jsx"
};
this.$rules.start.unshift(jsxTag);
var jsxJsRule = {
regex: "{",
token: "paren.quasi.start",
push: "start"
};
this.$rules.jsx = [
jsxJsRule,
jsxTag,
{include : "reference"},
{defaultToken: "string"}
];
this.$rules.jsxAttributes = [{
token : "meta.tag.punctuation.tag-close.xml",
regex : "/?>",
onMatch : function(value, currentState, stack) {
if (currentState == stack[0])
stack.shift();
if (value.length == 2) {
if (stack[0] == this.nextState)
stack[1]--;
if (!stack[1] || stack[1] < 0) {
stack.splice(0, 2);
}
}
this.next = stack[0] || "start";
return [{type: this.token, value: value}];
},
nextState: "jsx"
},
jsxJsRule,
comments("jsxAttributes"),
{
token : "entity.other.attribute-name.xml",
regex : tagRegex
}, {
token : "keyword.operator.attribute-equals.xml",
regex : "="
}, {
token : "text.tag-whitespace.xml",
regex : "\\s+"
}, {
token : "string.attribute-value.xml",
regex : "'",
stateName : "jsx_attr_q",
push : [
{token : "string.attribute-value.xml", regex: "'", next: "pop"},
{include : "reference"},
{defaultToken : "string.attribute-value.xml"}
]
}, {
token : "string.attribute-value.xml",
regex : '"',
stateName : "jsx_attr_qq",
push : [
{token : "string.attribute-value.xml", regex: '"', next: "pop"},
{include : "reference"},
{defaultToken : "string.attribute-value.xml"}
]
},
jsxTag
];
this.$rules.reference = [{
token : "constant.language.escape.reference.xml",
regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
}];
}
function comments(next) {
return [
{
token : "comment", // multi line comment
regex : /\/\*/,
next: [
DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : next || "pop"},
{defaultToken : "comment", caseInsensitive: true}
]
}, {
token : "comment",
regex : "\\/\\/",
next: [
DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : next || "pop"},
{defaultToken : "comment", caseInsensitive: true}
]
}
];
}
exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
});
define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
"use strict";
var Range = require("../range").Range;
var MatchingBraceOutdent = function() {};
(function() {
this.checkOutdent = function(line, input) {
if (! /^\s+$/.test(line))
return false;
return /^\s*\}/.test(input);
};
this.autoOutdent = function(doc, row) {
var line = doc.getLine(row);
var match = line.match(/^(\s*\})/);
if (!match) return 0;
var column = match[1].length;
var openBracePos = doc.findMatchingBracket({row: row, column: column});
if (!openBracePos || openBracePos.row == row) return 0;
var indent = this.$getIndent(doc.getLine(openBracePos.row));
doc.replace(new Range(row, 0, row, column-1), indent);
};
this.$getIndent = function(line) {
return line.match(/^\s*/)[0];
};
}).call(MatchingBraceOutdent.prototype);
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
var BaseFoldMode = require("./fold_mode").FoldMode;
var FoldMode = exports.FoldMode = function(commentRegex) {
if (commentRegex) {
this.foldingStartMarker = new RegExp(
this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
);
this.foldingStopMarker = new RegExp(
this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
);
}
};
oop.inherits(FoldMode, BaseFoldMode);
(function() {
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
this._getFoldWidgetBase = this.getFoldWidget;
this.getFoldWidget = function(session, foldStyle, row) {
var line = session.getLine(row);
if (this.singleLineBlockCommentRe.test(line)) {
if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
return "";
}
var fw = this._getFoldWidgetBase(session, foldStyle, row);
if (!fw && this.startRegionRe.test(line))
return "start"; // lineCommentRegionStart
return fw;
};
this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
if (this.startRegionRe.test(line))
return this.getCommentRegionBlock(session, line, row);
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
var range = session.getCommentFoldRange(row, i + match[0].length, 1);
if (range && !range.isMultiLine()) {
if (forceMultiline) {
range = this.getSectionRange(session, row);
} else if (foldStyle != "all")
range = null;
}
return range;
}
if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
if (match) {
var i = match.index + match[0].length;
if (match[1])
return this.closingBracketBlock(session, match[1], row, i);
return session.getCommentFoldRange(row, i, -1);
}
};
this.getSectionRange = function(session, row) {
var line = session.getLine(row);
var startIndent = line.search(/\S/);
var startRow = row;
var startColumn = line.length;
row = row + 1;
var endRow = row;
var maxRow = session.getLength();
while (++row < maxRow) {
line = session.getLine(row);
var indent = line.search(/\S/);
if (indent === -1)
continue;
if (startIndent > indent)
break;
var subRange = this.getFoldWidgetRange(session, "all", row);
if (subRange) {
if (subRange.start.row <= startRow) {
break;
} else if (subRange.isMultiLine()) {
row = subRange.end.row;
} else if (startIndent == indent) {
break;
}
}
endRow = row;
}
return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
};
this.getCommentRegionBlock = function(session, line, row) {
var startColumn = line.search(/\s*$/);
var maxRow = session.getLength();
var startRow = row;
var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
var depth = 1;
while (++row < maxRow) {
line = session.getLine(row);
var m = re.exec(line);
if (!m) continue;
if (m[1]) depth--;
else depth++;
if (!depth) break;
}
var endRow = row;
if (endRow > startRow) {
return new Range(startRow, startColumn, endRow, line.length);
}
};
}).call(FoldMode.prototype);
});
define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var TextMode = require("./text").Mode;
var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
var WorkerClient = require("../worker/worker_client").WorkerClient;
var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
var CStyleFoldMode = require("./folding/cstyle").FoldMode;
var Mode = function() {
this.HighlightRules = JavaScriptHighlightRules;
this.$outdent = new MatchingBraceOutdent();
this.$behaviour = new CstyleBehaviour();
this.foldingRules = new CStyleFoldMode();
};
oop.inherits(Mode, TextMode);
(function() {
this.lineCommentStart = "//";
this.blockComment = {start: "/*", end: "*/"};
this.getNextLineIndent = function(state, line, tab) {
var indent = this.$getIndent(line);
var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
var tokens = tokenizedLine.tokens;
var endState = tokenizedLine.state;
if (tokens.length && tokens[tokens.length-1].type == "comment") {
return indent;
}
if (state == "start" || state == "no_regex") {
var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
if (match) {
indent += tab;
}
} else if (state == "doc-start") {
if (endState == "start" || endState == "no_regex") {
return "";
}
var match = line.match(/^\s*(\/?)\*/);
if (match) {
if (match[1]) {
indent += " ";
}
indent += "* ";
}
}
return indent;
};
this.checkOutdent = function(state, line, input) {
return this.$outdent.checkOutdent(line, input);
};
this.autoOutdent = function(state, doc, row) {
this.$outdent.autoOutdent(doc, row);
};
this.createWorker = function(session) {
var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
worker.attachToDocument(session.getDocument());
worker.on("annotate", function(results) {
session.setAnnotations(results.data);
});
worker.on("terminate", function() {
session.clearAnnotations();
});
return worker;
};
this.$id = "ace/mode/javascript";
}).call(Mode.prototype);
exports.Mode = Mode;
});
define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index";
var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b";
var CssHighlightRules = function() {
var keywordMapper = this.createKeywordMapper({
"support.function": supportFunction,
"support.constant": supportConstant,
"support.type": supportType,
"support.constant.color": supportConstantColor,
"support.constant.fonts": supportConstantFonts
}, "text", true);
this.$rules = {
"start" : [{
token : "comment", // multi line comment
regex : "\\/\\*",
push : "comment"
}, {
token: "paren.lparen",
regex: "\\{",
push: "ruleset"
}, {
token: "string",
regex: "@.*?{",
push: "media"
}, {
token: "keyword",
regex: "#[a-z0-9-_]+"
}, {
token: "variable",
regex: "\\.[a-z0-9-_]+"
}, {
token: "string",
regex: ":[a-z0-9-_]+"
}, {
token: "constant",
regex: "[a-z0-9-_]+"
}, {
caseInsensitive: true
}],
"media" : [{
token : "comment", // multi line comment
regex : "\\/\\*",
push : "comment"
}, {
token: "paren.lparen",
regex: "\\{",
push: "ruleset"
}, {
token: "string",
regex: "\\}",
next: "pop"
}, {
token: "keyword",
regex: "#[a-z0-9-_]+"
}, {
token: "variable",
regex: "\\.[a-z0-9-_]+"
}, {
token: "string",
regex: ":[a-z0-9-_]+"
}, {
token: "constant",
regex: "[a-z0-9-_]+"
}, {
caseInsensitive: true
}],
"comment" : [{
token : "comment",
regex : "\\*\\/",
next : "pop"
}, {
defaultToken : "comment"
}],
"ruleset" : [
{
token : "paren.rparen",
regex : "\\}",
next: "pop"
}, {
token : "comment", // multi line comment
regex : "\\/\\*",
push : "comment"
}, {
token : "string", // single line
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
}, {
token : "string", // single line
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
}, {
token : ["constant.numeric", "keyword"],
regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"
}, {
token : "constant.numeric",
regex : numRe
}, {
token : "constant.numeric", // hex6 color
regex : "#[a-f0-9]{6}"
}, {
token : "constant.numeric", // hex3 color
regex : "#[a-f0-9]{3}"
}, {
token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
regex : pseudoElements
}, {
token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
regex : pseudoClasses
}, {
token : ["support.function", "string", "support.function"],
regex : "(url\\()(.*)(\\))"
}, {
token : keywordMapper,
regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
}, {
caseInsensitive: true
}]
};
this.normalizeRules();
};
oop.inherits(CssHighlightRules, TextHighlightRules);
exports.CssHighlightRules = CssHighlightRules;
});
define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) {
"use strict";
var propertyMap = {
"background": {"#$0": 1},
"background-color": {"#$0": 1, "transparent": 1, "fixed": 1},
"background-image": {"url('/$0')": 1},
"background-repeat": {"repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1},
"background-position": {"bottom":2, "center":2, "left":2, "right":2, "top":2, "inherit":2},
"background-attachment": {"scroll": 1, "fixed": 1},
"background-size": {"cover": 1, "contain": 1},
"background-clip": {"border-box": 1, "padding-box": 1, "content-box": 1},
"background-origin": {"border-box": 1, "padding-box": 1, "content-box": 1},
"border": {"solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1},
"border-color": {"#$0": 1},
"border-style": {"solid":2, "dashed":2, "dotted":2, "double":2, "groove":2, "hidden":2, "inherit":2, "inset":2, "none":2, "outset":2, "ridged":2},
"border-collapse": {"collapse": 1, "separate": 1},
"bottom": {"px": 1, "em": 1, "%": 1},
"clear": {"left": 1, "right": 1, "both": 1, "none": 1},
"color": {"#$0": 1, "rgb(#$00,0,0)": 1},
"cursor": {"default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1},
"display": {"none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1},
"empty-cells": {"show": 1, "hide": 1},
"float": {"left": 1, "right": 1, "none": 1},
"font-family": {"Arial":2,"Comic Sans MS":2,"Consolas":2,"Courier New":2,"Courier":2,"Georgia":2,"Monospace":2,"Sans-Serif":2, "Segoe UI":2,"Tahoma":2,"Times New Roman":2,"Trebuchet MS":2,"Verdana": 1},
"font-size": {"px": 1, "em": 1, "%": 1},
"font-weight": {"bold": 1, "normal": 1},
"font-style": {"italic": 1, "normal": 1},
"font-variant": {"normal": 1, "small-caps": 1},
"height": {"px": 1, "em": 1, "%": 1},
"left": {"px": 1, "em": 1, "%": 1},
"letter-spacing": {"normal": 1},
"line-height": {"normal": 1},
"list-style-type": {"none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1},
"margin": {"px": 1, "em": 1, "%": 1},
"margin-right": {"px": 1, "em": 1, "%": 1},
"margin-left": {"px": 1, "em": 1, "%": 1},
"margin-top": {"px": 1, "em": 1, "%": 1},
"margin-bottom": {"px": 1, "em": 1, "%": 1},
"max-height": {"px": 1, "em": 1, "%": 1},
"max-width": {"px": 1, "em": 1, "%": 1},
"min-height": {"px": 1, "em": 1, "%": 1},
"min-width": {"px": 1, "em": 1, "%": 1},
"overflow": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
"overflow-x": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
"overflow-y": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
"padding": {"px": 1, "em": 1, "%": 1},
"padding-top": {"px": 1, "em": 1, "%": 1},
"padding-right": {"px": 1, "em": 1, "%": 1},
"padding-bottom": {"px": 1, "em": 1, "%": 1},
"padding-left": {"px": 1, "em": 1, "%": 1},
"page-break-after": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
"page-break-before": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
"position": {"absolute": 1, "relative": 1, "fixed": 1, "static": 1},
"right": {"px": 1, "em": 1, "%": 1},
"table-layout": {"fixed": 1, "auto": 1},
"text-decoration": {"none": 1, "underline": 1, "line-through": 1, "blink": 1},
"text-align": {"left": 1, "right": 1, "center": 1, "justify": 1},
"text-transform": {"capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1},
"top": {"px": 1, "em": 1, "%": 1},
"vertical-align": {"top": 1, "bottom": 1},
"visibility": {"hidden": 1, "visible": 1},
"white-space": {"nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1},
"width": {"px": 1, "em": 1, "%": 1},
"word-spacing": {"normal": 1},
"filter": {"alpha(opacity=$0100)": 1},
"text-shadow": {"$02px 2px 2px #777": 1},
"text-overflow": {"ellipsis-word": 1, "clip": 1, "ellipsis": 1},
"-moz-border-radius": 1,
"-moz-border-radius-topright": 1,
"-moz-border-radius-bottomright": 1,
"-moz-border-radius-topleft": 1,
"-moz-border-radius-bottomleft": 1,
"-webkit-border-radius": 1,
"-webkit-border-top-right-radius": 1,
"-webkit-border-top-left-radius": 1,
"-webkit-border-bottom-right-radius": 1,
"-webkit-border-bottom-left-radius": 1,
"-moz-box-shadow": 1,
"-webkit-box-shadow": 1,
"transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
"-moz-transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
"-webkit-transform": {"rotate($00deg)": 1, "skew($00deg)": 1 }
};
var CssCompletions = function() {
};
(function() {
this.completionsDefined = false;
this.defineCompletions = function() {
if (document) {
var style = document.createElement('c').style;
for (var i in style) {
if (typeof style[i] !== 'string')
continue;
var name = i.replace(/[A-Z]/g, function(x) {
return '-' + x.toLowerCase();
});
if (!propertyMap.hasOwnProperty(name))
propertyMap[name] = 1;
}
}
this.completionsDefined = true;
}
this.getCompletions = function(state, session, pos, prefix) {
if (!this.completionsDefined) {
this.defineCompletions();
}
var token = session.getTokenAt(pos.row, pos.column);
if (!token)
return [];
if (state==='ruleset'){
var line = session.getLine(pos.row).substr(0, pos.column);
if (/:[^;]+$/.test(line)) {
/([\w\-]+):[^:]*$/.test(line);
return this.getPropertyValueCompletions(state, session, pos, prefix);
} else {
return this.getPropertyCompletions(state, session, pos, prefix);
}
}
return [];
};
this.getPropertyCompletions = function(state, session, pos, prefix) {
var properties = Object.keys(propertyMap);
return properties.map(function(property){
return {
caption: property,
snippet: property + ': $0',
meta: "property",
score: Number.MAX_VALUE
};
});
};
this.getPropertyValueCompletions = function(state, session, pos, prefix) {
var line = session.getLine(pos.row).substr(0, pos.column);
var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1];
if (!property)
return [];
var values = [];
if (property in propertyMap && typeof propertyMap[property] === "object") {
values = Object.keys(propertyMap[property]);
}
return values.map(function(value){
return {
caption: value,
snippet: value,
meta: "property value",
score: Number.MAX_VALUE
};
});
};
}).call(CssCompletions.prototype);
exports.CssCompletions = CssCompletions;
});
define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
var TokenIterator = require("../../token_iterator").TokenIterator;
var CssBehaviour = function () {
this.inherit(CstyleBehaviour);
this.add("colon", "insertion", function (state, action, editor, session, text) {
if (text === ':') {
var cursor = editor.getCursorPosition();
var iterator = new TokenIterator(session, cursor.row, cursor.column);
var token = iterator.getCurrentToken();
if (token && token.value.match(/\s+/)) {
token = iterator.stepBackward();
}
if (token && token.type === 'support.type') {
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar === ':') {
return {
text: '',
selection: [1, 1]
}
}
if (!line.substring(cursor.column).match(/^\s*;/)) {
return {
text: ':;',
selection: [1, 1]
}
}
}
}
});
this.add("colon", "deletion", function (state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected === ':') {
var cursor = editor.getCursorPosition();
var iterator = new TokenIterator(session, cursor.row, cursor.column);
var token = iterator.getCurrentToken();
if (token && token.value.match(/\s+/)) {
token = iterator.stepBackward();
}
if (token && token.type === 'support.type') {
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.end.column, range.end.column + 1);
if (rightChar === ';') {
range.end.column ++;
return range;
}
}
}
});
this.add("semicolon", "insertion", function (state, action, editor, session, text) {
if (text === ';') {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar === ';') {
return {
text: '',
selection: [1, 1]
}
}
}
});
}
oop.inherits(CssBehaviour, CstyleBehaviour);
exports.CssBehaviour = CssBehaviour;
});
define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var TextMode = require("./text").Mode;
var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
var WorkerClient = require("../worker/worker_client").WorkerClient;
var CssCompletions = require("./css_completions").CssCompletions;
var CssBehaviour = require("./behaviour/css").CssBehaviour;
var CStyleFoldMode = require("./folding/cstyle").FoldMode;
var Mode = function() {
this.HighlightRules = CssHighlightRules;
this.$outdent = new MatchingBraceOutdent();
this.$behaviour = new CssBehaviour();
this.$completer = new CssCompletions();
this.foldingRules = new CStyleFoldMode();
};
oop.inherits(Mode, TextMode);
(function() {
this.foldingRules = "cStyle";
this.blockComment = {start: "/*", end: "*/"};
this.getNextLineIndent = function(state, line, tab) {
var indent = this.$getIndent(line);
var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
if (tokens.length && tokens[tokens.length-1].type == "comment") {
return indent;
}
var match = line.match(/^.*\{\s*$/);
if (match) {
indent += tab;
}
return indent;
};
this.checkOutdent = function(state, line, input) {
return this.$outdent.checkOutdent(line, input);
};
this.autoOutdent = function(state, doc, row) {
this.$outdent.autoOutdent(doc, row);
};
this.getCompletions = function(state, session, pos, prefix) {
return this.$completer.getCompletions(state, session, pos, prefix);
};
this.createWorker = function(session) {
var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
worker.attachToDocument(session.getDocument());
worker.on("annotate", function(e) {
session.setAnnotations(e.data);
});
worker.on("terminate", function() {
session.clearAnnotations();
});
return worker;
};
this.$id = "ace/mode/css";
}).call(Mode.prototype);
exports.Mode = Mode;
});
define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var XmlHighlightRules = function(normalize) {
var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
this.$rules = {
start : [
{token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
{
token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"],
regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true
},
{
token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
},
{token : "comment.xml", regex : "<\\!--", next : "comment"},
{
token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
},
{include : "tag"},
{token : "text.end-tag-open.xml", regex: "</"},
{token : "text.tag-open.xml", regex: "<"},
{include : "reference"},
{defaultToken : "text.xml"}
],
xml_decl : [{
token : "entity.other.attribute-name.decl-attribute-name.xml",
regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
}, {
token : "keyword.operator.decl-attribute-equals.xml",
regex : "="
}, {
include: "whitespace"
}, {
include: "string"
}, {
token : "punctuation.xml-decl.xml",
regex : "\\?>",
next : "start"
}],
processing_instruction : [
{token : "punctuation.instruction.xml", regex : "\\?>", next : "start"},
{defaultToken : "instruction.xml"}
],
doctype : [
{include : "whitespace"},
{include : "string"},
{token : "xml-pe.doctype.xml", regex : ">", next : "start"},
{token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
{token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
],
int_subset : [{
token : "text.xml",
regex : "\\s+"
}, {
token: "punctuation.int-subset.xml",
regex: "]",
next: "pop"
}, {
token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
regex : "(<\\!)(" + tagRegex + ")",
push : [{
token : "text",
regex : "\\s+"
},
{
token : "punctuation.markup-decl.xml",
regex : ">",
next : "pop"
},
{include : "string"}]
}],
cdata : [
{token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
{token : "text.xml", regex : "\\s+"},
{token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
],
comment : [
{token : "comment.xml", regex : "-->", next : "start"},
{defaultToken : "comment.xml"}
],
reference : [{
token : "constant.language.escape.reference.xml",
regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
}],
attr_reference : [{
token : "constant.language.escape.reference.attribute-value.xml",
regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
}],
tag : [{
token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
next: [
{include : "attributes"},
{token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
]
}],
tag_whitespace : [
{token : "text.tag-whitespace.xml", regex : "\\s+"}
],
whitespace : [
{token : "text.whitespace.xml", regex : "\\s+"}
],
string: [{
token : "string.xml",
regex : "'",
push : [
{token : "string.xml", regex: "'", next: "pop"},
{defaultToken : "string.xml"}
]
}, {
token : "string.xml",
regex : '"',
push : [
{token : "string.xml", regex: '"', next: "pop"},
{defaultToken : "string.xml"}
]
}],
attributes: [{
token : "entity.other.attribute-name.xml",
regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
}, {
token : "keyword.operator.attribute-equals.xml",
regex : "="
}, {
include: "tag_whitespace"
}, {
include: "attribute_value"
}],
attribute_value: [{
token : "string.attribute-value.xml",
regex : "'",
push : [
{token : "string.attribute-value.xml", regex: "'", next: "pop"},
{include : "attr_reference"},
{defaultToken : "string.attribute-value.xml"}
]
}, {
token : "string.attribute-value.xml",
regex : '"',
push : [
{token : "string.attribute-value.xml", regex: '"', next: "pop"},
{include : "attr_reference"},
{defaultToken : "string.attribute-value.xml"}
]
}]
};
if (this.constructor === XmlHighlightRules)
this.normalizeRules();
};
(function() {
this.embedTagRules = function(HighlightRules, prefix, tag){
this.$rules.tag.unshift({
token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
regex : "(<)(" + tag + "(?=\\s|>|$))",
next: [
{include : "attributes"},
{token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
]
});
this.$rules[tag + "-end"] = [
{include : "attributes"},
{token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
onMatch : function(value, currentState, stack) {
stack.splice(0);
return this.token;
}}
]
this.embedRules(HighlightRules, prefix, [{
token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
regex : "(</)(" + tag + "(?=\\s|>|$))",
next: tag + "-end"
}, {
token: "string.cdata.xml",
regex : "<\\!\\[CDATA\\["
}, {
token: "string.cdata.xml",
regex : "\\]\\]>"
}]);
};
}).call(TextHighlightRules.prototype);
oop.inherits(XmlHighlightRules, TextHighlightRules);
exports.XmlHighlightRules = XmlHighlightRules;
});
define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
var tagMap = lang.createMap({
a : 'anchor',
button : 'form',
form : 'form',
img : 'image',
input : 'form',
label : 'form',
option : 'form',
script : 'script',
select : 'form',
textarea : 'form',
style : 'style',
table : 'table',
tbody : 'table',
td : 'table',
tfoot : 'table',
th : 'table',
tr : 'table'
});
var HtmlHighlightRules = function() {
XmlHighlightRules.call(this);
this.addRules({
attributes: [{
include : "tag_whitespace"
}, {
token : "entity.other.attribute-name.xml",
regex : "[-_a-zA-Z0-9:.]+"
}, {
token : "keyword.operator.attribute-equals.xml",
regex : "=",
push : [{
include: "tag_whitespace"
}, {
token : "string.unquoted.attribute-value.html",
regex : "[^<>='\"`\\s]+",
next : "pop"
}, {
token : "empty",
regex : "",
next : "pop"
}]
}, {
include : "attribute_value"
}],
tag: [{
token : function(start, tag) {
var group = tagMap[tag];
return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
"meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
},
regex : "(</?)([-_a-zA-Z0-9:.]+)",
next: "tag_stuff"
}],
tag_stuff: [
{include : "attributes"},
{token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
]
});
this.embedTagRules(CssHighlightRules, "css-", "style");
this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
if (this.constructor === HtmlHighlightRules)
this.normalizeRules();
};
oop.inherits(HtmlHighlightRules, XmlHighlightRules);
exports.HtmlHighlightRules = HtmlHighlightRules;
});
define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
var TokenIterator = require("../../token_iterator").TokenIterator;
var lang = require("../../lib/lang");
function is(token, type) {
return token.type.lastIndexOf(type + ".xml") > -1;
}
var XmlBehaviour = function () {
this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
if (text == '"' || text == "'") {
var quote = text;
var selected = session.doc.getTextRange(editor.getSelectionRange());
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
return {
text: quote + selected + quote,
selection: false
};
}
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
var iterator = new TokenIterator(session, cursor.row, cursor.column);
var token = iterator.getCurrentToken();
if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
return {
text: "",
selection: [1, 1]
};
}
if (!token)
token = iterator.stepBackward();
if (!token)
return;
while (is(token, "tag-whitespace") || is(token, "whitespace")) {
token = iterator.stepBackward();
}
var rightSpace = !rightChar || rightChar.match(/\s/);
if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
return {
text: quote + quote,
selection: [1, 1]
};
}
}
});
this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == selected) {
range.end.column++;
return range;
}
}
});
this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
if (text == '>') {
var position = editor.getSelectionRange().start;
var iterator = new TokenIterator(session, position.row, position.column);
var token = iterator.getCurrentToken() || iterator.stepBackward();
if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
return;
if (is(token, "reference.attribute-value"))
return;
if (is(token, "attribute-value")) {
var firstChar = token.value.charAt(0);
if (firstChar == '"' || firstChar == "'") {
var lastChar = token.value.charAt(token.value.length - 1);
var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
return;
}
}
while (!is(token, "tag-name")) {
token = iterator.stepBackward();
if (token.value == "<") {
token = iterator.stepForward();
break;
}
}
var tokenRow = iterator.getCurrentTokenRow();
var tokenColumn = iterator.getCurrentTokenColumn();
if (is(iterator.stepBackward(), "end-tag-open"))
return;
var element = token.value;
if (tokenRow == position.row)
element = element.substring(0, position.column - tokenColumn);
if (this.voidElements.hasOwnProperty(element.toLowerCase()))
return;
return {
text: ">" + "</" + element + ">",
selection: [1, 1]
};
}
});
this.add("autoindent", "insertion", function (state, action, editor, session, text) {
if (text == "\n") {
var cursor = editor.getCursorPosition();
var line = session.getLine(cursor.row);
var iterator = new TokenIterator(session, cursor.row, cursor.column);
var token = iterator.getCurrentToken();
if (token && token.type.indexOf("tag-close") !== -1) {
if (token.value == "/>")
return;
while (token && token.type.indexOf("tag-name") === -1) {
token = iterator.stepBackward();
}
if (!token) {
return;
}
var tag = token.value;
var row = iterator.getCurrentTokenRow();
token = iterator.stepBackward();
if (!token || token.type.indexOf("end-tag") !== -1) {
return;
}
if (this.voidElements && !this.voidElements[tag]) {
var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
var line = session.getLine(row);
var nextIndent = this.$getIndent(line);
var indent = nextIndent + session.getTabString();
if (nextToken && nextToken.value === "</") {
return {
text: "\n" + indent + "\n" + nextIndent,
selection: [1, indent.length, 1, indent.length]
};
} else {
return {
text: "\n" + indent
};
}
}
}
}
});
};
oop.inherits(XmlBehaviour, Behaviour);
exports.XmlBehaviour = XmlBehaviour;
});
define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) {
"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
var FoldMode = exports.FoldMode = function(defaultMode, subModes) {
this.defaultMode = defaultMode;
this.subModes = subModes;
};
oop.inherits(FoldMode, BaseFoldMode);
(function() {
this.$getMode = function(state) {
if (typeof state != "string")
state = state[0];
for (var key in this.subModes) {
if (state.indexOf(key) === 0)
return this.subModes[key];
}
return null;
};
this.$tryMode = function(state, session, foldStyle, row) {
var mode = this.$getMode(state);
return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
};
this.getFoldWidget = function(session, foldStyle, row) {
return (
this.$tryMode(session.getState(row-1), session, foldStyle, row) ||
this.$tryMode(session.getState(row), session, foldStyle, row) ||
this.defaultMode.getFoldWidget(session, foldStyle, row)
);
};
this.getFoldWidgetRange = function(session, foldStyle, row) {
var mode = this.$getMode(session.getState(row-1));
if (!mode || !mode.getFoldWidget(session, foldStyle, row))
mode = this.$getMode(session.getState(row));
if (!mode || !mode.getFoldWidget(session, foldStyle, row))
mode = this.defaultMode;
return mode.getFoldWidgetRange(session, foldStyle, row);
};
}).call(FoldMode.prototype);
});
define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) {
"use strict";
var oop = require("../../lib/oop");
var lang = require("../../lib/lang");
var Range = require("../../range").Range;
var BaseFoldMode = require("./fold_mode").FoldMode;
var TokenIterator = require("../../token_iterator").TokenIterator;
var FoldMode = exports.FoldMode = function(voidElements, optionalEndTags) {
BaseFoldMode.call(this);
this.voidElements = voidElements || {};
this.optionalEndTags = oop.mixin({}, this.voidElements);
if (optionalEndTags)
oop.mixin(this.optionalEndTags, optionalEndTags);
};
oop.inherits(FoldMode, BaseFoldMode);
var Tag = function() {
this.tagName = "";
this.closing = false;
this.selfClosing = false;
this.start = {row: 0, column: 0};
this.end = {row: 0, column: 0};
};
function is(token, type) {
return token.type.lastIndexOf(type + ".xml") > -1;
}
(function() {
this.getFoldWidget = function(session, foldStyle, row) {
var tag = this._getFirstTagInLine(session, row);
if (!tag)
return "";
if (tag.closing || (!tag.tagName && tag.selfClosing))
return foldStyle == "markbeginend" ? "end" : "";
if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
return "";
if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
return "";
return "start";
};
this._getFirstTagInLine = function(session, row) {
var tokens = session.getTokens(row);
var tag = new Tag();
for (var i = 0; i < tokens.length; i++) {
var token = tokens[i];
if (is(token, "tag-open")) {
tag.end.column = tag.start.column + token.value.length;
tag.closing = is(token, "end-tag-open");
token = tokens[++i];
if (!token)
return null;
tag.tagName = token.value;
tag.end.column += token.value.length;
for (i++; i < tokens.length; i++) {
token = tokens[i];
tag.end.column += token.value.length;
if (is(token, "tag-close")) {
tag.selfClosing = token.value == '/>';
break;
}
}
return tag;
} else if (is(token, "tag-close")) {
tag.selfClosing = token.value == '/>';
return tag;
}
tag.start.column += token.value.length;
}
return null;
};
this._findEndTagInLine = function(session, row, tagName, startColumn) {
var tokens = session.getTokens(row);
var column = 0;
for (var i = 0; i < tokens.length; i++) {
var token = tokens[i];
column += token.value.length;
if (column < startColumn)
continue;
if (is(token, "end-tag-open")) {
token = tokens[i + 1];
if (token && token.value == tagName)
return true;
}
}
return false;
};
this._readTagForward = function(iterator) {
var token = iterator.getCurrentToken();
if (!token)
return null;
var tag = new Tag();
do {
if (is(token, "tag-open")) {
tag.closing = is(token, "end-tag-open");
tag.start.row = iterator.getCurrentTokenRow();
tag.start.column = iterator.getCurrentTokenColumn();
} else if (is(token, "tag-name")) {
tag.tagName = token.value;
} else if (is(token, "tag-close")) {
tag.selfClosing = token.value == "/>";
tag.end.row = iterator.getCurrentTokenRow();
tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
iterator.stepForward();
return tag;
}
} while(token = iterator.stepForward());
return null;
};
this._readTagBackward = function(iterator) {
var token = iterator.getCurrentToken();
if (!token)
return null;
var tag = new Tag();
do {
if (is(token, "tag-open")) {
tag.closing = is(token, "end-tag-open");
tag.start.row = iterator.getCurrentTokenRow();
tag.start.column = iterator.getCurrentTokenColumn();
iterator.stepBackward();
return tag;
} else if (is(token, "tag-name")) {
tag.tagName = token.value;
} else if (is(token, "tag-close")) {
tag.selfClosing = token.value == "/>";
tag.end.row = iterator.getCurrentTokenRow();
tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
}
} while(token = iterator.stepBackward());
return null;
};
this._pop = function(stack, tag) {
while (stack.length) {
var top = stack[stack.length-1];
if (!tag || top.tagName == tag.tagName) {
return stack.pop();
}
else if (this.optionalEndTags.hasOwnProperty(top.tagName)) {
stack.pop();
continue;
} else {
return null;
}
}
};
this.getFoldWidgetRange = function(session, foldStyle, row) {
var firstTag = this._getFirstTagInLine(session, row);
if (!firstTag)
return null;
var isBackward = firstTag.closing || firstTag.selfClosing;
var stack = [];
var tag;
if (!isBackward) {
var iterator = new TokenIterator(session, row, firstTag.start.column);
var start = {
row: row,
column: firstTag.start.column + firstTag.tagName.length + 2
};
if (firstTag.start.row == firstTag.end.row)
start.column = firstTag.end.column;
while (tag = this._readTagForward(iterator)) {
if (tag.selfClosing) {
if (!stack.length) {
tag.start.column += tag.tagName.length + 2;
tag.end.column -= 2;
return Range.fromPoints(tag.start, tag.end);
} else
continue;
}
if (tag.closing) {
this._pop(stack, tag);
if (stack.length == 0)
return Range.fromPoints(start, tag.start);
}
else {
stack.push(tag);
}
}
}
else {
var iterator = new TokenIterator(session, row, firstTag.end.column);
var end = {
row: row,
column: firstTag.start.column
};
while (tag = this._readTagBackward(iterator)) {
if (tag.selfClosing) {
if (!stack.length) {
tag.start.column += tag.tagName.length + 2;
tag.end.column -= 2;
return Range.fromPoints(tag.start, tag.end);
} else
continue;
}
if (!tag.closing) {
this._pop(stack, tag);
if (stack.length == 0) {
tag.start.column += tag.tagName.length + 2;
if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
tag.start.column = tag.end.column;
return Range.fromPoints(tag.start, end);
}
}
else {
stack.push(tag);
}
}
}
};
}).call(FoldMode.prototype);
});
define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) {
"use strict";
var oop = require("../../lib/oop");
var MixedFoldMode = require("./mixed").FoldMode;
var XmlFoldMode = require("./xml").FoldMode;
var CStyleFoldMode = require("./cstyle").FoldMode;
var FoldMode = exports.FoldMode = function(voidElements, optionalTags) {
MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
"js-": new CStyleFoldMode(),
"css-": new CStyleFoldMode()
});
};
oop.inherits(FoldMode, MixedFoldMode);
});
define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
"use strict";
var TokenIterator = require("../token_iterator").TokenIterator;
var commonAttributes = [
"accesskey",
"class",
"contenteditable",
"contextmenu",
"dir",
"draggable",
"dropzone",
"hidden",
"id",
"inert",
"itemid",
"itemprop",
"itemref",
"itemscope",
"itemtype",
"lang",
"spellcheck",
"style",
"tabindex",
"title",
"translate"
];
var eventAttributes = [
"onabort",
"onblur",
"oncancel",
"oncanplay",
"oncanplaythrough",
"onchange",
"onclick",
"onclose",
"oncontextmenu",
"oncuechange",
"ondblclick",
"ondrag",
"ondragend",
"ondragenter",
"ondragleave",
"ondragover",
"ondragstart",
"ondrop",
"ondurationchange",
"onemptied",
"onended",
"onerror",
"onfocus",
"oninput",
"oninvalid",
"onkeydown",
"onkeypress",
"onkeyup",
"onload",
"onloadeddata",
"onloadedmetadata",
"onloadstart",
"onmousedown",
"onmousemove",
"onmouseout",
"onmouseover",
"onmouseup",
"onmousewheel",
"onpause",
"onplay",
"onplaying",
"onprogress",
"onratechange",
"onreset",
"onscroll",
"onseeked",
"onseeking",
"onselect",
"onshow",
"onstalled",
"onsubmit",
"onsuspend",
"ontimeupdate",
"onvolumechange",
"onwaiting"
];
var globalAttributes = commonAttributes.concat(eventAttributes);
var attributeMap = {
"html": {"manifest": 1},
"head": {},
"title": {},
"base": {"href": 1, "target": 1},
"link": {"href": 1, "hreflang": 1, "rel": {"stylesheet": 1, "icon": 1}, "media": {"all": 1, "screen": 1, "print": 1}, "type": {"text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1}, "sizes": 1},
"meta": {"http-equiv": {"content-type": 1}, "name": {"description": 1, "keywords": 1}, "content": {"text/html; charset=UTF-8": 1}, "charset": 1},
"style": {"type": 1, "media": {"all": 1, "screen": 1, "print": 1}, "scoped": 1},
"script": {"charset": 1, "type": {"text/javascript": 1}, "src": 1, "defer": 1, "async": 1},
"noscript": {"href": 1},
"body": {"onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1},
"section": {},
"nav": {},
"article": {"pubdate": 1},
"aside": {},
"h1": {},
"h2": {},
"h3": {},
"h4": {},
"h5": {},
"h6": {},
"header": {},
"footer": {},
"address": {},
"main": {},
"p": {},
"hr": {},
"pre": {},
"blockquote": {"cite": 1},
"ol": {"start": 1, "reversed": 1},
"ul": {},
"li": {"value": 1},
"dl": {},
"dt": {},
"dd": {},
"figure": {},
"figcaption": {},
"div": {},
"a": {"href": 1, "target": {"_blank": 1, "top": 1}, "ping": 1, "rel": {"nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1}, "media": 1, "hreflang": 1, "type": 1},
"em": {},
"strong": {},
"small": {},
"s": {},
"cite": {},
"q": {"cite": 1},
"dfn": {},
"abbr": {},
"data": {},
"time": {"datetime": 1},
"code": {},
"var": {},
"samp": {},
"kbd": {},
"sub": {},
"sup": {},
"i": {},
"b": {},
"u": {},
"mark": {},
"ruby": {},
"rt": {},
"rp": {},
"bdi": {},
"bdo": {},
"span": {},
"br": {},
"wbr": {},
"ins": {"cite": 1, "datetime": 1},
"del": {"cite": 1, "datetime": 1},
"img": {"alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1},
"iframe": {"name": 1, "src": 1, "height": 1, "width": 1, "sandbox": {"allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1}, "seamless": {"seamless": 1}},
"embed": {"src": 1, "height": 1, "width": 1, "type": 1},
"object": {"param": 1, "data": 1, "type": 1, "height" : 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1},
"param": {"name": 1, "value": 1},
"video": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "width": 1, "height": 1, "poster": 1, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1}},
"audio": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1 }},
"source": {"src": 1, "type": 1, "media": 1},
"track": {"kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1},
"canvas": {"width": 1, "height": 1},
"map": {"name": 1},
"area": {"shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1},
"svg": {},
"math": {},
"table": {"summary": 1},
"caption": {},
"colgroup": {"span": 1},
"col": {"span": 1},
"tbody": {},
"thead": {},
"tfoot": {},
"tr": {},
"td": {"headers": 1, "rowspan": 1, "colspan": 1},
"th": {"headers": 1, "rowspan": 1, "colspan": 1, "scope": 1},
"form": {"accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": {"multipart/form-data": 1, "application/x-www-form-urlencoded": 1}, "method": {"get": 1, "post": 1}, "name": 1, "novalidate": 1, "target": {"_blank": 1, "top": 1}},
"fieldset": {"disabled": 1, "form": 1, "name": 1},
"legend": {},
"label": {"form": 1, "for": 1},
"input": {
"type": {"text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1},
"accept": 1, "alt": 1, "autocomplete": {"on": 1, "off": 1}, "autofocus": {"autofocus": 1}, "checked": {"checked": 1}, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": {"application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1}, "formmethod": {"get": 1, "post": 1}, "formnovalidate": {"formnovalidate": 1}, "formtarget": {"_blank": 1, "_self": 1, "_parent": 1, "_top": 1}, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": {"multiple": 1}, "name": 1, "pattern": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1},
"button": {"autofocus": 1, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": {"button": 1, "submit": 1}},
"select": {"autofocus": 1, "disabled": 1, "form": 1, "multiple": {"multiple": 1}, "name": 1, "size": 1, "readonly":{"readonly": 1}},
"datalist": {},
"optgroup": {"disabled": 1, "label": 1},
"option": {"disabled": 1, "selected": 1, "label": 1, "value": 1},
"textarea": {"autofocus": {"autofocus": 1}, "disabled": {"disabled": 1}, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "rows": 1, "cols": 1, "wrap": {"on": 1, "off": 1, "hard": 1, "soft": 1}},
"keygen": {"autofocus": 1, "challenge": {"challenge": 1}, "disabled": {"disabled": 1}, "form": 1, "keytype": {"rsa": 1, "dsa": 1, "ec": 1}, "name": 1},
"output": {"for": 1, "form": 1, "name": 1},
"progress": {"value": 1, "max": 1},
"meter": {"value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1},
"details": {"open": 1},
"summary": {},
"command": {"type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1},
"menu": {"type": 1, "label": 1},
"dialog": {"open": 1}
};
var elements = Object.keys(attributeMap);
function is(token, type) {
return token.type.lastIndexOf(type + ".xml") > -1;
}
function findTagName(session, pos) {
var iterator = new TokenIterator(session, pos.row, pos.column);
var token = iterator.getCurrentToken();
while (token && !is(token, "tag-name")){
token = iterator.stepBackward();
}
if (token)
return token.value;
}
function findAttributeName(session, pos) {
var iterator = new TokenIterator(session, pos.row, pos.column);
var token = iterator.getCurrentToken();
while (token && !is(token, "attribute-name")){
token = iterator.stepBackward();
}
if (token)
return token.value;
}
var HtmlCompletions = function() {
};
(function() {
this.getCompletions = function(state, session, pos, prefix) {
var token = session.getTokenAt(pos.row, pos.column);
if (!token)
return [];
if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
return this.getTagCompletions(state, session, pos, prefix);
if (is(token, "tag-whitespace") || is(token, "attribute-name"))
return this.getAttributeCompletions(state, session, pos, prefix);
if (is(token, "attribute-value"))
return this.getAttributeValueCompletions(state, session, pos, prefix);
var line = session.getLine(pos.row).substr(0, pos.column);
if (/&[a-z]*$/i.test(line))
return this.getHTMLEntityCompletions(state, session, pos, prefix);
return [];
};
this.getTagCompletions = function(state, session, pos, prefix) {
return elements.map(function(element){
return {
value: element,
meta: "tag",
score: Number.MAX_VALUE
};
});
};
this.getAttributeCompletions = function(state, session, pos, prefix) {
var tagName = findTagName(session, pos);
if (!tagName)
return [];
var attributes = globalAttributes;
if (tagName in attributeMap) {
attributes = attributes.concat(Object.keys(attributeMap[tagName]));
}
return attributes.map(function(attribute){
return {
caption: attribute,
snippet: attribute + '="$0"',
meta: "attribute",
score: Number.MAX_VALUE
};
});
};
this.getAttributeValueCompletions = function(state, session, pos, prefix) {
var tagName = findTagName(session, pos);
var attributeName = findAttributeName(session, pos);
if (!tagName)
return [];
var values = [];
if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") {
values = Object.keys(attributeMap[tagName][attributeName]);
}
return values.map(function(value){
return {
caption: value,
snippet: value,
meta: "attribute value",
score: Number.MAX_VALUE
};
});
};
this.getHTMLEntityCompletions = function(state, session, pos, prefix) {
var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;'];
return values.map(function(value){
return {
caption: value,
snippet: value,
meta: "html entity",
score: Number.MAX_VALUE
};
});
};
}).call(HtmlCompletions.prototype);
exports.HtmlCompletions = HtmlCompletions;
});
define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
var TextMode = require("./text").Mode;
var JavaScriptMode = require("./javascript").Mode;
var CssMode = require("./css").Mode;
var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
var HtmlFoldMode = require("./folding/html").FoldMode;
var HtmlCompletions = require("./html_completions").HtmlCompletions;
var WorkerClient = require("../worker/worker_client").WorkerClient;
var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
var Mode = function(options) {
this.fragmentContext = options && options.fragmentContext;
this.HighlightRules = HtmlHighlightRules;
this.$behaviour = new XmlBehaviour();
this.$completer = new HtmlCompletions();
this.createModeDelegates({
"js-": JavaScriptMode,
"css-": CssMode
});
this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
};
oop.inherits(Mode, TextMode);
(function() {
this.blockComment = {start: "<!--", end: "-->"};
this.voidElements = lang.arrayToMap(voidElements);
this.getNextLineIndent = function(state, line, tab) {
return this.$getIndent(line);
};
this.checkOutdent = function(state, line, input) {
return false;
};
this.getCompletions = function(state, session, pos, prefix) {
return this.$completer.getCompletions(state, session, pos, prefix);
};
this.createWorker = function(session) {
if (this.constructor != Mode)
return;
var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
worker.attachToDocument(session.getDocument());
if (this.fragmentContext)
worker.call("setOptions", [{context: this.fragmentContext}]);
worker.on("error", function(e) {
session.setAnnotations(e.data);
});
worker.on("terminate", function() {
session.clearAnnotations();
});
return worker;
};
this.$id = "ace/mode/html";
}).call(Mode.prototype);
exports.Mode = Mode;
});
define("ace/mode/tex_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var TexHighlightRules = function(textClass) {
if (!textClass)
textClass = "text";
this.$rules = {
"start" : [
{
token : "comment",
regex : "%.*$"
}, {
token : textClass, // non-command
regex : "\\\\[$&%#\\{\\}]"
}, {
token : "keyword", // command
regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b",
next : "nospell"
}, {
token : "keyword", // command
regex : "\\\\(?:[a-zA-Z0-9]+|[^a-zA-Z0-9])"
}, {
token : "paren.keyword.operator",
regex : "[[({]"
}, {
token : "paren.keyword.operator",
regex : "[\\])}]"
}, {
token : textClass,
regex : "\\s+"
}
],
"nospell" : [
{
token : "comment",
regex : "%.*$",
next : "start"
}, {
token : "nospell." + textClass, // non-command
regex : "\\\\[$&%#\\{\\}]"
}, {
token : "keyword", // command
regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b"
}, {
token : "keyword", // command
regex : "\\\\(?:[a-zA-Z0-9]+|[^a-zA-Z0-9])",
next : "start"
}, {
token : "paren.keyword.operator",
regex : "[[({]"
}, {
token : "paren.keyword.operator",
regex : "[\\])]"
}, {
token : "paren.keyword.operator",
regex : "}",
next : "start"
}, {
token : "nospell." + textClass,
regex : "\\s+"
}, {
token : "nospell." + textClass,
regex : "\\w+"
}
]
};
};
oop.inherits(TexHighlightRules, TextHighlightRules);
exports.TexHighlightRules = TexHighlightRules;
});
define("ace/mode/r_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/tex_highlight_rules"], function(require, exports, module)
{
var oop = require("../lib/oop");
var lang = require("../lib/lang");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var TexHighlightRules = require("./tex_highlight_rules").TexHighlightRules;
var RHighlightRules = function()
{
var keywords = lang.arrayToMap(
("function|if|in|break|next|repeat|else|for|return|switch|while|try|tryCatch|stop|warning|require|library|attach|detach|source|setMethod|setGeneric|setGroupGeneric|setClass")
.split("|")
);
var buildinConstants = lang.arrayToMap(
("NULL|NA|TRUE|FALSE|T|F|Inf|NaN|NA_integer_|NA_real_|NA_character_|" +
"NA_complex_").split("|")
);
this.$rules = {
"start" : [
{
token : "comment.sectionhead",
regex : "#+(?!').*(?:----|====|####)\\s*$"
},
{
token : "comment",
regex : "#+'",
next : "rd-start"
},
{
token : "comment",
regex : "#.*$"
},
{
token : "string", // multi line string start
regex : '["]',
next : "qqstring"
},
{
token : "string", // multi line string start
regex : "[']",
next : "qstring"
},
{
token : "constant.numeric", // hex
regex : "0[xX][0-9a-fA-F]+[Li]?\\b"
},
{
token : "constant.numeric", // explicit integer
regex : "\\d+L\\b"
},
{
token : "constant.numeric", // number
regex : "\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b"
},
{
token : "constant.numeric", // number with leading decimal
regex : "\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b"
},
{
token : "constant.language.boolean",
regex : "(?:TRUE|FALSE|T|F)\\b"
},
{
token : "identifier",
regex : "`.*?`"
},
{
onMatch : function(value) {
if (keywords[value])
return "keyword";
else if (buildinConstants[value])
return "constant.language";
else if (value == '...' || value.match(/^\.\.\d+$/))
return "variable.language";
else
return "identifier";
},
regex : "[a-zA-Z.][a-zA-Z0-9._]*\\b"
},
{
token : "keyword.operator",
regex : "%%|>=|<=|==|!=|\\->|<\\-|\\|\\||&&|=|\\+|\\-|\\*|/|\\^|>|<|!|&|\\||~|\\$|:"
},
{
token : "keyword.operator", // infix operators
regex : "%.*?%"
},
{
token : "paren.keyword.operator",
regex : "[[({]"
},
{
token : "paren.keyword.operator",
regex : "[\\])}]"
},
{
token : "text",
regex : "\\s+"
}
],
"qqstring" : [
{
token : "string",
regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
next : "start"
},
{
token : "string",
regex : '.+'
}
],
"qstring" : [
{
token : "string",
regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
next : "start"
},
{
token : "string",
regex : '.+'
}
]
};
var rdRules = new TexHighlightRules("comment").getRules();
for (var i = 0; i < rdRules["start"].length; i++) {
rdRules["start"][i].token += ".virtual-comment";
}
this.addRules(rdRules, "rd-");
this.$rules["rd-start"].unshift({
token: "text",
regex: "^",
next: "start"
});
this.$rules["rd-start"].unshift({
token : "keyword",
regex : "@(?!@)[^ ]*"
});
this.$rules["rd-start"].unshift({
token : "comment",
regex : "@@"
});
this.$rules["rd-start"].push({
token : "comment",
regex : "[^%\\\\[({\\])}]+"
});
};
oop.inherits(RHighlightRules, TextHighlightRules);
exports.RHighlightRules = RHighlightRules;
});
define("ace/mode/rhtml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/r_highlight_rules","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var RHighlightRules = require("./r_highlight_rules").RHighlightRules;
var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var RHtmlHighlightRules = function() {
HtmlHighlightRules.call(this);
this.$rules["start"].unshift({
token: "support.function.codebegin",
regex: "^<" + "!--\\s*begin.rcode\\s*(?:.*)",
next: "r-start"
});
this.embedRules(RHighlightRules, "r-", [{
token: "support.function.codeend",
regex: "^\\s*end.rcode\\s*-->",
next: "start"
}], ["start"]);
this.normalizeRules();
};
oop.inherits(RHtmlHighlightRules, TextHighlightRules);
exports.RHtmlHighlightRules = RHtmlHighlightRules;
});
define("ace/mode/rhtml",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/rhtml_highlight_rules"], function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var HtmlMode = require("./html").Mode;
var RHtmlHighlightRules = require("./rhtml_highlight_rules").RHtmlHighlightRules;
var Mode = function(doc, session) {
HtmlMode.call(this);
this.$session = session;
this.HighlightRules = RHtmlHighlightRules;
};
oop.inherits(Mode, HtmlMode);
(function() {
this.insertChunkInfo = {
value: "<!--begin.rcode\n\nend.rcode-->\n",
position: {row: 0, column: 15}
};
this.getLanguageMode = function(position)
{
return this.$session.getState(position.row).match(/^r-/) ? 'R' : 'HTML';
};
this.$id = "ace/mode/rhtml";
}).call(Mode.prototype);
exports.Mode = Mode;
});
| ninapavlich/django-ace-overlay | ace_overlay/static/ace_overlay/ace/mode-rhtml.js | JavaScript | mit | 107,049 |
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
/*=============================================================================
**
** Source: test2.c
**
** Dependencies: PAL_Initialize
** PAL_Terminate
** CreateEvent
** CloseHandle
** WaitForSingleObject
**
** Purpose:
**
** Test to ensure proper operation of the SetEvent()
** API by calling it on an event handle that's already set.
**
**
**===========================================================================*/
#include <palsuite.h>
int __cdecl main( int argc, char **argv )
{
/* local variables */
DWORD dwRet = 0;
HANDLE hEvent = NULL;
LPSECURITY_ATTRIBUTES lpEventAttributes = NULL;
BOOL bManualReset = TRUE;
BOOL bInitialState = FALSE;
/* PAL initialization */
if( (PAL_Initialize(argc, argv)) != 0 )
{
return( FAIL );
}
/* create an event which we can use with SetEvent */
hEvent = CreateEvent( lpEventAttributes,
bManualReset,
bInitialState,
NULL );
if( hEvent == INVALID_HANDLE_VALUE )
{
/* ERROR */
Fail( "ERROR:%lu:CreateEvent() call failed\n", GetLastError() );
}
/* verify that the event isn't signalled yet */
dwRet = WaitForSingleObject( hEvent, 0 );
if( dwRet != WAIT_TIMEOUT )
{
/* ERROR */
Trace( "ERROR:WaitForSingleObject() call returned %lu, "
"expected WAIT_TIMEOUT\n",
dwRet );
CloseHandle( hEvent );
Fail( "Test failed\n" );
}
/* set the event */
if( ! SetEvent( hEvent ) )
{
/* ERROR */
Trace( "ERROR:%lu:SetEvent() call failed\n", GetLastError() );
CloseHandle( hEvent );
Fail( "Test failed\n" );
}
/* verify that the event is signalled */
dwRet = WaitForSingleObject( hEvent, 0 );
if( dwRet != WAIT_OBJECT_0 )
{
/* ERROR */
Trace( "ERROR:WaitForSingleObject() call returned %lu, "
"expected WAIT_OBJECT_0\n",
dwRet );
CloseHandle( hEvent );
Fail( "Test failed\n" );
}
/* try to set the event again */
if( ! SetEvent( hEvent ) )
{
/* ERROR */
Trace( "FAIL:%lu:SetEvent() call failed on signalled event\n",
GetLastError() );
CloseHandle( hEvent );
Fail( "Test failed\n" );
}
/* verify that the event is still signalled */
dwRet = WaitForSingleObject( hEvent, 0 );
if( dwRet != WAIT_OBJECT_0 )
{
/* ERROR */
Trace( "ERROR:WaitForSingleObject() call returned %lu, "
"expected WAIT_OBJECT_0\n",
dwRet );
CloseHandle( hEvent );
Fail( "Test failed\n" );
}
/* close the event handle */
if( ! CloseHandle( hEvent ) )
{
Fail( "ERROR:%lu:CloseHandle() call failed\n", GetLastError() );
}
/* PAL termination */
PAL_Terminate();
/* return success */
return PASS;
}
| MCGPPeters/coreclr | src/pal/tests/palsuite/threading/SetEvent/test2/test2.c | C | mit | 3,310 |
# Copyright (c) 2008-2013 Michael Dvorkin and contributors.
#
# Fat Free CRM is freely distributable under the terms of MIT license.
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
#------------------------------------------------------------------------------
# config valid only for Capistrano 3.1
lock '3.2.1'
set :application, 'fat_free_crm'
set :repo_url, 'git://github.com/fatfreecrm/fat_free_crm.git'
# Default branch is :master
# ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }.call
# Default deploy_to directory is /var/www/my_app
# set :deploy_to, '/var/www/my_app'
# Default value for :scm is :git
# set :scm, :git
# Default value for :format is :pretty
# set :format, :pretty
# Default value for :log_level is :debug
# set :log_level, :debug
# Default value for :pty is false
# set :pty, true
# Default value for :linked_files is []
set :linked_files, %w(config/database.yml config/settings.yml)
# Default value for linked_dirs is []
# set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}
# Default value for default_env is {}
# set :default_env, { path: "/opt/ruby/bin:$PATH" }
# Default value for keep_releases is 5
# set :keep_releases, 5
set :rvm_ruby_version, '2.1.5'
namespace :deploy do
desc 'Restart application'
task :restart do
on roles(:app), in: :sequence, wait: 5 do
# Your restart mechanism here, for example:
# execute :touch, release_path.join('tmp/restart.txt')
end
end
after :publishing, :restart
after :restart, :clear_cache do
on roles(:web), in: :groups, limit: 3, wait: 10 do
# Here we can do anything such as:
# within release_path do
# execute :rake, 'cache:clear'
# end
end
end
end
# cap production invoke[db:migrate]
# cap production invoke[db:reset]
desc "Invoke a rake command on the remote server: cap production invoke[db:migrate]"
task :invoke, [:command] => 'deploy:set_rails_env' do |_task, args|
on primary(:app) do
within current_path do
with rails_env: fetch(:rails_env) do
rake args[:command]
end
end
end
end
| leikir/fat_free_crm | config/deploy.example.rb | Ruby | mit | 2,152 |
.msettings_main {
background-color: #dddddd;
position: absolute;
text-align:left;
width: 150px;
font: 9px sans-serif;
box-shadow: 5px 5px 8px rgba(0, 0, 0, 0.35);
user-select: none;
-webkit-user-select: none;
}
.msettings_content {
background-color: #dddddd;
overflow-y: auto;
}
.msettings_title_bar {
background-color: #ffffff;
user-select: none;
-webkit-user-select: none;
cursor: pointer;
padding: 3px;
border: 1px #eeeeee solid;
}
.msettings_container {
margin: 3px;
padding: 3px;
background-color: #eeeeee;
}
.msettings_range {
-webkit-appearance: none;
width: 100%;
padding: 0px;
margin: 0px;
}
.msettings_range:focus {
outline: none;
}
.msettings_range::-ms-track {
width: 100%;
cursor: pointer;
background: transparent;
border-color: transparent;
color: transparent;
}
.msettings_range::-webkit-slider-thumb {
-webkit-appearance: none;
height: 10px;
width: 10px;
border-radius: 0px;
background: #999999;
cursor: pointer;
margin-top: 0px;
}
.msettings_range::-moz-range-thumb {
height: 10px;
width: 10px;
border: none;
border-radius: 0px;
background: #999999;
cursor: pointer;
}
.msettings_range::-ms-thumb {
height: 10px;
width: 10px;
border-radius: 0px;
background: #999999;
cursor: pointer;
}
.msettings_range::-webkit-slider-runnable-track {
width: 100%;
height: 10px;
cursor: pointer;
background: #cccccc;
border-radius: 0px;
}
.msettings_range:focus::-webkit-slider-runnable-track {
background: #cccccc;
}
.msettings_range::-moz-range-track {
width: 100%;
height: 12px;
cursor: pointer;
background: #cccccc;
border-radius: 0px;
}
.msettings_range::-ms-track {
width: 100%;
height: 10px;
cursor: pointer;
background: transparent;
color: transparent;
}
.msettings_range::-ms-fill-lower {
background: #cccccc;
border-radius: 0px;
}
.msettings_range:focus::-ms-fill-lower {
background: #cccccc;
}
.msettings_range::-ms-fill-upper {
background: #cccccc;
border-radius: 0px;
}
.msettings_range:focus::-ms-fill-upper {
background: #cccccc;
}
.msettings_checkbox {
margin-left: 2px;
}
.msettings_checkbox_label {
user-select: none;
-webkit-user-select: none;
cursor: default;
}
.msettings_label {
margin-bottom: 2px;
user-select: none;
-webkit-user-select: none;
cursor: default;
}
.msettings_color {
width: 40px;
font: 9px sans-serif;
margin: 0px;
}
.msettings_button {
font-size: 9px;
}
.msettings_text_input {
font-size: 9px;
width: 90%;
}
.msettings_select {
font-size: 9px;
}
.msettings_image {
width: 100%;
}
.msettings_progress {
width: 100%;
}
.msettings_textarea {
font-size: 9px;
resize: vertical;
width: 100%;
padding: 0;
margin: 0;
}
| ezekutor/jsdelivr | files/quicksettings/1.3/quicksettings_minimal.css | CSS | mit | 2,726 |
<script>
var contactForm = document.querySelector('form'),
inputEmail = contactForm.querySelector('[name="email"]'),
textAreaMessage = contactForm.querySelector('[name="content"]'),
sendButton = contactForm.querySelector('button');
sendButton.addEventListener('click', function(event){
event.preventDefault();
sendButton.innerHTML = '{{ site.text.contact.ajax.sending }}';
var xhr = new XMLHttpRequest();
xhr.open('POST', '//formspree.io/{{ site.email }}', true);
xhr.setRequestHeader("Accept", "application/json")
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
xhr.send(
"email=" + inputEmail.value +
"&message=" + textAreaMessage.value);
xhr.onloadend = function (res) {
if (res.target.status === 200){
sendButton.innerHTML = '{{ site.text.contact.ajax.sent }}';
}
else {
sendButton.innerHTML = '{{ site.text.contact.ajax.error }}';
}
}
});
</script>
| dedenzzi/dedenzzi.github.io | _includes/ajaxify_content_form.html | HTML | mit | 1,031 |
.cm-s-mdn-like.CodeMirror{color:#999;font-family:monospace;background-color:#fff}.cm-s-mdn-like .CodeMirror-selected{background:#cfc!important}.cm-s-mdn-like .CodeMirror-gutters{background:#f8f8f8;border-left:6px solid rgba(0,83,159,0.65);color:#333}.cm-s-mdn-like .CodeMirror-linenumber{color:#aaa;margin-left:3px}div.cm-s-mdn-like .CodeMirror-cursor{border-left:2px solid #222}.cm-s-mdn-like .cm-keyword{color:#6262ff}.cm-s-mdn-like .cm-atom{color:#F90}.cm-s-mdn-like .cm-number{color:#ca7841}.cm-s-mdn-like .cm-def{color:#8da6ce}.cm-s-mdn-like span.cm-variable-2,.cm-s-mdn-like span.cm-tag{color:#690}.cm-s-mdn-like span.cm-variable-3,.cm-s-mdn-like span.cm-def{color:#07a}.cm-s-mdn-like .cm-variable{color:#07a}.cm-s-mdn-like .cm-property{color:#905}.cm-s-mdn-like .cm-qualifier{color:#690}.cm-s-mdn-like .cm-operator{color:#cda869}.cm-s-mdn-like .cm-comment{color:#777;font-weight:normal}.cm-s-mdn-like .cm-string{color:#07a;font-style:italic}.cm-s-mdn-like .cm-string-2{color:#bd6b18}.cm-s-mdn-like .cm-meta{color:#000}.cm-s-mdn-like .cm-builtin{color:#9b7536}.cm-s-mdn-like .cm-tag{color:#997643}.cm-s-mdn-like .cm-attribute{color:#d6bb6d}.cm-s-mdn-like .cm-header{color:#ff6400}.cm-s-mdn-like .cm-hr{color:#aeaeae}.cm-s-mdn-like .cm-link{color:#ad9361;font-style:italic;text-decoration:none}.cm-s-mdn-like .cm-error{border-bottom:1px solid red}div.cm-s-mdn-like .CodeMirror-activeline-background{background:#efefff}div.cm-s-mdn-like span.CodeMirror-matchingbracket{outline:1px solid grey;color:inherit}.cm-s-mdn-like.CodeMirror{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFcAAAAyCAYAAAAp8UeFAAAHvklEQVR42s2b63bcNgyEQZCSHCdt2vd/0tWF7I+Q6XgMXiTtuvU5Pl57ZQKkKHzEAOtF5KeIJBGJ8uvL599FRFREZhFx8DeXv8trn68RuGaC8TRfo3SNp9dlDDHedyLyTUTeRWStXKPZrjtpZxaRw5hPqozRs1N8/enzIiQRWcCgy4MUA0f+XWliDhyL8Lfyvx7ei/Ae3iQFHyw7U/59pQVIMEEPEz0G7XiwdRjzSfC3UTtz9vchIntxvry5iMgfIhJoEflOz2CQr3F5h/HfeFe+GTdLaKcu9L8LTeQb/R/7GgbsfKedyNdoHsN31uRPWrfZ5wsj/NzzRQHuToIdU3ahwnsKPxXCjJITuOsi7XLc7SG/v5GdALs7wf8JjTFiB5+QvTEfRyGOfX3Lrx8wxyQi3sNq46O7QahQiCsRFgqddjBouVEHOKDgXAQHD9gJCr5sMKkEdjwsarG/ww3BMHBU7OBjXnzdyY7SfCxf5/z6ATccrwlKuwC/jhznnPF4CgVzhhVf4xp2EixcBActO75iZ8/fM9zAs2OMzKdslgXWJ9XG8PQoOAMA5fGcsvORgv0doBXyHrCwfLJAOwo71QLNkb8n2Pl6EWiR7OCibtkPaz4Kc/0NNAze2gju3zOwekALDaCFPI5vjPFmgGY5AZqyGEvH1x7QfIb8YtxMnA/b+QQ0aQDAwc6JMFg8CbQZ4qoYEEHbRwNojuK3EHwd7VALSgq+MNDKzfT58T8qdpADrgW0GmgcAS1lhzztJmkAzcPNOQbsWEALBDSlMKUG0Eq4CLAQWvEVQ9WU57gZJwZtgPO3r9oBTQ9WO8TjqXINx8R0EYpiZEUWOF3FxkbJkgU9B2f41YBrIj5ZfsQa0M5kTgiAAqM3ShXLgu8XMqcrQBvJ0CL5pnTsfMB13oB8athpAq2XOQmcGmoACCLydx7nToa23ATaSIY2ichfOdPTGxlasXMLaL0MLZAOwAKIM+y8CmicobGdCcbbK9DzN+yYGVoNNI5iUKTMyYOjPse4A8SM1MmcXgU0toOq1yO/v8FOxlASyc7TgeYaAMBJHcY1CcCwGI/TK4AmDbDyKYBBtFUkRwto8gygiQEaByFgJ00BH2M8JWwQS1nafDXQCidWyOI8AcjDCSjCLk8ngObuAm3JAHAdubAmOaK06V8MNEsKPJOhobSprwQa6gD7DclRQdqcwL4zxqgBrQcabUiBLclRDKAlWp+etPkBaNMA0AKlrHwTdEByZAA4GM+SNluSY6wAzcMNewxmgig5Ks0nkrSpBvSaQHMdKTBAnLojOdYyGpQ254602ZILPdTD1hdlggdIm74jbTp8vDwF5ZYUeLWGJpWsh6XNyXgcYwVoJQTEhhTYkxzZjiU5npU2TaB979TQehlaAVq4kaGpiPwwwLkYUuBbQwocyQTv1tA0+1UFWoJF3iv1oq+qoSk8EQdJmwHkziIF7oOZk14EGitibAdjLYYK78H5vZOhtWpoI0ATGHs0Q8OMb4Ey+2bU2UYztCtA0wFAs7TplGLRVQCcqaFdGSPCeTI1QNIC52iWNzof6Uib7xjEp07mNNoUYmVosVItHrHzRlLgBn9LFyRHaQCtVUMbtTNhoXWiTOO9k/V8BdAc1Oq0ArSQs6/5SU0hckNy9NnXqQY0PGYo5dWJ7nINaN6o958FWin27aBaWRka1r5myvLOAm0j30eBJqCxHLReVclxhxOEN2JfDWjxBtAC7MIH1fVaGdoOp4qJYDgKtKPSFNID2gSnGldrCqkFZ+5UeQXQBIRrSwocbdZYQT/2LwRahBPBXoHrB8nxaGROST62DKUbQOMMzZIC9abkuELfQzQALWTnDNAm8KHWFOJgJ5+SHIvTPcmx1xQyZRhNL5Qci689aXMEaN/uNIWkEwDAvFpOZmgsBaaGnbs1NPa1Jm32gBZAIh1pCtG7TSH4aE0y1uVY4uqoFPisGlpP2rSA5qTecWn5agK6BzSpgAyD+wFaqhnYoSZ1Vwr8CmlTQbrcO3ZaX0NAEyMbYaAlyquFoLKK3SPby9CeVUPThrSJmkCAE0CrKUQadi4DrdSlWhmah0YL9z9vClH59YGbHx1J8VZTyAjQepJjmXwAKTDQI3omc3p1U4gDUf6RfcdYfrUp5ClAi2J3Ba6UOXGo+K+bQrjjssitG2SJzshaLwMtXgRagUNpYYoVkMSBLM+9GGiJZMvduG6DRZ4qc04DMPtQQxOjEtACmhO7K1AbNbQDEggZyJwscFpAGwENhoBeUwh3bWolhe8BTYVKxQEWrSUn/uhcM5KhvUu/+eQu0Lzhi+VrK0PrZZNDQKs9cpYUuFYgMVpD4/NxenJTiMCNqdUEUf1qZWjppLT5qSkkUZbCwkbZMSuVnu80hfSkzRbQeqCZSAh6huR4VtoM2gHAlLf72smuWgE+VV7XpE25Ab2WFDgyhnSuKbs4GuGzCjR+tIoUuMFg3kgcWKLTwRqanJQ2W00hAsenfaApRC42hbCvK1SlE0HtE9BGgneJO+ELamitD1YjjOYnNYVcraGhtKkW0EqVVeDx733I2NH581k1NNxNLG0i0IJ8/NjVaOZ0tYZ2Vtr0Xv7tPV3hkWp9EFkgS/J0vosngTaSoaG06WHi+xObQkaAdlbanP8B2+2l0f90LmUAAAAASUVORK5CYII=)} | jrbasso/cdnjs | ajax/libs/codemirror/4.0.3/theme/mdn-like.min.css | CSS | mit | 4,301 |
@-webkit-keyframes medium-editor-image-loading {
0% {
-webkit-transform: scale(0);
transform: scale(0); }
100% {
-webkit-transform: scale(1);
transform: scale(1); } }
@keyframes medium-editor-image-loading {
0% {
-webkit-transform: scale(0);
transform: scale(0); }
100% {
-webkit-transform: scale(1);
transform: scale(1); } }
@-webkit-keyframes medium-editor-pop-upwards {
0% {
opacity: 0;
-webkit-transform: matrix(0.97, 0, 0, 1, 0, 12);
transform: matrix(0.97, 0, 0, 1, 0, 12); }
20% {
opacity: .7;
-webkit-transform: matrix(0.99, 0, 0, 1, 0, 2);
transform: matrix(0.99, 0, 0, 1, 0, 2); }
40% {
opacity: 1;
-webkit-transform: matrix(1, 0, 0, 1, 0, -1);
transform: matrix(1, 0, 0, 1, 0, -1); }
100% {
-webkit-transform: matrix(1, 0, 0, 1, 0, 0);
transform: matrix(1, 0, 0, 1, 0, 0); } }
@keyframes medium-editor-pop-upwards {
0% {
opacity: 0;
-webkit-transform: matrix(0.97, 0, 0, 1, 0, 12);
transform: matrix(0.97, 0, 0, 1, 0, 12); }
20% {
opacity: .7;
-webkit-transform: matrix(0.99, 0, 0, 1, 0, 2);
transform: matrix(0.99, 0, 0, 1, 0, 2); }
40% {
opacity: 1;
-webkit-transform: matrix(1, 0, 0, 1, 0, -1);
transform: matrix(1, 0, 0, 1, 0, -1); }
100% {
-webkit-transform: matrix(1, 0, 0, 1, 0, 0);
transform: matrix(1, 0, 0, 1, 0, 0); } }
.medium-editor-anchor-preview {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 16px;
left: 0;
line-height: 1.4;
max-width: 280px;
position: absolute;
text-align: center;
top: 0;
word-break: break-all;
word-wrap: break-word;
visibility: hidden;
z-index: 2000; }
.medium-editor-anchor-preview a {
color: #fff;
display: inline-block;
margin: 5px 5px 10px; }
.medium-editor-anchor-preview-active {
visibility: visible; }
.medium-editor-dragover {
background: #ddd; }
.medium-editor-image-loading {
-webkit-animation: medium-editor-image-loading 1s infinite ease-in-out;
animation: medium-editor-image-loading 1s infinite ease-in-out;
background-color: #333;
border-radius: 100%;
display: inline-block;
height: 40px;
width: 40px; }
.medium-editor-placeholder {
position: relative; }
.medium-editor-placeholder:after {
content: attr(data-placeholder) !important;
font-style: italic;
left: 0;
position: absolute;
top: 0;
white-space: pre; }
.medium-toolbar-arrow-under:after, .medium-toolbar-arrow-over:before {
border-style: solid;
content: '';
display: block;
height: 0;
left: 50%;
margin-left: -8px;
position: absolute;
width: 0; }
.medium-toolbar-arrow-under:after {
border-width: 8px 8px 0 8px; }
.medium-toolbar-arrow-over:before {
border-width: 0 8px 8px 8px;
top: -8px; }
.medium-editor-toolbar {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 16px;
left: 0;
position: absolute;
top: 0;
visibility: hidden;
z-index: 2000; }
.medium-editor-toolbar ul {
margin: 0;
padding: 0; }
.medium-editor-toolbar li {
float: left;
list-style: none;
margin: 0;
padding: 0; }
.medium-editor-toolbar li button {
box-sizing: border-box;
cursor: pointer;
display: block;
font-size: 14px;
line-height: 1.33;
margin: 0;
padding: 15px;
text-decoration: none; }
.medium-editor-toolbar li button:focus {
outline: none; }
.medium-editor-toolbar li .medium-editor-action-underline {
text-decoration: underline; }
.medium-editor-toolbar li .medium-editor-action-pre {
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
font-size: 12px;
font-weight: 100;
padding: 15px 0; }
.medium-editor-toolbar-active {
visibility: visible; }
.medium-editor-sticky-toolbar {
position: fixed;
top: 1px; }
.medium-editor-toolbar-active.medium-editor-stalker-toolbar {
-webkit-animation: medium-editor-pop-upwards 160ms forwards linear;
animation: medium-editor-pop-upwards 160ms forwards linear; }
.medium-editor-action-bold {
font-weight: bolder; }
.medium-editor-action-italic {
font-style: italic; }
.medium-editor-toolbar-form {
display: none; }
.medium-editor-toolbar-form input,
.medium-editor-toolbar-form a {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; }
.medium-editor-toolbar-form .medium-editor-toolbar-input,
.medium-editor-toolbar-form label {
border: none;
box-sizing: border-box;
font-size: 14px;
margin: 0;
padding: 6px;
width: 316px; }
.medium-editor-toolbar-form .medium-editor-toolbar-input:focus,
.medium-editor-toolbar-form label:focus {
appearance: none;
border: none;
box-shadow: none;
outline: 0; }
.medium-editor-toolbar-form label {
display: block; }
.medium-editor-toolbar-form a {
display: inline-block;
font-size: 24px;
font-weight: bolder;
margin: 0 10px;
text-decoration: none; }
.medium-editor-toolbar-actions:after {
clear: both;
content: "";
display: table; }
[data-medium-editor-element] img {
max-width: 100%; }
[data-medium-editor-element] sub {
vertical-align: sub; }
[data-medium-editor-element] sup {
vertical-align: super; }
.medium-editor-hidden {
display: none; }
| jackdoyle/cdnjs | ajax/libs/medium-editor/5.3.0/css/medium-editor.css | CSS | mit | 5,449 |
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Bridge\Doctrine\Tests\Security\User;
use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper;
use Symfony\Bridge\Doctrine\Tests\Fixtures\User;
use Symfony\Bridge\Doctrine\Security\User\EntityUserProvider;
use Doctrine\ORM\Tools\SchemaTool;
class EntityUserProviderTest extends \PHPUnit_Framework_TestCase
{
public function testRefreshUserGetsUserByPrimaryKey()
{
$em = DoctrineTestHelper::createTestEntityManager();
$this->createSchema($em);
$user1 = new User(1, 1, 'user1');
$user2 = new User(1, 2, 'user2');
$em->persist($user1);
$em->persist($user2);
$em->flush();
$provider = new EntityUserProvider($this->getManager($em), 'Symfony\Bridge\Doctrine\Tests\Fixtures\User', 'name');
// try to change the user identity
$user1->name = 'user2';
$this->assertSame($user1, $provider->refreshUser($user1));
}
public function testRefreshUserRequiresId()
{
$em = DoctrineTestHelper::createTestEntityManager();
$user1 = new User(null, null, 'user1');
$provider = new EntityUserProvider($this->getManager($em), 'Symfony\Bridge\Doctrine\Tests\Fixtures\User', 'name');
$this->setExpectedException(
'InvalidArgumentException',
'You cannot refresh a user from the EntityUserProvider that does not contain an identifier. The user object has to be serialized with its own identifier mapped by Doctrine'
);
$provider->refreshUser($user1);
}
public function testRefreshInvalidUser()
{
$em = DoctrineTestHelper::createTestEntityManager();
$this->createSchema($em);
$user1 = new User(1, 1, 'user1');
$em->persist($user1);
$em->flush();
$provider = new EntityUserProvider($this->getManager($em), 'Symfony\Bridge\Doctrine\Tests\Fixtures\User', 'name');
$user2 = new User(1, 2, 'user2');
$this->setExpectedException(
'Symfony\Component\Security\Core\Exception\UsernameNotFoundException',
'User with id {"id1":1,"id2":2} not found'
);
$provider->refreshUser($user2);
}
public function testSupportProxy()
{
$em = DoctrineTestHelper::createTestEntityManager();
$this->createSchema($em);
$user1 = new User(1, 1, 'user1');
$em->persist($user1);
$em->flush();
$em->clear();
$provider = new EntityUserProvider($this->getManager($em), 'Symfony\Bridge\Doctrine\Tests\Fixtures\User', 'name');
$user2 = $em->getReference('Symfony\Bridge\Doctrine\Tests\Fixtures\User', array('id1' => 1, 'id2' => 1));
$this->assertTrue($provider->supportsClass(get_class($user2)));
}
private function getManager($em, $name = null)
{
$manager = $this->getMock('Doctrine\Common\Persistence\ManagerRegistry');
$manager->expects($this->once())
->method('getManager')
->with($this->equalTo($name))
->will($this->returnValue($em));
return $manager;
}
private function createSchema($em)
{
$schemaTool = new SchemaTool($em);
$schemaTool->createSchema(array(
$em->getClassMetadata('Symfony\Bridge\Doctrine\Tests\Fixtures\User'),
));
}
}
| Pypylna/zaleglosci | vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Security/User/EntityUserProviderTest.php | PHP | mit | 3,555 |
/*
* /MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/CombDiacritMarks.js
*
* Copyright (c) 2009-2015 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS.MathJax_Main,{768:[699,-505,0,-394,-205],769:[699,-505,0,-297,-107],770:[694,-531,0,-388,-113],771:[668,-565,0,-417,-84],772:[590,-544,0,-431,-70],774:[694,-515,0,-408,-93],775:[669,-549,0,-310,-191],776:[669,-554,0,-405,-96],778:[715,-542,0,-353,-148],779:[701,-510,0,-378,-80],780:[644,-513,0,-386,-115],824:[716,215,0,-639,-140]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/Main/Regular/CombDiacritMarks.js");
| stefanneculai/cdnjs | ajax/libs/mathjax/2.6.0-beta.1/jax/output/HTML-CSS/fonts/TeX/Main/Regular/CombDiacritMarks.js | JavaScript | mit | 1,205 |
/*
* /MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/GeneralPunctuation.js
*
* Copyright (c) 2009-2015 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["MathJax_Main-bold"],{8194:[0,0,500,0,0],8195:[0,0,999,0,0],8196:[0,0,333,0,0],8197:[0,0,250,0,0],8198:[0,0,167,0,0],8201:[0,0,167,0,0],8202:[0,0,83,0,0],8211:[300,-249,575,0,574],8212:[300,-249,1150,0,1149],8216:[694,-329,319,58,245],8217:[694,-329,319,74,261],8220:[694,-329,603,110,564],8221:[694,-329,603,38,492],8224:[702,211,511,64,446],8225:[702,202,511,64,446],8230:[171,-1,1295,74,1221],8242:[563,-33,344,35,331]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/Main/Bold/GeneralPunctuation.js");
| cloudrifles/cdnjs | ajax/libs/mathjax/2.5.0/jax/output/HTML-CSS/fonts/TeX/Main/Bold/GeneralPunctuation.js | JavaScript | mit | 1,293 |
.video-js .vjs-big-play-button:before, .video-js .vjs-control:before {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
text-align: center; }
@font-face {
font-family: VideoJS;
src: url('font/VideoJS.eot?') format('eot'); }
@font-face {
font-family: VideoJS;
src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAi0AAoAAAAADnwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAAA9AAAAD0AAABWQLpNY2NtYXAAAAE0AAAAOgAAAUriJhC2Z2x5ZgAAAXAAAATAAAAH/CNovTZoZWFkAAAGMAAAACwAAAA2BEqUO2hoZWEAAAZcAAAAGAAAACQELwIWaG10eAAABnQAAAAPAAAAVCoAAABsb2NhAAAGhAAAACwAAAAsEBQSZm1heHAAAAawAAAAHwAAACABJgBkbmFtZQAABtAAAAElAAACCtXH9aBwb3N0AAAH+AAAALsAAAElJXNJs3icY2BkYmCcwMDKwMHowpjGwMDgDqW/MkgytDAwMDGwMjNgBQFprikMDh8ZP4owgbh6TBBhRhABAFl1B6YAAAB4nGNgYGBmgGAZBkYGEHAB8hjBfBYGDSDNBqQZGZgYGD6K/P8PUvCREUTzM0DVAwEjG8OIBwCEVQbLAAB4nIVVzW/jRBSf5zieJE2bOPVH0jRpEidxsZumW8f20orWi6C7rKoKqSQUVUjdQ6RVAkekHi047AEOvbSqxIFed8OBO3voDSE4gRohLmi1N/Z/SHljp90uJSLRvJn5vZn3Pc8ECP7gBE4IR8is6A7+huPR8JhEAnwIQ8RnyBwhm6C7M0CLoG6AuwyRZdBxgdsZuPB9c/+Q4w73Q/rgEcc9ehDQs4ODL67x/cPRl1cMpEwj6vBRd4RQQlxL1CzREv12e9DugzEagkH44Mw5nBOBZEiF1HDXquuy6rgSRYJmyEWoUVWTLdVWBSo7rupGqAoHhWwL7KmSDLB7r7k2+inf7bb7+8rcUmUpf95oACk0kk2b0uJc+a2VrW56KbX9Tb7r94/2xdhSYt7Mw4eNRqA+IB0YkCjGCPWI9LjT64Hn96HTJ2M/vka+QJK4YjZtQC04iHAhmy2MXrT7/UDj98nGp+N7kbFvz1FukuSuZKvMv43ALwn9CcLt4fVfmCC7ubbWvLeLPo3Ve6HMP9D6x9uppXR3a6uLYvnrvEbJFBGJivHFENmabtlIIVzLFk7HRs8zDK8HxOsZnmdc9IwTz7gkRu8c0Qmy2EUtlDgbSHRttul7KAzF+HjTMHoDr+cbvdHQM3zcMzFhrAYYqxSZxVUZa0rEKiqjmyKWVVksg39JMlmAbAbG8yWmAO+wxWsGlgeKEq7rlGIMZ0melMgiRtKtaxWBqjXMBdYG1qzdiuozIEuqxWrYtahirTqu/nNXyervze9ANP3u8s7vZ5/NFUcvdueK/Nm3DNB2x+zSD9Gc+qTSvC8+kX8sfGAoyhGjssyQI8YjrDoCW0LfVLRlIfRQFiWFeWiLrXrUkjVVsy02bBwwGD3LZNGlDtLRaaczHA59Rm85/Mxsm6ZpmNd1w/ToZPO2DqoFybDkGTChUn8HWs46rCoLcIVLAsN1ewMYLrMnn8nlMmAgfV4yzRIk4148GRA4ZkC4DOFblh1PeVMKO95hRHljd52jc+gH73xqHB2socCaIA5q2S7LOGwknhn82mCOLsLxyvBN/CMdmObVezzHnFcIqQlUd1q6q6w6rTqmXFIpTpKy6qqCLAUo+DnxlONOMna16lQhXNiZU67aqlafQvoTmqZ7YtWtVucp3UvjmfQepXkNozWu199Ql0s81MZUOU2op6COFKOYAjQAt8ICCKgbJ2UTMNQKRnYTsBnh1tHpMuZgVZEE+A6gIfBGNOakpRgX6+CQ0nacN3mhEbBMPm7fYv1awhdqGK8SSkITYg9pRJ6O3Y3H78am5Qh9GBO0SYxZYPc843UfY29lCl/IVSfHV2HeaNFAbrTyq/ca3sGcwYRPwBu3bn4A4GJi+7/xjWGyS5Olo4mVOovfRDUxwKyx5E5U9zTP+FWmkoaNCA7INFGwW6yRbfIR+Rgr0naKHEUjBE1fcbE9OHUqK6riuKx/1HVNUdEeSRgjaKEmISL/FxK1NoFVtyprL+vrxhzH36lJufxKthjhSgX4PJ7gE0llOg6RRAoy84k4n5gGeSbGJ1L/2o1q72e8O+vJxa/+BL7gVBddHuDtrFIow2PO5VIx0cxVWxmBz6zMlx35fwF1Hgp/7dwn/wCHsUmOeJxjYGRgYADi2RquW+L5bb4ycDMxgMDFaZpbkGkmBsZrQIqDASwNAAmYCNZ4nGNgZGBgYgACPTAJYjMyoAJRAAXjAEx4nGNiYGBgojIGAAeMACsAAAAAAAAMAD4AUACSAKIAvgDsARIBOAFgAaYB2gIyAloCkAL2AxADPgN6A/54nGNgZGBgEGWIYGBnAAEmIOYCQgaG/2A+AwATugGLAHicXZBNaoNAGIZfE5PQCKFQ2lUps2oXBfOzzAESyDKBQJdGR2NQR3QSSE/QE/QEPUUPUHqsvsrXjTMw83zPvPMNCuAWP3DQDAejdm1GjzwS7pMmwi75XngAD4/CQ/oX4TFe4Qt7uMMbOzjuDc0EmXCP/C7cJ38Iu+RP4QEe8CU8pP8WHmOPX2EPz87TPo202ey2OjlnQSXV/6arOjWFmvszMWtd6CqwOlKHq6ovycLaWMWVydXKFFZnmVFlZU46tP7R2nI5ncbi/dDkfDtFBA2DDXbYkhKc+V0Bqs5Zt9JM1HQGBRTm/EezTmZNKtpcAMs9Yu6AK9caF76zoLWIWcfMGOSkVduvSWechqZsz040Ib2PY3urxBJTzriT95lipz+TN1fmAAAAeJxtjlkOwjAMRDNAy1KgrMfIoUJqqKU0KVlYbk+hReKD+bCfrdHYYiR6ZeK/jkJghDEmyJBjihnmWKDAEiusUWKDLXbY44DjpDXqWbyL1Oy1oaxVKVBxcyY1JJsUaTGwcfcvNlx9HTVf6s05GRO0J7KSbCRf/i4eHPNwTcrTNLRsLfl5SKfI0VCYadVGdraDuiPyIQt15xxrd8n7h9Z9ky5Fw5b2w/gJGn7eqlSxkxV1J/mTJ8QLQRVRWgA=) format('woff'), url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAAKAIAAAwAgT1MvMkC6TWMAAAEoAAAAVmNtYXDiJhC2AAAB1AAAAUpnbHlmI2i9NgAAA0wAAAf8aGVhZARKlDsAAADQAAAANmhoZWEELwIWAAAArAAAACRobXR4KgAAAAAAAYAAAABUbG9jYRAUEmYAAAMgAAAALG1heHABJgBkAAABCAAAACBuYW1l1cf1oAAAC0gAAAIKcG9zdCVzSbMAAA1UAAABJQABAAACAAAAAC4CAAAAAAACAAABAAAAAAAAAAAAAAAAAAAAFQABAAAAAQAAmyhx5F8PPPUACwIAAAAAANGWKbQAAAAA0ZYptAAAAAACAAHWAAAACAACAAAAAAAAAAEAAAAVAFgABwAAAAAAAgAAAAoACgAAAP8AAAAAAAAAAQIAAZAABQAIAUQBZgAAAEcBRAFmAAAA9QAZAIQAAAIABQMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUGZFZABA8QHxFAIAAAAALgIAAAAAAAABAAAAAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAAAAAwAAAAMAAAAcAAEAAAAAAEQAAwABAAAAHAAEACgAAAAGAAQAAQACAADxFP//AAAAAPEB//8AAA8AAAEAAAAAAAAAAAEGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAPgBQAJIAogC+AOwBEgE4AWABpgHaAjICWgKQAvYDEAM+A3oD/gABAAAAAAGWAZYAAgAAExE3q+oBlf7WlQADAAAAAAHWAdYAAgAOABoAAD8BJzcOAQceARc+ATcuAQMuASc+ATceARcOAdWAgCtbeAICeFtbeAICeFtIYQICYUhIYQICYaBgYHUCeFtbeAICeFtbeP6CAmFISGECAmFISGEAAgAAAAABgAGWAAMABwAANzMRIzMRMxGAVVWrVWsBKv7WASoABAAAAAABwAHAAAYAEgAiACUAAAE0JicVFzY3FAcXNjcuAScVHgElBxcjFTMXNRcGBxU2Nxc3AwcXAWAdGDQBNQsgFQEBU0EvOv7HG2VlVWtbFhosIiwbwC0tAQAdLQwvNQcHHhohKTBGZRAsD0yMG2WAa5BbEQgsChwrGwFQLS0AAAAAAQAAAAABVgGrAAUAABMVMxcRB5VWamoBQIBrAVZrAAACAAAAAAGLAasABgAMAAABLgEnFT4BJRUzFxEHAYsBHRgYHf7hVWtrAQAdLQysDC1dgGsBVmsAAAMAAAAAAcABvAAFAAwAGQAAExUzFxEHFzQmJxU+AScVHgEUBgcVPgE3LgFAVWtryx0YGB01Lzo6L0FTAQFTAUCAawFWa0AdLQysDC3YLA9MaEwPLBBlRkZlAAAABAAAAAABlgGWAAUACwARABcAADcjFTM1IyczNTM1IwEjFTM1IycVMxUzNZUqakAqKkBqAQBAaipAQCrVaiqWQCr/ACpqwCpAagAAAAQAAAAAAZYBlgAFAAsAEQAXAAA3MxUzNSM3IxUzNSMTMzUzNSM3NSMVMzVrQCpqQEBqKoAqQGoqKmqrQGqAKmr+1kAqgEBqKgAAAAACAAAAAAGrAasADwATAAABIQ4BBxEeARchPgE3ES4BAyERIQGA/wASGAEBGBIBABIYAQEYEv8AAQABqwEYEv8AEhgBARgSAQASGP7WAQAAAAYAAAAAAdYB1gAHAAwAEwAbACAAKAAAEzcmIyIGBxclLgEnBxcjFz4BNTQFJw4BFRQXMwceARc3MwcWMzI2NyfJZRYYJ0QcTgEFEEIuTtOgbBoe/uFTGh4EoJsQQi5OI1MWGCdEHE4BILAFGReHIi9HEYcVux1JKhYWkB1JKhYVFS9HEYeQBRkXhwAABQAAAAAB1gGrAA8AEwAXABsAHwAAASEOARURFBYXIT4BNRE0JgUzFSMXIzUzFyM1MzUjNTMBq/6qEhgYEgFWEhgY/phWVtbW1oBWVtbWAasBGBL/ABIYAQEYEgEAEhiqK1UrKysqKwADAAAAAAHAAasADwAnAD8AAAEhDgEVERQWFyE+ATURNCYHIzUjFTM1MxUOASsBIiY9ATQ2OwEyFh8BIzUjFTM1MxUUBisBIiYnNT4BOwEyFhUBlf7WEhkZEgEqEhkZvCArKyABDAlACQwMCUAJDAGVICsrIAwJQAkMAQEMCUAJDAGrARgS/wASGAEBGBIBABIYlQtACxYJDAwJVgkMDAkWC0ALFgkMDAlWCQwMCQAAAAYAAAAAAcABawADAAcACwAPABMAFwAANzM1IxUzNSM1MzUjFyE1IRUhNSE1FSE1QCsrKysrK1UBK/7VASv+1QEr6yqAK4ArgCqAK6srKwAAAQAAAAABwAHWACIAACUGByc2NCc3FjI2NCYiBgcUFwcmIgYUFjI3FwYVFBYyNjQmAYAZEZgCApYSNSQkNiQBApYSNSQkNRKYAiQ0JCSpARBZBxAHWBEkNyQkHAcHWBAkNiQQWAcHGyMjNSMAAgAAAAAB0gHWADcAQAAAJTY0Jzc2LwEmDwEmLwEmKwEiDwEGBycmDwEGHwEGFBcHBh8BFj8BFh8BFjsBMj8BNjcXFj8BNicHLgE0NjIWFAYBnwEBLQYEKgUINhAUCAIIVggCCBQQNQkEKwQGLQEBLQYEKwQJNRAUCAIIVggCCBQQNQkEKwQGzCAqKkAqKusKFgojBghKBwMVDQg4CQk4CA0VAwdKCAYjChYKIwYISgcDFQ0IOAkJOAgNFQMHSggGEwEqQCoqQCoAAAAAAQAAAAAB1gHWAAsAABMeARc+ATcuAScOASsCeFtbeAICeFtbeAEAW3gCAnhbW3gCAngAAAIAAAAAAdYB1gALABcAAAEOAQceARc+ATcuAQMuASc+ATceARcOAQEAW3gCAnhbW3gCAnhbSGECAmFISGECAmEB1QJ4W1t4AgJ4W1t4/oICYUhIYQICYUhIYQAAAwAAAAAB1gHWAAsAFwAgAAABDgEHHgEXPgE3LgEDLgEnPgE3HgEXDgEnDgEiJjQ2MhYBAFt4AgJ4W1t4AgJ4W0hhAgJhSEhhAgJhCAEkNiQkNiQB1QJ4W1t4AgJ4W1t4/oICYUhIYQICYUhIYakbJCQ2JCQAAAAABwAAAAACAAFgAA0AFgAoADoATABUAFcAADc1Nh4CBw4BBwYjJzA3MjY3NiYHFRYXFjY3PgE1NCYnIxYXHgEXFAYXFjY3PgE1LgEnIxQXHgEVFAYXFjY3PgE1LgEnIxQXHgEVFAYFMz8BFTM1IxcVI+MmOyoaAgQxJRQZGzAYHgMCIB0BbQkKBAoMFg0JAQMKDwESHAoJBAoNARUOCAQKDxIcCgkECg0BFQ4IBAoPEv4lRRJAMTsMKIPaAQQdNiQoNwQBATkYFh0hAWgCNwIPCBErGSQ0EgYEEjAcITYVAg8IESsZJDQSBgQSMBwhNhUCDwgRKxkkNBIGBBIwHCE2FxwBHd9ORwAAAAAQAMYAAQAAAAAAAQAHAAAAAQAAAAAAAgAHAAcAAQAAAAAAAwAHAA4AAQAAAAAABAAHABUAAQAAAAAABQALABwAAQAAAAAABgAHACcAAQAAAAAACgArAC4AAQAAAAAACwATAFkAAwABBAkAAQAOAGwAAwABBAkAAgAOAHoAAwABBAkAAwAOAIgAAwABBAkABAAOAJYAAwABBAkABQAWAKQAAwABBAkABgAOALoAAwABBAkACgBWAMgAAwABBAkACwAmAR5WaWRlb0pTUmVndWxhclZpZGVvSlNWaWRlb0pTVmVyc2lvbiAxLjBWaWRlb0pTR2VuZXJhdGVkIGJ5IHN2ZzJ0dGYgZnJvbSBGb250ZWxsbyBwcm9qZWN0Lmh0dHA6Ly9mb250ZWxsby5jb20AVgBpAGQAZQBvAEoAUwBSAGUAZwB1AGwAYQByAFYAaQBkAGUAbwBKAFMAVgBpAGQAZQBvAEoAUwBWAGUAcgBzAGkAbwBuACAAMQAuADAAVgBpAGQAZQBvAEoAUwBHAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAHMAdgBnADIAdAB0AGYAIABmAHIAbwBtACAARgBvAG4AdABlAGwAbABvACAAcAByAG8AagBlAGMAdAAuAGgAdAB0AHAAOgAvAC8AZgBvAG4AdABlAGwAbABvAC4AYwBvAG0AAAACAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABUAAAECAQMBBAEFAQYBBwEIAQkBCgELAQwBDQEOAQ8BEAERARIBEwEUARUEcGxheQtwbGF5LWNpcmNsZQVwYXVzZQt2b2x1bWUtbXV0ZQp2b2x1bWUtbG93CnZvbHVtZS1taWQLdm9sdW1lLWhpZ2gQZnVsbHNjcmVlbi1lbnRlcg9mdWxsc2NyZWVuLWV4aXQGc3F1YXJlB3NwaW5uZXIJc3VidGl0bGVzCGNhcHRpb25zCGNoYXB0ZXJzBXNoYXJlA2NvZwZjaXJjbGUOY2lyY2xlLW91dGxpbmUTY2lyY2xlLWlubmVyLWNpcmNsZRFhdWRpby1kZXNjcmlwdGlvbgAAAAAA) format('truetype');
font-weight: normal;
font-style: normal; }
.vjs-icon-play, .video-js .vjs-big-play-button, .video-js .vjs-play-control {
font-family: VideoJS;
font-weight: normal;
font-style: normal; }
.vjs-icon-play:before, .video-js .vjs-big-play-button:before, .video-js .vjs-play-control:before {
content: '\f101'; }
.vjs-icon-play-circle {
font-family: VideoJS;
font-weight: normal;
font-style: normal; }
.vjs-icon-play-circle:before {
content: '\f102'; }
.vjs-icon-pause, .video-js.vjs-playing .vjs-play-control {
font-family: VideoJS;
font-weight: normal;
font-style: normal; }
.vjs-icon-pause:before, .video-js.vjs-playing .vjs-play-control:before {
content: '\f103'; }
.vjs-icon-volume-mute, .video-js .vjs-mute-control.vjs-vol-0, .video-js .vjs-volume-menu-button.vjs-vol-0 {
font-family: VideoJS;
font-weight: normal;
font-style: normal; }
.vjs-icon-volume-mute:before, .video-js .vjs-mute-control.vjs-vol-0:before, .video-js .vjs-volume-menu-button.vjs-vol-0:before {
content: '\f104'; }
.vjs-icon-volume-low, .video-js .vjs-mute-control.vjs-vol-1, .video-js .vjs-volume-menu-button.vjs-vol-1 {
font-family: VideoJS;
font-weight: normal;
font-style: normal; }
.vjs-icon-volume-low:before, .video-js .vjs-mute-control.vjs-vol-1:before, .video-js .vjs-volume-menu-button.vjs-vol-1:before {
content: '\f105'; }
.vjs-icon-volume-mid, .video-js .vjs-mute-control.vjs-vol-2, .video-js .vjs-volume-menu-button.vjs-vol-2 {
font-family: VideoJS;
font-weight: normal;
font-style: normal; }
.vjs-icon-volume-mid:before, .video-js .vjs-mute-control.vjs-vol-2:before, .video-js .vjs-volume-menu-button.vjs-vol-2:before {
content: '\f106'; }
.vjs-icon-volume-high, .video-js .vjs-mute-control, .video-js .vjs-volume-menu-button {
font-family: VideoJS;
font-weight: normal;
font-style: normal; }
.vjs-icon-volume-high:before, .video-js .vjs-mute-control:before, .video-js .vjs-volume-menu-button:before {
content: '\f107'; }
.vjs-icon-fullscreen-enter, .video-js .vjs-fullscreen-control {
font-family: VideoJS;
font-weight: normal;
font-style: normal; }
.vjs-icon-fullscreen-enter:before, .video-js .vjs-fullscreen-control:before {
content: '\f108'; }
.vjs-icon-fullscreen-exit, .video-js.vjs-fullscreen .vjs-fullscreen-control {
font-family: VideoJS;
font-weight: normal;
font-style: normal; }
.vjs-icon-fullscreen-exit:before, .video-js.vjs-fullscreen .vjs-fullscreen-control:before {
content: '\f109'; }
.vjs-icon-square {
font-family: VideoJS;
font-weight: normal;
font-style: normal; }
.vjs-icon-square:before {
content: '\f10a'; }
.vjs-icon-spinner, .vjs-loading-spinner {
font-family: VideoJS;
font-weight: normal;
font-style: normal; }
.vjs-icon-spinner:before, .vjs-loading-spinner:before {
content: '\f10b'; }
.vjs-icon-subtitles, .video-js .vjs-subtitles-button {
font-family: VideoJS;
font-weight: normal;
font-style: normal; }
.vjs-icon-subtitles:before, .video-js .vjs-subtitles-button:before {
content: '\f10c'; }
.vjs-icon-captions, .video-js .vjs-captions-button {
font-family: VideoJS;
font-weight: normal;
font-style: normal; }
.vjs-icon-captions:before, .video-js .vjs-captions-button:before {
content: '\f10d'; }
.vjs-icon-chapters, .video-js .vjs-chapters-button {
font-family: VideoJS;
font-weight: normal;
font-style: normal; }
.vjs-icon-chapters:before, .video-js .vjs-chapters-button:before {
content: '\f10e'; }
.vjs-icon-share {
font-family: VideoJS;
font-weight: normal;
font-style: normal; }
.vjs-icon-share:before {
content: '\f10f'; }
.vjs-icon-cog {
font-family: VideoJS;
font-weight: normal;
font-style: normal; }
.vjs-icon-cog:before {
content: '\f110'; }
.vjs-icon-circle, .video-js .vjs-play-progress, .video-js .vjs-volume-level {
font-family: VideoJS;
font-weight: normal;
font-style: normal; }
.vjs-icon-circle:before, .video-js .vjs-play-progress:before, .video-js .vjs-volume-level:before {
content: '\f111'; }
.vjs-icon-circle-outline {
font-family: VideoJS;
font-weight: normal;
font-style: normal; }
.vjs-icon-circle-outline:before {
content: '\f112'; }
.vjs-icon-circle-inner-circle {
font-family: VideoJS;
font-weight: normal;
font-style: normal; }
.vjs-icon-circle-inner-circle:before {
content: '\f113'; }
.vjs-icon-audio-description {
font-family: VideoJS;
font-weight: normal;
font-style: normal; }
.vjs-icon-audio-description:before {
content: '\f114'; }
.video-js {
/* display:inline-block would be closer to the video el's display:inline
* but it results in flash reloading when going into fullscreen [#2205]
*/
display: block;
/* Make video.js videos align top when next to video elements */
vertical-align: top;
box-sizing: border-box;
/* Default to the video element width/height. This will be overridden by
* the source width height unless changed elsewhere. */
width: 300px;
height: 150px;
color: #fff;
background-color: #000;
position: relative;
padding: 0;
/* Start with 10px for base font size so other dimensions can be em based and
easily calculable. */
font-size: 10px;
/* Provide some basic defaults for fonts */
font-weight: normal;
font-style: normal;
/* Avoiding helvetica: issue #376 */
font-family: Arial, Helvetica, sans-serif;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
/* Fix for Firefox 9 fullscreen (only if it is enabled). Not needed when
checking fullScreenEnabled. */ }
.video-js:-moz-full-screen {
position: absolute; }
.video-js:-webkit-full-screen {
width: 100% !important;
height: 100% !important; }
/* All elements inherit border-box sizing */
.video-js *, .video-js *:before, .video-js *:after {
box-sizing: inherit; }
/* Fill the width of the containing element and use padding to create the
desired aspect ratio. Default to 16x9 unless another ratio is given. */
.video-js.vjs-fluid, .video-js.vjs-16-9 {
width: 100%;
max-width: 100%;
height: 0;
padding-top: 56.25%; }
.video-js.vjs-4-3 {
width: 100%;
max-width: 100%;
height: 0;
padding-top: 75%; }
.video-js.vjs-fill {
width: 100%;
height: 100%; }
/* Playback technology elements expand to the width/height of the containing div
<video> or <object> */
.video-js .vjs-tech {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%; }
/* Fullscreen Styles */
body.vjs-full-window {
padding: 0;
margin: 0;
height: 100%;
/* Fix for IE6 full-window. http://www.cssplay.co.uk/layouts/fixed.html */
overflow-y: auto; }
.vjs-full-window .video-js.vjs-fullscreen {
position: fixed;
overflow: hidden;
z-index: 1000;
left: 0;
top: 0;
bottom: 0;
right: 0; }
.video-js.vjs-fullscreen {
width: 100% !important;
height: 100% !important;
/* Undo any aspect ratio padding for fluid layouts */
padding-top: 0 !important; }
.video-js.vjs-fullscreen.vjs-user-inactive {
cursor: none; }
/* Hide disabled or unsupported controls. */
.vjs-hidden {
display: none !important; }
.vjs-lock-showing {
display: block !important;
opacity: 1;
visibility: visible; }
/* In IE8 w/ no JavaScript (no HTML5 shim), the video tag doesn't register.
The .video-js classname on the video tag also isn't considered.
This optional paragraph inside the video tag can provide a message to users
about what's required to play video. */
.vjs-no-js {
padding: 20px;
color: #fff;
background-color: #000;
font-size: 18px;
font-family: Arial, Helvetica, sans-serif;
text-align: center;
width: 300px;
height: 150px;
margin: 0px auto; }
.vjs-no-js a, .vjs-no-js a:visited {
color: #F4A460; }
.video-js .vjs-big-play-button {
font-size: 3em;
line-height: 1.5em;
height: 1.5em;
width: 3em;
display: block;
z-index: 2;
position: absolute;
top: 10px;
left: 10px;
padding: 0;
cursor: pointer;
opacity: 1;
border: 2px solid #fff;
/* Need a slightly gray bg so it can be seen on black backgrounds */
background-color: #000;
background-color: rgba(0, 0, 0, 0.8);
-webkit-border-radius: 0.3em;
-moz-border-radius: 0.3em;
border-radius: 0.3em;
-webkit-transition: all 0.4s;
-moz-transition: all 0.4s;
-o-transition: all 0.4s;
transition: all 0.4s; }
.video-js.vjs-big-play-centered .vjs-big-play-button {
top: 50%;
left: 50%;
margin-top: -0.75em;
margin-left: -1.5em; }
.video-js.vjs-controls-disabled .vjs-big-play-button, .video-js.vjs-has-started .vjs-big-play-button, .video-js.vjs-using-native-controls .vjs-big-play-button {
display: none; }
.video-js:hover .vjs-big-play-button, .video-js .vjs-big-play-button:focus {
outline: 0;
border-color: #fff;
background-color: #595959;
background-color: rgba(89, 89, 89, 0.75);
-webkit-transition: all 0s;
-moz-transition: all 0s;
-o-transition: all 0s;
transition: all 0s; }
.vjs-error .vjs-big-play-button {
display: none; }
.video-js button {
background: none;
border: none;
color: #fff;
display: inline-block;
overflow: visible;
font-size: inherit;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none; }
.video-js .vjs-control-bar {
display: none;
width: 100%;
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 3em;
background-color: #2B333F;
background-color: rgba(43, 51, 63, 0.5); }
.video-js.vjs-has-started .vjs-control-bar {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
visibility: visible;
opacity: 1;
-webkit-transition: visibility 0.1s, opacity 0.1s;
-moz-transition: visibility 0.1s, opacity 0.1s;
-o-transition: visibility 0.1s, opacity 0.1s;
transition: visibility 0.1s, opacity 0.1s; }
.video-js.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar {
visibility: hidden;
opacity: 0;
-webkit-transition: visibility 1s, opacity 1s;
-moz-transition: visibility 1s, opacity 1s;
-o-transition: visibility 1s, opacity 1s;
transition: visibility 1s, opacity 1s; }
.video-js.vjs-controls-disabled .vjs-control-bar, .video-js.vjs-using-native-controls .vjs-control-bar, .video-js.vjs-error .vjs-control-bar {
display: none; }
.video-js.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar {
opacity: 1;
visibility: visible; }
/* IE8 is flakey with fonts, and you have to change the actual content to force
fonts to show/hide properly.
- "\9" IE8 hack didn't work for this
- Found in XP IE8 from http://modern.ie. Does not show up in "IE8 mode" in IE9
*/
@media \0screen {
.video-js.vjs-user-inactive.vjs-playing .vjs-control-bar :before {
content: ""; } }
/* IE 8 + 9 Support */
.video-js.vjs-has-started.vjs-no-flex .vjs-control-bar {
display: table; }
.video-js .vjs-control {
outline: none;
position: relative;
text-align: center;
margin: 0;
padding: 0;
height: 100%;
width: 4em;
-webkit-box-flex: none;
-moz-box-flex: none;
-webkit-flex: none;
-ms-flex: none;
flex: none; }
.video-js .vjs-control:before {
font-size: 1.8em;
line-height: 1.67; }
/* Replacement for focus outline */
.video-js .vjs-control:focus:before, .video-js .vjs-control:hover:before, .video-js .vjs-control:focus {
text-shadow: 0em 0em 1em white; }
/* Hide control text visually, but have it available for screenreaders */
.video-js .vjs-control-text {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px; }
/* IE 8 + 9 Support */
.vjs-no-flex .vjs-control {
display: table-cell;
vertical-align: middle; }
.video-js .vjs-custom-control-spacer {
display: none; }
/**
* Let's talk pixel math!
* Start with a base font size of 10px (assuming that hasn't changed)
* No Hover:
* - Progress holder is 3px
* - Progress handle is 9px
* - Progress handle is pulled up 3px to center it.
*
* Hover:
* - Progress holder becomes 5px
* - Progress handle becomes 15px
* - Progress handle is pulled up 5px to center it
*/
.video-js .vjs-progress-control {
-webkit-box-flex: auto;
-moz-box-flex: auto;
-webkit-flex: auto;
-ms-flex: auto;
flex: auto;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center; }
/* Box containing play and load progresses. Also acts as seek scrubber. */
.video-js .vjs-progress-holder {
-webkit-box-flex: auto;
-moz-box-flex: auto;
-webkit-flex: auto;
-ms-flex: auto;
flex: auto;
-webkit-transition: all 0.2s;
-moz-transition: all 0.2s;
-o-transition: all 0.2s;
transition: all 0.2s;
height: 0.3em; }
/* We need an increased hit area on hover */
.video-js .vjs-progress-control:hover .vjs-progress-holder {
font-size: 1.6666666667em; }
/* Also show the current time tooltip */
.video-js .vjs-progress-control:hover .vjs-play-progress:after {
display: block;
/* If we let the font size grow as much as everything else, the current time tooltip ends up
ginormous. If you'd like to enable the current time tooltip all the time, this should be disabled
to avoid a weird hitch when you roll off the hover. */
font-size: 0.6em; }
/* Progress Bars */
.video-js .vjs-progress-holder .vjs-play-progress, .video-js .vjs-progress-holder .vjs-load-progress, .video-js .vjs-progress-holder .vjs-load-progress div {
position: absolute;
display: block;
height: 0.3em;
margin: 0;
padding: 0;
/* updated by javascript during playback */
width: 0;
/* Needed for IE6 */
left: 0;
top: 0; }
.video-js .vjs-play-progress {
background-color: #fff; }
.video-js .vjs-play-progress:before {
position: absolute;
top: -0.3333333333em;
right: -0.5em;
font-size: 0.9em;
height: 1em;
line-height: 1em; }
.video-js .vjs-play-progress:after {
/* By default this is hidden and only shown when hovering over the progress control */
display: none;
position: absolute;
top: -2.4em;
right: -1.5em;
font-size: 0.9em;
color: #000;
content: attr(data-current-time);
padding: 0.2em 0.5em;
background-color: #fff;
background-color: rgba(255, 255, 255, 0.8);
-webkit-border-radius: 0.3em;
-moz-border-radius: 0.3em;
border-radius: 0.3em; }
.video-js .vjs-load-progress {
background: #646464;
/* IE8- Fallback */
background: rgba(255, 255, 255, 0.2); }
/* there are child elements of the load progress bar that represent the
specific time ranges that have been buffered */
.video-js .vjs-load-progress div {
background: rgba(89, 89, 89, 0.1); }
.video-js.vjs-no-flex .vjs-progress-control {
width: auto; }
.video-js .vjs-slider {
outline: 0;
position: relative;
cursor: pointer;
padding: 0;
margin: 0 0.45em 0 0.45em;
background-color: #595959;
background-color: rgba(89, 89, 89, 0.9); }
.video-js .vjs-slider:focus {
text-shadow: 0em 0em 1em white;
-webkit-box-shadow: 0 0 1em #fff;
-moz-box-shadow: 0 0 1em #fff;
box-shadow: 0 0 1em #fff; }
.video-js .vjs-mute-control, .video-js .vjs-volume-menu-button {
cursor: pointer;
-webkit-box-flex: none;
-moz-box-flex: none;
-webkit-flex: none;
-ms-flex: none;
flex: none; }
.video-js .vjs-volume-control {
width: 5em;
-webkit-box-flex: none;
-moz-box-flex: none;
-webkit-flex: none;
-ms-flex: none;
flex: none;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center; }
.video-js .vjs-volume-bar {
margin: 1.35em; }
.video-js .vjs-volume-bar.vjs-slider-horizontal {
width: 5em;
height: 0.3em; }
.video-js .vjs-volume-bar.vjs-slider-vertical {
width: 0.3em;
height: 5em; }
.video-js .vjs-volume-level {
position: absolute;
bottom: 0;
left: 0;
background-color: #fff; }
.video-js .vjs-volume-level:before {
position: absolute;
font-size: 0.9em; }
.video-js .vjs-slider-vertical .vjs-volume-level {
width: 0.3em; }
.video-js .vjs-slider-vertical .vjs-volume-level:before {
top: -0.5em;
left: -0.3em; }
.video-js .vjs-slider-horizontal .vjs-volume-level {
height: 0.3em; }
.video-js .vjs-slider-horizontal .vjs-volume-level:before {
top: -0.3em;
right: -0.5em; }
/* Assumes volume starts at 1.0. */
.video-js .vjs-volume-bar.vjs-slider-vertical .vjs-volume-level {
height: 100%; }
.video-js .vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level {
width: 100%; }
/* The volume menu button is like menu buttons (captions/subtitles) but works
a little differently. It needs to be possible to tab to the volume slider
without hitting space bar on the menu button. To do this we're not using
display:none to hide the slider menu by default, and instead setting the
width and height to zero. */
.video-js .vjs-menu-button-popup.vjs-volume-menu-button .vjs-menu {
display: block;
width: 0;
height: 0;
border-top-color: transparent; }
.video-js .vjs-volume-menu-button.vjs-volume-menu-button-vertical .vjs-menu {
left: 0.5em; }
.video-js .vjs-volume-menu-button-popup.vjs-volume-menu-button-horizontal .vjs-menu {
left: -2em; }
.video-js .vjs-menu-button.vjs-menu-button-popup.vjs-volume-menu-button .vjs-menu .vjs-menu-content {
height: 0;
width: 0;
overflow-x: hidden;
overflow-y: hidden; }
.video-js .vjs-volume-menu-button.vjs-volume-menu-button-vertical:hover .vjs-menu .vjs-menu-content, .video-js .vjs-volume-menu-button.vjs-volume-menu-button-vertical .vjs-menu.vjs-lock-showing .vjs-menu-content {
height: 8em;
width: 2.9em; }
.video-js .vjs-volume-menu-button.vjs-volume-menu-button-horizontal:hover .vjs-menu .vjs-menu-content, .video-js .vjs-volume-menu-button.vjs-volume-menu-button-horizontal .vjs-menu.vjs-lock-showing .vjs-menu-content {
height: 2.9em;
width: 8em; }
.video-js .vjs-mute-control, .video-js .vjs-volume-control {
display: none; }
.video-js .vjs-menu-button {
cursor: pointer; }
.video-js .vjs-menu .vjs-menu-content {
display: block;
padding: 0;
margin: 0;
overflow: auto; }
/* prevent menus from opening while scrubbing (FF, IE) */
.video-js.vjs-scrubbing .vjs-menu-button:hover .vjs-menu {
display: none; }
.video-js .vjs-menu ul li {
list-style: none;
margin: 0;
padding: 0.2em 0;
line-height: 1.4em;
font-size: 1.2em;
text-align: center;
text-transform: lowercase; }
.video-js .vjs-menu ul li.vjs-selected {
background-color: #000; }
.video-js .vjs-menu ul li:focus, .video-js .vjs-menu ul li:hover, .video-js .vjs-menu ul li.vjs-selected:focus, .video-js .vjs-menu ul li.vjs-selected:hover {
outline: 0;
color: #000;
background-color: #fff;
background-color: rgba(255, 255, 255, 0.75); }
.video-js .vjs-menu ul li.vjs-menu-title {
text-align: center;
text-transform: uppercase;
font-size: 1em;
line-height: 2em;
padding: 0;
margin: 0 0 0.3em 0;
font-weight: bold;
cursor: default; }
.video-js .vjs-menu-button-popup .vjs-menu {
display: none;
position: absolute;
bottom: 0;
left: -3em;
/* (Width of vjs-menu - width of button) / 2 */
width: 0em;
height: 0em;
margin-bottom: 1.5em;
border-top-color: rgba(7, 40, 50, 0.5);
/* Same as ul background */ }
/* Button Pop-up Menu */
.video-js .vjs-menu-button-popup .vjs-menu-content {
background-color: #000;
background-color: rgba(0, 0, 0, 0.7); }
.video-js .vjs-menu-button-popup .vjs-menu .vjs-menu-content {
position: absolute;
width: 10em;
bottom: 1.5em;
/* Same bottom as vjs-menu border-top */
max-height: 15em; }
.video-js .vjs-menu-button.vjs-menu-button-popup:hover .vjs-menu, .video-js .vjs-menu-button-popup .vjs-menu.vjs-lock-showing {
display: block; }
.video-js .vjs-menu-button-inline {
-webkit-transition: all 0.4s;
-moz-transition: all 0.4s;
-o-transition: all 0.4s;
transition: all 0.4s;
overflow: hidden; }
.video-js .vjs-menu-button.vjs-menu-button-inline:before {
width: 2.222222222em; }
.video-js .vjs-menu-button-inline .vjs-menu {
opacity: 0;
height: 100%;
width: auto;
position: absolute;
left: 2.2222222em;
top: 0;
padding: 0;
margin: 0;
-webkit-transition: all 0.2s;
-moz-transition: all 0.2s;
-o-transition: all 0.2s;
transition: all 0.2s; }
.video-js.vjs-no-flex .vjs-menu-button-inline .vjs-menu {
position: relative;
width: 0; }
.video-js.vjs-no-flex .vjs-menu-button-inline:hover .vjs-menu {
width: auto; }
.video-js .vjs-menu-button-inline .vjs-menu .vjs-menu-content {
width: auto;
height: 100%;
margin: 0;
overflow: hidden; }
.video-js .vjs-menu-button-inline:hover {
width: 10em; }
.video-js .vjs-menu-button.vjs-menu-button-inline:hover .vjs-menu, .video-js .vjs-menu-button-inline .vjs-menu.vjs-lock-showing {
display: block;
opacity: 1; }
.vjs-poster {
display: inline-block;
vertical-align: middle;
background-repeat: no-repeat;
background-position: 50% 50%;
background-size: contain;
cursor: pointer;
margin: 0;
padding: 0;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
height: 100%; }
.vjs-poster img {
display: block;
vertical-align: middle;
margin: 0 auto;
max-height: 100%;
padding: 0;
width: 100%; }
/* Hide the poster after the video has started playing */
.video-js.vjs-has-started .vjs-poster {
display: none; }
/* Don't hide the poster if we're playing audio */
.video-js.vjs-audio.vjs-has-started .vjs-poster {
display: block; }
/* Hide the poster when controls are disabled because it's clickable
and the native poster can take over */
.video-js.vjs-controls-disabled .vjs-poster {
display: none; }
/* Hide the poster when native controls are used otherwise it covers them */
.video-js.vjs-using-native-controls .vjs-poster {
display: none; }
.video-js.vjs-live .vjs-time-control, .video-js.vjs-live .vjs-time-divider, .video-js.vjs-live .vjs-progress-control {
display: none; }
.video-js .vjs-live-control {
display: none;
font-size: 1em;
line-height: 3em; }
.video-js .vjs-time-control {
-webkit-box-flex: none;
-moz-box-flex: none;
-webkit-flex: none;
-ms-flex: none;
flex: none;
font-size: 1em;
line-height: 3em; }
/* We need the extra specificity that referencing .vjs-no-flex provides. */
.video-js .vjs-current-time, .video-js.vjs-no-flex .vjs-current-time {
display: none; }
.video-js .vjs-duration, .video-js.vjs-no-flex .vjs-duration {
display: none; }
.vjs-time-divider {
display: none;
line-height: 3em; }
.video-js .vjs-play-control {
cursor: pointer;
-webkit-box-flex: none;
-moz-box-flex: none;
-webkit-flex: none;
-ms-flex: none;
flex: none; }
.video-js .vjs-text-track-display {
position: absolute;
bottom: 3em;
left: 0;
right: 0;
top: 0;
pointer-events: none; }
/* Move captions down when controls aren't being shown */
.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display {
bottom: 1em; }
/* Individual tracks */
.video-js .vjs-text-track {
font-size: 1.4em;
text-align: center;
margin-bottom: 0.1em;
/* Transparent black background, or fallback to all black (oldIE) */
background-color: #000;
background-color: rgba(0, 0, 0, 0.5); }
.video-js .vjs-subtitles {
color: #fff;
/* Subtitles are white */ }
.video-js .vjs-captions {
color: #fc6;
/* Captions are yellow */ }
.vjs-tt-cue {
display: block; }
.video-js .vjs-fullscreen-control {
width: 3.8em;
cursor: pointer;
-webkit-box-flex: none;
-moz-box-flex: none;
-webkit-flex: none;
-ms-flex: none;
flex: none; }
/* Switch to the exit icon when the player is in fullscreen */
.video-js .vjs-playback-rate .vjs-playback-rate-value {
font-size: 1.5em;
line-height: 2;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
text-align: center; }
.video-js .vjs-playback-rate .vjs-menu {
left: 0em; }
.video-js .vjs-playback-rate.vjs-menu-button .vjs-menu .vjs-menu-content {
width: 4em;
left: 0;
list-style: none; }
.vjs-error-display {
display: none; }
.vjs-error .vjs-error-display {
display: block;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%; }
.vjs-error .vjs-error-display:before {
content: 'X';
font-family: Arial, Helvetica, sans-serif;
font-size: 4em;
color: #595959;
/* In order to center the play icon vertically we need to set the line height
to the same as the button height */
line-height: 1;
text-shadow: 0.05em 0.05em 0.1em #000;
text-align: center;
/* Needed for IE8 */
vertical-align: middle;
position: absolute;
left: 0;
top: 50%;
margin-top: -0.5em;
width: 100%; }
.vjs-error-display div {
position: absolute;
bottom: 1em;
right: 0;
left: 0;
font-size: 1.4em;
text-align: center;
padding: 3px;
background-color: #000;
background-color: rgba(0, 0, 0, 0.5); }
.vjs-error-display a, .vjs-error-display a:visited {
color: #F4A460; }
.vjs-loading-spinner {
display: none;
position: absolute;
top: 50%;
left: 50%;
font-size: 4em;
line-height: 1;
width: 1em;
height: 1em;
margin-left: -0.5em;
margin-top: -0.5em;
opacity: 0.75; }
/* Show the spinner when waiting for data and seeking to a new time */
.vjs-waiting .vjs-loading-spinner, .vjs-seeking .vjs-loading-spinner {
display: block;
/* only animate when showing because it can be processor heavy */
-webkit-animation: spin 1.5s infinite linear;
-moz-animation: spin 1.5s infinite linear;
-o-animation: spin 1.5s infinite linear;
animation: spin 1.5s infinite linear; }
/* Errors are unrecoverable without user interaction so hide the spinner */
.vjs-error .vjs-loading-spinner {
display: none;
/* ensure animation doesn't continue while hidden */
-webkit-animation: none;
-moz-animation: none;
-o-animation: none;
animation: none; }
.video-js .vjs-loading-spinner:before {
position: absolute;
top: 0;
left: 0;
width: 1em;
height: 1em;
text-align: center;
text-shadow: 0em 0em 0.1em #000; }
@-moz-keyframes spin {
0% {
-moz-transform: rotate(0deg); }
100% {
-moz-transform: rotate(359deg); } }
@-webkit-keyframes spin {
0% {
-webkit-transform: rotate(0deg); }
100% {
-webkit-transform: rotate(359deg); } }
@-o-keyframes spin {
0% {
-o-transform: rotate(0deg); }
100% {
-o-transform: rotate(359deg); } }
@keyframes spin {
0% {
transform: rotate(0deg); }
100% {
transform: rotate(359deg); } }
.video-js .vjs-chapters-button.vjs-menu-button .vjs-menu {
left: 2em; }
.video-js .vjs-chapters-button.vjs-menu-button .vjs-menu .vjs-menu-content {
width: 24em;
left: -12em; }
.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-custom-control-spacer {
-webkit-box-flex: auto;
-moz-box-flex: auto;
-webkit-flex: auto;
-ms-flex: auto;
flex: auto; }
.video-js.vjs-layout-tiny:not(.vjs-fullscreen).vjs-no-flex .vjs-custom-control-spacer {
width: auto; }
.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-current-time, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-captions-button, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-time-divider, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-progress-control, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-duration, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-remaining-time, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-playback-rate, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-mute-control, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-volume-control, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-chapters-button, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-captions-button, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-subtitles-button, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-volume-menu-button {
display: none; }
.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-current-time, .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-captions-button, .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-time-divider, .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-duration, .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-remaining-time, .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-playback-rate, .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-captions-button, .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-mute-control, .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-volume-control, .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-chapters-button, .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-subtitles-button, .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-volume-button, .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-fullscreen-control {
display: none; }
.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-current-time, .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-captions-button, .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-time-divider, .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-duration, .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-remaining-time, .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-playback-rate, .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-mute-control, .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-volume-control, .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-chapters-button, .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-subtitles-button {
display: none; }
.vjs-caption-settings {
position: relative;
top: 1em;
background-color: #000;
opacity: 0.75;
color: #fff;
margin: 0 auto;
padding: 0.5em;
height: 15em;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
width: 40em; }
.vjs-caption-settings .vjs-tracksettings {
top: 0;
bottom: 2em;
left: 0;
right: 0;
position: absolute;
overflow: auto; }
.vjs-caption-settings .vjs-tracksettings-colors, .vjs-caption-settings .vjs-tracksettings-font {
float: left; }
.vjs-caption-settings .vjs-tracksettings-colors:after, .vjs-caption-settings .vjs-tracksettings-font:after, .vjs-caption-settings .vjs-tracksettings-controls:after {
clear: both; }
.vjs-caption-settings .vjs-tracksettings-controls {
position: absolute;
bottom: 1em;
right: 1em; }
.vjs-caption-settings .vjs-tracksetting {
margin: 5px;
padding: 3px;
min-height: 40px; }
.vjs-caption-settings .vjs-tracksetting label {
display: block;
width: 100px;
margin-bottom: 5px; }
.vjs-caption-settings .vjs-tracksetting span {
display: inline;
margin-left: 5px; }
.vjs-caption-settings .vjs-tracksetting > div {
margin-bottom: 5px;
min-height: 20px; }
.vjs-caption-settings .vjs-tracksetting > div:last-child {
margin-bottom: 0;
padding-bottom: 0;
min-height: 0; }
.vjs-caption-settings label > input {
margin-right: 10px; }
.vjs-caption-settings input[type="button"] {
width: 40px;
height: 40px; }
| dada0423/cdnjs | ajax/libs/video.js/5.0.0-rc.32/video-js.css | CSS | mit | 39,345 |
!function(e,t){e.jPlayerInspector={},e.jPlayerInspector.i=0,e.jPlayerInspector.defaults={jPlayer:t,idPrefix:"jplayer_inspector_",visible:!1};var a={init:function(t){var a=e(this),r=e.extend({},e.jPlayerInspector.defaults,t);e(this).data("jPlayerInspector",r),r.id=e(this).attr("id"),r.jPlayerId=r.jPlayer.attr("id"),r.windowId=r.idPrefix+"window_"+e.jPlayerInspector.i,r.statusId=r.idPrefix+"status_"+e.jPlayerInspector.i,r.configId=r.idPrefix+"config_"+e.jPlayerInspector.i,r.toggleId=r.idPrefix+"toggle_"+e.jPlayerInspector.i,r.eventResetId=r.idPrefix+"event_reset_"+e.jPlayerInspector.i,r.updateId=r.idPrefix+"update_"+e.jPlayerInspector.i,r.eventWindowId=r.idPrefix+"event_window_"+e.jPlayerInspector.i,r.eventId={},r.eventJq={},r.eventTimeout={},r.eventOccurrence={},e.each(e.jPlayer.event,function(t,a){r.eventId[a]=r.idPrefix+"event_"+t+"_"+e.jPlayerInspector.i,r.eventOccurrence[a]=0});var d='<p><a href="#" id="'+r.toggleId+'">'+(r.visible?"Hide":"Show")+'</a> jPlayer Inspector</p><div id="'+r.windowId+'"><div id="'+r.statusId+'"></div><div id="'+r.eventWindowId+'" style="padding:5px 5px 0 5px;background-color:#eee;border:1px dotted #000;"><p style="margin:0 0 10px 0;"><strong>jPlayer events that have occurred over the past 1 second:</strong><br />(Backgrounds: <span style="padding:0 5px;background-color:#eee;border:1px dotted #000;">Never occurred</span> <span style="padding:0 5px;background-color:#fff;border:1px dotted #000;">Occurred before</span> <span style="padding:0 5px;background-color:#9f9;border:1px dotted #000;">Occurred</span> <span style="padding:0 5px;background-color:#ff9;border:1px dotted #000;">Multiple occurrences</span> <a href="#" id="'+r.eventResetId+'">reset</a>)</p>',n="float:left;margin:0 5px 5px 0;padding:0 5px;border:1px dotted #000;";return d+='<div id="'+r.eventId[e.jPlayer.event.ready]+'" style="'+n+'"></div><div id="'+r.eventId[e.jPlayer.event.flashreset]+'" style="'+n+'"></div><div id="'+r.eventId[e.jPlayer.event.resize]+'" style="'+n+'"></div><div id="'+r.eventId[e.jPlayer.event.repeat]+'" style="'+n+'"></div><div id="'+r.eventId[e.jPlayer.event.click]+'" style="'+n+'"></div><div id="'+r.eventId[e.jPlayer.event.error]+'" style="'+n+'"></div><div id="'+r.eventId[e.jPlayer.event.warning]+'" style="'+n+'"></div><div id="'+r.eventId[e.jPlayer.event.loadstart]+'" style="clear:left;'+n+'"></div><div id="'+r.eventId[e.jPlayer.event.progress]+'" style="'+n+'"></div><div id="'+r.eventId[e.jPlayer.event.timeupdate]+'" style="'+n+'"></div><div id="'+r.eventId[e.jPlayer.event.volumechange]+'" style="'+n+'"></div><div id="'+r.eventId[e.jPlayer.event.play]+'" style="clear:left;'+n+'"></div><div id="'+r.eventId[e.jPlayer.event.pause]+'" style="'+n+'"></div><div id="'+r.eventId[e.jPlayer.event.waiting]+'" style="'+n+'"></div><div id="'+r.eventId[e.jPlayer.event.playing]+'" style="'+n+'"></div><div id="'+r.eventId[e.jPlayer.event.seeking]+'" style="'+n+'"></div><div id="'+r.eventId[e.jPlayer.event.seeked]+'" style="'+n+'"></div><div id="'+r.eventId[e.jPlayer.event.ended]+'" style="'+n+'"></div><div id="'+r.eventId[e.jPlayer.event.loadeddata]+'" style="clear:left;'+n+'"></div><div id="'+r.eventId[e.jPlayer.event.loadedmetadata]+'" style="'+n+'"></div><div id="'+r.eventId[e.jPlayer.event.canplay]+'" style="'+n+'"></div><div id="'+r.eventId[e.jPlayer.event.canplaythrough]+'" style="'+n+'"></div><div id="'+r.eventId[e.jPlayer.event.suspend]+'" style="clear:left;'+n+'"></div><div id="'+r.eventId[e.jPlayer.event.abort]+'" style="'+n+'"></div><div id="'+r.eventId[e.jPlayer.event.emptied]+'" style="'+n+'"></div><div id="'+r.eventId[e.jPlayer.event.stalled]+'" style="'+n+'"></div><div id="'+r.eventId[e.jPlayer.event.ratechange]+'" style="'+n+'"></div><div id="'+r.eventId[e.jPlayer.event.durationchange]+'" style="'+n+'"></div><div style="clear:both"></div>',d+='</div><p><a href="#" id="'+r.updateId+'">Update</a> jPlayer Inspector</p><div id="'+r.configId+'"></div></div>',e(this).html(d),r.windowJq=e("#"+r.windowId),r.statusJq=e("#"+r.statusId),r.configJq=e("#"+r.configId),r.toggleJq=e("#"+r.toggleId),r.eventResetJq=e("#"+r.eventResetId),r.updateJq=e("#"+r.updateId),e.each(e.jPlayer.event,function(t,d){r.eventJq[d]=e("#"+r.eventId[d]),r.eventJq[d].text(t+" ("+r.eventOccurrence[d]+")"),r.jPlayer.bind(d+".jPlayerInspector",function(e){r.eventOccurrence[e.type]++,r.eventOccurrence[e.type]>1?r.eventJq[e.type].css("background-color","#ff9"):r.eventJq[e.type].css("background-color","#9f9"),r.eventJq[e.type].text(t+" ("+r.eventOccurrence[e.type]+")"),clearTimeout(r.eventTimeout[e.type]),r.eventTimeout[e.type]=setTimeout(function(){r.eventJq[e.type].css("background-color","#fff")},1e3),setTimeout(function(){r.eventOccurrence[e.type]--,r.eventJq[e.type].text(t+" ("+r.eventOccurrence[e.type]+")")},1e3),r.visible&&a.jPlayerInspector("updateStatus")})}),r.jPlayer.bind(e.jPlayer.event.ready+".jPlayerInspector",function(){a.jPlayerInspector("updateConfig")}),r.toggleJq.click(function(){return r.visible?(e(this).text("Show"),r.windowJq.hide(),r.statusJq.empty(),r.configJq.empty()):(e(this).text("Hide"),r.windowJq.show(),r.updateJq.click()),r.visible=!r.visible,e(this).blur(),!1}),r.eventResetJq.click(function(){return e.each(e.jPlayer.event,function(e,t){r.eventJq[t].css("background-color","#eee")}),e(this).blur(),!1}),r.updateJq.click(function(){return a.jPlayerInspector("updateStatus"),a.jPlayerInspector("updateConfig"),!1}),r.visible||r.windowJq.hide(),e.jPlayerInspector.i++,this},destroy:function(){e(this).data("jPlayerInspector")&&e(this).data("jPlayerInspector").jPlayer.unbind(".jPlayerInspector"),e(this).empty()},updateConfig:function(){var t="<p>This jPlayer instance is running in your browser where:<br />";for(i=0;i<e(this).data("jPlayerInspector").jPlayer.data("jPlayer").solutions.length;i++){var a=e(this).data("jPlayerInspector").jPlayer.data("jPlayer").solutions[i];if(t+=" jPlayer's <strong>"+a+"</strong> solution is",e(this).data("jPlayerInspector").jPlayer.data("jPlayer")[a].used){t+=" being <strong>used</strong> and will support:<strong>";for(format in e(this).data("jPlayerInspector").jPlayer.data("jPlayer")[a].support)e(this).data("jPlayerInspector").jPlayer.data("jPlayer")[a].support[format]&&(t+=" "+format);t+="</strong><br />"}else t+=" <strong>not required</strong><br />"}t+="</p>",t+=e(this).data("jPlayerInspector").jPlayer.data("jPlayer").html.active?e(this).data("jPlayerInspector").jPlayer.data("jPlayer").flash.active?"<strong>Problem with jPlayer since both HTML5 and Flash are active.</strong>":"The <strong>HTML5 is active</strong>.":e(this).data("jPlayerInspector").jPlayer.data("jPlayer").flash.active?"The <strong>Flash is active</strong>.":"No solution is currently active. jPlayer needs a setMedia().",t+="</p>";var r=e(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.formatType;t+="<p><code>status.formatType = '"+r+"'</code><br />",t+=r?"<code>Browser canPlay('"+e.jPlayer.prototype.format[r].codec+"')</code>":"</p>",t+="<p><code>status.src = '"+e(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.src+"'</code></p>",t+="<p><code>status.media = {<br />";for(prop in e(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.media)t+=" "+prop+": "+e(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.media[prop]+"<br />";t+="};</code></p>",t+="<p>",t+="<code>status.videoWidth = '"+e(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.videoWidth+"'</code>",t+=" | <code>status.videoHeight = '"+e(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.videoHeight+"'</code>",t+="<br /><code>status.width = '"+e(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.width+"'</code>",t+=" | <code>status.height = '"+e(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.height+"'</code>",t+="</p>",e(this).data("jPlayerInspector").jPlayer.data("jPlayer").html.audio.available&&(t+="<code>htmlElement.audio.canPlayType = "+typeof e(this).data("jPlayerInspector").jPlayer.data("jPlayer").htmlElement.audio.canPlayType+"</code><br />"),e(this).data("jPlayerInspector").jPlayer.data("jPlayer").html.video.available&&(t+="<code>htmlElement.video.canPlayType = "+typeof e(this).data("jPlayerInspector").jPlayer.data("jPlayer").htmlElement.video.canPlayType+"</code>"),t+="</p>",t+="<p>This instance is using the constructor options:<br /><code>$('#"+e(this).data("jPlayerInspector").jPlayer.data("jPlayer").internal.self.id+"').jPlayer({<br /> swfPath: '"+e(this).data("jPlayerInspector").jPlayer.jPlayer("option","swfPath")+"',<br /> solution: '"+e(this).data("jPlayerInspector").jPlayer.jPlayer("option","solution")+"',<br /> supplied: '"+e(this).data("jPlayerInspector").jPlayer.jPlayer("option","supplied")+"',<br /> preload: '"+e(this).data("jPlayerInspector").jPlayer.jPlayer("option","preload")+"',<br /> volume: "+e(this).data("jPlayerInspector").jPlayer.jPlayer("option","volume")+",<br /> muted: "+e(this).data("jPlayerInspector").jPlayer.jPlayer("option","muted")+",<br /> backgroundColor: '"+e(this).data("jPlayerInspector").jPlayer.jPlayer("option","backgroundColor")+"',<br /> cssSelectorAncestor: '"+e(this).data("jPlayerInspector").jPlayer.jPlayer("option","cssSelectorAncestor")+"',<br /> cssSelector: {";var d=e(this).data("jPlayerInspector").jPlayer.jPlayer("option","cssSelector");for(prop in d)t+="<br /> "+prop+": '"+e(this).data("jPlayerInspector").jPlayer.jPlayer("option","cssSelector."+prop)+"',";return t=t.slice(0,-1),t+="<br /> },<br /> errorAlerts: "+e(this).data("jPlayerInspector").jPlayer.jPlayer("option","errorAlerts")+",<br /> warningAlerts: "+e(this).data("jPlayerInspector").jPlayer.jPlayer("option","warningAlerts")+"<br />});</code></p>",e(this).data("jPlayerInspector").configJq.html(t),this},updateStatus:function(){return e(this).data("jPlayerInspector").statusJq.html("<p>jPlayer is "+(e(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.paused?"paused":"playing")+" at time: "+Math.floor(10*e(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.currentTime)/10+"s. (d: "+Math.floor(10*e(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.duration)/10+"s, sp: "+Math.floor(e(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.seekPercent)+"%, cpr: "+Math.floor(e(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.currentPercentRelative)+"%, cpa: "+Math.floor(e(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.currentPercentAbsolute)+"%)</p>"),this}};e.fn.jPlayerInspector=function(t){return a[t]?a[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist on jQuery.jPlayerInspector"):a.init.apply(this,arguments)}}(jQuery); | Dervisevic/cdnjs | ajax/libs/jplayer/2.3.8/add-on/jquery.jplayer.inspector.min.js | JavaScript | mit | 10,790 |
// Muaz Khan - www.MuazKhan.com
// MIT License - www.WebRTC-Experiment.com/licence
// Experiments - github.com/muaz-khan/WebRTC-Experiment
function getElement(selector) {
return document.querySelector(selector);
}
var main = getElement('.main');
function getRandomColor() {
var letters = '0123456789ABCDEF'.split('');
var color = '#';
for (var i = 0; i < 6; i++) {
color += letters[Math.round(Math.random() * 15)];
}
return color;
}
function addNewMessage(args) {
var newMessageDIV = document.createElement('div');
newMessageDIV.className = 'new-message';
var userinfoDIV = document.createElement('div');
userinfoDIV.className = 'user-info';
userinfoDIV.innerHTML = args.userinfo || '<img src="images/user.png">';
userinfoDIV.style.background = args.color || rtcMultiConnection.extra.color || getRandomColor();
newMessageDIV.appendChild(userinfoDIV);
var userActivityDIV = document.createElement('div');
userActivityDIV.className = 'user-activity';
userActivityDIV.innerHTML = '<h2 class="header">' + args.header + '</h2>';
var p = document.createElement('p');
p.className = 'message';
userActivityDIV.appendChild(p);
p.innerHTML = args.message;
newMessageDIV.appendChild(userActivityDIV);
main.insertBefore(newMessageDIV, main.firstChild);
userinfoDIV.style.height = newMessageDIV.clientHeight + 'px';
if (args.callback) {
args.callback(newMessageDIV);
}
document.querySelector('#message-sound').play();
}
main.querySelector('#your-name').onkeyup = function(e) {
if (e.keyCode != 13) return;
main.querySelector('#continue').onclick();
};
main.querySelector('#room-name').onkeyup = function(e) {
if (e.keyCode != 13) return;
main.querySelector('#continue').onclick();
};
main.querySelector('#room-name').value = localStorage.getItem('room-name') || (Math.random() * 1000).toString().replace('.', '');
if(localStorage.getItem('user-name')) {
main.querySelector('#your-name').value = localStorage.getItem('user-name');
}
main.querySelector('#continue').onclick = function() {
var yourName = this.parentNode.querySelector('#your-name');
var roomName = this.parentNode.querySelector('#room-name');
if(!roomName.value || !roomName.value.length) {
roomName.focus();
return alert('Your MUST Enter Room Name!');
}
localStorage.setItem('room-name', roomName.value);
localStorage.setItem('user-name', yourName.value);
yourName.disabled = roomName.disabled = this.disabled = true;
var username = yourName.value || 'Anonymous';
rtcMultiConnection.extra = {
username: username,
color: getRandomColor()
};
addNewMessage({
header: username,
message: 'Searching for existing rooms...',
userinfo: '<img src="images/action-needed.png">'
});
var roomid = main.querySelector('#room-name').value;
rtcMultiConnection.channel = roomid;
var websocket = new WebSocket(SIGNALING_SERVER);
websocket.onmessage = function(event) {
var data = JSON.parse(event.data);
if (data.isChannelPresent == false) {
addNewMessage({
header: username,
message: 'No room found. Creating new room...<br /><br />You can share following room-id with your friends: <input type=text value="' + roomid + '">',
userinfo: '<img src="images/action-needed.png">'
});
rtcMultiConnection.userid = roomid;
rtcMultiConnection.open({
dontTransmit: true,
sessionid: roomid
});
} else {
addNewMessage({
header: username,
message: 'Room found. Joining the room...',
userinfo: '<img src="images/action-needed.png">'
});
rtcMultiConnection.join({
sessionid: roomid,
userid: roomid,
extra: {},
session: rtcMultiConnection.session
});
}
};
websocket.onopen = function() {
websocket.send(JSON.stringify({
checkPresence: true,
channel: roomid
}));
};
};
function getUserinfo(blobURL, imageURL) {
return blobURL ? '<video src="' + blobURL + '" autoplay controls></video>' : '<img src="' + imageURL + '">';
}
var isShiftKeyPressed = false;
getElement('.main-input-box textarea').onkeydown = function(e) {
if (e.keyCode == 16) {
isShiftKeyPressed = true;
}
};
var numberOfKeys = 0;
getElement('.main-input-box textarea').onkeyup = function(e) {
numberOfKeys++;
if (numberOfKeys > 3) numberOfKeys = 0;
if (!numberOfKeys) {
if (e.keyCode == 8) {
return rtcMultiConnection.send({
stoppedTyping: true
});
}
rtcMultiConnection.send({
typing: true
});
}
if (isShiftKeyPressed) {
if (e.keyCode == 16) {
isShiftKeyPressed = false;
}
return;
}
if (e.keyCode != 13) return;
addNewMessage({
header: rtcMultiConnection.extra.username,
message: 'Your Message:<br /><br />' + linkify(this.value),
userinfo: getUserinfo(rtcMultiConnection.blobURLs[rtcMultiConnection.userid], 'images/chat-message.png'),
color: rtcMultiConnection.extra.color
});
rtcMultiConnection.send(this.value);
this.value = '';
};
getElement('#allow-webcam').onclick = function() {
this.disabled = true;
var session = { audio: true, video: true };
rtcMultiConnection.captureUserMedia(function(stream) {
var streamid = rtcMultiConnection.token();
rtcMultiConnection.customStreams[streamid] = stream;
rtcMultiConnection.sendMessage({
hasCamera: true,
streamid: streamid,
session: session
});
}, session);
};
getElement('#allow-mic').onclick = function() {
this.disabled = true;
var session = { audio: true };
rtcMultiConnection.captureUserMedia(function(stream) {
var streamid = rtcMultiConnection.token();
rtcMultiConnection.customStreams[streamid] = stream;
rtcMultiConnection.sendMessage({
hasMic: true,
streamid: streamid,
session: session
});
}, session);
};
getElement('#allow-screen').onclick = function() {
this.disabled = true;
var session = { screen: true };
rtcMultiConnection.captureUserMedia(function(stream) {
var streamid = rtcMultiConnection.token();
rtcMultiConnection.customStreams[streamid] = stream;
rtcMultiConnection.sendMessage({
hasScreen: true,
streamid: streamid,
session: session
});
}, session);
};
getElement('#share-files').onclick = function() {
var file = document.createElement('input');
file.type = 'file';
file.onchange = function() {
rtcMultiConnection.send(this.files[0]);
};
fireClickEvent(file);
};
function fireClickEvent(element) {
var evt = new MouseEvent('click', {
view: window,
bubbles: true,
cancelable: true
});
element.dispatchEvent(evt);
}
function bytesToSize(bytes) {
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
if (bytes == 0) return '0 Bytes';
var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024)));
return Math.round(bytes / Math.pow(1024, i), 2) + ' ' + sizes[i];
}
| ajchambeaud/WebRTC-Experiment | MultiRTC-simple/ui.main.js | JavaScript | mit | 7,599 |
var map, layer, styleMap;
OpenLayers.ProxyHost = "proxy.cgi?url=";
function init() {
map = new OpenLayers.Map({
div: "map",
projection: new OpenLayers.Projection("EPSG:900913"),
displayProjection: new OpenLayers.Projection("EPSG:4326"),
units: "m",
maxResolution: 156543.0339,
maxExtent: new OpenLayers.Bounds(
-20037508, -20037508, 20037508, 20037508
)
});
var g = new OpenLayers.Layer.Google("Google Layer", {
sphericalMercator: true
});
map.addLayers([g]);
// prepare to style the data
styleMap = new OpenLayers.StyleMap({
strokeColor: "black",
strokeWidth: 2,
strokeOpacity: 0.5,
fillOpacity: 0.2
});
// create a color table for state FIPS code
var colors = ["red", "orange", "yellow", "green", "blue", "purple"];
var code, fips = {};
for(var i=1; i<=66; ++i) {
code = "0" + i;
code = code.substring(code.length - 2);
fips[code] = {fillColor: colors[i % colors.length]};
}
// add unique value rules with your color lookup
styleMap.addUniqueValueRules("default", "STATE_FIPS", fips);
// create a vector layer using the canvas renderer (where available)
var wfs = new OpenLayers.Layer.Vector("States", {
strategies: [new OpenLayers.Strategy.BBOX()],
protocol: new OpenLayers.Protocol.WFS({
version: "1.1.0",
srsName: "EPSG:900913",
url: "http://v2.suite.opengeo.org/geoserver/wfs",
featureType: "states",
featureNS: "http://usa.opengeo.org"
}),
styleMap: styleMap,
renderers: ["Canvas", "SVG", "VML"]
});
map.addLayer(wfs);
// if you want to use Geographic coords, transform to ESPG:900913
var ddBounds = new OpenLayers.Bounds(
-73.839111,40.287907,-68.214111,44.441624
);
map.zoomToExtent(
ddBounds.transform(map.displayProjection, map.getProjectionObject())
);
}
| socib/grumers | grumers/static/js/open_layers/examples/canvas.js | JavaScript | mit | 2,022 |
describe('collapse directive', function () {
var scope, $compile, $animate;
var element;
beforeEach(module('ui.bootstrap.collapse'));
beforeEach(module('ngAnimateMock'));
beforeEach(inject(function(_$rootScope_, _$compile_, _$animate_) {
scope = _$rootScope_;
$compile = _$compile_;
$animate = _$animate_;
}));
beforeEach(function() {
element = $compile('<div collapse="isCollapsed">Some Content</div>')(scope);
angular.element(document.body).append(element);
});
afterEach(function() {
element.remove();
});
it('should be hidden on initialization if isCollapsed = true without transition', function() {
scope.isCollapsed = true;
scope.$digest();
$animate.triggerCallbacks();
//No animation timeout here
expect(element.height()).toBe(0);
});
it('should collapse if isCollapsed = true with animation on subsequent use', function() {
scope.isCollapsed = false;
scope.$digest();
scope.isCollapsed = true;
scope.$digest();
$animate.triggerCallbacks();
expect(element.height()).toBe(0);
});
it('should be shown on initialization if isCollapsed = false without transition', function() {
scope.isCollapsed = false;
scope.$digest();
//No animation timeout here
expect(element.height()).not.toBe(0);
});
it('should expand if isCollapsed = false with animation on subsequent use', function() {
scope.isCollapsed = false;
scope.$digest();
scope.isCollapsed = true;
scope.$digest();
scope.isCollapsed = false;
scope.$digest();
$animate.triggerCallbacks();
expect(element.height()).not.toBe(0);
});
it('should expand if isCollapsed = true with animation on subsequent uses', function() {
scope.isCollapsed = false;
scope.$digest();
scope.isCollapsed = true;
scope.$digest();
scope.isCollapsed = false;
scope.$digest();
scope.isCollapsed = true;
scope.$digest();
$animate.triggerCallbacks();
expect(element.height()).toBe(0);
$animate.triggerCallbacks();
expect(element.height()).toBe(0);
});
describe('dynamic content', function() {
var element;
beforeEach(function() {
element = angular.element('<div collapse="isCollapsed"><p>Initial content</p><div ng-show="exp">Additional content</div></div>');
$compile(element)(scope);
angular.element(document.body).append(element);
});
afterEach(function() {
element.remove();
});
it('should grow accordingly when content size inside collapse increases', function() {
scope.exp = false;
scope.isCollapsed = false;
scope.$digest();
$animate.triggerCallbacks();
var collapseHeight = element.height();
scope.exp = true;
scope.$digest();
expect(element.height()).toBeGreaterThan(collapseHeight);
});
it('should shrink accordingly when content size inside collapse decreases', function() {
scope.exp = true;
scope.isCollapsed = false;
scope.$digest();
$animate.triggerCallbacks();
var collapseHeight = element.height();
scope.exp = false;
scope.$digest();
expect(element.height()).toBeLessThan(collapseHeight);
});
});
});
| qrohlf/bootstrap | src/collapse/test/collapse.spec.js | JavaScript | mit | 3,227 |
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Templating\Tests\Loader;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Templating\Loader\CacheLoader;
use Symfony\Component\Templating\Loader\Loader;
use Symfony\Component\Templating\Storage\StringStorage;
use Symfony\Component\Templating\TemplateReference;
use Symfony\Component\Templating\TemplateReferenceInterface;
class CacheLoaderTest extends TestCase
{
public function testConstructor()
{
$loader = new ProjectTemplateLoader($varLoader = new ProjectTemplateLoaderVar(), sys_get_temp_dir());
$this->assertSame($loader->getLoader(), $varLoader, '__construct() takes a template loader as its first argument');
$this->assertEquals(sys_get_temp_dir(), $loader->getDir(), '__construct() takes a directory where to store the cache as its second argument');
}
public function testLoad()
{
$dir = sys_get_temp_dir().\DIRECTORY_SEPARATOR.mt_rand(111111, 999999);
mkdir($dir, 0777, true);
$loader = new ProjectTemplateLoader($varLoader = new ProjectTemplateLoaderVar(), $dir);
$this->assertFalse($loader->load(new TemplateReference('foo', 'php')), '->load() returns false if the embed loader is not able to load the template');
$logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock();
$logger
->expects($this->once())
->method('debug')
->with('Storing template in cache.', ['name' => 'index']);
$loader->setLogger($logger);
$loader->load(new TemplateReference('index'));
$logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock();
$logger
->expects($this->once())
->method('debug')
->with('Fetching template from cache.', ['name' => 'index']);
$loader->setLogger($logger);
$loader->load(new TemplateReference('index'));
}
}
class ProjectTemplateLoader extends CacheLoader
{
public function getDir()
{
return $this->dir;
}
public function getLoader()
{
return $this->loader;
}
}
class ProjectTemplateLoaderVar extends Loader
{
public function getIndexTemplate()
{
return 'Hello World';
}
public function getSpecialTemplate()
{
return 'Hello {{ name }}';
}
public function load(TemplateReferenceInterface $template)
{
if (method_exists($this, $method = 'get'.ucfirst($template->get('name')).'Template')) {
return new StringStorage($this->$method());
}
return false;
}
public function isFresh(TemplateReferenceInterface $template, int $time): bool
{
return false;
}
}
| mweimerskirch/symfony | src/Symfony/Component/Templating/Tests/Loader/CacheLoaderTest.php | PHP | mit | 2,937 |
class ScaffoldGenerator < Rails::Generator::NamedBase
default_options :skip_timestamps => false, :skip_migration => false, :force_plural => false
attr_reader :controller_name,
:controller_class_path,
:controller_file_path,
:controller_class_nesting,
:controller_class_nesting_depth,
:controller_class_name,
:controller_underscore_name,
:controller_singular_name,
:controller_plural_name
alias_method :controller_file_name, :controller_underscore_name
alias_method :controller_table_name, :controller_plural_name
def initialize(runtime_args, runtime_options = {})
super
if @name == @name.pluralize && !options[:force_plural]
logger.warning "Plural version of the model detected, using singularized version. Override with --force-plural."
@name = @name.singularize
end
@controller_name = @name.pluralize
base_name, @controller_class_path, @controller_file_path, @controller_class_nesting, @controller_class_nesting_depth = extract_modules(@controller_name)
@controller_class_name_without_nesting, @controller_underscore_name, @controller_plural_name = inflect_names(base_name)
@controller_singular_name=base_name.singularize
if @controller_class_nesting.empty?
@controller_class_name = @controller_class_name_without_nesting
else
@controller_class_name = "#{@controller_class_nesting}::#{@controller_class_name_without_nesting}"
end
end
def manifest
record do |m|
# Check for class naming collisions.
m.class_collisions("#{controller_class_name}Controller", "#{controller_class_name}Helper")
m.class_collisions(class_name)
# Controller, helper, views, test and stylesheets directories.
m.directory(File.join('app/models', class_path))
m.directory(File.join('app/controllers', controller_class_path))
m.directory(File.join('app/helpers', controller_class_path))
m.directory(File.join('app/views', controller_class_path, controller_file_name))
m.directory(File.join('app/views/layouts', controller_class_path))
m.directory(File.join('test/functional', controller_class_path))
m.directory(File.join('test/unit', class_path))
m.directory(File.join('test/unit/helpers', class_path))
m.directory(File.join('public/stylesheets', class_path))
for action in scaffold_views
m.template(
"view_#{action}.html.erb",
File.join('app/views', controller_class_path, controller_file_name, "#{action}.html.erb")
)
end
# Layout and stylesheet.
m.template('layout.html.erb', File.join('app/views/layouts', controller_class_path, "#{controller_file_name}.html.erb"))
m.template('style.css', 'public/stylesheets/scaffold.css')
m.template(
'controller.rb', File.join('app/controllers', controller_class_path, "#{controller_file_name}_controller.rb")
)
m.template('functional_test.rb', File.join('test/functional', controller_class_path, "#{controller_file_name}_controller_test.rb"))
m.template('helper.rb', File.join('app/helpers', controller_class_path, "#{controller_file_name}_helper.rb"))
m.template('helper_test.rb', File.join('test/unit/helpers', controller_class_path, "#{controller_file_name}_helper_test.rb"))
m.route_resources controller_file_name
m.dependency 'model', [name] + @args, :collision => :skip
end
end
protected
# Override with your own usage banner.
def banner
"Usage: #{$0} scaffold ModelName [field:type, field:type]"
end
def add_options!(opt)
opt.separator ''
opt.separator 'Options:'
opt.on("--skip-timestamps",
"Don't add timestamps to the migration file for this model") { |v| options[:skip_timestamps] = v }
opt.on("--skip-migration",
"Don't generate a migration file for this model") { |v| options[:skip_migration] = v }
opt.on("--force-plural",
"Forces the generation of a plural ModelName") { |v| options[:force_plural] = v }
end
def scaffold_views
%w[ index show new edit ]
end
def model_name
class_name.demodulize
end
end
| jbripley/brazil | vendor/rails/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb | Ruby | mit | 4,310 |
hljs.registerLanguage("lasso",function(e){var r="[a-zA-Z_][\\w.]*",a="<\\?(lasso(script)?|=)",t="\\]|\\?>",n={literal:"true false none minimal full all void and or not bw nbw ew new cn ncn lt lte gt gte eq neq rx nrx ft",built_in:"array date decimal duration integer map pair string tag xml null boolean bytes keyword list locale queue set stack staticarray local var variable global data self inherited currentcapture givenblock",keyword:"cache database_names database_schemanames database_tablenames define_tag define_type email_batch encode_set html_comment handle handle_error header if inline iterate ljax_target link link_currentaction link_currentgroup link_currentrecord link_detail link_firstgroup link_firstrecord link_lastgroup link_lastrecord link_nextgroup link_nextrecord link_prevgroup link_prevrecord log loop namespace_using output_none portal private protect records referer referrer repeating resultset rows search_args search_arguments select sort_args sort_arguments thread_atomic value_list while abort case else fail_if fail_ifnot fail if_empty if_false if_null if_true loop_abort loop_continue loop_count params params_up return return_value run_children soap_definetag soap_lastrequest soap_lastresponse tag_name ascending average by define descending do equals frozen group handle_failure import in into join let match max min on order parent protected provide public require returnhome skip split_thread sum take thread to trait type where with yield yieldhome"},i=e.C("<!--","-->",{r:0}),s={cN:"meta",b:"\\[noprocess\\]",starts:{e:"\\[/noprocess\\]",rE:!0,c:[i]}},l={cN:"meta",b:"\\[/noprocess|"+a},o={cN:"symbol",b:"'"+r+"'"},c=[e.CLCM,e.CBCM,e.inherit(e.CNM,{b:e.CNR+"|(-?infinity|NaN)\\b"}),e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null}),{cN:"string",b:"`",e:"`"},{v:[{b:"[#$]"+r},{b:"#",e:"\\d+",i:"\\W"}]},{cN:"type",b:"::\\s*",e:r,i:"\\W"},{cN:"params",v:[{b:"-(?!infinity)"+r,r:0},{b:"(\\.\\.\\.)"}]},{b:/(->|\.)\s*/,r:0,c:[o]},{cN:"class",bK:"define",rE:!0,e:"\\(|=>",c:[e.inherit(e.TM,{b:r+"(=(?!>))?|[-+*/%](?!>)"})]}];return{aliases:["ls","lassoscript"],cI:!0,l:r+"|&[lg]t;",k:n,c:[{cN:"meta",b:t,r:0,starts:{e:"\\[|"+a,rE:!0,r:0,c:[i]}},s,l,{cN:"meta",b:"\\[no_square_brackets",starts:{e:"\\[/no_square_brackets\\]",l:r+"|&[lg]t;",k:n,c:[{cN:"meta",b:t,r:0,starts:{e:"\\[noprocess\\]|"+a,rE:!0,c:[i]}},s,l].concat(c)}},{cN:"meta",b:"\\[",r:0},{cN:"meta",b:"^#!",e:"lasso9$",r:10}].concat(c)}}); | kennynaoh/cdnjs | ajax/libs/highlight.js/9.8.0/languages/lasso.min.js | JavaScript | mit | 2,439 |
/*! normalize.css v2.0.0 | MIT License | git.io/normalize */
/* ==========================================================================
HTML5 display definitions
========================================================================== */
/*
* Corrects `block` display not defined in IE 8/9.
*/
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
nav,
section,
summary {
display: block;
}
/*
* Corrects `inline-block` display not defined in IE 8/9.
*/
audio,
canvas,
video {
display: inline-block;
*display: inline;
*zoom: 1;
}
/*
* Prevents modern browsers from displaying `audio` without controls.
* Remove excess height in iOS 5 devices.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/*
* Addresses styling for `hidden` attribute not present in IE 8/9.
*/
[hidden] {
display: none;
}
/* ==========================================================================
Base
========================================================================== */
/*
* 1. Sets default font family to sans-serif.
* 2. Prevents iOS text size adjust after orientation change, without disabling
* user zoom.
*/
html {
font-family: sans-serif; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
-ms-text-size-adjust: 100%; /* 2 */
}
/*
* Removes default margin.
*/
body {
margin: 0;
}
/* ==========================================================================
Links
========================================================================== */
/*
* Addresses `outline` inconsistency between Chrome and other browsers.
*/
a:focus {
outline: thin dotted;
}
/*
* Improves readability when focused and also mouse hovered in all browsers.
*/
a:active,
a:hover {
outline: 0;
}
/* ==========================================================================
Typography
========================================================================== */
/*
* Addresses `h1` font sizes within `section` and `article` in Firefox 4+,
* Safari 5, and Chrome.
*/
h1 {
font-size: 2em;
}
/*
* Addresses styling not present in IE 8/9, Safari 5, and Chrome.
*/
abbr[title] {
border-bottom: 1px dotted;
}
/*
* Addresses style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
*/
b,
strong {
font-weight: bold;
}
/*
* Addresses styling not present in Safari 5 and Chrome.
*/
dfn {
font-style: italic;
}
/*
* Addresses styling not present in IE 8/9.
*/
mark {
background: #ff0;
color: #000;
}
/*
* Corrects font family set oddly in Safari 5 and Chrome.
*/
code,
kbd,
pre,
samp {
font-family: monospace, serif;
font-size: 1em;
}
/*
* Improves readability of pre-formatted text in all browsers.
*/
pre {
white-space: pre;
white-space: pre-wrap;
word-wrap: break-word;
}
/*
* Sets consistent quote types.
*/
q {
quotes: "\201C" "\201D" "\2018" "\2019";
}
/*
* Addresses inconsistent and variable font size in all browsers.
*/
small {
font-size: 80%;
}
/*
* Prevents `sub` and `sup` affecting `line-height` in all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
/* ==========================================================================
Embedded content
========================================================================== */
/*
* Removes border when inside `a` element in IE 8/9.
*/
img {
border: 0;
}
/*
* Corrects overflow displayed oddly in IE 9.
*/
svg:not(:root) {
overflow: hidden;
}
/* ==========================================================================
Figures
========================================================================== */
/*
* Addresses margin not present in IE 8/9 and Safari 5.
*/
figure {
margin: 0;
}
/* ==========================================================================
Forms
========================================================================== */
/*
* Define consistent border, margin, and padding.
*/
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
/*
* 1. Corrects color not being inherited in IE 8/9.
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
*/
legend {
border: 0; /* 1 */
padding: 0; /* 2 */
}
/*
* 1. Corrects font family not being inherited in all browsers.
* 2. Corrects font size not being inherited in all browsers.
* 3. Addresses margins set differently in Firefox 4+, Safari 5, and Chrome
*/
button,
input,
select,
textarea {
font-family: inherit; /* 1 */
font-size: 100%; /* 2 */
margin: 0; /* 3 */
}
/*
* Addresses Firefox 4+ setting `line-height` on `input` using `!important` in
* the UA stylesheet.
*/
button,
input {
line-height: normal;
}
/*
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
* and `video` controls.
* 2. Corrects inability to style clickable `input` types in iOS.
* 3. Improves usability and consistency of cursor style between image-type
* `input` and others.
*/
button,
html input[type="button"], /* 1 */
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button; /* 2 */
cursor: pointer; /* 3 */
}
/*
* Re-set default cursor for disabled elements.
*/
button[disabled],
input[disabled] {
cursor: default;
}
/*
* 1. Addresses box sizing set to `content-box` in IE 8/9.
* 2. Removes excess padding in IE 8/9.
*/
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/*
* 1. Addresses `appearance` set to `searchfield` in Safari 5 and Chrome.
* 2. Addresses `box-sizing` set to `border-box` in Safari 5 and Chrome
* (include `-moz` to future-proof).
*/
input[type="search"] {
-webkit-appearance: textfield; /* 1 */
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box; /* 2 */
box-sizing: content-box;
}
/*
* Removes inner padding and search cancel button in Safari 5 and Chrome
* on OS X.
*/
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/*
* Removes inner padding and border in Firefox 4+.
*/
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
/*
* 1. Removes default vertical scrollbar in IE 8/9.
* 2. Improves readability and alignment in all browsers.
*/
textarea {
overflow: auto; /* 1 */
vertical-align: top; /* 2 */
}
/* ==========================================================================
Tables
========================================================================== */
/*
* Remove most spacing between table cells.
*/
table {
border-collapse: collapse;
border-spacing: 0;
}
| hikaMaeng/cdnjs | ajax/libs/normalize/2.0.0/normalize.css | CSS | mit | 6,911 |
(function(e){typeof exports=="object"&&typeof module=="object"?e(require("../../lib/codemirror")):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)})(function(e){"use strict";e.defineMode("xquery",function(){function r(e,r,i){return t=e,n=i,r}function i(e,t,n){return t.tokenize=n,n(e,t)}function s(t,n){var s=t.next(),l=!1,v=y(t);if(s=="<"){if(t.match("!--",!0))return i(t,n,c);if(t.match("![CDATA",!1))return n.tokenize=h,r("tag","tag");if(t.match("?",!1))return i(t,n,p);var g=t.eat("/");t.eatSpace();var b="",S;while(S=t.eat(/[^\s\u00a0=<>\"\'\/?]/))b+=S;return i(t,n,f(b,g))}if(s=="{")return w(n,{type:"codeblock"}),r("",null);if(s=="}")return E(n),r("",null);if(d(n))return s==">"?r("tag","tag"):s=="/"&&t.eat(">")?(E(n),r("tag","tag")):r("word","variable");if(/\d/.test(s))return t.match(/^\d*(?:\.\d*)?(?:E[+\-]?\d+)?/),r("number","atom");if(s==="("&&t.eat(":"))return w(n,{type:"comment"}),i(t,n,o);if(!!v||s!=='"'&&s!=="'"){if(s==="$")return i(t,n,a);if(s===":"&&t.eat("="))return r("operator","keyword");if(s==="(")return w(n,{type:"paren"}),r("",null);if(s===")")return E(n),r("",null);if(s==="[")return w(n,{type:"bracket"}),r("",null);if(s==="]")return E(n),r("",null);var x=e.propertyIsEnumerable(s)&&e[s];if(v&&s==='"')while(t.next()!=='"');if(v&&s==="'")while(t.next()!=="'");x||t.eatWhile(/[\w\$_-]/);var T=t.eat(":");!t.eat(":")&&T&&t.eatWhile(/[\w\$_-]/),t.match(/^[ \t]*\(/,!1)&&(l=!0);var N=t.current();return x=e.propertyIsEnumerable(N)&&e[N],l&&!x&&(x={type:"function_call",style:"variable def"}),m(n)?(E(n),r("word","variable",N)):((N=="element"||N=="attribute"||x.type=="axis_specifier")&&w(n,{type:"xmlconstructor"}),x?r(x.type,x.style,N):r("word","variable",N))}return i(t,n,u(s))}function o(e,t){var n=!1,i=!1,s=0,o;while(o=e.next()){if(o==")"&&n){if(!(s>0)){E(t);break}s--}else o==":"&&i&&s++;n=o==":",i=o=="("}return r("comment","comment")}function u(e,t){return function(n,i){var o;if(g(i)&&n.current()==e)return E(i),t&&(i.tokenize=t),r("string","string");w(i,{type:"string",name:e,tokenize:u(e,t)});if(n.match("{",!1)&&v(i))return i.tokenize=s,r("string","string");while(o=n.next()){if(o==e){E(i),t&&(i.tokenize=t);break}if(n.match("{",!1)&&v(i))return i.tokenize=s,r("string","string")}return r("string","string")}}function a(e,t){var n=/[\w\$_-]/;if(e.eat('"')){while(e.next()!=='"');e.eat(":")}else e.eatWhile(n),e.match(":=",!1)||e.eat(":");return e.eatWhile(n),t.tokenize=s,r("variable","variable")}function f(e,t){return function(n,i){return n.eatSpace(),t&&n.eat(">")?(E(i),i.tokenize=s,r("tag","tag")):(n.eat("/")||w(i,{type:"tag",name:e,tokenize:s}),n.eat(">")?(i.tokenize=s,r("tag","tag")):(i.tokenize=l,r("tag","tag")))}}function l(e,t){var n=e.next();if(n=="/"&&e.eat(">"))return v(t)&&E(t),d(t)&&E(t),r("tag","tag");if(n==">")return v(t)&&E(t),r("tag","tag");if(n=="=")return r("",null);if(n=='"'||n=="'")return i(e,t,u(n,l));v(t)||w(t,{type:"attribute",tokenize:l}),e.eat(/[a-zA-Z_:]/),e.eatWhile(/[-a-zA-Z0-9_:.]/),e.eatSpace();if(e.match(">",!1)||e.match("/",!1))E(t),t.tokenize=s;return r("attribute","attribute")}function c(e,t){var n;while(n=e.next())if(n=="-"&&e.match("->",!0))return t.tokenize=s,r("comment","comment")}function h(e,t){var n;while(n=e.next())if(n=="]"&&e.match("]",!0))return t.tokenize=s,r("comment","comment")}function p(e,t){var n;while(n=e.next())if(n=="?"&&e.match(">",!0))return t.tokenize=s,r("comment","comment meta")}function d(e){return b(e,"tag")}function v(e){return b(e,"attribute")}function m(e){return b(e,"xmlconstructor")}function g(e){return b(e,"string")}function y(e){return e.current()==='"'?e.match(/^[^\"]+\"\:/,!1):e.current()==="'"?e.match(/^[^\"]+\'\:/,!1):!1}function b(e,t){return e.stack.length&&e.stack[e.stack.length-1].type==t}function w(e,t){e.stack.push(t)}function E(e){e.stack.pop();var t=e.stack.length&&e.stack[e.stack.length-1].tokenize;e.tokenize=t||s}var e=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),r=e("keyword c"),i=e("operator"),s={type:"atom",style:"atom"},o={type:"punctuation",style:null},u={type:"axis_specifier",style:"qualifier"},a={"if":t,"switch":t,"while":t,"for":t,"else":n,then:n,"try":n,"finally":n,"catch":n,element:r,attribute:r,let:r,"implements":r,"import":r,module:r,namespace:r,"return":r,"super":r,"this":r,"throws":r,where:r,"private":r,",":o,"null":s,"fn:false()":s,"fn:true()":s},f=["after","ancestor","ancestor-or-self","and","as","ascending","assert","attribute","before","by","case","cast","child","comment","declare","default","define","descendant","descendant-or-self","descending","document","document-node","element","else","eq","every","except","external","following","following-sibling","follows","for","function","if","import","in","instance","intersect","item","let","module","namespace","node","node","of","only","or","order","parent","precedes","preceding","preceding-sibling","processing-instruction","ref","return","returns","satisfies","schema","schema-element","self","some","sortby","stable","text","then","to","treat","typeswitch","union","variable","version","where","xquery","empty-sequence"];for(var l=0,c=f.length;l<c;l++)a[f[l]]=e(f[l]);var h=["xs:string","xs:float","xs:decimal","xs:double","xs:integer","xs:boolean","xs:date","xs:dateTime","xs:time","xs:duration","xs:dayTimeDuration","xs:time","xs:yearMonthDuration","numeric","xs:hexBinary","xs:base64Binary","xs:anyURI","xs:QName","xs:byte","xs:boolean","xs:anyURI","xf:yearMonthDuration"];for(var l=0,c=h.length;l<c;l++)a[h[l]]=s;var p=["eq","ne","lt","le","gt","ge",":=","=",">",">=","<","<=",".","|","?","and","or","div","idiv","mod","*","/","+","-"];for(var l=0,c=p.length;l<c;l++)a[p[l]]=i;var d=["self::","attribute::","child::","descendant::","descendant-or-self::","parent::","ancestor::","ancestor-or-self::","following::","preceding::","following-sibling::","preceding-sibling::"];for(var l=0,c=d.length;l<c;l++)a[d[l]]=u;return a}(),t,n;return{startState:function(){return{tokenize:s,cc:[],stack:[]}},token:function(e,t){if(e.eatSpace())return null;var n=t.tokenize(e,t);return n},blockCommentStart:"(:",blockCommentEnd:":)"}}),e.defineMIME("application/xquery","xquery")}); | hnakamur/cdnjs | ajax/libs/codemirror/4.0.3/mode/xquery/xquery.min.js | JavaScript | mit | 6,191 |
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Security\Http;
use Symfony\Component\HttpFoundation\RequestMatcherInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Security\Http\Firewall\ExceptionListener;
/**
* FirewallMap allows configuration of different firewalls for specific parts
* of the website.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class FirewallMap implements FirewallMapInterface
{
private $map = array();
/**
* @param RequestMatcherInterface $requestMatcher
* @param array $listeners
* @param ExceptionListener $exceptionListener
*/
public function add(RequestMatcherInterface $requestMatcher = null, array $listeners = array(), ExceptionListener $exceptionListener = null)
{
$this->map[] = array($requestMatcher, $listeners, $exceptionListener);
}
/**
* {@inheritDoc}
*/
public function getListeners(Request $request)
{
foreach ($this->map as $elements) {
if (null === $elements[0] || $elements[0]->matches($request)) {
return array($elements[1], $elements[2]);
}
}
return array(array(), null);
}
}
| Hralien/MarathonWeb | vendor/symfony/symfony/src/Symfony/Component/Security/Http/FirewallMap.php | PHP | mit | 1,448 |
/** vim: et:ts=4:sw=4:sts=4
* @license amdefine 0.1.0 Copyright (c) 2011, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/jrburke/amdefine for details
*/
/*jslint node: true */
/*global module, process */
'use strict';
/**
* Creates a define for node.
* @param {Object} module the "module" object that is defined by Node for the
* current module.
* @param {Function} [requireFn]. Node's require function for the current module.
* It only needs to be passed in Node versions before 0.5, when module.require
* did not exist.
* @returns {Function} a define function that is usable for the current node
* module.
*/
function amdefine(module, requireFn) {
'use strict';
var defineCache = {},
loaderCache = {},
alreadyCalled = false,
path = require('path'),
makeRequire, stringRequire;
/**
* Trims the . and .. from an array of path segments.
* It will keep a leading path segment if a .. will become
* the first path segment, to help with module name lookups,
* which act like paths, but can be remapped. But the end result,
* all paths that use this function should look normalized.
* NOTE: this method MODIFIES the input array.
* @param {Array} ary the array of path segments.
*/
function trimDots(ary) {
var i, part;
for (i = 0; ary[i]; i+= 1) {
part = ary[i];
if (part === '.') {
ary.splice(i, 1);
i -= 1;
} else if (part === '..') {
if (i === 1 && (ary[2] === '..' || ary[0] === '..')) {
//End of the line. Keep at least one non-dot
//path segment at the front so it can be mapped
//correctly to disk. Otherwise, there is likely
//no path mapping for a path starting with '..'.
//This can still fail, but catches the most reasonable
//uses of ..
break;
} else if (i > 0) {
ary.splice(i - 1, 2);
i -= 2;
}
}
}
}
function normalize(name, baseName) {
var baseParts;
//Adjust any relative paths.
if (name && name.charAt(0) === '.') {
//If have a base name, try to normalize against it,
//otherwise, assume it is a top-level require that will
//be relative to baseUrl in the end.
if (baseName) {
baseParts = baseName.split('/');
baseParts = baseParts.slice(0, baseParts.length - 1);
baseParts = baseParts.concat(name.split('/'));
trimDots(baseParts);
name = baseParts.join('/');
}
}
return name;
}
/**
* Create the normalize() function passed to a loader plugin's
* normalize method.
*/
function makeNormalize(relName) {
return function (name) {
return normalize(name, relName);
};
}
function makeLoad(id) {
function load(value) {
loaderCache[id] = value;
}
load.fromText = function (id, text) {
//This one is difficult because the text can/probably uses
//define, and any relative paths and requires should be relative
//to that id was it would be found on disk. But this would require
//bootstrapping a module/require fairly deeply from node core.
//Not sure how best to go about that yet.
throw new Error('amdefine does not implement load.fromText');
};
return load;
}
makeRequire = function (systemRequire, exports, module, relId) {
function amdRequire(deps, callback) {
if (typeof deps === 'string') {
//Synchronous, single module require('')
return stringRequire(systemRequire, exports, module, deps, relId);
} else {
//Array of dependencies with a callback.
//Convert the dependencies to modules.
deps = deps.map(function (depName) {
return stringRequire(systemRequire, exports, module, depName, relId);
});
//Wait for next tick to call back the require call.
if (callback) {
process.nextTick(function () {
callback.apply(null, deps);
});
}
}
}
amdRequire.toUrl = function (filePath) {
if (filePath.indexOf('.') === 0) {
return normalize(filePath, path.dirname(module.filename));
} else {
return filePath;
}
};
return amdRequire;
};
//Favor explicit value, passed in if the module wants to support Node 0.4.
requireFn = requireFn || function req() {
return module.require.apply(module, arguments);
};
function runFactory(id, deps, factory) {
var r, e, m, result;
if (id) {
e = loaderCache[id] = {};
m = {
id: id,
uri: __filename,
exports: e
};
r = makeRequire(requireFn, e, m, id);
} else {
//Only support one define call per file
if (alreadyCalled) {
throw new Error('amdefine with no module ID cannot be called more than once per file.');
}
alreadyCalled = true;
//Use the real variables from node
//Use module.exports for exports, since
//the exports in here is amdefine exports.
e = module.exports;
m = module;
r = makeRequire(requireFn, e, m, module.id);
}
//If there are dependencies, they are strings, so need
//to convert them to dependency values.
if (deps) {
deps = deps.map(function (depName) {
return r(depName);
});
}
//Call the factory with the right dependencies.
if (typeof factory === 'function') {
result = factory.apply(m.exports, deps);
} else {
result = factory;
}
if (result !== undefined) {
m.exports = result;
if (id) {
loaderCache[id] = m.exports;
}
}
}
stringRequire = function (systemRequire, exports, module, id, relId) {
//Split the ID by a ! so that
var index = id.indexOf('!'),
originalId = id,
prefix, plugin;
if (index === -1) {
id = normalize(id, relId);
//Straight module lookup. If it is one of the special dependencies,
//deal with it, otherwise, delegate to node.
if (id === 'require') {
return makeRequire(systemRequire, exports, module, relId);
} else if (id === 'exports') {
return exports;
} else if (id === 'module') {
return module;
} else if (loaderCache.hasOwnProperty(id)) {
return loaderCache[id];
} else if (defineCache[id]) {
runFactory.apply(null, defineCache[id]);
return loaderCache[id];
} else {
if(systemRequire) {
return systemRequire(originalId);
} else {
throw new Error('No module with ID: ' + id);
}
}
} else {
//There is a plugin in play.
prefix = id.substring(0, index);
id = id.substring(index + 1, id.length);
plugin = stringRequire(systemRequire, exports, module, prefix, relId);
if (plugin.normalize) {
id = plugin.normalize(id, makeNormalize(relId));
} else {
//Normalize the ID normally.
id = normalize(id, relId);
}
if (loaderCache[id]) {
return loaderCache[id];
} else {
plugin.load(id, makeRequire(systemRequire, exports, module, relId), makeLoad(id), {});
return loaderCache[id];
}
}
};
//Create a define function specific to the module asking for amdefine.
function define(id, deps, factory) {
if (Array.isArray(id)) {
factory = deps;
deps = id;
id = undefined;
} else if (typeof id !== 'string') {
factory = id;
id = deps = undefined;
}
if (deps && !Array.isArray(deps)) {
factory = deps;
deps = undefined;
}
if (!deps) {
deps = ['require', 'exports', 'module'];
}
//Set up properties for this module. If an ID, then use
//internal cache. If no ID, then use the external variables
//for this node module.
if (id) {
//Put the module in deep freeze until there is a
//require call for it.
defineCache[id] = [id, deps, factory];
} else {
runFactory(id, deps, factory);
}
}
//define.require, which has access to all the values in the
//cache. Useful for AMD modules that all have IDs in the file,
//but need to finally export a value to node based on one of those
//IDs.
define.require = function (id) {
if (loaderCache[id]) {
return loaderCache[id];
}
if (defineCache[id]) {
runFactory.apply(null, defineCache[id]);
return loaderCache[id];
}
};
define.amd = {};
return define;
}
module.exports = amdefine;
| PeterDulworth/stockSearch_meanjs | node_modules/grunt-ng-annotate/node_modules/ng-annotate/node_modules/source-map/node_modules/amdefine/amdefine.js | JavaScript | mit | 9,911 |
webshims.register("form-core",function(a,b,c,d,e,f){"use strict";b.capturingEventPrevented=function(b){if(!b._isPolyfilled){var c=b.isDefaultPrevented,d=b.preventDefault;b.preventDefault=function(){return clearTimeout(a.data(b.target,b.type+"DefaultPrevented")),a.data(b.target,b.type+"DefaultPrevented",setTimeout(function(){a.removeData(b.target,b.type+"DefaultPrevented")},30)),d.apply(this,arguments)},b.isDefaultPrevented=function(){return!(!c.apply(this,arguments)&&!a.data(b.target,b.type+"DefaultPrevented"))},b._isPolyfilled=!0}};var g=b.modules,h=b.support,i=function(b){return(a.prop(b,"validity")||{valid:1}).valid},j=function(){var c=["form-validation"];a(d).off(".lazyloadvalidation"),f.lazyCustomMessages&&(f.customMessages=!0,c.push("form-message")),b._getAutoEnhance(f.customDatalist)&&(f.fD=!0,c.push("form-datalist")),f.addValidators&&c.push("form-validators"),b.reTest(c)},k=function(){var c,e,g=a.expr[":"],j=/^(?:form|fieldset)$/i,k=function(b){var c=!1;return a(b).jProp("elements").each(function(){return!j.test(this.nodeName||"")&&(c=g.invalid(this))?!1:void 0}),c};if(a.extend(g,{"valid-element":function(b){return j.test(b.nodeName||"")?!k(b):!(!a.prop(b,"willValidate")||!i(b))},"invalid-element":function(b){return j.test(b.nodeName||"")?k(b):!(!a.prop(b,"willValidate")||i(b))},"required-element":function(b){return!(!a.prop(b,"willValidate")||!a.prop(b,"required"))},"user-error":function(b){return a.prop(b,"willValidate")&&a(b).getShadowElement().hasClass(f.iVal.errorClass||"user-error")},"optional-element":function(b){return!(!a.prop(b,"willValidate")||a.prop(b,"required")!==!1)}}),["valid","invalid","required","optional"].forEach(function(b){g[b]=a.expr[":"][b+"-element"]}),h.fieldsetdisabled&&!a('<fieldset disabled=""><input /><input /></fieldset>').find(":disabled").filter(":disabled").is(":disabled")&&(c=a.find.matches,e={":disabled":1,":enabled":1},a.find.matches=function(a,b){return e[a]?c.call(this,"*"+a,b):c.apply(this,arguments)},a.extend(g,{enabled:function(b){return"disabled"in b&&b.disabled===!1&&!a.find.matchesSelector(b,"fieldset[disabled] *")},disabled:function(b){return b.disabled===!0||"disabled"in b&&a.find.matchesSelector(b,"fieldset[disabled] *")}})),"unknown"==typeof d.activeElement){var l=g.focus;g.focus=function(){try{return l.apply(this,arguments)}catch(a){b.error(a)}return!1}}},l={noAutoCallback:!0,options:f},m=b.loader.addModule,n=function(a,c,d){j(),b.ready("form-validation",function(){a[c].apply(a,d)})},o="transitionDelay"in d.documentElement.style?"":" no-transition",p=b.cfg.wspopover;m("form-validation",a.extend({d:["form-message"]},l)),m("form-validators",a.extend({},l)),h.formvalidation&&!b.bugs.bustedValidity&&b.capturingEvents(["invalid"],!0),a.expr.filters?k():b.ready("sizzle",k),b.triggerInlineForm=function(b,c){a(b).trigger(c)},p.position||p.position===!1||(p.position={at:"left bottom",my:"left top",collision:"fit flip"}),b.wsPopover={id:0,_create:function(){this.options=a.extend(!0,{},p,this.options),this.id=b.wsPopover.id++,this.eventns=".wsoverlay"+this.id,this.timers={},this.element=a('<div class="ws-popover'+o+'" tabindex="-1"><div class="ws-po-outerbox"><div class="ws-po-arrow"><div class="ws-po-arrowbox" /></div><div class="ws-po-box" /></div></div>'),this.contentElement=a(".ws-po-box",this.element),this.lastElement=a([]),this.bindElement(),this.element.data("wspopover",this)},options:{},content:function(a){this.contentElement.html(a)},bindElement:function(){var a=this,b=function(){a.stopBlur=!1};this.preventBlur=function(){a.stopBlur=!0,clearTimeout(a.timers.stopBlur),a.timers.stopBlur=setTimeout(b,9)},this.element.on({mousedown:this.preventBlur})},show:function(){n(this,"show",arguments)}},b.validityAlert={showFor:function(){n(this,"showFor",arguments)}},b.getContentValidationMessage=function(c,d,e){var f;b.errorbox&&b.errorbox.initIvalContentMessage&&b.errorbox.initIvalContentMessage(c);var g=(b.getOptions&&b.errorbox?b.getOptions(c,"errormessage",!1,!0):a(c).data("errormessage"))||c.getAttribute("x-moz-errormessage")||"";return e&&g[e]?g=g[e]:g&&(d=d||a.prop(c,"validity")||{valid:1},d.valid&&(g="")),"object"==typeof g&&(d=d||a.prop(c,"validity")||{valid:1},d.customError&&(f=a.data(c,"customMismatchedRule"))&&g[f]&&"string"==typeof g[f]?g=g[f]:d.valid||(a.each(d,function(a,b){return b&&"valid"!=a&&g[a]?(g=g[a],!1):void 0}),"object"==typeof g&&(d.typeMismatch&&g.badInput&&(g=g.badInput),d.badInput&&g.typeMismatch&&(g=g.typeMismatch)))),"object"==typeof g&&(g=g.defaultMessage),b.replaceValidationplaceholder&&(g=b.replaceValidationplaceholder(c,g)),g||""},a.fn.getErrorMessage=function(c){var d="",e=this[0];return e&&(d=b.getContentValidationMessage(e,!1,c)||a.prop(e,"customValidationMessage")||a.prop(e,"validationMessage")),d},a.event.special.valuevalidation={setup:function(){b.error("valuevalidation was renamed to validatevalue!")}},a.event.special.validatevalue={setup:function(){var b=a(this).data()||a.data(this,{});"validatevalue"in b||(b.validatevalue=!0)}},a(d).on("focusin.lazyloadvalidation mousedown.lazyloadvalidation touchstart.lazyloadvalidation",function(a){"form"in a.target&&j()}),b.ready("WINDOWLOAD",j),g["form-number-date-ui"].loaded&&!f.customMessages&&(g["form-number-date-api"].test()||h.inputtypes.range&&h.inputtypes.color)&&b.isReady("form-number-date-ui",!0),b.ready("DOM",function(){d.querySelector(".ws-custom-file")&&b.reTest(["form-validation"])}),f.addValidators&&f.fastValidators&&b.reTest(["form-validators","form-validation"]),"complete"==d.readyState&&b.isReady("WINDOWLOAD",!0)}); | jonobr1/cdnjs | ajax/libs/webshim/1.15.1/minified/shims/form-core.js | JavaScript | mit | 5,560 |
//! moment.js
//! version : 2.5.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
(function(a){function b(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function c(a,b){return function(c){return k(a.call(this,c),b)}}function d(a,b){return function(c){return this.lang().ordinal(a.call(this,c),b)}}function e(){}function f(a){w(a),h(this,a)}function g(a){var b=q(a),c=b.year||0,d=b.month||0,e=b.week||0,f=b.day||0,g=b.hour||0,h=b.minute||0,i=b.second||0,j=b.millisecond||0;this._milliseconds=+j+1e3*i+6e4*h+36e5*g,this._days=+f+7*e,this._months=+d+12*c,this._data={},this._bubble()}function h(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return b.hasOwnProperty("toString")&&(a.toString=b.toString),b.hasOwnProperty("valueOf")&&(a.valueOf=b.valueOf),a}function i(a){var b,c={};for(b in a)a.hasOwnProperty(b)&&qb.hasOwnProperty(b)&&(c[b]=a[b]);return c}function j(a){return 0>a?Math.ceil(a):Math.floor(a)}function k(a,b,c){for(var d=""+Math.abs(a),e=a>=0;d.length<b;)d="0"+d;return(e?c?"+":"":"-")+d}function l(a,b,c,d){var e,f,g=b._milliseconds,h=b._days,i=b._months;g&&a._d.setTime(+a._d+g*c),(h||i)&&(e=a.minute(),f=a.hour()),h&&a.date(a.date()+h*c),i&&a.month(a.month()+i*c),g&&!d&&db.updateOffset(a),(h||i)&&(a.minute(e),a.hour(f))}function m(a){return"[object Array]"===Object.prototype.toString.call(a)}function n(a){return"[object Date]"===Object.prototype.toString.call(a)||a instanceof Date}function o(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;e>d;d++)(c&&a[d]!==b[d]||!c&&s(a[d])!==s(b[d]))&&g++;return g+f}function p(a){if(a){var b=a.toLowerCase().replace(/(.)s$/,"$1");a=Tb[a]||Ub[b]||b}return a}function q(a){var b,c,d={};for(c in a)a.hasOwnProperty(c)&&(b=p(c),b&&(d[b]=a[c]));return d}function r(b){var c,d;if(0===b.indexOf("week"))c=7,d="day";else{if(0!==b.indexOf("month"))return;c=12,d="month"}db[b]=function(e,f){var g,h,i=db.fn._lang[b],j=[];if("number"==typeof e&&(f=e,e=a),h=function(a){var b=db().utc().set(d,a);return i.call(db.fn._lang,b,e||"")},null!=f)return h(f);for(g=0;c>g;g++)j.push(h(g));return j}}function s(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=b>=0?Math.floor(b):Math.ceil(b)),c}function t(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function u(a){return v(a)?366:365}function v(a){return a%4===0&&a%100!==0||a%400===0}function w(a){var b;a._a&&-2===a._pf.overflow&&(b=a._a[jb]<0||a._a[jb]>11?jb:a._a[kb]<1||a._a[kb]>t(a._a[ib],a._a[jb])?kb:a._a[lb]<0||a._a[lb]>23?lb:a._a[mb]<0||a._a[mb]>59?mb:a._a[nb]<0||a._a[nb]>59?nb:a._a[ob]<0||a._a[ob]>999?ob:-1,a._pf._overflowDayOfYear&&(ib>b||b>kb)&&(b=kb),a._pf.overflow=b)}function x(a){return null==a._isValid&&(a._isValid=!isNaN(a._d.getTime())&&a._pf.overflow<0&&!a._pf.empty&&!a._pf.invalidMonth&&!a._pf.nullInput&&!a._pf.invalidFormat&&!a._pf.userInvalidated,a._strict&&(a._isValid=a._isValid&&0===a._pf.charsLeftOver&&0===a._pf.unusedTokens.length)),a._isValid}function y(a){return a?a.toLowerCase().replace("_","-"):a}function z(a,b){return b._isUTC?db(a).zone(b._offset||0):db(a).local()}function A(a,b){return b.abbr=a,pb[a]||(pb[a]=new e),pb[a].set(b),pb[a]}function B(a){delete pb[a]}function C(a){var b,c,d,e,f=0,g=function(a){if(!pb[a]&&rb)try{require("./lang/"+a)}catch(b){}return pb[a]};if(!a)return db.fn._lang;if(!m(a)){if(c=g(a))return c;a=[a]}for(;f<a.length;){for(e=y(a[f]).split("-"),b=e.length,d=y(a[f+1]),d=d?d.split("-"):null;b>0;){if(c=g(e.slice(0,b).join("-")))return c;if(d&&d.length>=b&&o(e,d,!0)>=b-1)break;b--}f++}return db.fn._lang}function D(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function E(a){var b,c,d=a.match(vb);for(b=0,c=d.length;c>b;b++)d[b]=Yb[d[b]]?Yb[d[b]]:D(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function F(a,b){return a.isValid()?(b=G(b,a.lang()),Vb[b]||(Vb[b]=E(b)),Vb[b](a)):a.lang().invalidDate()}function G(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(wb.lastIndex=0;d>=0&&wb.test(a);)a=a.replace(wb,c),wb.lastIndex=0,d-=1;return a}function H(a,b){var c,d=b._strict;switch(a){case"DDDD":return Ib;case"YYYY":case"GGGG":case"gggg":return d?Jb:zb;case"Y":case"G":case"g":return Lb;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return d?Kb:Ab;case"S":if(d)return Gb;case"SS":if(d)return Hb;case"SSS":if(d)return Ib;case"DDD":return yb;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return Cb;case"a":case"A":return C(b._l)._meridiemParse;case"X":return Fb;case"Z":case"ZZ":return Db;case"T":return Eb;case"SSSS":return Bb;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return d?Hb:xb;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return xb;default:return c=new RegExp(P(O(a.replace("\\","")),"i"))}}function I(a){a=a||"";var b=a.match(Db)||[],c=b[b.length-1]||[],d=(c+"").match(Qb)||["-",0,0],e=+(60*d[1])+s(d[2]);return"+"===d[0]?-e:e}function J(a,b,c){var d,e=c._a;switch(a){case"M":case"MM":null!=b&&(e[jb]=s(b)-1);break;case"MMM":case"MMMM":d=C(c._l).monthsParse(b),null!=d?e[jb]=d:c._pf.invalidMonth=b;break;case"D":case"DD":null!=b&&(e[kb]=s(b));break;case"DDD":case"DDDD":null!=b&&(c._dayOfYear=s(b));break;case"YY":e[ib]=s(b)+(s(b)>68?1900:2e3);break;case"YYYY":case"YYYYY":case"YYYYYY":e[ib]=s(b);break;case"a":case"A":c._isPm=C(c._l).isPM(b);break;case"H":case"HH":case"h":case"hh":e[lb]=s(b);break;case"m":case"mm":e[mb]=s(b);break;case"s":case"ss":e[nb]=s(b);break;case"S":case"SS":case"SSS":case"SSSS":e[ob]=s(1e3*("0."+b));break;case"X":c._d=new Date(1e3*parseFloat(b));break;case"Z":case"ZZ":c._useUTC=!0,c._tzm=I(b);break;case"w":case"ww":case"W":case"WW":case"d":case"dd":case"ddd":case"dddd":case"e":case"E":a=a.substr(0,1);case"gg":case"gggg":case"GG":case"GGGG":case"GGGGG":a=a.substr(0,2),b&&(c._w=c._w||{},c._w[a]=b)}}function K(a){var b,c,d,e,f,g,h,i,j,k,l=[];if(!a._d){for(d=M(a),a._w&&null==a._a[kb]&&null==a._a[jb]&&(f=function(b){var c=parseInt(b,10);return b?b.length<3?c>68?1900+c:2e3+c:c:null==a._a[ib]?db().weekYear():a._a[ib]},g=a._w,null!=g.GG||null!=g.W||null!=g.E?h=Z(f(g.GG),g.W||1,g.E,4,1):(i=C(a._l),j=null!=g.d?V(g.d,i):null!=g.e?parseInt(g.e,10)+i._week.dow:0,k=parseInt(g.w,10)||1,null!=g.d&&j<i._week.dow&&k++,h=Z(f(g.gg),k,j,i._week.doy,i._week.dow)),a._a[ib]=h.year,a._dayOfYear=h.dayOfYear),a._dayOfYear&&(e=null==a._a[ib]?d[ib]:a._a[ib],a._dayOfYear>u(e)&&(a._pf._overflowDayOfYear=!0),c=U(e,0,a._dayOfYear),a._a[jb]=c.getUTCMonth(),a._a[kb]=c.getUTCDate()),b=0;3>b&&null==a._a[b];++b)a._a[b]=l[b]=d[b];for(;7>b;b++)a._a[b]=l[b]=null==a._a[b]?2===b?1:0:a._a[b];l[lb]+=s((a._tzm||0)/60),l[mb]+=s((a._tzm||0)%60),a._d=(a._useUTC?U:T).apply(null,l)}}function L(a){var b;a._d||(b=q(a._i),a._a=[b.year,b.month,b.day,b.hour,b.minute,b.second,b.millisecond],K(a))}function M(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function N(a){a._a=[],a._pf.empty=!0;var b,c,d,e,f,g=C(a._l),h=""+a._i,i=h.length,j=0;for(d=G(a._f,g).match(vb)||[],b=0;b<d.length;b++)e=d[b],c=(h.match(H(e,a))||[])[0],c&&(f=h.substr(0,h.indexOf(c)),f.length>0&&a._pf.unusedInput.push(f),h=h.slice(h.indexOf(c)+c.length),j+=c.length),Yb[e]?(c?a._pf.empty=!1:a._pf.unusedTokens.push(e),J(e,c,a)):a._strict&&!c&&a._pf.unusedTokens.push(e);a._pf.charsLeftOver=i-j,h.length>0&&a._pf.unusedInput.push(h),a._isPm&&a._a[lb]<12&&(a._a[lb]+=12),a._isPm===!1&&12===a._a[lb]&&(a._a[lb]=0),K(a),w(a)}function O(a){return a.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e})}function P(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Q(a){var c,d,e,f,g;if(0===a._f.length)return a._pf.invalidFormat=!0,a._d=new Date(0/0),void 0;for(f=0;f<a._f.length;f++)g=0,c=h({},a),c._pf=b(),c._f=a._f[f],N(c),x(c)&&(g+=c._pf.charsLeftOver,g+=10*c._pf.unusedTokens.length,c._pf.score=g,(null==e||e>g)&&(e=g,d=c));h(a,d||c)}function R(a){var b,c,d=a._i,e=Mb.exec(d);if(e){for(a._pf.iso=!0,b=0,c=Ob.length;c>b;b++)if(Ob[b][1].exec(d)){a._f=Ob[b][0]+(e[6]||" ");break}for(b=0,c=Pb.length;c>b;b++)if(Pb[b][1].exec(d)){a._f+=Pb[b][0];break}d.match(Db)&&(a._f+="Z"),N(a)}else a._d=new Date(d)}function S(b){var c=b._i,d=sb.exec(c);c===a?b._d=new Date:d?b._d=new Date(+d[1]):"string"==typeof c?R(b):m(c)?(b._a=c.slice(0),K(b)):n(c)?b._d=new Date(+c):"object"==typeof c?L(b):b._d=new Date(c)}function T(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);return 1970>a&&h.setFullYear(a),h}function U(a){var b=new Date(Date.UTC.apply(null,arguments));return 1970>a&&b.setUTCFullYear(a),b}function V(a,b){if("string"==typeof a)if(isNaN(a)){if(a=b.weekdaysParse(a),"number"!=typeof a)return null}else a=parseInt(a,10);return a}function W(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function X(a,b,c){var d=hb(Math.abs(a)/1e3),e=hb(d/60),f=hb(e/60),g=hb(f/24),h=hb(g/365),i=45>d&&["s",d]||1===e&&["m"]||45>e&&["mm",e]||1===f&&["h"]||22>f&&["hh",f]||1===g&&["d"]||25>=g&&["dd",g]||45>=g&&["M"]||345>g&&["MM",hb(g/30)]||1===h&&["y"]||["yy",h];return i[2]=b,i[3]=a>0,i[4]=c,W.apply({},i)}function Y(a,b,c){var d,e=c-b,f=c-a.day();return f>e&&(f-=7),e-7>f&&(f+=7),d=db(a).add("d",f),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}function Z(a,b,c,d,e){var f,g,h=U(a,0,1).getUTCDay();return c=null!=c?c:e,f=e-h+(h>d?7:0)-(e>h?7:0),g=7*(b-1)+(c-e)+f+1,{year:g>0?a:a-1,dayOfYear:g>0?g:u(a-1)+g}}function $(a){var b=a._i,c=a._f;return null===b?db.invalid({nullInput:!0}):("string"==typeof b&&(a._i=b=C().preparse(b)),db.isMoment(b)?(a=i(b),a._d=new Date(+b._d)):c?m(c)?Q(a):N(a):S(a),new f(a))}function _(a,b){db.fn[a]=db.fn[a+"s"]=function(a){var c=this._isUTC?"UTC":"";return null!=a?(this._d["set"+c+b](a),db.updateOffset(this),this):this._d["get"+c+b]()}}function ab(a){db.duration.fn[a]=function(){return this._data[a]}}function bb(a,b){db.duration.fn["as"+a]=function(){return+this/b}}function cb(a){var b=!1,c=db;"undefined"==typeof ender&&(a?(gb.moment=function(){return!b&&console&&console.warn&&(b=!0,console.warn("Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release.")),c.apply(null,arguments)},h(gb.moment,c)):gb.moment=db)}for(var db,eb,fb="2.5.1",gb=this,hb=Math.round,ib=0,jb=1,kb=2,lb=3,mb=4,nb=5,ob=6,pb={},qb={_isAMomentObject:null,_i:null,_f:null,_l:null,_strict:null,_isUTC:null,_offset:null,_pf:null,_lang:null},rb="undefined"!=typeof module&&module.exports&&"undefined"!=typeof require,sb=/^\/?Date\((\-?\d+)/i,tb=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,ub=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,vb=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|X|zz?|ZZ?|.)/g,wb=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,xb=/\d\d?/,yb=/\d{1,3}/,zb=/\d{1,4}/,Ab=/[+\-]?\d{1,6}/,Bb=/\d+/,Cb=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Db=/Z|[\+\-]\d\d:?\d\d/gi,Eb=/T/i,Fb=/[\+\-]?\d+(\.\d{1,3})?/,Gb=/\d/,Hb=/\d\d/,Ib=/\d{3}/,Jb=/\d{4}/,Kb=/[+-]?\d{6}/,Lb=/[+-]?\d+/,Mb=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Nb="YYYY-MM-DDTHH:mm:ssZ",Ob=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],Pb=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d{1,3}/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],Qb=/([\+\-]|\d\d)/gi,Rb="Date|Hours|Minutes|Seconds|Milliseconds".split("|"),Sb={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6},Tb={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",D:"date",w:"week",W:"isoWeek",M:"month",y:"year",DDD:"dayOfYear",e:"weekday",E:"isoWeekday",gg:"weekYear",GG:"isoWeekYear"},Ub={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},Vb={},Wb="DDD w W M D d".split(" "),Xb="M D H h m s w W".split(" "),Yb={M:function(){return this.month()+1},MMM:function(a){return this.lang().monthsShort(this,a)},MMMM:function(a){return this.lang().months(this,a)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(a){return this.lang().weekdaysMin(this,a)},ddd:function(a){return this.lang().weekdaysShort(this,a)},dddd:function(a){return this.lang().weekdays(this,a)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return k(this.year()%100,2)},YYYY:function(){return k(this.year(),4)},YYYYY:function(){return k(this.year(),5)},YYYYYY:function(){var a=this.year(),b=a>=0?"+":"-";return b+k(Math.abs(a),6)},gg:function(){return k(this.weekYear()%100,2)},gggg:function(){return k(this.weekYear(),4)},ggggg:function(){return k(this.weekYear(),5)},GG:function(){return k(this.isoWeekYear()%100,2)},GGGG:function(){return k(this.isoWeekYear(),4)},GGGGG:function(){return k(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.lang().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.lang().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return s(this.milliseconds()/100)},SS:function(){return k(s(this.milliseconds()/10),2)},SSS:function(){return k(this.milliseconds(),3)},SSSS:function(){return k(this.milliseconds(),3)},Z:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+k(s(a/60),2)+":"+k(s(a)%60,2)},ZZ:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+k(s(a/60),2)+k(s(a)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},X:function(){return this.unix()},Q:function(){return this.quarter()}},Zb=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"];Wb.length;)eb=Wb.pop(),Yb[eb+"o"]=d(Yb[eb],eb);for(;Xb.length;)eb=Xb.pop(),Yb[eb+eb]=c(Yb[eb],2);for(Yb.DDDD=c(Yb.DDD,3),h(e.prototype,{set:function(a){var b,c;for(c in a)b=a[c],"function"==typeof b?this[c]=b:this["_"+c]=b},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(a){return this._months[a.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(a){return this._monthsShort[a.month()]},monthsParse:function(a){var b,c,d;for(this._monthsParse||(this._monthsParse=[]),b=0;12>b;b++)if(this._monthsParse[b]||(c=db.utc([2e3,b]),d="^"+this.months(c,"")+"|^"+this.monthsShort(c,""),this._monthsParse[b]=new RegExp(d.replace(".",""),"i")),this._monthsParse[b].test(a))return b},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(a){return this._weekdays[a.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(a){return this._weekdaysShort[a.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(a){return this._weekdaysMin[a.day()]},weekdaysParse:function(a){var b,c,d;for(this._weekdaysParse||(this._weekdaysParse=[]),b=0;7>b;b++)if(this._weekdaysParse[b]||(c=db([2e3,1]).day(b),d="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[b]=new RegExp(d.replace(".",""),"i")),this._weekdaysParse[b].test(a))return b},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY LT",LLLL:"dddd, MMMM D YYYY LT"},longDateFormat:function(a){var b=this._longDateFormat[a];return!b&&this._longDateFormat[a.toUpperCase()]&&(b=this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a]=b),b},isPM:function(a){return"p"===(a+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(a,b){var c=this._calendar[a];return"function"==typeof c?c.apply(b):c},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)},pastFuture:function(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)},ordinal:function(a){return this._ordinal.replace("%d",a)},_ordinal:"%d",preparse:function(a){return a},postformat:function(a){return a},week:function(a){return Y(a,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),db=function(c,d,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._i=c,g._f=d,g._l=e,g._strict=f,g._isUTC=!1,g._pf=b(),$(g)},db.utc=function(c,d,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._useUTC=!0,g._isUTC=!0,g._l=e,g._i=c,g._f=d,g._strict=f,g._pf=b(),$(g).utc()},db.unix=function(a){return db(1e3*a)},db.duration=function(a,b){var c,d,e,f=a,h=null;return db.isDuration(a)?f={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(f={},b?f[b]=a:f.milliseconds=a):(h=tb.exec(a))?(c="-"===h[1]?-1:1,f={y:0,d:s(h[kb])*c,h:s(h[lb])*c,m:s(h[mb])*c,s:s(h[nb])*c,ms:s(h[ob])*c}):(h=ub.exec(a))&&(c="-"===h[1]?-1:1,e=function(a){var b=a&&parseFloat(a.replace(",","."));return(isNaN(b)?0:b)*c},f={y:e(h[2]),M:e(h[3]),d:e(h[4]),h:e(h[5]),m:e(h[6]),s:e(h[7]),w:e(h[8])}),d=new g(f),db.isDuration(a)&&a.hasOwnProperty("_lang")&&(d._lang=a._lang),d},db.version=fb,db.defaultFormat=Nb,db.updateOffset=function(){},db.lang=function(a,b){var c;return a?(b?A(y(a),b):null===b?(B(a),a="en"):pb[a]||C(a),c=db.duration.fn._lang=db.fn._lang=C(a),c._abbr):db.fn._lang._abbr},db.langData=function(a){return a&&a._lang&&a._lang._abbr&&(a=a._lang._abbr),C(a)},db.isMoment=function(a){return a instanceof f||null!=a&&a.hasOwnProperty("_isAMomentObject")},db.isDuration=function(a){return a instanceof g},eb=Zb.length-1;eb>=0;--eb)r(Zb[eb]);for(db.normalizeUnits=function(a){return p(a)},db.invalid=function(a){var b=db.utc(0/0);return null!=a?h(b._pf,a):b._pf.userInvalidated=!0,b},db.parseZone=function(a){return db(a).parseZone()},h(db.fn=f.prototype,{clone:function(){return db(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().lang("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var a=db(this).utc();return 0<a.year()&&a.year()<=9999?F(a,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):F(a,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var a=this;return[a.year(),a.month(),a.date(),a.hours(),a.minutes(),a.seconds(),a.milliseconds()]},isValid:function(){return x(this)},isDSTShifted:function(){return this._a?this.isValid()&&o(this._a,(this._isUTC?db.utc(this._a):db(this._a)).toArray())>0:!1},parsingFlags:function(){return h({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(){return this.zone(0)},local:function(){return this.zone(0),this._isUTC=!1,this},format:function(a){var b=F(this,a||db.defaultFormat);return this.lang().postformat(b)},add:function(a,b){var c;return c="string"==typeof a?db.duration(+b,a):db.duration(a,b),l(this,c,1),this},subtract:function(a,b){var c;return c="string"==typeof a?db.duration(+b,a):db.duration(a,b),l(this,c,-1),this},diff:function(a,b,c){var d,e,f=z(a,this),g=6e4*(this.zone()-f.zone());return b=p(b),"year"===b||"month"===b?(d=432e5*(this.daysInMonth()+f.daysInMonth()),e=12*(this.year()-f.year())+(this.month()-f.month()),e+=(this-db(this).startOf("month")-(f-db(f).startOf("month")))/d,e-=6e4*(this.zone()-db(this).startOf("month").zone()-(f.zone()-db(f).startOf("month").zone()))/d,"year"===b&&(e/=12)):(d=this-f,e="second"===b?d/1e3:"minute"===b?d/6e4:"hour"===b?d/36e5:"day"===b?(d-g)/864e5:"week"===b?(d-g)/6048e5:d),c?e:j(e)},from:function(a,b){return db.duration(this.diff(a)).lang(this.lang()._abbr).humanize(!b)},fromNow:function(a){return this.from(db(),a)},calendar:function(){var a=z(db(),this).startOf("day"),b=this.diff(a,"days",!0),c=-6>b?"sameElse":-1>b?"lastWeek":0>b?"lastDay":1>b?"sameDay":2>b?"nextDay":7>b?"nextWeek":"sameElse";return this.format(this.lang().calendar(c,this))},isLeapYear:function(){return v(this.year())},isDST:function(){return this.zone()<this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=V(a,this.lang()),this.add({d:a-b})):b},month:function(a){var b,c=this._isUTC?"UTC":"";return null!=a?"string"==typeof a&&(a=this.lang().monthsParse(a),"number"!=typeof a)?this:(b=this.date(),this.date(1),this._d["set"+c+"Month"](a),this.date(Math.min(b,this.daysInMonth())),db.updateOffset(this),this):this._d["get"+c+"Month"]()},startOf:function(a){switch(a=p(a)){case"year":this.month(0);case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===a?this.weekday(0):"isoWeek"===a&&this.isoWeekday(1),this},endOf:function(a){return a=p(a),this.startOf(a).add("isoWeek"===a?"week":a,1).subtract("ms",1)},isAfter:function(a,b){return b="undefined"!=typeof b?b:"millisecond",+this.clone().startOf(b)>+db(a).startOf(b)},isBefore:function(a,b){return b="undefined"!=typeof b?b:"millisecond",+this.clone().startOf(b)<+db(a).startOf(b)},isSame:function(a,b){return b=b||"ms",+this.clone().startOf(b)===+z(a,this).startOf(b)},min:function(a){return a=db.apply(null,arguments),this>a?this:a},max:function(a){return a=db.apply(null,arguments),a>this?this:a},zone:function(a){var b=this._offset||0;return null==a?this._isUTC?b:this._d.getTimezoneOffset():("string"==typeof a&&(a=I(a)),Math.abs(a)<16&&(a=60*a),this._offset=a,this._isUTC=!0,b!==a&&l(this,db.duration(b-a,"m"),1,!0),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.zone(this._tzm):"string"==typeof this._i&&this.zone(this._i),this},hasAlignedHourOffset:function(a){return a=a?db(a).zone():0,(this.zone()-a)%60===0},daysInMonth:function(){return t(this.year(),this.month())},dayOfYear:function(a){var b=hb((db(this).startOf("day")-db(this).startOf("year"))/864e5)+1;return null==a?b:this.add("d",a-b)},quarter:function(){return Math.ceil((this.month()+1)/3)},weekYear:function(a){var b=Y(this,this.lang()._week.dow,this.lang()._week.doy).year;return null==a?b:this.add("y",a-b)},isoWeekYear:function(a){var b=Y(this,1,4).year;return null==a?b:this.add("y",a-b)},week:function(a){var b=this.lang().week(this);return null==a?b:this.add("d",7*(a-b))},isoWeek:function(a){var b=Y(this,1,4).week;return null==a?b:this.add("d",7*(a-b))},weekday:function(a){var b=(this.day()+7-this.lang()._week.dow)%7;return null==a?b:this.add("d",a-b)},isoWeekday:function(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)},get:function(a){return a=p(a),this[a]()},set:function(a,b){return a=p(a),"function"==typeof this[a]&&this[a](b),this},lang:function(b){return b===a?this._lang:(this._lang=C(b),this)}}),eb=0;eb<Rb.length;eb++)_(Rb[eb].toLowerCase().replace(/s$/,""),Rb[eb]);_("year","FullYear"),db.fn.days=db.fn.day,db.fn.months=db.fn.month,db.fn.weeks=db.fn.week,db.fn.isoWeeks=db.fn.isoWeek,db.fn.toJSON=db.fn.toISOString,h(db.duration.fn=g.prototype,{_bubble:function(){var a,b,c,d,e=this._milliseconds,f=this._days,g=this._months,h=this._data;h.milliseconds=e%1e3,a=j(e/1e3),h.seconds=a%60,b=j(a/60),h.minutes=b%60,c=j(b/60),h.hours=c%24,f+=j(c/24),h.days=f%30,g+=j(f/30),h.months=g%12,d=j(g/12),h.years=d},weeks:function(){return j(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*s(this._months/12)},humanize:function(a){var b=+this,c=X(b,!a,this.lang());return a&&(c=this.lang().pastFuture(b,c)),this.lang().postformat(c)},add:function(a,b){var c=db.duration(a,b);return this._milliseconds+=c._milliseconds,this._days+=c._days,this._months+=c._months,this._bubble(),this},subtract:function(a,b){var c=db.duration(a,b);return this._milliseconds-=c._milliseconds,this._days-=c._days,this._months-=c._months,this._bubble(),this},get:function(a){return a=p(a),this[a.toLowerCase()+"s"]()},as:function(a){return a=p(a),this["as"+a.charAt(0).toUpperCase()+a.slice(1)+"s"]()},lang:db.fn.lang,toIsoString:function(){var a=Math.abs(this.years()),b=Math.abs(this.months()),c=Math.abs(this.days()),d=Math.abs(this.hours()),e=Math.abs(this.minutes()),f=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(a?a+"Y":"")+(b?b+"M":"")+(c?c+"D":"")+(d||e||f?"T":"")+(d?d+"H":"")+(e?e+"M":"")+(f?f+"S":""):"P0D"}});for(eb in Sb)Sb.hasOwnProperty(eb)&&(bb(eb,Sb[eb]),ab(eb.toLowerCase()));bb("Weeks",6048e5),db.duration.fn.asMonths=function(){return(+this-31536e6*this.years())/2592e6+12*this.years()},db.lang("en",{ordinal:function(a){var b=a%10,c=1===s(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),rb?(module.exports=db,cb(!0)):"function"==typeof define&&define.amd?define("moment",function(b,c,d){return d.config&&d.config()&&d.config().noGlobal!==!0&&cb(d.config().noGlobal===a),db}):cb()}).call(this); | zhangbg/cdnjs | ajax/libs/moment.js/2.5.1/moment.min.js | JavaScript | mit | 26,049 |
/*************************************************************
*
* MathJax/fonts/HTML-CSS/TeX/png/Main/Italic/Latin1Supplement.js
*
* Defines the image size data needed for the HTML-CSS OutputJax
* to display mathematics using fallback images when the fonts
* are not availble to the client browser.
*
* ---------------------------------------------------------------------
*
* Copyright (c) 2009-2013 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
MathJax.OutputJax["HTML-CSS"].defineImageData({
"MathJax_Main-italic": {
0xA0: [ // NO-BREAK SPACE
[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],
[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0]
],
0xA3: [ // POUND SIGN
[5,5,0],[6,6,0],[7,6,0],[9,8,0],[10,9,0],[12,11,0],[14,14,0],[17,15,0],
[20,20,0],[24,24,0],[28,27,0],[33,34,1],[39,41,1],[47,48,1]
]
}
});
MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].imgDir+"/Main/Italic"+
MathJax.OutputJax["HTML-CSS"].imgPacked+"/Latin1Supplement.js");
| TerryMooreII/cdnjs | ajax/libs/mathjax/2.2.0/fonts/HTML-CSS/TeX/png/Main/Italic/unpacked/Latin1Supplement.js | JavaScript | mit | 1,600 |
/*************************************************************
*
* MathJax/fonts/HTML-CSS/TeX/png/Main/Regular/SpacingModLetters.js
*
* Defines the image size data needed for the HTML-CSS OutputJax
* to display mathematics using fallback images when the fonts
* are not availble to the client browser.
*
* ---------------------------------------------------------------------
*
* Copyright (c) 2009-2013 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
MathJax.OutputJax["HTML-CSS"].defineImageData({
"MathJax_Main": {
0x2C6: [ // MODIFIER LETTER CIRCUMFLEX ACCENT
[3,2,-3],[4,3,-4],[4,3,-5],[5,3,-5],[6,3,-7],[7,4,-9],[8,4,-10],[9,5,-13],
[11,6,-15],[13,7,-17],[16,7,-21],[18,9,-24],[22,10,-29],[26,12,-35]
],
0x2C7: [ // CARON
[3,1,-3],[4,1,-5],[4,2,-6],[5,2,-6],[6,2,-7],[7,3,-9],[8,3,-10],[9,3,-13],
[11,4,-15],[13,5,-17],[16,6,-21],[18,6,-24],[22,8,-29],[26,9,-34]
],
0x2C9: [ // MODIFIER LETTER MACRON
[3,1,-3],[4,1,-5],[5,1,-6],[6,1,-6],[6,1,-7],[8,1,-10],[9,1,-11],[10,2,-13],
[12,3,-15],[15,2,-18],[17,2,-22],[20,3,-26],[24,3,-30],[29,4,-36]
],
0x2CA: [ // MODIFIER LETTER ACUTE ACCENT
[3,2,-3],[4,2,-4],[4,3,-5],[5,3,-5],[6,3,-6],[7,4,-8],[8,5,-9],[10,6,-12],
[11,7,-14],[13,7,-17],[16,9,-19],[19,10,-23],[22,12,-28],[26,13,-34]
],
0x2CB: [ // MODIFIER LETTER GRAVE ACCENT
[3,2,-3],[3,2,-4],[3,3,-5],[4,3,-5],[5,3,-6],[5,4,-8],[6,4,-10],[7,6,-12],
[9,7,-14],[10,7,-17],[12,8,-20],[14,10,-23],[17,11,-28],[20,13,-34]
],
0x2D8: [ // BREVE
[3,2,-3],[4,2,-4],[4,2,-6],[5,2,-6],[6,3,-6],[7,3,-9],[8,4,-10],[10,5,-12],
[12,5,-15],[14,6,-17],[16,7,-21],[19,9,-24],[23,10,-29],[27,12,-34]
],
0x2D9: [ // DOT ABOVE
[3,1,-4],[3,2,-4],[4,2,-6],[4,2,-6],[5,2,-7],[6,3,-9],[7,3,-11],[8,3,-14],
[9,4,-16],[11,5,-18],[13,5,-22],[15,6,-26],[18,7,-31],[21,9,-37]
],
0x2DA: [ // RING ABOVE
[3,2,-3],[3,2,-4],[4,2,-6],[5,2,-6],[5,3,-6],[6,3,-9],[7,4,-10],[9,5,-13],
[10,6,-15],[12,7,-17],[14,8,-22],[17,8,-25],[20,10,-30],[24,12,-36]
],
0x2DC: [ // SMALL TILDE
[3,1,-4],[4,1,-5],[5,1,-7],[5,1,-7],[6,1,-8],[7,3,-9],[9,3,-11],[10,3,-14],
[12,3,-17],[14,4,-19],[17,4,-23],[20,5,-26],[23,6,-32],[28,7,-38]
]
}
});
MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].imgDir+"/Main/Regular"+
MathJax.OutputJax["HTML-CSS"].imgPacked+"/SpacingModLetters.js");
| DaneTheory/cdnjs | ajax/libs/mathjax/2.2/fonts/HTML-CSS/TeX/png/Main/Regular/unpacked/SpacingModLetters.js | JavaScript | mit | 3,023 |
/*************************************************************
*
* MathJax/fonts/HTML-CSS/TeX/png/Main/Bold/LatinExtendedB.js
*
* Defines the image size data needed for the HTML-CSS OutputJax
* to display mathematics using fallback images when the fonts
* are not availble to the client browser.
*
* ---------------------------------------------------------------------
*
* Copyright (c) 2009-2013 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
MathJax.OutputJax["HTML-CSS"].defineImageData({
"MathJax_Main-bold": {
0x237: [ // LATIN SMALL LETTER DOTLESS J
[4,4,1],[5,6,2],[6,7,2],[6,7,2],[7,9,3],[8,11,3],[10,13,4],[11,16,5],
[13,19,6],[15,21,6],[18,26,8],[21,30,9],[25,36,11],[29,43,13]
]
}
});
MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].imgDir+"/Main/Bold"+
MathJax.OutputJax["HTML-CSS"].imgPacked+"/LatinExtendedB.js");
| ruslanas/cdnjs | ajax/libs/mathjax/2.4.0/fonts/HTML-CSS/TeX/png/Main/Bold/unpacked/LatinExtendedB.js | JavaScript | mit | 1,446 |
/*************************************************************
*
* MathJax/fonts/HTML-CSS/TeX/png/Main/Regular/GeneralPunctuation.js
*
* Defines the image size data needed for the HTML-CSS OutputJax
* to display mathematics using fallback images when the fonts
* are not availble to the client browser.
*
* ---------------------------------------------------------------------
*
* Copyright (c) 2009-2013 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
MathJax.OutputJax["HTML-CSS"].defineImageData({
"MathJax_Main": {
0x2002: [ // ??
[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],
[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0]
],
0x2003: [ // ??
[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],
[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0]
],
0x2004: [ // ??
[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],
[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0]
],
0x2005: [ // ??
[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],
[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0]
],
0x2006: [ // ??
[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],
[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0]
],
0x2009: [ // ??
[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],
[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0]
],
0x200A: [ // ??
[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],
[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0]
],
0x2013: [ // EN DASH
[4,1,-1],[5,1,-2],[5,1,-2],[6,1,-2],[7,1,-3],[9,1,-4],[10,1,-5],[12,1,-6],
[14,2,-6],[17,3,-8],[20,3,-9],[24,2,-12],[28,3,-14],[33,3,-17]
],
0x2014: [ // EM DASH
[7,1,-1],[9,1,-2],[10,1,-2],[12,1,-2],[14,1,-3],[17,1,-4],[20,1,-5],[24,1,-6],
[28,2,-6],[33,3,-8],[40,3,-9],[47,2,-12],[56,3,-14],[66,3,-17]
],
0x2018: [ // LEFT SINGLE QUOTATION MARK
[2,2,-3],[2,4,-2],[2,4,-4],[3,4,-4],[3,4,-5],[4,6,-6],[4,7,-7],[5,8,-9],
[6,9,-11],[7,11,-12],[8,13,-15],[10,15,-18],[11,18,-21],[14,21,-25]
],
0x2019: [ // RIGHT SINGLE QUOTATION MARK
[2,3,-2],[2,3,-3],[3,4,-4],[3,4,-4],[3,5,-4],[4,6,-6],[5,7,-7],[5,8,-9],
[6,10,-10],[7,11,-12],[9,13,-15],[10,15,-18],[12,18,-21],[14,22,-25]
],
0x201C: [ // LEFT DOUBLE QUOTATION MARK
[4,2,-3],[4,4,-2],[5,4,-4],[6,4,-4],[7,4,-5],[8,6,-6],[10,7,-7],[11,8,-9],
[13,9,-11],[16,11,-12],[19,13,-15],[22,15,-18],[26,18,-21],[31,21,-25]
],
0x201D: [ // RIGHT DOUBLE QUOTATION MARK
[3,3,-2],[4,3,-3],[4,4,-4],[5,4,-4],[6,5,-4],[7,6,-6],[8,7,-7],[9,8,-9],
[11,10,-10],[13,11,-12],[15,13,-15],[18,15,-18],[21,18,-21],[25,22,-25]
],
0x2020: [ // DAGGER
[3,6,1],[4,8,2],[4,10,2],[5,10,2],[6,12,3],[7,16,4],[8,18,4],[9,23,5],
[11,27,6],[13,31,7],[16,37,8],[18,44,11],[22,52,12],[26,62,15]
],
0x2021: [ // DOUBLE DAGGER
[3,6,1],[4,8,2],[4,10,2],[5,10,2],[6,12,3],[7,16,4],[8,18,4],[10,23,5],
[11,27,6],[13,31,7],[16,37,8],[19,43,9],[22,51,11],[26,61,13]
],
0x2026: [ // HORIZONTAL ELLIPSIS
[8,1,0],[10,2,0],[11,2,0],[13,2,0],[16,2,0],[19,3,0],[22,3,0],[26,3,0],
[31,4,0],[36,5,0],[43,5,0],[51,6,0],[61,7,0],[72,9,0]
],
0x2032: [ // PRIME
[2,4,0],[3,5,0],[3,6,0],[4,6,0],[4,7,-1],[5,9,-1],[6,11,-1],[7,13,-1],
[8,15,-1],[9,18,-1],[11,21,-2],[13,24,-2],[15,29,-2],[18,35,-3]
]
}
});
MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].imgDir+"/Main/Regular"+
MathJax.OutputJax["HTML-CSS"].imgPacked+"/GeneralPunctuation.js");
| tengyifei/cdnjs | ajax/libs/mathjax/2.4.0/fonts/HTML-CSS/TeX/png/Main/Regular/unpacked/GeneralPunctuation.js | JavaScript | mit | 4,255 |
/*************************************************************
*
* MathJax/fonts/HTML-CSS/TeX/png/Script/Regular/Main.js
*
* Defines the image size data needed for the HTML-CSS OutputJax
* to display mathematics using fallback images when the fonts
* are not availble to the client browser.
*
* ---------------------------------------------------------------------
*
* Copyright (c) 2009-2013 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
MathJax.OutputJax["HTML-CSS"].defineImageData({
"MathJax_Script": {
}
});
MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].imgDir+"/Script/Regular"+
MathJax.OutputJax["HTML-CSS"].imgPacked+"/Main.js");
| kentcdodds/cdnjs | ajax/libs/mathjax/2.5.1/fonts/HTML-CSS/TeX/png/Script/Regular/unpacked/Main.js | JavaScript | mit | 1,238 |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.dialog.add("cellProperties",function(f){var g=f.lang.table,c=g.cell,d=f.lang.common,h=CKEDITOR.dialog.validate,j=/^(\d+(?:\.\d+)?)(px|%)$/,e={type:"html",html:" "},k="rtl"==f.lang.dir,i=f.plugins.colordialog;return{title:c.title,minWidth:CKEDITOR.env.ie&&CKEDITOR.env.quirks?450:410,minHeight:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?230:220,contents:[{id:"info",label:c.title,accessKey:"I",elements:[{type:"hbox",widths:["40%","5%","40%"],children:[{type:"vbox",padding:0,
children:[{type:"hbox",widths:["70%","30%"],children:[{type:"text",id:"width",width:"100px",label:d.width,validate:h.number(c.invalidWidth),onLoad:function(){var a=this.getDialog().getContentElement("info","widthType").getElement(),b=this.getInputElement(),c=b.getAttribute("aria-labelledby");b.setAttribute("aria-labelledby",[c,a.$.id].join(" "))},setup:function(a){var b=parseInt(a.getAttribute("width"),10),a=parseInt(a.getStyle("width"),10);!isNaN(b)&&this.setValue(b);!isNaN(a)&&this.setValue(a)},
commit:function(a){var b=parseInt(this.getValue(),10),c=this.getDialog().getValueOf("info","widthType");isNaN(b)?a.removeStyle("width"):a.setStyle("width",b+c);a.removeAttribute("width")},"default":""},{type:"select",id:"widthType",label:f.lang.table.widthUnit,labelStyle:"visibility:hidden","default":"px",items:[[g.widthPx,"px"],[g.widthPc,"%"]],setup:function(a){(a=j.exec(a.getStyle("width")||a.getAttribute("width")))&&this.setValue(a[2])}}]},{type:"hbox",widths:["70%","30%"],children:[{type:"text",
id:"height",label:d.height,width:"100px","default":"",validate:h.number(c.invalidHeight),onLoad:function(){var a=this.getDialog().getContentElement("info","htmlHeightType").getElement(),b=this.getInputElement(),c=b.getAttribute("aria-labelledby");b.setAttribute("aria-labelledby",[c,a.$.id].join(" "))},setup:function(a){var b=parseInt(a.getAttribute("height"),10),a=parseInt(a.getStyle("height"),10);!isNaN(b)&&this.setValue(b);!isNaN(a)&&this.setValue(a)},commit:function(a){var b=parseInt(this.getValue(),
10);isNaN(b)?a.removeStyle("height"):a.setStyle("height",CKEDITOR.tools.cssLength(b));a.removeAttribute("height")}},{id:"htmlHeightType",type:"html",html:"<br />"+g.widthPx}]},e,{type:"select",id:"wordWrap",label:c.wordWrap,"default":"yes",items:[[c.yes,"yes"],[c.no,"no"]],setup:function(a){var b=a.getAttribute("noWrap");("nowrap"==a.getStyle("white-space")||b)&&this.setValue("no")},commit:function(a){"no"==this.getValue()?a.setStyle("white-space","nowrap"):a.removeStyle("white-space");a.removeAttribute("noWrap")}},
e,{type:"select",id:"hAlign",label:c.hAlign,"default":"",items:[[d.notSet,""],[d.alignLeft,"left"],[d.alignCenter,"center"],[d.alignRight,"right"]],setup:function(a){var b=a.getAttribute("align");this.setValue(a.getStyle("text-align")||b||"")},commit:function(a){var b=this.getValue();b?a.setStyle("text-align",b):a.removeStyle("text-align");a.removeAttribute("align")}},{type:"select",id:"vAlign",label:c.vAlign,"default":"",items:[[d.notSet,""],[d.alignTop,"top"],[d.alignMiddle,"middle"],[d.alignBottom,
"bottom"],[c.alignBaseline,"baseline"]],setup:function(a){var b=a.getAttribute("vAlign"),a=a.getStyle("vertical-align");switch(a){case "top":case "middle":case "bottom":case "baseline":break;default:a=""}this.setValue(a||b||"")},commit:function(a){var b=this.getValue();b?a.setStyle("vertical-align",b):a.removeStyle("vertical-align");a.removeAttribute("vAlign")}}]},e,{type:"vbox",padding:0,children:[{type:"select",id:"cellType",label:c.cellType,"default":"td",items:[[c.data,"td"],[c.header,"th"]],
setup:function(a){this.setValue(a.getName())},commit:function(a){a.renameNode(this.getValue())}},e,{type:"text",id:"rowSpan",label:c.rowSpan,"default":"",validate:h.integer(c.invalidRowSpan),setup:function(a){(a=parseInt(a.getAttribute("rowSpan"),10))&&1!=a&&this.setValue(a)},commit:function(a){var b=parseInt(this.getValue(),10);b&&1!=b?a.setAttribute("rowSpan",this.getValue()):a.removeAttribute("rowSpan")}},{type:"text",id:"colSpan",label:c.colSpan,"default":"",validate:h.integer(c.invalidColSpan),
setup:function(a){(a=parseInt(a.getAttribute("colSpan"),10))&&1!=a&&this.setValue(a)},commit:function(a){var b=parseInt(this.getValue(),10);b&&1!=b?a.setAttribute("colSpan",this.getValue()):a.removeAttribute("colSpan")}},e,{type:"hbox",padding:0,widths:["60%","40%"],children:[{type:"text",id:"bgColor",label:c.bgColor,"default":"",setup:function(a){var b=a.getAttribute("bgColor");this.setValue(a.getStyle("background-color")||b)},commit:function(a){this.getValue()?a.setStyle("background-color",this.getValue()):
a.removeStyle("background-color");a.removeAttribute("bgColor")}},i?{type:"button",id:"bgColorChoose","class":"colorChooser",label:c.chooseColor,onLoad:function(){this.getElement().getParent().setStyle("vertical-align","bottom")},onClick:function(){f.getColorFromDialog(function(a){a&&this.getDialog().getContentElement("info","bgColor").setValue(a);this.focus()},this)}}:e]},e,{type:"hbox",padding:0,widths:["60%","40%"],children:[{type:"text",id:"borderColor",label:c.borderColor,"default":"",setup:function(a){var b=
a.getAttribute("borderColor");this.setValue(a.getStyle("border-color")||b)},commit:function(a){this.getValue()?a.setStyle("border-color",this.getValue()):a.removeStyle("border-color");a.removeAttribute("borderColor")}},i?{type:"button",id:"borderColorChoose","class":"colorChooser",label:c.chooseColor,style:(k?"margin-right":"margin-left")+": 10px",onLoad:function(){this.getElement().getParent().setStyle("vertical-align","bottom")},onClick:function(){f.getColorFromDialog(function(a){a&&this.getDialog().getContentElement("info",
"borderColor").setValue(a);this.focus()},this)}}:e]}]}]}]}],onShow:function(){this.cells=CKEDITOR.plugins.tabletools.getSelectedCells(this._.editor.getSelection());this.setupContent(this.cells[0])},onOk:function(){for(var a=this._.editor.getSelection(),b=a.createBookmarks(),c=this.cells,d=0;d<c.length;d++)this.commitContent(c[d]);this._.editor.forceNextSelectionCheck();a.selectBookmarks(b);this._.editor.selectionChange()}}}); | rajanpkr/jobportal | assets/ckeditor/ckeditor_js/plugins/tabletools/dialogs/tableCell.js | JavaScript | mit | 6,208 |
/**
* lodash 3.9.1 (Custom Build) <https://lodash.com/>
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license <https://lodash.com/license>
*/
/** `Object#toString` result references. */
var funcTag = '[object Function]';
/** Used to detect host constructors (Safari > 5). */
var reIsHostCtor = /^\[object .+?Constructor\]$/;
/**
* Checks if `value` is object-like.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
*/
function isObjectLike(value) {
return !!value && typeof value == 'object';
}
/** Used for native method references. */
var objectProto = Object.prototype;
/** Used to resolve the decompiled source of functions. */
var fnToString = Function.prototype.toString;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objToString = objectProto.toString;
/** Used to detect if a method is native. */
var reIsNative = RegExp('^' +
fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
);
/**
* Gets the native function at `key` of `object`.
*
* @private
* @param {Object} object The object to query.
* @param {string} key The key of the method to get.
* @returns {*} Returns the function if it's native, else `undefined`.
*/
function getNative(object, key) {
var value = object == null ? undefined : object[key];
return isNative(value) ? value : undefined;
}
/**
* Checks if `value` is classified as a `Function` object.
*
* @static
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
* @example
*
* _.isFunction(_);
* // => true
*
* _.isFunction(/abc/);
* // => false
*/
function isFunction(value) {
// The use of `Object#toString` avoids issues with the `typeof` operator
// in older versions of Chrome and Safari which return 'function' for regexes
// and Safari 8 equivalents which return 'object' for typed array constructors.
return isObject(value) && objToString.call(value) == funcTag;
}
/**
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
* @example
*
* _.isObject({});
* // => true
*
* _.isObject([1, 2, 3]);
* // => true
*
* _.isObject(1);
* // => false
*/
function isObject(value) {
// Avoid a V8 JIT bug in Chrome 19-20.
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
var type = typeof value;
return !!value && (type == 'object' || type == 'function');
}
/**
* Checks if `value` is a native function.
*
* @static
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a native function, else `false`.
* @example
*
* _.isNative(Array.prototype.push);
* // => true
*
* _.isNative(_);
* // => false
*/
function isNative(value) {
if (value == null) {
return false;
}
if (isFunction(value)) {
return reIsNative.test(fnToString.call(value));
}
return isObjectLike(value) && reIsHostCtor.test(value);
}
module.exports = getNative;
| davyengone/meetup.demo | node_modules/eslint/node_modules/lodash.merge/node_modules/lodash._getnative/index.js | JavaScript | mit | 3,870 |
/**** Filter Formatter Elements ****/
.tablesorter .tablesorter-filter-row td {
text-align: center;
font-size: 0.9em;
font-weight: normal;
}
/**** Sliders ****/
/* shrink the sliders to look nicer inside of a table cell */
.tablesorter .ui-slider, .tablesorter input.range {
width: 90%;
margin: 2px auto 2px auto; /* add enough top margin so the tooltips will fit */
font-size: 0.8em;
}
.tablesorter .ui-slider {
top: 12px;
}
.tablesorter .ui-slider .ui-slider-handle {
width: 0.9em;
height: 0.9em;
}
.tablesorter .ui-datepicker {
font-size: 0.8em;
}
.tablesorter .ui-slider-horizontal {
height: 0.5em;
}
/* Add tooltips to slider handles */
.tablesorter .value-popup:after {
content : attr(data-value);
position: absolute;
bottom: 14px;
left: -7px;
min-width: 18px;
height: 12px;
background-color: #444;
background-image: -webkit-gradient(linear, left top, left bottom, from(#444444), to(#999999));
background-image: -webkit-linear-gradient(top, #444, #999);
background-image: -moz-linear-gradient(top, #444, #999);
background-image: -o-linear-gradient(top, #444, #999);
background-image: linear-gradient(to bottom, #444, #999);
-webkit-border-radius: 3px;
border-radius: 3px;
-webkit-background-clip: padding-box; background-clip: padding-box;
-webkit-box-shadow: 0px 0px 4px 0px #777;
box-shadow: 0px 0px 4px 0px #777;
border: #444 1px solid;
color: #fff;
font: 1em/1.1em Arial, Sans-Serif;
padding: 1px;
text-align: center;
}
.tablesorter .value-popup:before {
content: "";
position: absolute;
width: 0;
height: 0;
border-top: 8px solid #777;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
top: -8px;
left: 50%;
margin-left: -8px;
margin-top: -1px;
}
/**** Date Picker ****/
.tablesorter .dateFrom, .tablesorter .dateTo {
width: 80px;
margin: 2px 5px;
}
/**** Color Picker/HTML5Number Toggle button ****/
.tablesorter .button {
width: 14px;
height: 14px;
background: #fcfff4;
background: -webkit-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
background: -moz-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
background: -o-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
background: -ms-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
background: linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcfff4', endColorstr='#b3bead', GradientType=0 );
margin: 1px 5px 1px 1px;
-webkit-border-radius: 25px;
-moz-border-radius: 25px;
border-radius: 25px;
-webkit-box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0,0,0,0.5);
-moz-box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0,0,0,0.5);
box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0,0,0,0.5);
position: relative;
top: 3px;
display: inline-block;
}
.tablesorter .button label {
cursor: pointer;
position: absolute;
width: 10px;
height: 10px;
-webkit-border-radius: 25px;
-moz-border-radius: 25px;
border-radius: 25px;
left: 2px;
top: 2px;
-webkit-box-shadow: inset 0px 1px 1px rgba(0,0,0,0.5), 0px 1px 0px rgba(255,255,255,1);
-moz-box-shadow: inset 0px 1px 1px rgba(0,0,0,0.5), 0px 1px 0px rgba(255,255,255,1);
box-shadow: inset 0px 1px 1px rgba(0,0,0,0.5), 0px 1px 0px rgba(255,255,255,1);
background: #45484d;
background: -webkit-linear-gradient(top, #222 0%, #45484d 100%);
background: -moz-linear-gradient(top, #222 0%, #45484d 100%);
background: -o-linear-gradient(top, #222 0%, #45484d 100%);
background: -ms-linear-gradient(top, #222 0%, #45484d 100%);
background: linear-gradient(top, #222 0%, #45484d 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#222', endColorstr='#45484d', GradientType=0 );
}
.tablesorter .button label:after {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
filter: alpha(opacity=0);
opacity: 0;
content: '';
position: absolute;
width: 8px;
height: 8px;
background: #55f;
background: -webkit-linear-gradient(top, #aaf 0%, #55f 100%);
background: -moz-linear-gradient(top, #aaf 0%, #55f 100%);
background: -o-linear-gradient(top, #aaf 0%, #55f 100%);
background: -ms-linear-gradient(top, #aaf 0%, #55f 100%);
background: linear-gradient(top, #aaf 0%, #55f 100%);
-webkit-border-radius: 25px;
-moz-border-radius: 25px;
border-radius: 25px;
top: 1px;
left: 1px;
-webkit-box-shadow: inset 0px 1px 1px #fff, 0px 1px 3px rgba(0,0,0,0.5);
-moz-box-shadow: inset 0px 1px 1px #fff, 0px 1px 3px rgba(0,0,0,0.5);
box-shadow: inset 0px 1px 1px #fff, 0px 1px 3px rgba(0,0,0,0.5);
}
.tablesorter .button label:hover::after {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";
filter: alpha(opacity=30);
opacity: 0.3;
}
.tablesorter .button input[type=checkbox] {
visibility: hidden;
}
.tablesorter .button input[type=checkbox]:checked + label:after {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
filter: alpha(opacity=100);
opacity: 1;
}
.tablesorter .colorpicker {
width: 30px;
height: 18px;
}
.tablesorter .ui-spinner-input {
width: 100px;
height: 18px;
}
.tablesorter .currentColor, .tablesorter .ui-spinner {
position: relative;
}
.tablesorter input.number {
position: relative;
}
/* hide filter row */
.tablesorter .tablesorter-filter-row.hideme td * {
height: 1px;
min-height: 0;
border: 0;
padding: 0;
margin: 0;
/* don't use visibility: hidden because it disables tabbing */
opacity: 0;
filter: alpha(opacity=0);
}
| stevermeister/cdnjs | ajax/libs/jquery.tablesorter/2.16.0/css/filter.formatter.css | CSS | mit | 5,493 |
/**** Filter Formatter Elements ****/
.tablesorter .tablesorter-filter-row td {
text-align: center;
font-size: 0.9em;
font-weight: normal;
}
/**** Sliders ****/
/* shrink the sliders to look nicer inside of a table cell */
.tablesorter .ui-slider, .tablesorter input.range {
width: 90%;
margin: 2px auto 2px auto; /* add enough top margin so the tooltips will fit */
font-size: 0.8em;
}
.tablesorter .ui-slider {
top: 12px;
}
.tablesorter .ui-slider .ui-slider-handle {
width: 0.9em;
height: 0.9em;
}
.tablesorter .ui-datepicker {
font-size: 0.8em;
}
.tablesorter .ui-slider-horizontal {
height: 0.5em;
}
/* Add tooltips to slider handles */
.tablesorter .value-popup:after {
content : attr(data-value);
position: absolute;
bottom: 14px;
left: -7px;
min-width: 18px;
height: 12px;
background-color: #444;
background-image: -webkit-gradient(linear, left top, left bottom, from(#444444), to(#999999));
background-image: -webkit-linear-gradient(top, #444, #999);
background-image: -moz-linear-gradient(top, #444, #999);
background-image: -o-linear-gradient(top, #444, #999);
background-image: linear-gradient(to bottom, #444, #999);
-webkit-border-radius: 3px;
border-radius: 3px;
-webkit-background-clip: padding-box; background-clip: padding-box;
-webkit-box-shadow: 0px 0px 4px 0px #777;
box-shadow: 0px 0px 4px 0px #777;
border: #444 1px solid;
color: #fff;
font: 1em/1.1em Arial, Sans-Serif;
padding: 1px;
text-align: center;
}
.tablesorter .value-popup:before {
content: "";
position: absolute;
width: 0;
height: 0;
border-top: 8px solid #777;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
top: -8px;
left: 50%;
margin-left: -8px;
margin-top: -1px;
}
/**** Date Picker ****/
.tablesorter .dateFrom, .tablesorter .dateTo {
width: 80px;
margin: 2px 5px;
}
/**** Color Picker/HTML5Number Toggle button ****/
.tablesorter .button {
width: 14px;
height: 14px;
background: #fcfff4;
background: -webkit-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
background: -moz-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
background: -o-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
background: -ms-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
background: linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcfff4', endColorstr='#b3bead', GradientType=0 );
margin: 1px 5px 1px 1px;
-webkit-border-radius: 25px;
-moz-border-radius: 25px;
border-radius: 25px;
-webkit-box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0,0,0,0.5);
-moz-box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0,0,0,0.5);
box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0,0,0,0.5);
position: relative;
top: 3px;
display: inline-block;
}
.tablesorter .button label {
cursor: pointer;
position: absolute;
width: 10px;
height: 10px;
-webkit-border-radius: 25px;
-moz-border-radius: 25px;
border-radius: 25px;
left: 2px;
top: 2px;
-webkit-box-shadow: inset 0px 1px 1px rgba(0,0,0,0.5), 0px 1px 0px rgba(255,255,255,1);
-moz-box-shadow: inset 0px 1px 1px rgba(0,0,0,0.5), 0px 1px 0px rgba(255,255,255,1);
box-shadow: inset 0px 1px 1px rgba(0,0,0,0.5), 0px 1px 0px rgba(255,255,255,1);
background: #45484d;
background: -webkit-linear-gradient(top, #222 0%, #45484d 100%);
background: -moz-linear-gradient(top, #222 0%, #45484d 100%);
background: -o-linear-gradient(top, #222 0%, #45484d 100%);
background: -ms-linear-gradient(top, #222 0%, #45484d 100%);
background: linear-gradient(top, #222 0%, #45484d 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#222', endColorstr='#45484d', GradientType=0 );
}
.tablesorter .button label:after {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
filter: alpha(opacity=0);
opacity: 0;
content: '';
position: absolute;
width: 8px;
height: 8px;
background: #55f;
background: -webkit-linear-gradient(top, #aaf 0%, #55f 100%);
background: -moz-linear-gradient(top, #aaf 0%, #55f 100%);
background: -o-linear-gradient(top, #aaf 0%, #55f 100%);
background: -ms-linear-gradient(top, #aaf 0%, #55f 100%);
background: linear-gradient(top, #aaf 0%, #55f 100%);
-webkit-border-radius: 25px;
-moz-border-radius: 25px;
border-radius: 25px;
top: 1px;
left: 1px;
-webkit-box-shadow: inset 0px 1px 1px #fff, 0px 1px 3px rgba(0,0,0,0.5);
-moz-box-shadow: inset 0px 1px 1px #fff, 0px 1px 3px rgba(0,0,0,0.5);
box-shadow: inset 0px 1px 1px #fff, 0px 1px 3px rgba(0,0,0,0.5);
}
.tablesorter .button label:hover::after {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";
filter: alpha(opacity=30);
opacity: 0.3;
}
.tablesorter .button input[type=checkbox] {
visibility: hidden;
}
.tablesorter .button input[type=checkbox]:checked + label:after {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
filter: alpha(opacity=100);
opacity: 1;
}
.tablesorter .colorpicker {
width: 30px;
height: 18px;
}
.tablesorter .ui-spinner-input {
width: 100px;
height: 18px;
}
.tablesorter .currentColor, .tablesorter .ui-spinner {
position: relative;
}
.tablesorter input.number {
position: relative;
}
/* hide filter row */
.tablesorter .tablesorter-filter-row.hideme td * {
height: 1px;
min-height: 0;
border: 0;
padding: 0;
margin: 0;
/* don't use visibility: hidden because it disables tabbing */
opacity: 0;
filter: alpha(opacity=0);
}
| cnbin/cdnjs | ajax/libs/jquery.tablesorter/2.20.1/css/filter.formatter.css | CSS | mit | 5,493 |
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v6.4.1
* @link http://www.ag-grid.com/
* @license MIT
*/
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 __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var utils_1 = require("../utils");
var constants_1 = require("../constants");
var context_1 = require("../context/context");
var gridCore_1 = require("../gridCore");
var PopupService = (function () {
function PopupService() {
}
// this.popupService.setPopupParent(this.eRootPanel.getGui());
PopupService.prototype.getPopupParent = function () {
return this.gridCore.getRootGui();
};
PopupService.prototype.positionPopupForMenu = function (params) {
var sourceRect = params.eventSource.getBoundingClientRect();
var parentRect = this.getPopupParent().getBoundingClientRect();
var x = sourceRect.right - parentRect.left - 2;
var y = sourceRect.top - parentRect.top;
var minWidth;
if (params.ePopup.clientWidth > 0) {
minWidth = params.ePopup.clientWidth;
}
else {
minWidth = 200;
}
var widthOfParent = parentRect.right - parentRect.left;
var maxX = widthOfParent - minWidth;
if (x > maxX) {
// try putting menu to the left
x = sourceRect.left - parentRect.left - minWidth;
}
if (x < 0) {
x = 0;
}
params.ePopup.style.left = x + "px";
params.ePopup.style.top = y + "px";
};
PopupService.prototype.positionPopupUnderMouseEvent = function (params) {
var parentRect = this.getPopupParent().getBoundingClientRect();
this.positionPopup({
ePopup: params.ePopup,
x: params.mouseEvent.clientX - parentRect.left,
y: params.mouseEvent.clientY - parentRect.top,
keepWithinBounds: true
});
};
PopupService.prototype.positionPopupUnderComponent = function (params) {
var sourceRect = params.eventSource.getBoundingClientRect();
var parentRect = this.getPopupParent().getBoundingClientRect();
this.positionPopup({
ePopup: params.ePopup,
minWidth: params.minWidth,
nudgeX: params.nudgeX,
nudgeY: params.nudgeY,
x: sourceRect.left - parentRect.left,
y: sourceRect.top - parentRect.top + sourceRect.height,
keepWithinBounds: params.keepWithinBounds
});
};
PopupService.prototype.positionPopupOverComponent = function (params) {
var sourceRect = params.eventSource.getBoundingClientRect();
var parentRect = this.getPopupParent().getBoundingClientRect();
this.positionPopup({
ePopup: params.ePopup,
minWidth: params.minWidth,
nudgeX: params.nudgeX,
nudgeY: params.nudgeY,
x: sourceRect.left - parentRect.left,
y: sourceRect.top - parentRect.top,
keepWithinBounds: params.keepWithinBounds
});
};
PopupService.prototype.positionPopup = function (params) {
var parentRect = this.getPopupParent().getBoundingClientRect();
var x = params.x;
var y = params.y;
if (params.nudgeX) {
x += params.nudgeX;
}
if (params.nudgeY) {
y += params.nudgeY;
}
// if popup is overflowing to the bottom, move it up
if (params.keepWithinBounds) {
checkHorizontalOverflow();
checkVerticalOverflow();
}
params.ePopup.style.left = x + "px";
params.ePopup.style.top = y + "px";
function checkHorizontalOverflow() {
var minWidth;
if (params.minWidth > 0) {
minWidth = params.minWidth;
}
else if (params.ePopup.clientWidth > 0) {
minWidth = params.ePopup.clientWidth;
}
else {
minWidth = 200;
}
var widthOfParent = parentRect.right - parentRect.left;
var maxX = widthOfParent - minWidth - 5;
if (x > maxX) {
x = maxX;
}
if (x < 0) {
x = 0;
}
}
function checkVerticalOverflow() {
var minHeight;
if (params.ePopup.clientWidth > 0) {
minHeight = params.ePopup.clientHeight;
}
else {
minHeight = 200;
}
var heightOfParent = parentRect.bottom - parentRect.top;
var maxY = heightOfParent - minHeight - 5;
if (y > maxY) {
y = maxY;
}
if (y < 0) {
y = 0;
}
}
};
//adds an element to a div, but also listens to background checking for clicks,
//so that when the background is clicked, the child is removed again, giving
//a model look to popups.
PopupService.prototype.addAsModalPopup = function (eChild, closeOnEsc, closedCallback) {
var eBody = document.body;
if (!eBody) {
console.warn('ag-grid: could not find the body of the document, document.body is empty');
return;
}
eChild.style.top = '0px';
eChild.style.left = '0px';
var popupAlreadyShown = utils_1.Utils.isVisible(eChild);
if (popupAlreadyShown) {
return;
}
this.getPopupParent().appendChild(eChild);
var that = this;
var popupHidden = false;
// if we add these listeners now, then the current mouse
// click will be included, which we don't want
setTimeout(function () {
if (closeOnEsc) {
eBody.addEventListener('keydown', hidePopupOnEsc);
}
eBody.addEventListener('click', hidePopup);
eBody.addEventListener('touchstart', hidePopup);
eBody.addEventListener('contextmenu', hidePopup);
//eBody.addEventListener('mousedown', hidePopup);
eChild.addEventListener('click', consumeMouseClick);
eChild.addEventListener('touchstart', consumeTouchClick);
//eChild.addEventListener('mousedown', consumeClick);
}, 0);
// var timeOfMouseEventOnChild = new Date().getTime();
var childMouseClick = null;
var childTouch = null;
function hidePopupOnEsc(event) {
var key = event.which || event.keyCode;
if (key === constants_1.Constants.KEY_ESCAPE) {
hidePopup(null);
}
}
function hidePopup(event) {
// we don't hide popup if the event was on the child
if (event && event === childMouseClick) {
return;
}
if (event && event === childTouch) {
return;
}
// this method should only be called once. the client can have different
// paths, each one wanting to close, so this method may be called multiple
// times.
if (popupHidden) {
return;
}
popupHidden = true;
that.getPopupParent().removeChild(eChild);
eBody.removeEventListener('keydown', hidePopupOnEsc);
//eBody.removeEventListener('mousedown', hidePopupOnEsc);
eBody.removeEventListener('click', hidePopup);
eBody.removeEventListener('touchstart', hidePopup);
eBody.removeEventListener('contextmenu', hidePopup);
eChild.removeEventListener('click', consumeMouseClick);
eChild.removeEventListener('touchstart', consumeTouchClick);
//eChild.removeEventListener('mousedown', consumeClick);
if (closedCallback) {
closedCallback();
}
}
function consumeMouseClick(event) {
childMouseClick = event;
}
function consumeTouchClick(event) {
childTouch = event;
}
return hidePopup;
};
__decorate([
context_1.Autowired('gridCore'),
__metadata('design:type', gridCore_1.GridCore)
], PopupService.prototype, "gridCore", void 0);
PopupService = __decorate([
context_1.Bean('popupService'),
__metadata('design:paramtypes', [])
], PopupService);
return PopupService;
})();
exports.PopupService = PopupService;
| nolsherry/cdnjs | ajax/libs/ag-grid/6.4.1/lib/widgets/popupService.js | JavaScript | mit | 9,190 |
/*
All of the code within the ZingChart software is developed and copyrighted by PINT, Inc., and may not be copied,
replicated, or used in any other software or application without prior permission from PINT. All usage must coincide with the
ZingChart End User License Agreement which can be requested by email at support@zingchart.com.
Build 2.1.0
*/
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('oc.ob.oa("18");(js(){if(!1t.1x.18){1t.1x.18={}}if(!1t.1x.4D.18){1t.1x.4D.18={}}oe a={at:[[-83.cW,35.d3],[-83.oh,34.of],[-83.o8,34.o2],[-83.o1,34.o0],[-82.nZ,34.o4],[-82.o5,34.ox],[-82.ow,34.oy],[-82.ou,33.ot],[-82.ol,33.oo],[-82.nY,33.nw],[-81.nv,33.nu],[-81.nB,33.nz],[-81.nt,33.nn],[-81.ns,33.nX],[-81.nD,32.nQ],[-81.nP,32.nS],[-81.dR,32.nW],[-81.nV,32.nO],[-81.nN,32.nG],[-80.nI,32.nJ],[-81.nL,31.nK],[-81.py,31.oE],[-81.dR,31.pD],[-81.pv,31.pu],[-81.ps,31.pr],[-81.pF,30.pT],[-81.pS,30.pW],[-81.pP,30.pG],[-82.pM,30.oS],[-82.oX,30.oI],[-82.oJ,30.oN],[-82.oY,30.pf],[-82.pg,30.p9],[-83.p3,30.p1],[-84.p6,30.oR],[-85.dU,31.pO],[-85.pH,31.pC],[-85.pZ,31.nC],[-85.on,31.ov],[-85.od,32.pE],[-85.og,32.o7],[-84.oj,32.oC],[-85.dU,32.om],[-84.op,32.nR],[-85.nx,32.ny],[-85.nq,32.no],[-85.nU,34.nF],[-85.pz,34.e5],[-84.pm,34.pp],[-83.pV,34.e5],[-83.cW,35.d3],[-83.cW,35.d3]],6g:[[-82.19,31.I],[-82.26,31.4j],[-82.6h,31.2G],[-82.d0,31.6i],[-82.aS,31.aT],[-82.lL,31.7z],[-82.lG,31.16],[-82.M,31.16],[-82.M,31.aC],[-82.M,31.Z],[-82.26,31.5J],[-82.13,31.7U],[-82.2t,31.7R],[-82.7Q,31.7R],[-82.7Q,31.9R],[-82.19,31.g7],[-82.19,31.I]],9w:[[-83.8o,31.U],[-82.V,31.3t],[-82.V,31.1e],[-82.lV,31.1e],[-82.5e,31.t],[-82.10,31.t],[-83.4R,31.t],[-83.3C,31.t],[-83.4R,31.1e],[-83.8o,31.U]],6j:[[-82.13,31.7U],[-82.26,31.5J],[-82.ff,31.fd],[-82.2K,31.U],[-82.ay,31.U],[-82.7m,31.Z],[-82.4U,31.Z],[-82.V,31.X],[-82.13,31.X],[-82.13,31.7U]],6c:[[-84.P,31.1r],[-84.4E,31.1i],[-84.3z,31.gw],[-84.gx,31.gv],[-84.89,31.gy],[-84.gu,31.gz],[-84.2C,31.d],[-84.T,31.d],[-84.go,31.9k],[-84.9p,31.9t],[-84.1P,31.1r],[-84.P,31.1r]],6d:[[-83.22,33.2n],[-83.2A,33.15],[-83.2A,33.dZ],[-83.aI,33.aD],[-83.2a,32.3G],[-83.2q,33.bh],[-83.2j,32.64],[-83.2l,32.51],[-83.52,32.64],[-83.1O,32.bc],[-83.1T,33.G],[-83.22,33.2n]],6l:[[-83.bY,34.bZ],[-83.cS,34.3S],[-83.cG,34.cF],[-83.54,34.ea],[-83.C,34.3m],[-83.1O,34.cl],[-83.1l,34.cm],[-83.25,34.3m],[-83.gQ,34.gb],[-83.1D,34.43],[-83.1D,34.c9],[-83.4K,34.dY],[-83.s,34.c5],[-83.bY,34.bZ]],6s:[[-83.1a,33.4P],[-83.7s,34.dt],[-83.1f,34.4c],[-83.4F,34.ga],[-83.2I,34.gc],[-83.1p,33.21],[-83.4h,33.1U],[-83.lS,33.lR],[-83.1a,33.4P]],6p:[[-84.1H,34.c0],[-84.z,34.3O],[-84.B,34.48],[-84.bP,34.w],[-84.1h,34.w],[-85.v,34.2u],[-85.6t,34.bX],[-84.1H,34.c0]],6m:[[-83.25,31.K],[-83.2j,31.K],[-82.1J,31.F],[-82.4u,31.X],[-83.2Z,31.dN],[-83.2Z,31.7f],[-83.dM,31.7f],[-83.C,31.1V],[-83.7Z,31.3U],[-83.25,31.K]],6n:[[-83.3d,31.17],[-83.2q,31.17],[-83.8o,31.U],[-83.4R,31.1e],[-83.3C,31.t],[-83.fW,31.7H],[-83.2l,31.7H],[-83.cq,31.2x],[-83.59,31.2x],[-83.q,31.eE],[-83.ef,31.1B],[-83.a8,31.3Y],[-83.ek,31.eq],[-83.3B,31.N],[-83.3B,31.3q],[-83.C,31.17],[-83.3d,31.17]],6o:[[-83.4z,32.1c],[-83.bt,32.1c],[-83.77,32.fV],[-83.45,32.1K],[-83.ll,32.ld],[-83.6y,32.hG],[-83.ak,32.2T],[-83.2F,32.11],[-83.3p,32.6W],[-83.bn,32.2P],[-83.4z,32.1c]],6b:[[-83.42,32.1w],[-83.3y,32.1M],[-83.41,32.20],[-83.4S,32.4C],[-83.E,32.44],[-83.E,32.20],[-83.42,32.1w]],6a:[[-82.2S,31.37],[-82.2S,31.aU],[-81.3s,31.3q],[-81.lQ,31.3t],[-81.aO,31.3W],[-81.2B,31.3Y],[-81.57,31.1B],[-81.df,31.1B],[-81.6C,31.d8],[-81.cC,31.dd],[-82.eJ,31.1F],[-82.2Y,31.5n],[-82.M,31.5n],[-82.8x,31.m3],[-82.8x,31.lF],[-82.5o,31.lM],[-82.5o,31.bj],[-82.bG,31.fg],[-82.6h,31.fi],[-82.bk,31.1e],[-81.fh,31.5v],[-82.2S,31.37]],5Y:[[-83.E,31.dr],[-83.cv,31.3e],[-83.1T,30.3o],[-83.gE,30.gJ],[-83.4S,30.gD],[-83.gF,30.a1],[-83.8m,30.cJ],[-83.1O,30.cu],[-83.s,30.oZ],[-83.gA,30.aq],[-83.aj,31.4p],[-83.2I,31.4p],[-83.2I,31.d],[-83.E,31.dr]],5Z:[[-81.6Q,32.r],[-81.39,32.8L],[-81.9Z,31.cM],[-81.9i,31.el],[-81.3v,31.4g],[-81.ej,31.bJ],[-81.c4,31.2G],[-81.e8,31.cK],[-81.eb,31.7z],[-81.ec,31.9U],[-81.3v,31.9U],[-81.9Z,31.3U],[-81.fZ,31.2h],[-81.g1,31.2h],[-81.g2,31.9R],[-81.g4,31.3j],[-81.4A,31.g3],[-81.fY,31.2L],[-81.fX,32.2e],[-81.c3,32.3A],[-81.9X,32.3A],[-81.bs,32.bl],[-81.4x,32.bI],[-81.6Q,32.r]],5W:[[-81.cL,32.1o],[-81.fD,32.fB],[-81.dc,32.4w],[-81.ey,32.eu],[-81.dA,32.bF],[-81.4x,32.bI],[-81.bs,32.bl],[-81.ep,32.r],[-81.8M,32.4C],[-81.97,32.bR],[-81.3s,32.5g],[-81.cT,32.dE],[-81.97,32.1C],[-82.2o,32.1n],[-82.7C,32.1G],[-81.57,32.1o],[-81.cL,32.1o]],5V:[[-82.dh,33.di],[-82.fj,33.6A],[-81.dn,33.eY],[-81.pb,33.aJ],[-81.ce,33.px],[-81.p7,33.p8],[-81.cO,33.cR],[-81.2B,32.cN],[-81.cb,32.1c],[-82.2Y,32.gf],[-82.ca,32.58],[-82.7S,32.5a],[-82.gd,32.dp],[-82.4Y,33.g8],[-82.2v,33.6A],[-82.dk,33.de],[-82.dh,33.di]],5S:[[-83.L,33.a5],[-83.bo,33.bp],[-83.1f,33.g9],[-83.bA,33.G],[-84.l,33.Y],[-84.9x,33.Y],[-84.g,33.Y],[-84.3i,33.cI],[-83.L,33.a5]],5T:[[-84.T,31.e],[-84.Q,31.e],[-84.P,31.1r],[-84.1P,31.1r],[-84.e3,31.1r],[-84.e1,31.4I],[-84.1Z,31.4I],[-84.1Z,31.e],[-84.B,31.e],[-84.3x,31.eZ],[-84.T,31.e]],5U:[[-81.2B,31.3Y],[-81.dz,31.dy],[-81.eA,31.eN],[-81.eB,31.1B],[-81.cw,31.8z],[-81.36,30.p4],[-81.4A,30.d6],[-81.p0,30.p2],[-81.cw,30.bK],[-81.9X,30.8e],[-81.8i,30.a1],[-81.8M,30.d6],[-81.3s,30.ez],[-81.8i,31.9v],[-81.6C,31.d8],[-81.df,31.1B],[-81.57,31.1B],[-81.2B,31.3Y]],68:[[-82.2o,32.1n],[-81.97,32.1C],[-81.cT,32.dE],[-81.3s,32.5g],[-81.97,32.bR],[-82.6k,32.6e],[-82.2v,32.5d],[-82.ev,32.eI],[-82.8C,32.i],[-82.2Y,32.bM],[-82.2o,32.1n]],69:[[-85.9P,33.1m],[-84.bO,33.5t],[-84.3N,33.5l],[-84.bw,33.5l],[-84.er,33.D],[-84.9q,33.ed],[-84.4B,33.1E],[-84.1H,33.J],[-84.47,33.e4],[-85.3F,33.7c],[-85.dL,33.dK],[-85.pa,33.O],[-85.7a,33.1y],[-85.5u,33.e0],[-85.9P,33.1m]],67:[[-85.4O,34.o],[-84.47,34.k],[-85.3F,34.5K],[-85.4l,34.mg],[-85.4l,34.R],[-85.ax,34.R],[-85.al,34.aw],[-85.8s,34.3r],[-85.8s,34.1Y],[-85.4O,34.1Y],[-85.4O,34.o]],66:[[-81.cC,31.dd],[-81.6C,31.d8],[-81.8i,31.9v],[-81.3s,30.ez],[-81.8M,30.d6],[-81.8i,30.a1],[-81.ph,30.pi],[-81.cT,30.pe],[-82.pc,30.pd],[-82.2S,30.8e],[-82.eD,30.aq],[-82.7C,30.oL],[-82.eD,30.oM],[-82.bG,30.oK],[-82.oF,30.oG],[-82.5p,30.lW],[-82.8C,30.m7],[-82.2K,30.8D],[-82.8v,31.8z],[-82.M,31.5n],[-82.2Y,31.5n],[-82.eJ,31.1F],[-81.cC,31.dd]],63:[[-81.bL,32.u],[-81.dx,32.dB],[-81.oP,32.oV],[-81.oW,32.8L],[-80.oU,32.2e],[-80.oT,32.oQ],[-80.pj,31.I],[-80.pk,31.pN],[-80.pL,31.cM],[-80.pK,31.cK],[-81.pI,31.pJ],[-81.pQ,31.83],[-81.pX,31.3j],[-81.ec,31.9U],[-81.eb,31.7z],[-81.e8,31.cK],[-81.c4,31.2G],[-81.ej,31.bJ],[-81.3v,31.4g],[-81.9i,31.el],[-81.9Z,31.cM],[-81.39,32.8L],[-81.3v,32.r],[-81.bL,32.u]],65:[[-84.1P,32.1n],[-84.B,32.r],[-84.1h,32.u],[-84.ao,32.pt],[-85.pq,32.bF],[-84.47,32.4y],[-84.bm,32.1M],[-84.3T,32.i],[-84.1P,32.1n]],6u:[[-85.1k,34.A],[-85.eh,34.eg],[-85.7a,34.eo],[-85.5G,34.3E],[-85.en,34.3E],[-85.pl,34.pn],[-85.53,34.mA],[-85.1k,34.A]],6T:[[-84.2R,34.bT],[-84.p,34.bU],[-84.p,34.2s],[-84.p,34.bB],[-84.H,34.e9],[-84.S,34.4c],[-84.5j,34.ck],[-84.cn,34.48],[-84.4r,34.w],[-84.B,34.48],[-84.z,34.3O],[-84.2R,34.5H],[-84.2R,34.bT]],6U:[[-83.3n,34.2H],[-83.bD,33.4t],[-83.q,33.5E],[-83.3d,33.1U],[-83.22,33.5r],[-83.br,33.bq],[-83.1p,33.21],[-83.3n,34.2H]],6V:[[-85.4M,31.F],[-84.6w,31.16],[-84.9c,31.cx],[-84.1Z,31.e],[-84.1Z,31.4I],[-85.dI,31.dS],[-85.v,31.bx],[-85.4l,31.cx],[-85.4M,31.g0],[-85.4M,31.cf],[-85.eV,31.F],[-85.4M,31.F]],6S:[[-84.H,33.n],[-84.7g,33.n],[-84.dJ,33.dH],[-84.7i,33.D],[-84.7i,33.J],[-84.H,33.J],[-84.H,33.h],[-84.5f,33.h],[-84.cz,33.h],[-84.1A,33.ei],[-84.Q,33.D],[-84.1s,33.D],[-84.1s,33.n],[-84.H,33.n]],6R:[[-82.10,31.t],[-82.5e,31.t],[-82.2O,31.lX],[-82.lZ,30.m0],[-82.7m,30.7p],[-82.2W,30.7p],[-82.2K,30.lY],[-82.po,30.pB],[-82.3g,30.dD],[-82.du,30.bK],[-82.7F,30.8e],[-82.dV,30.dC],[-82.10,30.7E],[-82.10,31.t]],5R:[[-84.4r,34.w],[-84.cn,34.48],[-84.1A,33.50],[-84.1z,33.7r],[-84.1s,33.eM],[-84.bV,33.bW],[-84.1q,33.4e],[-84.9Q,33.4e],[-84.bP,34.w],[-84.B,34.48],[-84.4r,34.w]],6O:[[-82.1J,31.F],[-82.eP,31.F],[-82.4J,31.3j],[-82.4J,31.X],[-82.V,31.X],[-82.4U,31.Z],[-82.V,31.Z],[-82.V,31.3t],[-83.8o,31.U],[-83.2q,31.17],[-83.dO,31.es],[-83.dQ,31.dP],[-82.4u,31.X],[-82.1J,31.F]],6X:[[-83.b2,31.49],[-83.12,31.3W],[-83.45,31.aR],[-83.4o,31.dX],[-83.2I,31.d],[-83.2I,31.4p],[-83.aj,31.4p],[-84.l,31.9v],[-84.l,31.d],[-84.l,31.49],[-83.b2,31.49]],73:[[-82.5p,33.c2],[-82.aB,33.5h],[-82.d0,33.1g],[-82.2o,33.dm],[-82.4Y,33.h],[-82.8Z,33.6q],[-82.1L,33.1b],[-82.2W,33.D],[-82.92,33.n],[-82.2z,33.2Q],[-82.5p,33.c2]],72:[[-83.3B,31.3q],[-83.3B,31.N],[-83.ek,31.eq],[-83.a8,31.3Y],[-83.ef,31.1B],[-83.q,31.eE],[-83.59,31.2x],[-83.cp,31.3e],[-83.cv,31.3e],[-83.E,31.dr],[-83.2I,31.d],[-83.4o,31.dX],[-83.45,31.aR],[-83.3B,31.3q]],71:[[-84.bv,33.1E],[-84.bz,33.4Q],[-84.4r,33.em],[-84.2b,33.4Z],[-84.cB,33.2E],[-84.4B,33.2E],[-84.f,33.3M],[-84.f,33.2E],[-84.3J,33.4d],[-85.3F,33.7c],[-84.47,33.e4],[-84.1H,33.J],[-84.4B,33.1E],[-84.bv,33.1E]],6Z:[[-84.g,32.2P],[-83.bn,32.2P],[-83.3p,32.6W],[-83.2F,32.11],[-83.2F,32.11],[-83.4F,32.bS],[-84.l,32.2c],[-84.ft,32.6f],[-84.gH,32.fu],[-84.4f,32.46],[-84.am,32.11],[-84.3H,32.8f],[-84.g,32.8f],[-84.g,32.2P]],70:[[-83.3K,32.2e],[-83.2i,32.b1],[-83.s,31.6H],[-83.s,31.2w],[-83.b7,31.2w],[-83.3I,31.K],[-83.L,31.4j],[-83.3K,32.2e]],6M:[[-85.eF,34.o],[-85.mt,34.o],[-85.mr,34.2U],[-85.nM,34.nE],[-85.nH,34.o],[-85.eF,34.o]],6B:[[-84.3z,34.7W],[-84.ci,34.ch],[-84.9a,34.8W],[-84.4f,34.5z],[-83.98,34.co],[-83.cc,34.2s],[-84.p,34.2s],[-84.p,34.bU],[-84.p,34.5z],[-84.5I,34.f6],[-84.3D,34.5N],[-84.j,34.ex],[-84.j,34.93],[-84.3z,34.7W]],5k:[[-84.3P,33.14],[-84.j,33.7r],[-84.dg,33.dl],[-84.2J,33.fF],[-84.1v,33.n],[-84.c8,33.3f],[-84.7g,33.n],[-84.H,33.n],[-84.3D,33.21],[-84.3P,33.14],[-84.3P,33.14]],6z:[[-84.T,31.d],[-84.T,31.d],[-84.2C,31.d],[-84.by,31.d],[-84.1A,30.ds],[-84.f,30.cP],[-84.f,30.fO],[-84.fI,30.fN],[-84.5b,31.cQ],[-84.T,31.d]],6v:[[-83.3y,32.1M],[-82.6N,32.fS],[-82.b9,32.bd],[-82.bb,32.1u],[-82.1j,32.2k],[-83.52,31.2G],[-83.2N,31.mk],[-83.59,32.ml],[-83.C,32.an],[-83.2N,32.f3],[-83.fe,32.f4],[-83.4S,32.4C],[-83.41,32.20],[-83.3y,32.1M]],6x:[[-83.27,32.W],[-83.s,32.W],[-83.2i,32.2k],[-83.2i,32.b1],[-83.3K,32.2e],[-84.db,32.da],[-83.3K,32.gK],[-83.27,32.W]],6D:[[-84.1S,31.4i],[-83.4q,31.4i],[-84.l7,31.e],[-83.98,31.l2],[-83.b5,31.1i],[-84.3w,31.1i],[-84.4E,31.1i],[-84.P,31.1r],[-84.Q,31.e],[-84.90,31.e],[-84.23,31.e],[-84.1S,31.4i]],6E:[[-84.9Q,33.4e],[-84.1q,33.4e],[-84.bV,33.bW],[-84.B,33.6r],[-84.eH,33.eG],[-84.bw,33.5l],[-84.3N,33.5l],[-84.bO,33.5t],[-84.9Q,33.4e]],6L:[[-85.8J,31.5v],[-85.v,31.bx],[-85.dI,31.dS],[-84.1Z,31.4I],[-84.e1,31.4I],[-84.e3,31.1r],[-84.1P,31.1r],[-84.9p,31.9t],[-84.2r,31.9k],[-84.1h,31.1F],[-85.3Z,31.1F],[-85.1k,31.t],[-85.np,31.1e],[-85.8J,31.5v]],6J:[[-82.10,30.7E],[-82.dV,30.dC],[-82.7F,30.8e],[-82.du,30.bK],[-82.3g,30.dD],[-82.7k,30.oD],[-83.3y,30.gG],[-83.9K,30.8D],[-83.gI,30.4G],[-83.ct,30.4G],[-82.10,30.7E]],6I:[[-81.39,32.dq],[-81.4v,32.bM],[-81.oq,32.5x],[-81.os,32.1M],[-81.c1,32.aY],[-81.dx,32.dB],[-81.bL,32.u],[-81.3v,32.r],[-81.39,32.8L],[-81.6Q,32.r],[-81.4x,32.bI],[-81.dA,32.bF],[-81.ey,32.eu],[-81.dc,32.4w],[-81.39,32.dq]],6F:[[-82.cd,34.43],[-82.4T,34.oi],[-82.2O,34.o6],[-82.9J,33.14],[-82.2p,33.2d],[-82.aQ,33.2d],[-82.b0,33.50],[-82.5i,34.2H],[-83.60,34.4H],[-83.2a,34.cj],[-82.5i,34.e2],[-82.cd,34.43]],6G:[[-82.7S,32.5a],[-82.ca,32.58],[-82.gh,32.2T],[-82.7C,32.1G],[-82.2o,32.1n],[-82.2Y,32.bM],[-82.8C,32.i],[-82.ev,32.eI],[-82.2v,32.5d],[-82.2z,32.W],[-82.3Q,32.4m],[-82.dW,32.dG],[-82.2t,32.b4],[-82.1Q,32.1C],[-82.9J,32.2c],[-82.2O,32.6f],[-82.g6,32.g5],[-82.gg,32.46],[-82.2W,32.3a],[-82.8Z,32.gj],[-82.8v,32.ge],[-82.7S,32.5a]],75:[[-82.6k,32.6e],[-81.97,32.bR],[-81.8M,32.4C],[-81.ep,32.r],[-81.bs,32.bl],[-81.9X,32.3A],[-81.cU,32.cX],[-81.fw,32.fv],[-82.6k,32.6e]],5y:[[-84.5I,34.k],[-84.8p,34.k],[-84.kV,34.8q],[-84.4f,34.l1],[-84.3H,34.8r],[-84.4E,34.8n],[-84.2m,34.kJ],[-84.2m,34.8h],[-84.ai,34.ah],[-84.ci,34.ch],[-84.3z,34.7W],[-84.j,34.9e],[-84.j,34.3u],[-84.eC,34.8n],[-84.5f,34.8r],[-84.1q,34.1Y],[-84.1q,34.k],[-84.5I,34.k]],5M:[[-84.Q,33.D],[-84.1A,33.ei],[-84.cz,33.h],[-84.fK,33.4W],[-84.2b,33.4Z],[-84.4r,33.em],[-84.bz,33.4Q],[-84.1s,33.D],[-84.Q,33.D]],5C:[[-85.ar,34.A],[-85.3L,34.A],[-85.1k,34.5H],[-85.6t,34.bX],[-85.v,34.2u],[-85.bH,34.w],[-85.en,34.3E],[-85.5G,34.3E],[-85.7a,34.eo],[-85.eh,34.eg],[-85.1k,34.A],[-85.ar,34.A]],5D:[[-84.p,34.2s],[-83.cc,34.2s],[-83.L,34.3E],[-83.a4,34.8U],[-84.3w,34.4H],[-84.dw,34.2u],[-84.2m,34.2D],[-84.j,34.e7],[-84.p,34.bB],[-84.p,34.2s]],5A:[[-83.cE,34.cH],[-83.60,34.fA],[-83.3C,34.c7],[-83.dT,34.3O],[-83.cg,34.3l],[-83.3h,34.3l],[-83.41,34.8U],[-83.gM,34.3m],[-83.1O,34.cl],[-83.C,34.3m],[-83.54,34.ea],[-83.cG,34.cF],[-83.41,34.3S],[-83.cE,34.cH]],5Q:[[-84.5j,34.ck],[-84.S,34.4c],[-84.H,34.e9],[-84.p,34.bB],[-84.j,34.e7],[-84.2m,34.2D],[-84.9a,33.dv],[-84.4V,33.4t],[-84.3P,33.14],[-84.3D,33.21],[-84.H,33.n],[-84.1s,33.n],[-84.1s,33.D],[-84.bz,33.4Q],[-84.bv,33.1E],[-84.4B,33.1E],[-84.9q,33.ed],[-84.er,33.D],[-84.bw,33.5l],[-84.eH,33.eG],[-84.B,33.6r],[-84.bV,33.bW],[-84.1s,33.eM],[-84.1z,33.7r],[-84.1A,33.50],[-84.cn,34.48],[-84.5j,34.ck]],5F:[[-84.1q,34.1Y],[-84.5f,34.8r],[-84.eC,34.8n],[-84.j,34.3u],[-84.j,34.9e],[-84.3z,34.7W],[-84.j,34.93],[-84.j,34.ex],[-84.3D,34.5N],[-84.z,34.bN],[-84.z,34.A],[-84.B,34.8h],[-84.2R,34.fQ],[-84.1q,34.1Y]],5L:[[-82.7k,33.bf],[-82.m1,33.m2],[-82.19,33.b8],[-82.3g,33.1d],[-82.gk,33.gi],[-82.ba,33.28],[-82.4T,33.1d],[-82.38,33.7B],[-82.bg,33.4W],[-82.7k,33.bf]],5P:[[-81.4v,31.N],[-81.gB,31.N],[-81.s4,31.sa],[-81.sb,31.si],[-81.fE,31.2x],[-81.cw,31.8z],[-81.eB,31.1B],[-81.eA,31.eN],[-81.dz,31.dy],[-81.2B,31.3Y],[-81.aO,31.3W],[-81.aM,31.aN],[-81.4A,31.N],[-81.gs,31.gq],[-81.4v,31.N]],5O:[[-84.2r,34.9b],[-84.f,34.cD],[-84.fP,34.2U],[-84.5b,34.93],[-84.z,34.A],[-84.z,34.bN],[-84.z,34.3O],[-84.1H,34.c0],[-85.6t,34.bX],[-85.1k,34.5H],[-85.3L,34.A],[-85.v,34.2U],[-84.2r,34.9b]],5w:[[-84.40,31.d],[-84.2J,31.d],[-84.2J,30.gO],[-84.gr,30.gN],[-84.gt,30.b6],[-84.7g,30.sg],[-84.1A,30.ds],[-84.by,31.d],[-84.40,31.d]],7J:[[-83.2N,33.2V],[-83.q,33.bC],[-83.3h,33.2Q],[-82.1J,33.cV],[-82.1j,33.6r],[-82.4u,33.5h],[-82.fy,33.6q],[-83.3R,33.1I],[-83.2l,33.h],[-83.eS,33.eR],[-83.eT,33.eU],[-83.q,33.O],[-83.2Z,33.dj],[-83.6K,33.1g],[-83.1l,33.2Q],[-83.2N,33.2V]],9N:[[-83.4q,34.c6],[-83.7s,34.2u],[-83.1f,34.4c],[-83.7s,34.dt],[-83.1a,33.4P],[-83.98,33.8G],[-84.dg,33.dl],[-84.j,33.7r],[-84.3P,33.14],[-84.3P,33.14],[-84.4V,33.4t],[-84.9a,33.dv],[-84.2m,34.2D],[-84.dw,34.2u],[-84.3w,34.4H],[-83.4q,34.c6]],9V:[[-83.12,34.R],[-83.f1,34.R],[-83.1p,34.8j],[-83.1T,34.eW],[-83.6K,34.3u],[-83.C,34.fz],[-83.cS,34.3S],[-83.bY,34.bZ],[-83.s,34.c5],[-83.4K,34.3k],[-83.1D,34.8W],[-83.ms,34.mq],[-83.mu,34.mv],[-83.2y,34.5q],[-83.12,34.R]],9H:[[-83.4N,34.aZ],[-83.4K,34.3k],[-83.s,34.c5],[-83.4K,34.dY],[-83.1D,34.c9],[-83.1f,34.4c],[-83.7s,34.2u],[-83.4q,34.c6],[-84.3w,34.4H],[-83.a4,34.8U],[-83.L,34.3E],[-83.cc,34.2s],[-83.98,34.co],[-83.aX,34.3k],[-83.4N,34.aZ]],9M:[[-83.3R,33.1I],[-82.55,33.bi],[-82.bg,33.4W],[-82.38,33.7B],[-82.55,33.aJ],[-82.lH,33.28],[-83.aI,33.aD],[-83.2A,33.dZ],[-83.2A,33.15],[-83.22,33.2n],[-83.eQ,33.4Z],[-83.2q,33.do],[-83.2l,33.h],[-83.3R,33.1I],[-83.3R,33.1I]],ae:[[-85.bE,33.4L],[-85.v,33.1U],[-85.9P,33.1m],[-85.5u,33.e0],[-85.7a,33.1y],[-85.5G,33.4L],[-85.bE,33.4L]],ad:[[-84.f,32.1W],[-84.d2,32.1K],[-84.3T,32.1w],[-85.3Z,32.1G],[-85.f9,32.1G],[-85.ax,32.6W],[-85.ee,32.1W],[-84.f,32.1W],[-84.f,32.1W]],a3:[[-83.3C,34.c7],[-82.1J,34.3S],[-82.aK,34.q0],[-82.cd,34.43],[-82.5i,34.e2],[-83.2a,34.cj],[-83.cg,34.3l],[-83.dT,34.3O],[-83.3C,34.c7]],9I:[[-85.3F,33.7c],[-84.3J,33.4d],[-84.3J,33.4d],[-85.8J,33.1d],[-85.1k,33.3M],[-85.eK,33.ew],[-85.av,33.28],[-85.dL,33.dK],[-85.3F,33.7c]],9G:[[-84.c8,33.3f],[-84.1v,33.n],[-84.8p,33.fk],[-84.23,33.1b],[-84.3X,33.f8],[-83.a4,33.O],[-83.L,33.a5],[-84.3i,33.cI],[-84.3H,33.fM],[-84.H,33.h],[-84.H,33.J],[-84.7i,33.J],[-84.7i,33.D],[-84.dJ,33.dH],[-84.7g,33.n],[-84.c8,33.3f]],9h:[[-83.2F,32.11],[-83.2F,32.11],[-83.ak,32.2T],[-83.8l,32.dF],[-83.8l,32.8k],[-83.8m,32.4w],[-83.E,32.20],[-83.E,32.44],[-83.s,32.W],[-83.27,32.W],[-83.27,32.5x],[-83.1a,32.f7],[-83.4N,32.1C],[-83.4z,32.i],[-83.af,32.1o],[-83.2F,32.11]],8X:[[-83.7Z,31.3U],[-83.C,31.1V],[-83.dM,31.7f],[-83.2Z,31.7f],[-83.2Z,31.dN],[-82.4u,31.X],[-83.dQ,31.dP],[-83.dO,31.es],[-83.2q,31.17],[-83.3d,31.17],[-83.C,31.17],[-83.E,31.3V],[-83.7Z,31.3U]],9y:[[-83.1D,34.43],[-83.gQ,34.gb],[-83.25,34.3m],[-83.1l,34.cm],[-83.3n,34.gL],[-83.gP,34.2D],[-83.3n,34.2H],[-83.1p,33.21],[-83.2I,34.gc],[-83.4F,34.ga],[-83.1f,34.4c],[-83.1D,34.c9],[-83.1D,34.43]],9A:[[-83.2y,33.1b],[-83.1p,33.J],[-83.2f,33.1d],[-83.1f,33.bu],[-83.bA,33.G],[-83.1f,33.g9],[-83.bo,33.bp],[-83.3p,33.J],[-83.62,33.4Q],[-83.5s,33.O],[-83.2y,33.1b]],9B:[[-82.aW,31.I],[-82.19,31.I],[-82.19,31.g7],[-82.7Q,31.9R],[-82.7Q,31.7R],[-82.2t,31.7R],[-82.13,31.7U],[-82.13,31.X],[-82.V,31.X],[-82.4J,31.X],[-82.4J,31.3j],[-82.2p,31.m],[-82.4s,31.4n],[-82.3c,31.2L],[-82.aW,31.I]],9o:[[-82.1L,33.24],[-82.2z,33.24],[-82.dk,33.de],[-82.2v,33.6A],[-82.4Y,33.g8],[-82.gd,32.dp],[-82.7S,32.5a],[-82.8v,32.ge],[-82.8Z,32.gj],[-82.2W,32.3a],[-82.13,32.7O],[-82.gR,32.lT],[-82.2t,33.lU],[-82.4U,33.7w],[-82.ba,33.28],[-82.gk,33.gi],[-82.3g,33.1d],[-82.19,33.b8],[-82.1L,33.24]],9r:[[-81.cb,32.1c],[-81.2B,32.cN],[-81.fC,32.fH],[-81.57,32.1o],[-82.7C,32.1G],[-82.gh,32.2T],[-82.ca,32.58],[-82.2Y,32.gf],[-81.cb,32.1c]],9s:[[-82.13,32.7O],[-82.2W,32.3a],[-82.gg,32.46],[-82.g6,32.g5],[-82.2O,32.6f],[-82.9J,32.2c],[-82.1Q,32.1C],[-82.fR,32.8k],[-82.5e,32.fT],[-82.7F,32.2T],[-82.fU,32.46],[-82.aA,32.az],[-82.56,32.3a],[-82.lI,32.58],[-82.lJ,32.lK],[-82.13,32.7O]],9l:[[-83.1T,33.G],[-83.1O,32.bc],[-83.1l,32.aV],[-83.45,32.1K],[-83.77,32.fV],[-83.bt,32.1c],[-83.af,33.7w],[-83.1f,33.bu],[-83.2f,33.1d],[-83.1T,33.G]],9u:[[-84.9x,33.Y],[-84.23,32.3G],[-84.g,32.as],[-84.g,32.1R],[-84.40,32.1R],[-84.4V,33.2n],[-84.g,33.fL],[-84.g,33.Y],[-84.9x,33.Y]],9D:[[-83.4R,31.t],[-82.10,31.t],[-82.10,30.7E],[-83.ct,30.4G],[-83.eO,30.3o],[-83.2j,30.3o],[-83.cq,31.2x],[-83.2l,31.7H],[-83.fW,31.7H],[-83.3C,31.t],[-83.4R,31.t]],76:[[-83.42,32.1w],[-82.aA,32.az],[-82.fU,32.46],[-82.7F,32.2T],[-82.5e,32.fT],[-82.fR,32.8k],[-82.1Q,32.1C],[-82.et,32.eL],[-82.e6,32.20],[-82.4T,32.aY],[-82.9d,32.9g],[-82.b9,32.bd],[-82.6N,32.fS],[-83.3y,32.1M],[-83.42,32.1w]],9z:[[-84.p,31.m],[-83.L,31.4j],[-83.3I,31.K],[-84.1N,31.2w],[-83.l5,31.1V],[-84.3X,31.l6],[-84.1S,31.4i],[-84.23,31.e],[-84.90,31.e],[-84.fa,31.83],[-84.29,31.ap],[-84.29,31.m],[-84.p,31.m]],91:[[-81.c3,32.3A],[-81.fX,32.2e],[-81.fY,31.2L],[-81.4A,31.g3],[-81.g4,31.3j],[-81.g2,31.9R],[-81.g1,31.2h],[-81.fZ,31.2h],[-81.9Z,31.3U],[-81.3v,31.9U],[-81.c1,31.g0],[-81.c1,31.e],[-81.c4,31.sF],[-81.gC,31.4X],[-81.9i,31.9j],[-81.4x,31.9j],[-81.36,31.9n],[-81.gm,31.cf],[-81.gl,31.6i],[-81.ce,31.4n],[-81.cs,31.cr],[-81.cY,32.d1],[-81.cU,32.cX],[-81.9X,32.3A],[-81.c3,32.3A]],8Y:[[-82.2p,33.2d],[-82.9J,33.14],[-82.so,33.8Q],[-82.5p,33.c2],[-82.2z,33.2Q],[-82.92,33.n],[-82.3c,33.3f],[-82.2O,33.kZ],[-82.lE,33.lD],[-82.mi,33.mj],[-82.2p,33.2d]],8V:[[-81.cs,31.cr],[-81.ce,31.4n],[-81.gl,31.6i],[-81.gm,31.cf],[-81.36,31.9n],[-81.gp,31.gn],[-81.aP,31.aL],[-81.97,31.2h],[-81.cY,32.d1],[-81.cs,31.cr]],94:[[-83.cp,31.3e],[-83.59,31.2x],[-83.cq,31.2x],[-83.2j,30.3o],[-83.eO,30.3o],[-83.ct,30.4G],[-83.gI,30.4G],[-83.9K,30.8D],[-83.3y,30.gG],[-83.sw,30.cu],[-83.1O,30.cu],[-83.8m,30.cJ],[-83.gF,30.a1],[-83.4S,30.gD],[-83.gE,30.gJ],[-83.1T,30.3o],[-83.cv,31.3e],[-83.cp,31.3e]],95:[[-83.9E,34.1X],[-83.mw,34.mx],[-83.aX,34.3k],[-83.98,34.co],[-84.4f,34.5z],[-84.9a,34.8W],[-84.ci,34.ch],[-84.ai,34.ah],[-84.3X,34.kK],[-83.3I,34.8j],[-83.9E,34.1X]],9f:[[-84.l,32.2c],[-84.1N,32.i],[-84.2M,32.i],[-84.2M,32.i],[-84.l,32.2c],cZ,[-84.1S,32.3b],[-83.L,32.cy],[-83.6Y,32.f5],[-83.27,32.5x],[-83.27,32.W],[-83.3K,32.gK],[-84.db,32.da],[-84.5X,32.fl],[-84.5X,32.u],[-84.1v,32.u],[-84.74,32.u],[-84.74,32.2X],[-84.j,32.2X],[-84.j,32.4y],[-84.g,32.3b],[-84.2M,32.i],[-84.1S,32.3b]],96:[[-83.3h,34.3l],[-83.cg,34.3l],[-83.2a,34.cj],[-83.60,34.4H],[-82.5i,34.2H],[-83.2A,34.bQ],[-83.9K,34.2D],[-83.bD,33.4t],[-83.3n,34.2H],[-83.gP,34.2D],[-83.3n,34.gL],[-83.1l,34.cm],[-83.1O,34.cl],[-83.gM,34.3m],[-83.41,34.8U],[-83.3h,34.3l]],9F:[[-84.1P,32.1n],[-84.1z,32.2g],[-84.b3,32.5g],[-84.P,32.5c],[-84.P,32.1u],[-84.5m,32.1u],[-84.3x,32.r],[-84.B,32.r],[-84.1P,32.1n]],a6:[[-82.92,33.n],[-82.2W,33.D],[-82.1L,33.1b],[-82.8Z,33.6q],[-82.4Y,33.h],[-82.2z,33.24],[-82.1L,33.24],[-82.4s,33.h],[-82.1Q,33.61],[-82.3g,33.1y],[-82.3c,33.3f],[-82.92,33.n]],a7:[[-81.36,31.9n],[-81.4x,31.9j],[-81.9i,31.9j],[-81.gC,31.4X],[-81.qK,31.qL],[-81.qM,31.bx],[-81.4v,31.3t],[-81.gB,31.N],[-81.4v,31.N],[-81.gs,31.gq],[-81.4A,31.N],[-81.aM,31.aN],[-81.aP,31.aL],[-81.gp,31.gn],[-81.36,31.9n]],a2:[[-84.f,33.3M],[-84.4B,33.2E],[-84.cB,33.2E],[-84.2b,33.G],[-84.5m,32.51],[-84.2C,32.8c],[-84.fx,32.1K],[-84.d2,32.1K],[-84.f,32.1W],[-84.f,32.1W],[-84.f,33.3M]],a9:[[-84.9p,31.9t],[-84.go,31.9k],[-84.T,31.d],[-84.T,31.d],[-84.5b,31.cQ],[-84.1h,31.1F],[-84.2r,31.9k],[-84.9p,31.9t]],ab:[[-84.3w,31.1i],[-83.b5,31.1i],[-84.l,31.49],[-84.l,31.d],[-84.3i,31.d],[-84.2J,31.d],[-84.40,31.d],[-84.by,31.d],[-84.2C,31.d],[-84.gu,31.gz],[-84.89,31.gy],[-84.gx,31.gv],[-84.3z,31.gw],[-84.4E,31.1i],[-84.3w,31.1i]],ac:[[-84.l,33.Y],[-83.bA,33.G],[-83.1f,33.bu],[-83.af,33.7w],[-83.bt,32.1c],[-83.4z,32.1c],[-83.bn,32.2P],[-84.g,32.2P],[-84.g,32.as],[-84.23,32.3G],[-84.9x,33.Y],[-84.l,33.Y]],a0:[[-82.3Q,32.4m],[-82.3c,31.2L],[-82.4s,31.4n],[-82.m8,32.m9],[-82.aF,32.2X],[-82.3Q,32.4m]],9O:[[-83.4o,33.1m],[-83.au,33.8Q],[-83.1l,33.2Q],[-83.6K,33.1g],[-83.2Z,33.dj],[-83.q,33.O],[-83.q,33.O],[-83.1p,33.J],[-83.2y,33.1b],[-83.5s,33.1g],[-83.4o,33.1m]],9W:[[-84.1q,34.k],[-84.1q,34.1Y],[-84.2R,34.fQ],[-84.B,34.8h],[-84.z,34.A],[-84.5b,34.93],[-84.fP,34.2U],[-84.f,34.cD],[-84.2r,34.9b],[-84.9c,34.mc],[-84.ao,34.9e],[-84.1H,34.mf],[-84.f,34.3u],[-84.mo,34.3r],[-84.mp,34.5q],[-84.f,34.mz],[-84.1Z,34.my],[-84.mC,34.mB],[-84.9q,34.k],[-84.bm,34.k],[-84.1q,34.k]],9Y:[[-85.3Z,32.1G],[-84.3T,32.1w],[-84.fs,32.2g],[-84.3T,32.i],[-84.bm,32.1M],[-84.47,32.4y],[-84.6w,32.1M],[-84.qm,32.cy],[-85.f9,32.1G],[-85.3Z,32.1G]],9T:[[-83.4a,33.8O],[-83.5s,33.1g],[-83.2y,33.1b],[-83.5s,33.O],[-83.62,33.4Q],[-83.3p,33.J],[-83.bo,33.bp],[-83.L,33.a5],[-83.a4,33.O],[-84.3X,33.f8],[-84.23,33.1b],[-83.6Y,33.1y],[-83.4a,33.8O]],9S:[[-83.br,33.bq],[-83.22,33.5r],[-83.a8,33.1m],[-83.q,33.bC],[-83.2N,33.2V],[-83.1l,33.2Q],[-83.au,33.8Q],[-83.4h,33.1U],[-83.1p,33.21],[-83.br,33.bq]],9L:[[-83.2A,34.bQ],[-82.5i,34.2H],[-82.b0,33.50],[-82.56,33.5r],[-82.6N,33.5t],[-82.1j,33.2V],[-82.1J,33.cV],[-83.3h,33.2Q],[-83.q,33.bC],[-83.a8,33.1m],[-83.22,33.5r],[-83.3d,33.1U],[-83.q,33.5E],[-83.bD,33.4t],[-83.9K,34.2D],[-83.2A,34.bQ]],aa:[[-84.1h,34.w],[-84.bP,34.w],[-84.9Q,33.4e],[-84.bO,33.5t],[-85.9P,33.1m],[-85.v,33.1U],[-85.v,33.14],[-84.5B,33.5E],[-84.1h,34.w]],8S:[[-83.4F,32.bS],[-83.2F,32.11],[-83.af,32.1o],[-83.4z,32.i],[-83.4N,32.1C],[-83.1a,32.f7],[-83.27,32.5x],[-83.6Y,32.f5],[-83.L,32.cy],[-84.1S,32.3b],[-84.1N,32.i],[-84.l,32.2c],[-83.4F,32.bS]],7G:[[-84.3D,34.5N],[-84.5I,34.f6],[-84.p,34.5z],[-84.p,34.bU],[-84.2R,34.bT],[-84.2R,34.5H],[-84.z,34.3O],[-84.z,34.bN],[-84.3D,34.5N]],7I:[[-82.26,31.5J],[-82.M,31.Z],[-82.lN,31.lO],[-82.2S,31.aU],[-82.2S,31.37],[-81.fh,31.5v],[-82.bk,31.1e],[-82.6h,31.fi],[-82.bG,31.fg],[-82.5o,31.bj],[-82.1L,31.N],[-82.2K,31.U],[-82.ff,31.fd],[-82.26,31.5J]],7D:[[-84.2b,33.G],[-84.Q,33.fJ],[-84.4V,33.2n],[-84.40,32.1R],[-84.S,32.1R],[-84.5m,32.51],[-84.2b,33.G]],7y:[[-85.bH,34.w],[-85.v,34.2u],[-84.1h,34.w],[-84.5B,33.5E],[-85.v,33.14],[-85.v,33.1U],[-85.bE,33.4L],[-85.5G,33.4L],[-85.r0,33.21],[-85.bH,34.w]],7A:[[-83.s,32.W],[-83.E,32.44],[-83.4S,32.4C],[-83.fe,32.f4],[-83.2N,32.f3],[-83.C,32.an],[-83.mh,32.mm],[-83.2i,32.2k],[-83.s,32.W]],8T:[[-83.q,33.O],[-83.q,33.O],[-83.eT,33.eU],[-83.eS,33.eR],[-83.2l,33.h],[-83.2q,33.do],[-83.eQ,33.4Z],[-83.22,33.2n],[-83.1T,33.G],[-83.2f,33.1d],[-83.1p,33.J],[-83.q,33.O]],7K:[[-85.3L,31.d7],[-84.fn,31.2L],[-84.fq,31.fo],[-84.3N,31.4g],[-84.eX,31.16],[-84.6w,31.16],[-85.4M,31.F],[-85.eV,31.F],[-85.ra,31.bJ],[-85.3L,31.d7]],7T:[[-83.f2,35.f0],[-83.3h,34.be],[-83.3d,34.rd],[-83.6K,34.3u],[-83.1T,34.eW],[-83.1p,34.8j],[-83.f1,34.R],[-83.12,34.R],[-83.77,34.5K],[-83.6y,34.be],[-83.2f,34.8q],[-83.2f,34.k],[-83.25,34.r5],[-83.f2,35.f0]],7V:[[-84.3N,31.4g],[-84.z,31.m],[-84.aE,31.m],[-84.fb,31.1V],[-84.fc,31.1V],[-84.T,31.e],[-84.3x,31.eZ],[-84.B,31.e],[-84.1Z,31.e],[-84.9c,31.cx],[-84.6w,31.16],[-84.eX,31.16],[-84.3N,31.4g]],7M:[[-82.2o,33.dm],[-82.bk,33.dj],[-81.df,33.r9],[-81.6C,33.rb],[-81.dn,33.do],[-81.dn,33.eY],[-82.fj,33.6A],[-82.dh,33.di],[-82.dk,33.de],[-82.2z,33.24],[-82.4Y,33.h],[-82.2o,33.dm]],7L:[[-83.98,33.8G],[-83.4a,33.8O],[-83.6Y,33.1y],[-84.23,33.1b],[-84.8p,33.fk],[-84.1v,33.n],[-84.2J,33.fF],[-84.dg,33.dl],[-83.98,33.8G]],7N:[[-84.S,32.44],[-84.j,32.4y],[-84.j,32.2X],[-84.74,32.2X],[-84.74,32.u],[-84.1v,32.u],[-84.1v,32.fm],[-84.P,32.5c],[-84.b3,32.5g],[-84.S,32.fr],[-84.S,32.44]],7P:[[-81.cO,33.cR],[-81.36,33.bh],[-81.rx,32.dp],[-81.rC,32.5a],[-81.rA,32.6W],[-81.6Q,32.rk],[-81.rj,32.1o],[-81.fE,32.rg],[-81.39,32.dq],[-81.dc,32.4w],[-81.fD,32.fB],[-81.cL,32.1o],[-81.57,32.1o],[-81.fC,32.fH],[-81.2B,32.cN],[-81.cO,33.cR]],7x:[[-85.3Z,31.1F],[-84.1h,31.1F],[-84.5b,31.cQ],[-84.fI,30.fN],[-84.f,30.fO],[-84.f,30.cP],[-84.qn,30.cP],[-84.2r,30.cJ],[-84.1H,30.qc],[-85.6t,31.q3],[-85.3Z,31.1F]],7e:[[-84.5f,33.h],[-84.H,33.h],[-84.3H,33.fM],[-84.3i,33.cI],[-84.g,33.Y],[-84.g,33.fL],[-84.4V,33.2n],[-84.Q,33.fJ],[-84.2b,33.G],[-84.cB,33.2E],[-84.2b,33.4Z],[-84.fK,33.4W],[-84.cz,33.h],[-84.5f,33.h]],7h:[[-83.q,34.fp],[-83.qJ,34.cD],[-83.60,34.fA],[-83.cE,34.cH],[-83.41,34.3S],[-83.cG,34.cF],[-83.cS,34.3S],[-83.C,34.fz],[-83.q,34.fp]],7d:[[-84.B,32.r],[-84.3x,32.r],[-84.z,31.m],[-84.3N,31.4g],[-84.fq,31.fo],[-84.fn,31.2L],[-85.3L,31.d7],[-85.5u,32.sP],[-85.4l,32.1u],[-84.1h,32.u],[-84.B,32.r]],78:[[-84.1v,32.u],[-84.5X,32.u],[-84.5X,32.fl],[-84.db,32.da],[-83.3K,32.2e],[-83.L,31.4j],[-84.p,31.m],[-84.29,31.m],[-84.29,31.ap],[-84.1z,31.I],[-84.P,32.1u],[-84.P,32.5c],[-84.1v,32.fm],[-84.1v,32.u]],79:[[-84.2C,32.8c],[-84.1s,32.me],[-84.89,32.6P],[-84.1A,32.ma],[-84.87,32.86],[-84.29,32.fG],[-84.5j,32.2g],[-84.1z,32.2g],[-84.1P,32.1n],[-84.3T,32.i],[-84.fs,32.2g],[-84.3T,32.1w],[-84.d2,32.1K],[-84.fx,32.1K],[-84.2C,32.8c]],7b:[[-82.1j,33.2V],[-82.aK,33.5h],[-82.kY,33.1y],[-82.aH,33.1g],[-82.38,33.1E],[-82.m5,33.m4],[-82.m6,33.1I],[-82.55,33.bi],[-83.3R,33.1I],[-83.3R,33.1I],[-82.fy,33.6q],[-82.4u,33.5h],[-82.1j,33.6r],[-82.1J,33.cV],[-82.1j,33.2V]],7j:[[-82.2v,32.5d],[-82.6k,32.6e],[-81.fw,32.fv],[-81.cU,32.cX],[-81.cY,32.d1],[-81.97,31.2h],[-82.aS,31.aT],[-82.d0,31.6i],[-82.6h,31.2G],[-82.26,31.4j],[-82.aB,32.5c],[-82.2v,32.5d]],7t:[[-84.87,32.86],[-84.l0,32.mn],[-84.am,32.11],[-84.4f,32.46],[-84.gH,32.fu],[-84.ft,32.6f],[-84.l,32.2c],[-84.2M,32.i],[-84.g,32.3b],[-84.j,32.4y],[-84.S,32.44],[-84.S,32.fr],[-84.b3,32.5g],[-84.1z,32.2g],[-84.5j,32.2g],[-84.29,32.fG],[-84.87,32.86],cZ,[-84.2M,32.i],[-84.1N,32.i],[-84.1S,32.3b],[-84.2M,32.i],[-84.2M,32.i]],7u:[[-82.1j,32.2k],[-82.bb,32.1u],[-82.2p,31.m],[-82.4J,31.3j],[-82.eP,31.F],[-82.1J,31.F],[-83.2j,31.K],[-83.52,31.2G],[-82.1j,32.2k]],7v:[[-84.90,31.e],[-84.Q,31.e],[-84.T,31.e],[-84.fc,31.1V],[-84.fb,31.1V],[-84.aE,31.m],[-84.Q,31.m],[-84.1z,31.I],[-84.29,31.ap],[-84.fa,31.83],[-84.90,31.e]],7q:[[-84.3i,31.d],[-84.l,31.d],[-84.l,31.9v],[-83.aj,31.4p],[-83.gA,30.aq],[-84.1N,30.b6],[-84.gt,30.b6],[-84.gr,30.gN],[-84.2J,30.gO],[-84.2J,31.d],[-84.3i,31.d]],7l:[[-83.4h,31.3V],[-83.E,31.3V],[-83.C,31.17],[-83.3B,31.3q],[-83.45,31.aR],[-83.12,31.3W],[-83.12,31.4X],[-83.4h,31.3V]],7n:[[-82.3Q,32.4m],[-82.2z,32.W],[-82.2v,32.5d],[-82.aB,32.5c],[-82.26,31.4j],[-82.19,31.I],[-82.aW,31.I],[-82.3c,31.2L],[-82.3Q,32.4m]],7o:[[-83.ag,34.o],[-83.2f,34.k],[-83.2f,34.8q],[-83.6y,34.be],[-83.77,34.5K],[-83.12,34.R],[-83.2y,34.5q],[-83.9C,34.9m],[-83.lA,34.kH],[-83.4a,34.le],[-83.ag,34.o]],7X:[[-82.2t,32.b4],[-82.dW,32.dG],[-82.3Q,32.4m],[-82.aF,32.2X],[-82.9d,32.9g],[-82.4T,32.aY],[-82.e6,32.20],[-82.et,32.eL],[-82.1Q,32.1C],[-82.2t,32.b4]],8B:[[-84.3J,33.4d],[-84.3J,33.4d],[-84.f,33.2E],[-84.f,33.3M],[-84.f,32.1W],[-85.ee,32.1W],[-85.av,33.oB],[-85.av,33.28],[-85.eK,33.ew],[-85.1k,33.3M],[-85.8J,33.1d],[-84.3J,33.4d]],8E:[[-83.s,31.6H],[-83.25,31.K],[-83.7Z,31.3U],[-83.E,31.3V],[-83.4h,31.3V],[-83.12,31.4X],[-83.62,31.e],[-83.1a,31.e],[-83.b7,31.2w],[-83.s,31.2w],[-83.s,31.6H]],8u:[[-83.54,32.aG],[-83.42,32.1w],[-83.E,32.20],[-83.8m,32.4w],[-83.8l,32.8k],[-83.8l,32.dF],[-83.ak,32.2T],[-83.6y,32.hG],[-83.ll,32.ld],[-83.45,32.1K],[-83.1l,32.aV],[-83.54,32.aG]],8w:[[-84.1N,34.o],[-83.ag,34.o],[-83.4a,34.le],[-83.lA,34.kH],[-83.9C,34.9m],[-83.3p,34.3r],[-83.9E,34.1X],[-83.3I,34.8j],[-84.3X,34.kK],[-84.ai,34.ah],[-84.2m,34.8h],[-84.2m,34.kJ],[-84.4E,34.8n],[-84.3H,34.8r],[-84.4f,34.l1],[-84.kV,34.8q],[-84.8p,34.k],[-84.1N,34.o]],8y:[[-84.S,32.1R],[-84.40,32.1R],[-84.g,32.1R],[-84.g,32.as],[-84.g,32.2P],[-84.g,32.8f],[-84.3H,32.8f],[-84.am,32.11],[-84.l0,32.mn],[-84.87,32.86],[-84.1A,32.ma],[-84.89,32.6P],[-84.1s,32.me],[-84.2C,32.8c],[-84.5m,32.51],[-84.S,32.1R]],8F:[[-85.lP,34.o],[-85.4O,34.o],[-85.4O,34.1Y],[-85.8s,34.1Y],[-85.8s,34.3r],[-85.al,34.aw],[-85.mb,34.1X],[-85.5u,34.1X],[-85.v,34.2U],[-85.3L,34.A],[-85.ar,34.A],[-85.1k,34.A],[-85.53,34.mA],[-85.mr,34.2U],[-85.mt,34.o],[-85.lP,34.o]],8P:[[-83.1a,33.4P],[-83.lS,33.lR],[-83.4h,33.1U],[-83.au,33.8Q],[-83.4o,33.1m],[-83.5s,33.1g],[-83.4a,33.8O],[-83.98,33.8G],[-83.1a,33.4P]],8R:[[-82.ay,31.U],[-82.2K,31.U],[-82.1L,31.N],[-82.5o,31.bj],[-82.5o,31.lM],[-82.8x,31.lF],[-82.8x,31.m3],[-82.M,31.5n],[-82.8v,31.8z],[-82.2K,30.8D],[-82.8C,30.m7],[-82.5p,30.lW],[-82.2K,30.lY],[-82.2W,30.7p],[-82.7m,30.7p],[-82.lZ,30.m0],[-82.2O,31.lX],[-82.5e,31.t],[-82.lV,31.1e],[-82.V,31.1e],[-82.V,31.3t],[-82.V,31.Z],[-82.4U,31.Z],[-82.7m,31.Z],[-82.ay,31.U]],8N:[[-82.1Q,33.61],[-82.4s,33.h],[-82.1L,33.24],[-82.19,33.b8],[-82.m1,33.m2],[-82.7k,33.bf],[-82.bg,33.4W],[-82.55,33.bi],[-82.m6,33.1I],[-82.m5,33.m4],[-82.38,33.1E],[-82.aH,33.1g],[-82.1Q,33.61]],8I:[[-82.38,33.7B],[-82.4T,33.1d],[-82.ba,33.28],[-82.4U,33.7w],[-82.2t,33.lU],[-82.gR,32.lT],[-82.13,32.7O],[-82.lJ,32.lK],[-82.lI,32.58],[-82.56,32.3a],[-82.10,32.6P],[-83.kX,32.kW],[-83.2a,32.3G],[-83.aI,33.aD],[-82.lH,33.28],[-82.55,33.aJ],[-82.38,33.7B]],8H:[[-82.M,31.aC],[-82.M,31.16],[-82.lG,31.16],[-82.lL,31.7z],[-82.aS,31.aT],[-81.97,31.2h],[-81.aP,31.aL],[-81.aM,31.aN],[-81.aO,31.3W],[-81.lQ,31.3t],[-81.3s,31.3q],[-82.2S,31.aU],[-82.lN,31.lO],[-82.M,31.Z],[-82.M,31.aC]],8K:[[-84.3x,32.r],[-84.5m,32.1u],[-84.P,32.1u],[-84.1z,31.I],[-84.Q,31.m],[-84.aE,31.m],[-84.z,31.m],[-84.3x,32.r]],8t:[[-82.9d,32.9g],[-82.aF,32.2X],[-82.m8,32.m9],[-82.4s,31.4n],[-82.2p,31.m],[-82.bb,32.1u],[-82.b9,32.bd],[-82.9d,32.9g]],8b:[[-83.9C,34.9m],[-83.2y,34.5q],[-83.mu,34.mv],[-83.ms,34.mq],[-83.1D,34.8W],[-83.4K,34.3k],[-83.4N,34.aZ],[-83.aX,34.3k],[-83.mw,34.mx],[-83.9E,34.1X],[-83.3p,34.3r],[-83.9C,34.9m]],8d:[[-84.5B,34.k],[-84.9q,34.k],[-84.mC,34.mB],[-84.1Z,34.my],[-84.f,34.mz],[-84.mp,34.5q],[-84.mo,34.3r],[-84.f,34.3u],[-84.1H,34.mf],[-84.ao,34.9e],[-84.9c,34.mc],[-84.2r,34.9b],[-85.v,34.2U],[-85.5u,34.1X],[-85.mb,34.1X],[-85.al,34.aw],[-85.ax,34.R],[-85.4l,34.R],[-85.4l,34.mg],[-85.3F,34.5K],[-84.47,34.k],[-84.5B,34.k]],8a:[[-83.2i,32.2k],[-83.mh,32.mm],[-83.C,32.an],[-83.59,32.ml],[-83.2N,31.mk],[-83.52,31.2G],[-83.2j,31.K],[-83.25,31.K],[-83.s,31.6H],[-83.2i,32.b1],[-83.2i,32.2k]],7Y:[[-82.aQ,33.2d],[-82.2p,33.2d],[-82.mi,33.mj],[-82.lE,33.lD],[-82.2O,33.kZ],[-82.3c,33.3f],[-82.3g,33.1y],[-82.1Q,33.61],[-82.aH,33.1g],[-82.kY,33.1y],[-82.aK,33.5h],[-82.1j,33.2V],[-82.6N,33.5t],[-82.56,33.5r],[-82.b0,33.50],[-82.aQ,33.2d]],88:[[-83.2a,32.3G],[-83.kX,32.kW],[-82.10,32.6P],[-82.56,32.3a],[-82.aA,32.az],[-83.42,32.1w],[-83.54,32.aG],[-83.1l,32.aV],[-83.1O,32.bc],[-83.52,32.64],[-83.2l,32.51],[-83.2j,32.64],[-83.2q,33.bh],[-83.2a,32.3G]],8g:[[-83.3I,31.K],[-83.b7,31.2w],[-83.1a,31.e],[-83.62,31.e],[-83.12,31.4X],[-83.12,31.3W],[-83.b2,31.49],[-84.l,31.49],[-83.b5,31.1i],[-83.98,31.l2],[-84.l7,31.e],[-83.4q,31.4i],[-84.1S,31.4i],[-84.3X,31.l6],[-83.l5,31.1V],[-84.1N,31.2w],[-83.3I,31.K]]};1t.1x.4D.18={rW:{},l3:1t.1x.l3,at:{7:a.at,8:{},6:{2:"l4"},5:{2:"l4"},3:{4:[],9:""}},6g:{7:a.6g,8:{x:"-82.kU",y:"31.kT"},6:{2:"sm"},5:{2:"6g",x:"-82.kU",y:"31.kT"},3:{4:[],9:""}},9w:{7:a.9w,8:{x:"-82.kI",y:"31.kF"},6:{2:"rQ"},5:{2:"9w",x:"-82.kI",y:"31.kF"},3:{4:[],9:""}},6j:{7:a.6j,8:{x:"-82.kG",y:"31.kL"},6:{2:"rS"},5:{2:"6j",x:"-82.kG",y:"31.kL"},3:{4:[],9:""}},6c:{7:a.6c,8:{x:"-84.kM",y:"31.kR"},6:{2:"sv"},5:{2:"6c",x:"-84.kM",y:"31.kR"},3:{4:[],9:""}},6d:{7:a.6d,8:{x:"-83.kS",y:"33.kQ"},6:{2:"sM"},5:{2:"6d",x:"-83.kS",y:"33.kQ"},3:{4:[],9:""}},6l:{7:a.6l,8:{x:"-83.kP",y:"34.kN"},6:{2:"sH"},5:{2:"6l",x:"-83.kP",y:"34.kN"},3:{4:[],9:""}},6s:{7:a.6s,8:{x:"-83.kO",y:"33.l8"},6:{2:"sI"},5:{2:"6s",x:"-83.kO",y:"33.l8"},3:{4:[],9:""}},6p:{7:a.6p,8:{x:"-84.l9",y:"34.lu"},6:{2:"sS"},5:{2:"6p",x:"-84.l9",y:"34.lu"},3:{4:[],9:""}},6m:{7:a.6m,8:{x:"-83.99",y:"31.lv"},6:{2:"sT su"},5:{2:"6m",x:"-83.99",y:"31.lv"},3:{4:[],9:""}},6n:{7:a.6n,8:{x:"-83.lt",y:"31.ls"},6:{2:"sn"},5:{2:"6n",x:"-83.lt",y:"31.ls"},3:{4:[],9:""}},6o:{7:a.6o,8:{x:"-83.lq",y:"32.lr"},6:{2:"sD"},5:{2:"6o",x:"-83.lq",y:"32.lr"},3:{4:[],9:""}},6b:{7:a.6b,8:{x:"-83.lw",y:"32.lx"},6:{2:"sx"},5:{2:"6b",x:"-83.lw",y:"32.lx"},3:{4:[],9:""}},6a:{7:a.6a,8:{x:"-81.lC",y:"31.lB"},6:{2:"sz"},5:{2:"6a",x:"-81.lC",y:"31.lB"},3:{4:[],9:""}},5Y:{7:a.5Y,8:{x:"-83.ly",y:"30.mE"},6:{2:"sq"},5:{2:"5Y",x:"-83.ly",y:"30.mE"},3:{4:[],9:""}},5Z:{7:a.5Z,8:{x:"-81.lz",y:"32.lp"},6:{2:"rY"},5:{2:"5Z",x:"-81.lz",y:"32.lp"},3:{4:[],9:""}},5W:{7:a.5W,8:{x:"-81.lo",y:"32.lf"},6:{2:"qz"},5:{2:"5W",x:"-81.lo",y:"32.lf"},3:{4:[],9:""}},5V:{7:a.5V,8:{x:"-81.lc",y:"33.la"},6:{2:"qB"},5:{2:"5V",x:"-81.lc",y:"33.la"},3:{4:[],9:""}},5S:{7:a.5S,8:{x:"-83.lb",y:"33.lg"},6:{2:"qs"},5:{2:"5S",x:"-83.lb",y:"33.lg"},3:{4:[],9:""}},5T:{7:a.5T,8:{x:"-84.8A",y:"31.lh"},6:{2:"qt"},5:{2:"5T",x:"-84.8A",y:"31.lh"},3:{4:[],9:""}},5U:{7:a.5U,8:{x:"-81.lm",y:"30.ln"},6:{2:"qv"},5:{2:"5U",x:"-81.lm",y:"30.ln"},3:{4:[],9:""}},68:{7:a.68,8:{x:"-82.lk",y:"32.li"},6:{2:"qN"},5:{2:"68",x:"-82.lk",y:"32.li"},3:{4:[],9:""}},69:{7:a.69,8:{x:"-85.lj",y:"33.mD"},6:{2:"qF"},5:{2:"69",x:"-85.lj",y:"33.mD"},3:{4:[],9:""}},67:{7:a.67,8:{x:"-85.nk",y:"34.nj"},6:{2:"qH"},5:{2:"67",x:"-85.nk",y:"34.nj"},3:{4:[],9:""}},66:{7:a.66,8:{x:"-82.ni",y:"30.nl"},6:{2:"q8"},5:{2:"66",x:"-82.ni",y:"30.nl"},3:{4:[],9:""}},63:{7:a.63,8:{x:"-81.nm",y:"32.nh"},6:{2:"qa"},5:{2:"63",x:"-81.nm",y:"32.nh"},3:{4:[],9:""}},65:{7:a.65,8:{x:"-84.ng",y:"32.ne"},6:{2:"q2"},5:{2:"65",x:"-84.ng",y:"32.ne"},3:{4:[],9:""}},6u:{7:a.6u,8:{x:"-85.mR",y:"34.mQ"},6:{2:"q5"},5:{2:"6u",x:"-85.mR",y:"34.mQ"},3:{4:[],9:""}},6T:{7:a.6T,8:{x:"-84.mP",y:"34.mS"},6:{2:"qo"},5:{2:"6T",x:"-84.mP",y:"34.mS"},3:{4:[],9:""}},6U:{7:a.6U,8:{x:"-83.mT",y:"33.mV"},6:{2:"qf"},5:{2:"6U",x:"-83.mT",y:"33.mV"},3:{4:[],9:""}},6V:{7:a.6V,8:{x:"-84.mU",y:"31.mO"},6:{2:"qg"},5:{2:"6V",x:"-84.mU",y:"31.mO"},3:{4:[],9:""}},6S:{7:a.6S,8:{x:"-84.mN",y:"33.nf"},6:{2:"qO"},5:{2:"6S",x:"-84.mN",y:"33.nf"},3:{4:[],9:""}},6R:{7:a.6R,8:{x:"-82.mH",y:"30.mG"},6:{2:"rn"},5:{2:"6R",x:"-82.mH",y:"30.mG"},3:{4:[],9:""}},5R:{7:a.5R,8:{x:"-84.mF",y:"33.mI"},6:{2:"rq"},5:{2:"5R",x:"-84.mF",y:"33.mI"},3:{4:[],9:""}},6O:{7:a.6O,8:{x:"-82.mJ",y:"31.mM"},6:{2:"rl"},5:{2:"6O",x:"-82.mJ",y:"31.mM"},3:{4:[],9:""}},6X:{7:a.6X,8:{x:"-83.mL",y:"31.mK"},6:{2:"rs"},5:{2:"6X",x:"-83.mL",y:"31.mK"},3:{4:[],9:""}},73:{7:a.73,8:{x:"-82.mW",y:"33.mX"},6:{2:"rt"},5:{2:"73",x:"-82.mW",y:"33.mX"},3:{4:[],9:""}},72:{7:a.72,8:{x:"-83.n9",y:"31.n8"},6:{2:"rw"},5:{2:"72",x:"-83.n9",y:"31.n8"},3:{4:[],9:""}},71:{7:a.71,8:{x:"-84.n7",y:"33.na"},6:{2:"re"},5:{2:"71",x:"-84.n7",y:"33.na"},3:{4:[],9:""}},6Z:{7:a.6Z,8:{x:"-83.nb",y:"32.nd"},6:{2:"qZ"},5:{2:"6Z",x:"-83.nb",y:"32.nd"},3:{4:[],9:""}},70:{7:a.70,8:{x:"-83.nc",y:"31.n6"},6:{2:"qV"},5:{2:"70",x:"-83.nc",y:"31.n6"},3:{4:[],9:""}},6M:{7:a.6M,8:{x:"-85.n5",y:"34.n0"},6:{2:"qS"},5:{2:"6M",x:"-85.n5",y:"34.n0"},3:{4:[],9:""}},6B:{7:a.6B,8:{x:"-84.mZ",y:"34.mY"},6:{2:"qU"},5:{2:"6B",x:"-84.mZ",y:"34.mY"},3:{4:[],9:""}},5k:{7:a.5k,8:{x:"-84.n1",y:"33.n2"},6:{2:"5k"},5:{2:"5k",x:"-84.n1",y:"33.n2"},3:{4:[],9:""}},6z:{7:a.6z,8:{x:"-84.n4",y:"30.n3"},6:{2:"r4"},5:{2:"6z",x:"-84.n4",y:"30.n3"},3:{4:[],9:""}},6v:{7:a.6v,8:{x:"-83.md",y:"32.kD"},6:{2:"r6"},5:{2:"6v",x:"-83.md",y:"32.kD"},3:{4:[],9:""}},6x:{7:a.6x,8:{x:"-83.i8",y:"32.i7"},6:{2:"r7"},5:{2:"6x",x:"-83.i8",y:"32.i7"},3:{4:[],9:""}},6D:{7:a.6D,8:{x:"-84.i6",y:"31.i4"},6:{2:"r3"},5:{2:"6D",x:"-84.i6",y:"31.i4"},3:{4:[],9:""}},6E:{7:a.6E,8:{x:"-84.i5",y:"33.i9"},6:{2:"r8"},5:{2:"6E",x:"-84.i5",y:"33.i9"},3:{4:[],9:""}},6L:{7:a.6L,8:{x:"-84.ia",y:"31.ih"},6:{2:"rc"},5:{2:"6L",x:"-84.ia",y:"31.ih"},3:{4:[],9:""}},6J:{7:a.6J,8:{x:"-82.ig",y:"30.ie"},6:{2:"r2"},5:{2:"6J",x:"-82.ig",y:"30.ie"},3:{4:[],9:""}},6I:{7:a.6I,8:{x:"-81.ib",y:"32.ic"},6:{2:"r1"},5:{2:"6I",x:"-81.ib",y:"32.ic"},3:{4:[],9:""}},6F:{7:a.6F,8:{x:"-82.i3",y:"34.i2"},6:{2:"qT"},5:{2:"6F",x:"-82.i3",y:"34.i2"},3:{4:[],9:""}},6G:{7:a.6G,8:{x:"-82.hT",y:"32.hU"},6:{2:"qQ"},5:{2:"6G",x:"-82.hT",y:"32.hU"},3:{4:[],9:""}},75:{7:a.75,8:{x:"-81.hS",y:"32.hR"},6:{2:"qR"},5:{2:"75",x:"-81.hS",y:"32.hR"},3:{4:[],9:""}},5y:{7:a.5y,8:{x:"-84.hP",y:"34.hQ"},6:{2:"qW"},5:{2:"5y",x:"-84.hP",y:"34.hQ"},3:{4:[],9:""}},5M:{7:a.5M,8:{x:"-84.hV",y:"33.hW"},6:{2:"qY"},5:{2:"5M",x:"-84.hV",y:"33.hW"},3:{4:[],9:""}},5C:{7:a.5C,8:{x:"-85.i1",y:"34.i0"},6:{2:"qX"},5:{2:"5C",x:"-85.i1",y:"34.i0"},3:{4:[],9:""}},5D:{7:a.5D,8:{x:"-84.hZ",y:"34.hX"},6:{2:"rf"},5:{2:"5D",x:"-84.hZ",y:"34.hX"},3:{4:[],9:""}},5A:{7:a.5A,8:{x:"-83.hY",y:"34.ii"},6:{2:"rv"},5:{2:"5A",x:"-83.hY",y:"34.ii"},3:{4:[],9:""}},5Q:{7:a.5Q,8:{x:"-84.ij",y:"33.iD"},6:{2:"ru"},5:{2:"5Q",x:"-84.ij",y:"33.iD"},3:{4:[],9:""}},5F:{7:a.5F,8:{x:"-84.iC",y:"34.iB"},6:{2:"ry"},5:{2:"5F",x:"-84.iC",y:"34.iB"},3:{4:[],9:""}},5L:{7:a.5L,8:{x:"-82.iz",y:"33.iA"},6:{2:"rB"},5:{2:"5L",x:"-82.iz",y:"33.iA"},3:{4:[],9:""}},5P:{7:a.5P,8:{x:"-81.iE",y:"31.iF"},6:{2:"rz"},5:{2:"5P",x:"-81.iE",y:"31.iF"},3:{4:[],9:""}},5O:{7:a.5O,8:{x:"-84.iK",y:"34.iJ"},6:{2:"rr"},5:{2:"5O",x:"-84.iK",y:"34.iJ"},3:{4:[],9:""}},5w:{7:a.5w,8:{x:"-84.iI",y:"30.iG"},6:{2:"ri"},5:{2:"5w",x:"-84.iI",y:"30.iG"},3:{4:[],9:""}},7J:{7:a.7J,8:{x:"-83.iH",y:"33.iy"},6:{2:"rh"},5:{2:"7J",x:"-83.iH",y:"33.iy"},3:{4:[],9:""}},9N:{7:a.9N,8:{x:"-84.ix",y:"33.io"},6:{2:"rm"},5:{2:"9N",x:"-84.ix",y:"33.io"},3:{4:[],9:""}},9V:{7:a.9V,8:{x:"-83.ip",y:"34.in"},6:{2:"rp"},5:{2:"9V",x:"-83.ip",y:"34.in"},3:{4:[],9:""}},9H:{7:a.9H,8:{x:"-83.im",y:"34.ik"},6:{2:"ro"},5:{2:"9H",x:"-83.im",y:"34.ik"},3:{4:[],9:""}},9M:{7:a.9M,8:{x:"-82.il",y:"33.iq"},6:{2:"qP"},5:{2:"9M",x:"-82.il",y:"33.iq"},3:{4:[],9:""}},ae:{7:a.ae,8:{x:"-85.ir",y:"33.iw"},6:{2:"qi"},5:{2:"ae",x:"-85.ir",y:"33.iw"},3:{4:[],9:""}},ad:{7:a.ad,8:{x:"-84.iv",y:"32.iu"},6:{2:"qh"},5:{2:"ad",x:"-84.iv",y:"32.iu"},3:{4:[],9:""}},a3:{7:a.a3,8:{x:"-82.is",y:"34.it"},6:{2:"qe"},5:{2:"a3",x:"-82.is",y:"34.it"},3:{4:[],9:""}},9I:{7:a.9I,8:{x:"-85.hO",y:"33.hN"},6:{2:"qj"},5:{2:"9I",x:"-85.hO",y:"33.hN"},3:{4:[],9:""}},9G:{7:a.9G,8:{x:"-84.hb",y:"33.hc"},6:{2:"qk"},5:{2:"9G",x:"-84.hb",y:"33.hc"},3:{4:[],9:""}},9h:{7:a.9h,8:{x:"-83.ha",y:"32.h9"},6:{2:"ql"},5:{2:"9h",x:"-83.ha",y:"32.h9"},3:{4:[],9:""}},8X:{7:a.8X,8:{x:"-83.h7",y:"31.h8"},6:{2:"qd"},5:{2:"8X",x:"-83.h7",y:"31.h8"},3:{4:[],9:""}},9y:{7:a.9y,8:{x:"-83.hd",y:"34.he"},6:{2:"q4"},5:{2:"9y",x:"-83.hd",y:"34.he"},3:{4:[],9:""}},9A:{7:a.9A,8:{x:"-83.hj",y:"33.hi"},6:{2:"q1"},5:{2:"9A",x:"-83.hj",y:"33.hi"},3:{4:[],9:""}},9B:{7:a.9B,8:{x:"-82.hh",y:"31.hf"},6:{2:"q6 q7"},5:{2:"9B",x:"-82.hh",y:"31.hf"},3:{4:[],9:""}},9o:{7:a.9o,8:{x:"-82.hg",y:"33.h6"},6:{2:"qb"},5:{2:"9o",x:"-82.hg",y:"33.h6"},3:{4:[],9:""}},9r:{7:a.9r,8:{x:"-81.h5",y:"32.gW"},6:{2:"q9"},5:{2:"9r",x:"-81.h5",y:"32.gW"},3:{4:[],9:""}},9s:{7:a.9s,8:{x:"-82.gX",y:"32.gV"},6:{2:"qp"},5:{2:"9s",x:"-82.gX",y:"32.gV"},3:{4:[],9:""}},9l:{7:a.9l,8:{x:"-83.gU",y:"33.gS"},6:{2:"qq"},5:{2:"9l",x:"-83.gU",y:"33.gS"},3:{4:[],9:""}},9u:{7:a.9u,8:{x:"-84.gT",y:"33.gY"},6:{2:"qG"},5:{2:"9u",x:"-84.gT",y:"33.gY"},3:{4:[],9:""}},9D:{7:a.9D,8:{x:"-83.gZ",y:"31.h4"},6:{2:"qE"},5:{2:"9D",x:"-83.gZ",y:"31.h4"},3:{4:[],9:""}},76:{7:a.76,8:{x:"-82.h3",y:"32.h2"},6:{2:"qI"},5:{2:"76",x:"-82.h3",y:"32.h2"},3:{4:[],9:""}},9z:{7:a.9z,8:{x:"-84.h0",y:"31.h1"},6:{2:"qD"},5:{2:"9z",x:"-84.h0",y:"31.h1"},3:{4:[],9:""}},91:{7:a.91,8:{x:"-81.hk",y:"31.hl"},6:{2:"qC"},5:{2:"91",x:"-81.hk",y:"31.hl"},3:{4:[],9:""}},8Y:{7:a.8Y,8:{x:"-82.hF",y:"33.hE"},6:{2:"qu"},5:{2:"8Y",x:"-82.hF",y:"33.hE"},3:{4:[],9:""}},8V:{7:a.8V,8:{x:"-81.hD",y:"31.hB"},6:{2:"qr"},5:{2:"8V",x:"-81.hD",y:"31.hB"},3:{4:[],9:""}},94:{7:a.94,8:{x:"-83.hC",y:"30.kE"},6:{2:"qw"},5:{2:"94",x:"-83.hC",y:"30.kE"},3:{4:[],9:""}},95:{7:a.95,8:{x:"-84.hH",y:"34.hM"},6:{2:"qx"},5:{2:"95",x:"-84.hH",y:"34.hM"},3:{4:[],9:""}},9f:{7:a.9f,8:{x:"-84.hL",y:"32.hK"},6:{2:"qA"},5:{2:"9f",x:"-84.hL",y:"32.hK"},3:{4:[],9:""}},96:{7:a.96,8:{x:"-83.99",y:"34.hI"},6:{2:"rE"},5:{2:"96",x:"-83.99",y:"34.hI"},3:{4:[],9:""}},9F:{7:a.9F,8:{x:"-84.hJ",y:"32.hA"},6:{2:"rD"},5:{2:"9F",x:"-84.hJ",y:"32.hA"},3:{4:[],9:""}},a6:{7:a.a6,8:{x:"-82.hz",y:"33.hq"},6:{2:"sJ"},5:{2:"a6",x:"-82.hz",y:"33.hq"},3:{4:[],9:""}},a7:{7:a.a7,8:{x:"-81.hr",y:"31.hp"},6:{2:"sE"},5:{2:"a7",x:"-81.hr",y:"31.hp"},3:{4:[],9:""}},a2:{7:a.a2,8:{x:"-84.ho",y:"33.hm"},6:{2:"sp"},5:{2:"a2",x:"-84.ho",y:"33.hm"},3:{4:[],9:""}},a9:{7:a.a9,8:{x:"-84.hn",y:"31.hs"},6:{2:"st"},5:{2:"a9",x:"-84.hn",y:"31.hs"},3:{4:[],9:""}},ab:{7:a.ab,8:{x:"-84.ht",y:"31.hy"},6:{2:"sy"},5:{2:"ab",x:"-84.ht",y:"31.hy"},3:{4:[],9:""}},ac:{7:a.ac,8:{x:"-83.hx",y:"33.hw"},6:{2:"sA"},5:{2:"ac",x:"-83.hx",y:"33.hw"},3:{4:[],9:""}},a0:{7:a.a0,8:{x:"-82.hu",y:"32.hv"},6:{2:"sB"},5:{2:"a0",x:"-82.hu",y:"32.hv"},3:{4:[],9:""}},9O:{7:a.9O,8:{x:"-83.iL",y:"33.iM"},6:{2:"sC"},5:{2:"9O",x:"-83.iL",y:"33.iM"},3:{4:[],9:""}},9W:{7:a.9W,8:{x:"-84.k2",y:"34.k1"},6:{2:"sr"},5:{2:"9W",x:"-84.k2",y:"34.k1"},3:{4:[],9:""}},9Y:{7:a.9Y,8:{x:"-84.k0",y:"32.jY"},6:{2:"ss"},5:{2:"9Y",x:"-84.k0",y:"32.jY"},3:{4:[],9:""}},9T:{7:a.9T,8:{x:"-83.jZ",y:"33.k3"},6:{2:"sR"},5:{2:"9T",x:"-83.jZ",y:"33.k3"},3:{4:[],9:""}},9S:{7:a.9S,8:{x:"-83.k4",y:"33.k9"},6:{2:"sQ"},5:{2:"9S",x:"-83.k4",y:"33.k9"},3:{4:[],9:""}},9L:{7:a.9L,8:{x:"-83.k8",y:"33.k7"},6:{2:"sN"},5:{2:"9L",x:"-83.k8",y:"33.k7"},3:{4:[],9:""}},aa:{7:a.aa,8:{x:"-84.k5",y:"33.k6"},6:{2:"sO"},5:{2:"aa",x:"-84.k5",y:"33.k6"},3:{4:[],9:""}},8S:{7:a.8S,8:{x:"-83.jX",y:"32.jW"},6:{2:"sG"},5:{2:"8S",x:"-83.jX",y:"32.jW"},3:{4:[],9:""}},7G:{7:a.7G,8:{x:"-84.jN",y:"34.jO"},6:{2:"sK"},5:{2:"7G",x:"-84.jN",y:"34.jO"},3:{4:[],9:""}},7I:{7:a.7I,8:{x:"-82.jM",y:"31.jL"},6:{2:"sL"},5:{2:"7I",x:"-82.jM",y:"31.jL"},3:{4:[],9:""}},7D:{7:a.7D,8:{x:"-84.jJ",y:"33.jK"},6:{2:"sl"},5:{2:"7D",x:"-84.jJ",y:"33.jK"},3:{4:[],9:""}},7y:{7:a.7y,8:{x:"-85.jP",y:"34.jQ"},6:{2:"rT"},5:{2:"7y",x:"-85.jP",y:"34.jQ"},3:{4:[],9:""}},7A:{7:a.7A,8:{x:"-83.jV",y:"32.jU"},6:{2:"rR"},5:{2:"7A",x:"-83.jV",y:"32.jU"},3:{4:[],9:""}},8T:{7:a.8T,8:{x:"-83.jT",y:"33.jR"},6:{2:"rU"},5:{2:"8T",x:"-83.jT",y:"33.jR"},3:{4:[],9:""}},7K:{7:a.7K,8:{x:"-85.jS",y:"31.ka"},6:{2:"rV"},5:{2:"7K",x:"-85.jS",y:"31.ka"},3:{4:[],9:""}},7T:{7:a.7T,8:{x:"-83.kb",y:"34.kv"},6:{2:"rX"},5:{2:"7T",x:"-83.kb",y:"34.kv"},3:{4:[],9:""}},7V:{7:a.7V,8:{x:"-84.ku",y:"31.kt"},6:{2:"rP"},5:{2:"7V",x:"-84.ku",y:"31.kt"},3:{4:[],9:""}},7M:{7:a.7M,8:{x:"-82.kr",y:"33.ks"},6:{2:"rO"},5:{2:"7M",x:"-82.kr",y:"33.ks"},3:{4:[],9:""}},7L:{7:a.7L,8:{x:"-84.kw",y:"33.kx"},6:{2:"rI"},5:{2:"7L",x:"-84.kw",y:"33.kx"},3:{4:[],9:""}},7N:{7:a.7N,8:{x:"-84.kC",y:"32.kB"},6:{2:"rH"},5:{2:"7N",x:"-84.kC",y:"32.kB"},3:{4:[],9:""}},7P:{7:a.7P,8:{x:"-81.kA",y:"32.ky"},6:{2:"rG"},5:{2:"7P",x:"-81.kA",y:"32.ky"},3:{4:[],9:""}},7x:{7:a.7x,8:{x:"-84.kz",y:"30.kq"},6:{2:"rF"},5:{2:"7x",x:"-84.kz",y:"30.kq"},3:{4:[],9:""}},7e:{7:a.7e,8:{x:"-84.kp",y:"33.kg"},6:{2:"rJ"},5:{2:"7e",x:"-84.kp",y:"33.kg"},3:{4:[],9:""}},7h:{7:a.7h,8:{x:"-83.kh",y:"34.kf"},6:{2:"rK"},5:{2:"7h",x:"-83.kh",y:"34.kf"},3:{4:[],9:""}},7d:{7:a.7d,8:{x:"-84.ke",y:"32.kc"},6:{2:"rN"},5:{2:"7d",x:"-84.ke",y:"32.kc"},3:{4:[],9:""}},78:{7:a.78,8:{x:"-84.kd",y:"32.ki"},6:{2:"rM"},5:{2:"78",x:"-84.kd",y:"32.ki"},3:{4:[],9:""}},79:{7:a.79,8:{x:"-84.kj",y:"32.ko"},6:{2:"rL"},5:{2:"79",x:"-84.kj",y:"32.ko"},3:{4:[],9:""}},7b:{7:a.7b,8:{x:"-82.kn",y:"33.km"},6:{2:"rZ"},5:{2:"7b",x:"-82.kn",y:"33.km"},3:{4:[],9:""}},7j:{7:a.7j,8:{x:"-82.kk",y:"32.kl"},6:{2:"s0"},5:{2:"7j",x:"-82.kk",y:"32.kl"},3:{4:[],9:""}},7t:{7:a.7t,8:{x:"-84.jI",y:"32.jH"},6:{2:"sf"},5:{2:"7t",x:"-84.jI",y:"32.jH"},3:{4:[],9:""}},7u:{7:a.7u,8:{x:"-82.j6",y:"31.j5"},6:{2:"se"},5:{2:"7u",x:"-82.j6",y:"31.j5"},3:{4:[],9:""}},7v:{7:a.7v,8:{x:"-84.j4",y:"31.j2"},6:{2:"sd"},5:{2:"7v",x:"-84.j4",y:"31.j2"},3:{4:[],9:""}},7q:{7:a.7q,8:{x:"-83.j3",y:"30.j7"},6:{2:"sc"},5:{2:"7q",x:"-83.j3",y:"30.j7"},3:{4:[],9:""}},7l:{7:a.7l,8:{x:"-83.j8",y:"31.jd"},6:{2:"sh"},5:{2:"7l",x:"-83.j8",y:"31.jd"},3:{4:[],9:""}},7n:{7:a.7n,8:{x:"-82.jc",y:"32.jb"},6:{2:"sk"},5:{2:"7n",x:"-82.jc",y:"32.jb"},3:{4:[],9:""}},7o:{7:a.7o,8:{x:"-83.j9",y:"34.ja"},6:{2:"sj"},5:{2:"7o",x:"-83.j9",y:"34.ja"},3:{4:[],9:""}},7X:{7:a.7X,8:{x:"-82.j1",y:"32.j0"},6:{2:"s3"},5:{2:"7X",x:"-82.j1",y:"32.j0"},3:{4:[],9:""}},8B:{7:a.8B,8:{x:"-85.iR",y:"33.iS"},6:{2:"s2"},5:{2:"8B",x:"-85.iR",y:"33.iS"},3:{4:[],9:""}},8E:{7:a.8E,8:{x:"-83.8A",y:"31.iQ"},6:{2:"s1"},5:{2:"8E",x:"-83.8A",y:"31.iQ"},3:{4:[],9:""}},8u:{7:a.8u,8:{x:"-83.iP",y:"32.iN"},6:{2:"s5"},5:{2:"8u",x:"-83.iP",y:"32.iN"},3:{4:[],9:""}},8w:{7:a.8w,8:{x:"-83.iO",y:"34.iT"},6:{2:"s6"},5:{2:"8w",x:"-83.iO",y:"34.iT"},3:{4:[],9:""}},8y:{7:a.8y,8:{x:"-84.iU",y:"32.iZ"},6:{2:"s9"},5:{2:"8y",x:"-84.iU",y:"32.iZ"},3:{4:[],9:""}},8F:{7:a.8F,8:{x:"-85.iY",y:"34.iX"},6:{2:"s8"},5:{2:"8F",x:"-85.iY",y:"34.iX"},3:{4:[],9:""}},8P:{7:a.8P,8:{x:"-83.iV",y:"33.iW"},6:{2:"s7"},5:{2:"8P",x:"-83.iV",y:"33.iW"},3:{4:[],9:""}},8R:{7:a.8R,8:{x:"-82.je",y:"31.jf"},6:{2:"qy"},5:{2:"8R",x:"-82.je",y:"31.jf"},3:{4:[],9:""}},8N:{7:a.8N,8:{x:"-82.jz",y:"33.jy"},6:{2:"p5"},5:{2:"8N",x:"-82.jz",y:"33.jy"},3:{4:[],9:""}},8I:{7:a.8I,8:{x:"-82.jx",y:"32.jv"},6:{2:"o9"},5:{2:"8I",x:"-82.jx",y:"32.jv"},3:{4:[],9:""}},8H:{7:a.8H,8:{x:"-81.jw",y:"31.jA"},6:{2:"o3"},5:{2:"8H",x:"-81.jw",y:"31.jA"},3:{4:[],9:""}},8K:{7:a.8K,8:{x:"-84.jB",y:"32.jG"},6:{2:"oz"},5:{2:"8K",x:"-84.jB",y:"32.jG"},3:{4:[],9:""}},8t:{7:a.8t,8:{x:"-82.jF",y:"32.jE"},6:{2:"oA"},5:{2:"8t",x:"-82.jF",y:"32.jE"},3:{4:[],9:""}},8b:{7:a.8b,8:{x:"-83.jC",y:"34.jD"},6:{2:"ok"},5:{2:"8b",x:"-83.jC",y:"34.jD"},3:{4:[],9:""}},8d:{7:a.8d,8:{x:"-84.ju",y:"34.jt"},6:{2:"nA"},5:{2:"8d",x:"-84.ju",y:"34.jt"},3:{4:[],9:""}},8a:{7:a.8a,8:{x:"-83.jk",y:"31.jl"},6:{2:"nr"},5:{2:"8a",x:"-83.jk",y:"31.jl"},3:{4:[],9:""}},7Y:{7:a.7Y,8:{x:"-82.jj",y:"33.ji"},6:{2:"nT"},5:{2:"7Y",x:"-82.jj",y:"33.ji"},3:{4:[],9:""}},88:{7:a.88,8:{x:"-83.jg",y:"32.jh"},6:{2:"or"},5:{2:"88",x:"-83.jg",y:"32.jh"},3:{4:[],9:""}},8g:{7:a.8g,8:{x:"-83.jm",y:"31.jn"},6:{2:"pA"},5:{2:"8g",x:"-83.jm",y:"31.jn"},3:{4:[],9:""}}}})();1t.1x.18=js(b,a,c){pR 1t.1x.pU({pY:oO,oH:a||{},cA:((4k(b.cA)=="4b")?0:b.cA),4D:c,id:b.id||"18",x:((4k(b.x)=="4b")?0:b.x),y:((4k(b.y)=="4b")?0:b.y),d5:((4k(b.d5)=="4b")?1:b.d5),d4:((4k(b.d4)=="4b")?1:b.d4),d9:((4k(b.d9)=="4b")?1:b.d9),jr:b.jr||[],jq:b.jq||[],jo:b.jo||[],jp:b.jp||cZ,pw:1t.1x.4D.18})};',62,1792,'||text|connector|points|label|tooltip|coords|cpoint|anchor||||0797|6219|8618|1224|3526|5201|2539|9902|0019|9177|6484|9847|2593|279|2353|6131|1838|2298|048|0811|||6537|5849|6592|3392|5498|4981|7807|1828|3525|967|4348|8465|9253|1343|2933|4841|4291|451|8204|3634|5441|4193|6272|2901|6712|2047|4686|9723|6899|6514|5232|9551||7753|474|usa_ga|4301|7993|5279|9528|1719|2769|8157|5991|9221|4412|9504|1083|4049|8127|5366|6516|5364|6208|4357|4565|zingchart|1367|1827|5858|maps|6539|4456|3798|0961|5146|6185|5115|0742|6078|933|4676|9942|8433|3862|4215|0074|3557|6373|6491|9911|0184|4269|9058|7698|8706|7219|8533|818|4544|966|2735|0457|3143|4816|2274|8486|1281|336|0763|4949|5311|9825|0327|5473|5639|7917|6076|1804|1203|164|095|1883|0302|6437|1475|9166|333|5505|0975|2329|8026|0249|6843|3534|0982|7673|5058|0482|2212|7007|9012|0427|5747|1169|4191|9724|0512|2899|5944|8487|6977|5825|0412|6625|6233|736|4355|2956|0795|268|||||||4935||7477|3894|7611|5037|4793|2406|0304|6374|5834|1201|1005|8136|5028|2727|2618|3611|9482|8267|3481|7766|9207|3645|7164|1977|0622|6482|1366|1991|0874|4323|0489|347|2837|0152|9473|1498|9417|9385|9636|0699|1938|9056|4151|2758|4081|0106|4809|692|7588|5945|3316|0348|1673|0261|2703|1749|2242|2892|3996|5145|6844|9823|0756|3371|9143|undefined|1249|2267|8072|106|9231|6459|6493|9122|typeof|059|3558|9615|509|0359|991|6153|5451|9989|9997|2799|4873|4332|3722|7226|4059|8509|2737|data|1389|7664|8497|1687|5014|8353|6678|9003|1247|7883|2671|9277|5005|0325|3447|7422|5998|2484|254|5671|2931|2595|9715|9692|2078||394|8518|9449|8385|8104|2954|8378|7304|1641|3175|671|3689|4161|621|9777|4072|DeKalb|5717|5277|0085|2822|2164|7985|8455|6788|7798|0535|3097|GR|4654|FA|4644|FR|9768|FL|FO|9496|GI|3876|4097|3196|5288|8807|GL|FY|563|GO|GY|FU|CB|BS|CL|CM|BU|BC|1334|BO|BR|1037||7062|CA|9857|CC|CH|CS|CN|CR|BE|BL|BK|BD|2791|5804|AP|1124|8629|BA|0248|BN|BH|BI|BB|BT|4895|6593|BW|0042|CG|DO|9604|DL|6021|DE|2321|DW|9371|DU|DG|EL|EM|8519|EF|EC|3502|EA|DA|9887|CF|8323|4278|CI|CT|CE|CK|CY|7447|CQ|9307|CD|CP|CW|CO|CU|221|EV|LU|6569|SU|TB|3383|TA|4238|ST|SP|6822|2813|SE|2922|TT|6875|TI|4958|TM|TO|8223|TH|9113|8705|TY|TF|TL|035|SM|PO|7972|PL|2376|0028|PI|8716|797|PC|1454|PE|GE|QU|RO|RI|SC|8214|SR|5177|7479|315|RB|7095|RA|6178|TE|WL|4542|||||||7502|2867|WI|4127|WC|WT|8816|WH|7456|7994|WO|7273|9043|7383|5256|5419|4871|8095|1421|1279|9464|8423|2014|WE|TW|4136|UN|211|UP|014|6247lon|TR|1507|7949|TU|WK|7853|WY|WG|0864|WS|0984|8933|WR|747|WN|8182|WA|PA|PU|2399|LO|5411|IR|LC|3972|2977|LI|4246|5959|LW|LP|MD|||2141lon|1936|6342|944|7203|6671|MA|312|HO|2361|6383|255|JN|7931|6986|JE|6427|8125|JK|JO|2604|LA|0414|AT|0403|JA|LE|JS|JD|7829|LN|8541|MR|HY|HL|HE|567|1311|OG|HN|GW|MN|0371|7249|841|OC|NE|726|HA|MU|718|MS|2635|MG|8168|ME|HT|9472|4512|MC|MI|3064|ML|PD|MT|MO|HI|HR|7281|9362|6507|1553|739|5966|1466|2046|1039|8892|8738|658|0973|9309|__|5035|2342|7657|1302|4739|7063|9558|1836|6329|0788|5989|6546|8761|682|0544|1993|8792|5398|6249|4521|729|6633|7313|3262|0467|8246|3754|898|4684|8431|3394|5137|7806|0272|9745|3908|4982|9965|6744|8048|2759|8846|6601|9285|9254|197|9409|2705|7532|0076|4457|2276|0138|1532|7742|8924|865|3691|9606|5309|7838|7117|1335|6811|807|5178|3744|6099|8212|1851|7634|2571|3109|3284|1945|4205|2408|8903|7073|1594|5585|5466|9002|7358|0263|2682|6954|3878|3823|577|7415|3932|5528|4863|3987|132|6867|7071|1704|4316|1413|4973|2265|2947|1452|8604|9581|7751|7454|7643|1147|6014|1881|2289|1084|2235|1961|4182|4206|383|1968|9998|8112|0216|6361|4761|4442|6164|5092|3853|graphid|5003|9864|6068|1256|459|3995|5192|2979|7511|8574|8276|9067|909|5428|7127|0687|0459|4597|9755|7619|6922|109191|0491|8221|null|1179|0162|703|00118|height|width|9592|9943|0468|level|1696|0293|5483|0578|265|9152|0238|1891|2924|5334|2657|7524|5443|8495|3088|9364|5968|0523|6908|0044|5889|9934|1115|1484|1071|6359|4661|2244|8332|5922|4708|6242|438|5936|0316|2429|4293|2945|3283|6548|0818|611|0599|279893|485|0928|004212|8463|3808|2057|3659|0514|7141|7961|2125|7906|4567|984749|6929|103|1375|1742|3275|1813|1539|5224|185|3228|4371|1795|4622|2196|3337|8848|4019|4643|3713|8166|2385|8344|5124|6327|3942|2548|1609|5685|5318|9866|5592|5702|3141|0521|0633|4752|6319|7523|3503|0631|1192|4927|8236|129|0435|8737|2516|391|1859|2461|3964|1411|7492|9111|2486|6438|0012|5857|1092|1806|2518|4818|4699|4489|495|0809|2648|6044|5661|4302|3721|3424|2002|9919|2714|096|5662|186|1586|9549|9505|6452|9659|427|6701|0677|6351|082|9809|5715|9832|689|5356|5475|8659|6907|4168|6155|7228|679|7687|2102|4346|1774|3362|8387|762|7139|8259|6765|1477|6132|7861|8871|038|6195|5921|2744|6931|3128|3292|945|3566|6461|4629|8355|0623|2431|0646|2508|0372|2712|8159|9145|5013|085|1226|7775|5779|7509|6414|5781|5387|5647|3207|0731|3675|0841|4839|3042|3535|3415|1892|1564|7445|2689|1923|8551|4378|4488|6251|0567|0873|9044|2463|1577|3009|9099|9702|3885|5638|5122|0235lat|1434lon|5583lon|6999lat|7916lat|6641lon|0796lat|0663lon|1408lon|7816lat|4629lat|9235lon|0367lat|9615lon|0569lat|2806lon|6016lat|4587lat|6676lon|1595lon|4573lat|5666lon|1321lat|8055lat|4165lon|6338lon|3187lat|6899lon|4875lon|8216lat|0384lat|7309lon|6854lon|4923lat|4811lat|4080lon|1652lat|1939lon|5319lon|1722lat|0125lat|9203lon|2243lat|4830lon|3542lat|7524lat|2702lon|7438lon|7929lat|4528lon|7392|0027lon|1312lat|5242lon|3541lat|0453lon|5702lat|2966lat|1288lon|3196lon|8626lat|1603lat|8862lon|3033lon|5922lat|4901lon|4090lat|2245lat|2314lon|1239lon|2621lat|2131lon|1150lat|8398lon|5322lat|7678lon|2148lon|1559lat|7967lon|7049lat|9043lon|3387lon|3703lat||7111lat||8953lon|3188lat|3766lat|4649lon|3173lat|9987lon|8164lon|6331lat|9602lat|5274lon|2737lat|2110lon|9640lon|3484lat|7371lat|9150lon|7956lat|0230lon|5760lat|6119lon|2273lat|6906lat|4562lon|7881lat|5372lon|2332lat|8749lat|1680lon|2328lon|5082lat|8783lon|4918lon|5903lat|6689lat|9912lon|4271lon|7152lat|0279lon|0341lat|8316lat|2967lon|7306lon|7801lat|7322lat|3027lon|8798lat|3999lat|5716lon|7743lat|9194lon|4364lon|9317lat|9364lon|8644lat|5249lon|7371lon|9155lat|1192lat|3247lon|4591lat|4229lon|0560lat|1701lon|8021lat|7817lat|7424lon|4339lon|9752lat|8502lon|5505lat|ignore|bbox|items|groups|function|8109lat|9672lon|9681lat|9173lon|7968lon|4094lat|6796lon|5535lat|5529lon|7491lon|6457lat|1199lat|7284lon|0449lat|5605lat|2470lon|3877lon|0908lat|3583lat|2108lon|4655lon|4676lat|1855lon|0025lat|3224lat|0218lon|3757lon|2318lat|4740lon|5664lat|8329lon|5113lat|8528lon|8685lon|7906lat|7480lon|5589lat|4357lon|8697lon|9238lat|8819lat|0771lon|8369lat|8712lat|4022lon|0772lat|1987lon|8360lon|5515lat|2631lat|2888lon|0399lat|5337lon|0521lon|0444lat|5713lat|8740lon|7012lat|2807lon|9411lat|0715lon|3585lat|7624lat|7573lon|8833lat|0238lon|6528lat|7487lat|8658lon|6097lon|2643lat|3169lon|1711lat|8328lat|2949lat|4538lon|9026|8700lon|804|6397|5493lat|4422lon|3516lat|7147lon|4984lon|0719lat|3260lat|2495lon|7475lat|2907lon|1772|8542|027|8134|8291|232|8862|5617|_DEFAULTS_|Georgia|9855|715|0129|9909lat|8382lon|0606lat|9567lon|9958lon|8049|9245|3960lat|2903lat|5311lat|4037lat|0816lon|0770lon|4926|6717lon|9293lat|7446lon|0162lat|6999lon|8078lat|2764lat|2286lon|2409lat|7589lat|3273lon|4348lat|5825lon|4455lon|8102|1961lat|9780lon|8675|5725|1728|0905|9011|8025|7696|7666|1069|1947|0576|4631|2726|8002|8948|7609|9199|0185|6984|5703|0194|5813|4903|9647|5615|3252|0852|5169|8189|8682|7839|6108|0382|783|1685|678|1688lon|8268|7109|8643|3666|6053|862|9834|0765|1313|7337|8782|8399|6561|5355|6624|3657|624|7328|876|6287|8697|815|5904|919|8454|5824lat|8435lat|5749lon|9148lat|7052lon|9407lat|8545lon|1894lat|7679lon|5487lat|3576lon|6241lat|4759lon|4735lat|3469lon|2460lat|3624lon|9813lon|9518lat|2635lon|5447lat|4405lat|1660lon|8637lat|2231lon|7689lat|8780lat|5779lon|5035lon|9218lat|7637lon|1579lat|4266lon|3533lat|9825lon|7716lon|7159lat|3472lat|5460lat|7833lon|0070lat|1388lon|9044lat|1377lon|7823lat|1331lon|160928|859696|1138|184951|Wilcox|493493|761863|462159|926172|631944|069935|580372|347144|Whitfield|937125|539753|42777|8588|124869|120309|6067|885553|032678|693108|132015|5848|115584|290094|416816|843265|421541|629664|Wilkes|431413|121061|558464|007573|194542|901067|469916|005129|683517|Wayne|486347|747713|0153|13674|339222|Washington|push|TG|ZC|053504|var|787579|058981|322791|207|889196|White|325988|322956|141136|81816|960397|1868|Wilkinson|2032|94413|55602|840985|714851|26727|152254|Webster|Wheeler|1062|262709|5977|517845|2384|5375|loaderdata|564858|046664|3786|5649|3622|362211|this|1156|0217|712735|751074|8417|8856|1148|0006|002849|167157|6525|4606|647012|7675|498053|9756|Warren|867289|614|0952|570335|3054|7564|0193|7894|7785|356734|216449|9481|8278|8636|9732|5136|319594|5247|4574|990226|0097|13446|400385|2627|20566|290846|map|139|175831|606675|Worth|5868|27686|364491|01077|444201|827751|113751|0663|8793|9951|9348|041187|9396|003013|948079|0772|return|718048|707258|convert|618546|745597|0389|loader|042551|4754|Jasper|Chattahoochee|003|Jackson|Chattooga|Jeff|Davis|Charlton|Jenkins|Chatham|Jefferson|8825|Irwin|Hart|Clarke|Clay|Harris|Haralson|Heard|Henry|Houston|9987|8673|Cherokee|Johnson|Jones|Long|Butts|Calhoun|Lincoln|Camden|Lowndes|Lumpkin|Ware|Bulloch|Macon|Burke|Liberty|Lee|Lanier|Carroll|Lamar|Catoosa|Laurens|1694|258|5507|1758|Candler|Clayton|Hancock|Emanuel|Evans|Dade|Elbert|Dawson|Crisp|Fannin|Floyd|Fayette|Crawford|3986|Effingham|Echols|Dougherty|Decatur|9957|Dodge|Dooly|Douglas|4403|1357|3471|Early|8752|Coweta|Forsyth|6297|Greene|Grady|3949|7009|Coffee|Gwinnett|Clinch|Hall|Habersham|Cobb|Gordon|Colquitt|Columbia|Fulton|Franklin|Cook|5044|Gilmer|Glynn|4113|Glascock|4223|Marion|Madison|Seminole|Screven|Schley|Rockdale|Spalding|Stephens|Talbot|Sumter|Stewart|Richmond|Randolph|Atkinson|Pulaski|Bacon|Polk|Putnam|Quitman|_GROUPS_|Rabun|Bryan|Taliaferro|Tattnall|Turner|Troup|Treutlen|2908|Twiggs|Union|Walton|Walker|Upson|2111|4004|Thomas|Terrell|Telfair|Taylor|6854|Tift|1345|Towns|Toombs|Pike|Appling|Berrien|326|Meriwether|Brooks|Murray|Muscogee|Miller|Hill|Baker|3118|Bleckley|Mitchell|Brantley|Monroe|Montgomery|Morgan|Bibb|McIntosh|5562|Peach|Banks|Barrow|McDuffie|Pickens|Pierce|Baldwin|Oglethorpe|Paulding|0655|Oconee|Newton|Bartow|Ben'.split('|'),0,{}))
| wout/cdnjs | ajax/libs/zingchart/2.1.0/modules/zingchart-maps-usa_ga.min.js | JavaScript | mit | 57,986 |
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("mobx"),require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["mobx","react","react-dom"],t):"object"==typeof exports?exports.mobxReact=t(require("mobx"),require("react"),require("react-dom")):e.mobxReact=t(e.mobx,e.React,e.ReactDOM)}(this,function(e,t,r){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.reactiveComponent=t.PropTypes=t.propTypes=t.inject=t.Provider=t.useStaticRendering=t.trackComponents=t.componentByNodeRegistery=t.renderReporter=t.Observer=t.observer=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},a=arguments,u=r(1);Object.defineProperty(t,"observer",{enumerable:!0,get:function(){return u.observer}}),Object.defineProperty(t,"Observer",{enumerable:!0,get:function(){return u.Observer}}),Object.defineProperty(t,"renderReporter",{enumerable:!0,get:function(){return u.renderReporter}}),Object.defineProperty(t,"componentByNodeRegistery",{enumerable:!0,get:function(){return u.componentByNodeRegistery}}),Object.defineProperty(t,"trackComponents",{enumerable:!0,get:function(){return u.trackComponents}}),Object.defineProperty(t,"useStaticRendering",{enumerable:!0,get:function(){return u.useStaticRendering}});var c=r(9);Object.defineProperty(t,"Provider",{enumerable:!0,get:function(){return o(c).default}});var s=r(6);Object.defineProperty(t,"inject",{enumerable:!0,get:function(){return o(s).default}});var f=r(2),l=o(f),p=r(3),d=o(p),b=r(10),y=n(b),v=void 0;if(v="mobx-react",!l.default)throw new Error(v+" requires the MobX package");if(!d.default)throw new Error(v+" requires React to be available");t.propTypes=y,t.PropTypes=y,t.default=e.exports;t.reactiveComponent=function(){return console.warn("[mobx-react] `reactiveComponent` has been renamed to `observer` and will be removed in 1.1."),observer.apply(null,a)};"object"===("undefined"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__?"undefined":i(__MOBX_DEVTOOLS_GLOBAL_HOOK__))&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobxReact(e.exports,l.default)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){return m.default?m.default.findDOMNode(e):null}function i(e){var t=o(e);t&&j&&j.set(t,e),P.emit({event:"render",renderTime:e.__$mobRenderEnd-e.__$mobRenderStart,totalTime:Date.now()-e.__$mobRenderStart,component:e,node:t})}function a(){if("undefined"==typeof WeakMap)throw new Error("[mobx-react] tracking components is not supported in this browser.");x||(x=!0)}function u(e){_=e}function c(e,t){var r=e[t],n=T[t];r?e[t]=function(){r.apply(this,arguments),n.apply(this,arguments)}:e[t]=n}function s(e,t){if(null==e||null==t||"object"!==("undefined"==typeof e?"undefined":l(e))||"object"!==("undefined"==typeof t?"undefined":l(t)))return e!==t;var r=Object.keys(e);if(r.length!==Object.keys(t).length)return!0;for(var n=void 0,o=r.length-1;n=r[o];o--){var i=t[n];if(i!==e[n])return!0;if(i&&"object"===("undefined"==typeof i?"undefined":l(i))&&!d.default.isObservable(i))return!0}return!1}function f(e,t){if("string"==typeof e)throw new Error("Store names should be provided as array");if(Array.isArray(e))return t?w.default.apply(null,e)(f(t)):function(t){return f(e,t)};var r=e;if(void 0!==r.isInjector&&r.isInjector&&console.warn("Mobx observer: You are trying to use 'observer' on a component that already has 'inject'. Please apply 'observer' before applying 'inject'"),!("function"!=typeof r||r.prototype&&r.prototype.render||r.isReactClass||y.default.Component.isPrototypeOf(r)))return f(y.default.createClass({displayName:r.displayName||r.name,propTypes:r.propTypes,contextTypes:r.contextTypes,getDefaultProps:function(){return r.defaultProps},render:function(){return r.call(this,this.props,this.context)}}));if(!r)throw new Error("Please pass a valid component to 'observer'");var n=r.prototype||r;return["componentWillMount","componentWillUnmount","componentDidMount","componentDidUpdate"].forEach(function(e){c(n,e)}),n.shouldComponentUpdate||(n.shouldComponentUpdate=T.shouldComponentUpdate),r.isMobXReactObserver=!0,r}Object.defineProperty(t,"__esModule",{value:!0}),t.Observer=t.renderReporter=t.componentByNodeRegistery=void 0;var l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};t.trackComponents=a,t.useStaticRendering=u,t.observer=f;var p=r(2),d=n(p),b=r(3),y=n(b),v=r(4),m=n(v),h=r(5),O=n(h),g=r(6),w=n(g),x=!1,_=!1,j=t.componentByNodeRegistery="undefined"!=typeof WeakMap?new WeakMap:void 0,P=t.renderReporter=new O.default,T={componentWillMount:function(){function e(e){var t=this[e],r=new d.default.Atom("reactive "+e);Object.defineProperty(this,e,{configurable:!0,enumerable:!0,get:function(){return r.reportObserved(),t},set:function(e){s(t,e)?(t=e,o=!0,r.reportChanged(),o=!1):t=e}})}var t=this;if(_!==!0){var r=this.displayName||this.name||this.constructor&&(this.constructor.displayName||this.constructor.name)||"<component>",n=this._reactInternalInstance&&this._reactInternalInstance._rootNodeID,o=!1;e.call(this,"props"),e.call(this,"state");var i=this.render.bind(this),a=null,u=!1,c=function(){return a=new d.default.Reaction(r+"#"+n+".render()",function(){if(!u&&(u=!0,"function"==typeof t.componentWillReact&&t.componentWillReact(),t.__$mobxIsUnmounted!==!0)){var e=!0;try{o||y.default.Component.prototype.forceUpdate.call(t),e=!1}finally{e&&a.dispose()}}}),f.$mobx=a,t.render=f,f()},f=function(){u=!1;var e=void 0;return a.track(function(){x&&(t.__$mobRenderStart=Date.now()),e=d.default.extras.allowStateChanges(!1,i),x&&(t.__$mobRenderEnd=Date.now())}),e};this.render=c}},componentWillUnmount:function(){if(_!==!0&&(this.render.$mobx&&this.render.$mobx.dispose(),this.__$mobxIsUnmounted=!0,x)){var e=o(this);e&&j&&j.delete(e),P.emit({event:"destroy",component:this,node:e})}},componentDidMount:function(){x&&i(this)},componentDidUpdate:function(){x&&i(this)},shouldComponentUpdate:function(e,t){return _&&console.warn("[mobx-react] It seems that a re-rendering of a React component is triggered while in static (server-side) mode. Please make sure components are rendered only once server-side."),this.state!==t||s(this.props,e)}},S=t.Observer=f(function(e){var t=e.children;return t()});S.propTypes={children:y.default.PropTypes.func.isRequired}},function(t,r){t.exports=e},function(e,r){e.exports=t},function(e,t){e.exports=r},function(e,t){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=function(){function e(){r(this,e),this.listeners=[]}return n(e,[{key:"on",value:function(e){var t=this;return this.listeners.push(e),function(){var r=t.listeners.indexOf(e);r!==-1&&t.listeners.splice(r,1)}}},{key:"emit",value:function(e){this.listeners.forEach(function(t){return t(e)})}}]),e}();t.default=o},function(e,t,r){(function(e){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var r=s.default.createClass({displayName:"MobXStoreInjector",render:function(){var r=this,n={};for(var o in this.props)this.props.hasOwnProperty(o)&&(n[o]=this.props[o]);var i=e(this.context.mobxStores||{},n,this.context)||{};for(var a in i)n[a]=i[a];return n.ref=function(e){r.wrappedInstance=e},s.default.createElement(t,n)}});return r.isInjector=!0,r.contextTypes={mobxStores:c.PropTypes.object},r.wrappedComponent=t,i(r,t),(0,l.default)(r,t),r}function i(t,r){"undefined"!=typeof e&&e.env&&"production"!==e.env.NODE_ENV&&["propTypes","defaultProps","contextTypes"].forEach(function(e){var n=t[e];Object.defineProperty(t,e,{set:function(t){var n=r.displayName||r.name;console.warn("Mobx Injector: you are trying to attach "+e+" to HOC instead of "+n+". Use `wrappedComponent` property.")},get:function(){return n},configurable:!0})})}function a(e){return function(t,r){return e.forEach(function(e){if(!(e in r)){if(!(e in t))throw new Error("MobX observer: Store '"+e+"' is not available! Make sure it is provided by some Provider");r[e]=t[e]}}),r}}function u(){var e=void 0;if("function"==typeof arguments[0])e=arguments[0];else{for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];e=a(t)}return function(t){return o(e,t)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var c=r(3),s=n(c),f=r(8),l=n(f)}).call(t,r(7))},function(e,t){function r(e){return c===setTimeout?setTimeout(e,0):c.call(null,e,0)}function n(e){s===clearTimeout?clearTimeout(e):s.call(null,e)}function o(){d&&l&&(d=!1,l.length?p=l.concat(p):b=-1,p.length&&i())}function i(){if(!d){var e=r(o);d=!0;for(var t=p.length;t;){for(l=p,p=[];++b<t;)l&&l[b].run();b=-1,t=p.length}l=null,d=!1,n(e)}}function a(e,t){this.fun=e,this.array=t}function u(){}var c,s,f=e.exports={};!function(){try{c=setTimeout}catch(e){c=function(){throw new Error("setTimeout is not defined")}}try{s=clearTimeout}catch(e){s=function(){throw new Error("clearTimeout is not defined")}}}();var l,p=[],d=!1,b=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];p.push(new a(e,t)),1!==p.length||d||r(i)},a.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=u,f.addListener=u,f.once=u,f.off=u,f.removeListener=u,f.removeAllListeners=u,f.emit=u,f.binding=function(e){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(e){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},function(e,t){"use strict";var r={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0},o="function"==typeof Object.getOwnPropertySymbols;e.exports=function(e,t,i){if("string"!=typeof t){var a=Object.getOwnPropertyNames(t);o&&(a=a.concat(Object.getOwnPropertySymbols(t)));for(var u=0;u<a.length;++u)if(!(r[a[u]]||n[a[u]]||i&&i[a[u]]))try{e[a[u]]=t[a[u]]}catch(e){}}return e}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),c=r(3),s=n(c),f={children:!0,key:!0,ref:!0},l=function(e){function t(){return o(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return a(t,e),u(t,[{key:"render",value:function(){return s.default.Children.only(this.props.children)}},{key:"getChildContext",value:function(){var e={},t=this.context.mobxStores;if(t)for(var r in t)e[r]=t[r];for(var n in this.props)f[n]||(e[n]=this.props[n]);return{mobxStores:e}}},{key:"componentWillReceiveProps",value:function(e){Object.keys(e).length!==Object.keys(this.props).length&&console.warn("MobX Provider: The set of provided stores has changed. Please avoid changing stores as the change might not propagate to all children");for(var t in e)f[t]||this.props[t]===e[t]||console.warn("MobX Provider: Provided store '"+t+"' has changed. Please avoid replacing stores as the change might not propagate to all children")}}]),t}(c.Component);l.contextTypes={mobxStores:c.PropTypes.object},l.childContextTypes={mobxStores:c.PropTypes.object.isRequired},t.default=l},function(e,t,r){"use strict";function n(e){function t(t,r,n,o,i,a){for(var u=arguments.length,c=Array(u>6?u-6:0),s=6;s<u;s++)c[s-6]=arguments[s];return(0,f.untracked)(function(){if(o=o||"<<anonymous>>",a=a||n,null==r[n]){if(t){var u=null===r[n]?"null":"undefined";return new Error("The "+i+" `"+a+"` is marked as required in `"+o+"`, but its value is `"+u+"`.")}return null}return e.apply(void 0,[r,n,o,i,a].concat(c))})}var r=t.bind(null,!1);return r.isRequired=t.bind(null,!0),r}function o(e,t){return"symbol"===e||("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}function i(e){var t="undefined"==typeof e?"undefined":s(e);return Array.isArray(e)?"array":e instanceof RegExp?"object":o(t,e)?"symbol":t}function a(e){var t=i(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function u(e,t){return n(function(r,n,o,u,c){return(0,f.untracked)(function(){if(e&&i(r[n])===t.toLowerCase())return null;var u=void 0;switch(t){case"Array":u=f.isObservableArray;break;case"Object":u=f.isObservableObject;break;case"Map":u=f.isObservableMap;break;default:throw new Error("Unexpected mobxType: "+t)}var s=r[n];if(!u(s)){var l=a(s),p=e?" or javascript `"+t.toLowerCase()+"`":"";return new Error("Invalid prop `"+c+"` of type `"+l+"` supplied to `"+o+"`, expected `mobx.Observable"+t+"`"+p+".")}return null})})}function c(e,t){return n(function(r,n,o,i,a){for(var c=arguments.length,s=Array(c>5?c-5:0),l=5;l<c;l++)s[l-5]=arguments[l];return(0,f.untracked)(function(){if("function"!=typeof t)return new Error("Property `"+a+"` of component `"+o+"` has invalid PropType notation.");var c=u(e,"Array")(r,n,o);if(c instanceof Error)return c;for(var f=r[n],l=0;l<f.length;l++)if(c=t.apply(void 0,[f,l,o,i,a+"["+l+"]"].concat(s)),c instanceof Error)return c;return null})})}Object.defineProperty(t,"__esModule",{value:!0}),t.objectOrObservableObject=t.arrayOrObservableArrayOf=t.arrayOrObservableArray=t.observableObject=t.observableMap=t.observableArrayOf=t.observableArray=void 0;var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},f=r(2);t.observableArray=u(!1,"Array"),t.observableArrayOf=c.bind(null,!1),t.observableMap=u(!1,"Map"),t.observableObject=u(!1,"Object"),t.arrayOrObservableArray=u(!0,"Array"),t.arrayOrObservableArrayOf=c.bind(null,!0),t.objectOrObservableObject=u(!0,"Object")}])});
//# sourceMappingURL=index.min.js.map | menuka94/cdnjs | ajax/libs/mobx-react/4.0.0-beta.1/index.min.js | JavaScript | mit | 15,452 |
/*
All of the code within the ZingChart software is developed and copyrighted by PINT, Inc., and may not be copied,
replicated, or used in any other software or application without prior permission from PINT. All usage must coincide with the
ZingChart End User License Agreement which can be requested by email at support@zingchart.com.
Build 2.2.2
*/
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('k.2d("l-1B");5(k.l){k.l.2c=I(P){6 q=P.v||("1B"+2b(10+2a*O.2e(),10));6 1o=P.1C||"";6 7=P.2f||{v:"v",z:"z",A:"A"};6 1I=P.1i||[];6 L=P.11||{};5(1o===""){5(P.R){P.R.X()}}r.2j.2i({t:"2h",1C:1o,2g:I(){},u:"",29:I(){5(P.R){P.R.X()}},28:I(1c){6 F;6 Q={};1G{Q=23.22(1c)}1J(1E){1G{Q=20("("+1c+")")}1J(1E){}}5(!k.l[q]){k.l[q]={}}5(!k.l.u[q]){k.l.u[q]={24:{},1z:k.l.1z}}6 Y={};6 n=[19.14,19.14,-19.14,-19.14];6 1g,1e,13,8,m;6 C=Q.27||{1t:[1,1],1v:[0,0]};6 G=Q.W||[];6 1f=Q.26||{};6 U=I(C,1H){6 x=0,y=0;1p 1H.1F(I(M){M=M.2l();M[0]=(x+=M[0])*C.1t[0]+C.1v[0];M[1]=(y+=M[1])*C.1t[1]+C.1v[1];1p M})};s(1g 1U 1f){1e=1f[1g];13=1e.2p||[];s(6 i=0,1M=13.o;i<1M;i++){6 h=13[i];6 16=h.2z||{};8=q.2B()+i;7.v=(7.v 1d 1h)?7.v:[7.v];7.A=(7.A 1d 1h)?7.A:[7.A];7.z=(7.z 1d 1h)?7.z:[7.z];s(m=0;m<7.v.o;m++){8=h[7.v[m]]||8;8=16[7.v[m]]||8}5(r.N(8)===D||8===""){8=q+"2y"+i}8=(""+8).2o(/[^a-2m-9]/2n,"2r");5(r.2s(1I,8)!==-1){2w}6 K="";s(m=0;m<7.A.o;m++){5(J(7.A[m])==="I"){K=7.A[m].X(K)}B{K=h[7.A[m]]||K;K=16[7.A[m]]||K}}6 H="";s(m=0;m<7.z.o;m++){5(J(7.z[m])==="I"){H=7.z[m].X(H)}B{H=h[7.z[m]]||H;H=16[7.z[m]]||H}}Y[8]=[];6 E="1a";6 b=[],e,V,g,a,m;5(h.t==="1D"){e=h.W||[]}B{5(h.t==="1x"){V=h.W||[]}B{5(h.t==="1Y"){E="Z";b=[h.2t]||[]}B{5(h.t==="1y"){E="S";e=h.W||[]}B{5(h.t==="1A"){E="S";e=h.W||[]}}}}}5(h.t==="1D"){s(g=0;g<e.o;g++){6 w=e[g];s(a=0;a<w.o;a++){6 f=(w[a]>=0)?G[w[a]]:G[-w[a]-1];f=U(C,f);5(w[a]<0){f.18()}b=b.17(f)}5(g!==e.o-1){b.12(D)}}}B{5(h.t==="1y"){s(a=0;a<e.o;a++){6 f=(e[a]>=0)?G[e[a]]:G[-e[a]-1];f=U(C,f);5(e[a]<0){f.18()}b=b.17(f)}}B{5(h.t==="1x"){s(m=0;m<V.o;m++){e=V[m];s(g=0;g<e.o;g++){6 w=e[g];s(a=0;a<w.o;a++){6 f=(w[a]>=0)?G[w[a]]:G[-w[a]-1];f=U(C,f);5(w[a]<0){f.18()}b=b.17(f)}5(g!==e.o-1){b.12(D)}}5(m!==V.o-1){b.12(D)}}}B{5(h.t==="1A"){s(a=0;a<e.o;a++){6 f=(e[a]>=0)?G[e[a]]:G[-e[a]-1];f=U(C,f);5(e[a]<0){f.18()}b=b.17(f);5(a<e.o-1){b.12(D)}}}B{5(h.t==="1Y"){b=U(C,b)}}}}}s(6 j=0,1Z=b.o;j<1Z;j++){Y[8].12(b[j]);5(b[j]){n[0]=O.1W(n[0],b[j][0]);n[2]=O.1s(n[2],b[j][0]);n[1]=O.1W(n[1],b[j][1]);n[3]=O.1s(n[3],b[j][1])}}6 1P=K||H;6 15=0;5(E==="S"){15=2}B{5(E==="Z"){15=4}}5(Y[8].o){k.l.u[q][8]={2q:15,t:E,1m:Y[8],2A:{1X:H},2k:{1X:1P},11:{}};5(E==="1a"&&r.N(L.1a)!==D){r.1w(L.1a,k.l.u[q][8]["11"])}5(E==="S"&&r.N(L.S)!==D){r.1w(L.S,k.l.u[q][8]["11"])}5(E==="Z"&&r.N(L.Z)!==D){r.1w(L.Z,k.l.u[q][8]["11"])}}}6 1q=n[2]-n[0];6 1r=n[3]-n[1];6 1u=10,1R=1u*1r/1q;6 1S=1u/1q;6 1O=1R/1r;6 1V=O.1s(r.1b(n[0]),r.1b(n[1]),r.1b(n[2]),r.1b(n[3]));5(1V>21){s(8 1U k.l.u[q]){5(r.N(F=k.l.u[q][8]["1m"])!==D){s(6 c=0,1T=k.l.u[q][8]["1m"].o;c<1T;c++){5(r.N(F[c])!==D){F[c][0]=(F[c][0]-n[0])*1S;F[c][1]=(F[c][1]-n[1])*1O}}}}}}k.l.25(q);k.l[q]=I(p,1Q,d){1p k.l.2C({2x:2v,2u:1Q||{},1l:((J(p.1l)==="T")?0:p.1l),u:d,v:p.v||q,x:((J(p.x)==="T")?0:p.x),y:((J(p.y)==="T")?0:p.y),1n:((J(p.1n)==="T")?1:p.1n),1k:((J(p.1k)==="T")?1:p.1k),1j:((J(p.1j)==="T")?1:p.1j),1N:p.1N||[],1K:p.1K||[],1i:p.1i||[],1L:p.1L||D,1F:k.l.u[q]})};5(P.R){P.R.X()}}})}};',62,163,'|||||if|var|oMappings|A7V|||aCoordinates|||aArcGroups|aArcCoords||oGeometry|||zingchart|maps||aBBox|length||A41|ZC|for|type|data|id|aArcGroup|||name|abbr|else|GF|null|A9||aArcs|sItemName|function|typeof|sItemAbbr||aPosition|_n_|Math||D0|callback|line|undefined|decodeArc|aMultiArcGroups|arcs|call|_COORDS_|point||style|push|aGeometries|MAX_VALUE|iSort|oProperties|concat|reverse|Number|poly|_a_|IR|instanceof|BU|oObjects|FV|Array|ignore|level|height|graphid|coords|width|E1|return|iDiffLon|iDiffLat|max|scale|iMaxLon|translate|_cp_|MultiPolygon|LineString|_DEFAULTS_|MultiLineString|topojson|url|Polygon|HY|map|try|aArc|A9J|catch|items|bbox|A1|groups|fRatioLat|sLabelText|ld|iMaxLat|fRatioLon|cLen|in|iMax|min|text|Point|IO|eval|180|parse|JSON|_GROUPS_|upgrade|objects|transform|success|error|89|parseInt|loadTopoJSON|setModule|random|mappings|beforeSend|GET|ajax|A3|label|slice|z0|gi|replace|geometries|sort|_|AK|coordinates|loaderdata|this|continue|loader|_item_|properties|tooltip|toUpperCase|convert'.split('|'),0,{}))
| sufuf3/cdnjs | ajax/libs/zingchart/2.2.2/modules/zingchart-maps-topojson.min.js | JavaScript | mit | 4,625 |
// Type definitions for Lovefield v2.0.62
// Project: http://google.github.io/lovefield/
// Definitions by: freshp86 <https://github.com/freshp86>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../es6-promise/es6-promise.d.ts"/>
declare module lf {
export enum Order { ASC, DESC }
export enum Type {
ARRAY_BUFFER,
BOOLEAN,
DATE_TIME,
INTEGER,
NUMBER,
OBJECT,
STRING
}
export enum ConstraintAction {
RESTRICT,
CASCADE
}
export enum ConstraintTiming {
IMMEDIATE,
DEFERRABLE
}
export interface Binder {
getIndex(): number
}
export interface Predicate {}
export interface Row {}
type ValueLiteral = string|number|boolean|Date;
export interface PredicateProvider {
eq(operand: ValueLiteral|schema.Column|Binder): Predicate
neq(operand: ValueLiteral|schema.Column|Binder): Predicate
lt(operand: ValueLiteral|schema.Column|Binder): Predicate
lte(operand: ValueLiteral|schema.Column|Binder): Predicate
gt(operand: ValueLiteral|schema.Column|Binder): Predicate
gte(operand: ValueLiteral|schema.Column|Binder): Predicate
match(operand: RegExp|Binder): Predicate
between(from: ValueLiteral|Binder, to: ValueLiteral|Binder): Predicate
in(values: Binder|Array<ValueLiteral>): Predicate
isNull(): Predicate
isNotNull(): Predicate
}
function bind(index: number): Binder;
export interface Transaction {
attach(query: query.Builder): Promise<Array<Object>>
begin(scope: Array<schema.Table>): Promise<void>
commit(): Promise<void>
exec(queries: Array<query.Builder>): Promise<Array<Array<Object>>>
rollback(): Promise<void>
}
export enum TransactionType { READ_ONLY, READ_WRITE }
export interface Database {
close(): void
createTransaction(type?: TransactionType): Transaction
delete(): query.Delete
export(): Promise<Object>
getSchema(): schema.Database
import(data: Object): Promise<void>
insertOrReplace(): query.Insert
insert(): query.Insert
observe(query: query.Select, callback: Function): void
select(...columns: schema.Column[]): query.Select
unobserve(query: query.Select, callback: Function): void
update(table: schema.Table): query.Update
}
module query {
export interface Builder {
bind(...values: any[]): Builder
exec(): Promise<Array<Object>>
explain(): string
toSql(): string
}
export interface Delete extends Builder {
from(table: schema.Table): Delete
where(predicate: Predicate): Delete
}
export interface Insert extends Builder {
into(table: schema.Table): Insert
values(rows: Array<Row>|Binder|Array<Binder>): Insert
}
export interface Select extends Builder {
from(...tables: schema.Table[]): Select
groupBy(...columns: schema.Column[]): Select
innerJoin(table: schema.Table, predicate: Predicate): Select
leftOuterJoin(table: schema.Table, predicate: Predicate): Select
limit(numberOfRows: Binder|number): Select
orderBy(column: schema.Column, order?: Order): Select
skip(numberOfRows: Binder|number): Select
where(predicate: Predicate): Select
}
export interface Update extends Builder {
set(column: schema.Column, value: any): Update
where(predicate: Predicate): Update
}
} // module query
module raw {
export interface BackStore {
getRawDBInstance(): any
getRawTransaction(): any
dropTable(tableName: string): Promise<void>
addTableColumn(
tableName: string, columnName: string,
defaultValue: string|boolean|number|Date|ArrayBuffer): Promise<void>
dropTableColumn(tableName: string, columnName:string): Promise<void>
renameTableColumn(
tableName: string, oldColumnName: string,
newColumnName:string) : Promise<void>
createRow(payload: Object): Row
getVersion(): number
dump(): Array<Object>
}
} // module raw
module schema {
export enum DataStoreType {
FIREBASE,
INDEXED_DB,
LOCAL_STORAGE,
MEMORY,
WEB_SQL
}
export interface DatabasePragma {
enableBundledMode: boolean
}
export interface Database {
name(): string
pragma(): DatabasePragma
tables(): Array<schema.Table>
table(tableName: string): schema.Table
version(): number
}
export interface Column extends PredicateProvider {
as(name: string): Column
getName(): string
getNormalizedName(): string
}
export interface Table {
as(name: string): Table
createRow(value: Object): Row
getName(): string
}
export interface ConnectOptions {
onUpgrade?: (rawDb: raw.BackStore) => Promise<void>
storeType?: DataStoreType
webSqlDbSize?: number
// TODO(dpapad): firebase?
}
export interface Builder {
connect(options: ConnectOptions): Promise<lf.Database>
createTable(tableName: string): TableBuilder
getSchema(): Database
setPragma(pragma: DatabasePragma): void
}
export interface IndexedColumn {
autoIncrement: boolean
name: string
order: Order
}
type RawForeignKeySpec = {
local: string
ref: string
action: lf.ConstraintAction
timing: lf.ConstraintAction
}
export interface TableBuilder {
addColumn(name: string, type: lf.Type): TableBuilder
addForeignKey(name: string, spec: RawForeignKeySpec): TableBuilder
addIndex(
name: string, columns: Array<string>|Array<IndexedColumn>,
unique?: boolean, order?: Order): TableBuilder
addNullable(columns: Array<string>): TableBuilder
addPrimaryKey(
columns: Array<string>|Array<IndexedColumn>,
autoInc?: boolean): TableBuilder
addUnique(name: string, columns: Array<string>): TableBuilder
}
function create(dbName: string, dbVersion: number): Builder
} // module schema
module op {
function and(...args: Predicate[]): Predicate;
function not(operand: Predicate): Predicate;
function or(...args: Predicate[]): Predicate;
} // module op
module fn {
function avg(column: schema.Column): schema.Column
function count(column?: schema.Column): schema.Column
function distinct(column: schema.Column): schema.Column
function geomean(column: schema.Column): schema.Column
function max(column: schema.Column): schema.Column
function min(column: schema.Column): schema.Column
function stddev(column: schema.Column): schema.Column
function sum(column: schema.Column): schema.Column
} // module fn
} // module lf
declare module 'lf' {
export = lf;
}
| drinchev/DefinitelyTyped | lovefield/lovefield.d.ts | TypeScript | mit | 6,778 |
# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20131206080416) do
create_table "cylons", :force => true do |t|
t.string "name"
t.string "email"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "ducks", :force => true do |t|
t.string "name"
t.string "email"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "mailboxer_conversation_opt_outs", :force => true do |t|
t.integer "unsubscriber_id"
t.string "unsubscriber_type"
t.integer "conversation_id"
end
create_table "mailboxer_conversations", :force => true do |t|
t.string "subject", :default => ""
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "mailboxer_notifications", :force => true do |t|
t.string "type"
t.text "body"
t.string "subject", :default => ""
t.integer "sender_id"
t.string "sender_type"
t.integer "notified_object_id"
t.string "notified_object_type"
t.string "notification_code"
t.integer "conversation_id"
t.boolean "draft", :default => false
t.string "attachment"
t.datetime "updated_at", :null => false
t.datetime "created_at", :null => false
t.boolean "global", :default => false
t.datetime "expires"
end
add_index "mailboxer_notifications", ["conversation_id"], :name => "index_mailboxer_notifications_on_conversation_id"
create_table "mailboxer_receipts", :force => true do |t|
t.integer "receiver_id"
t.string "receiver_type"
t.integer "notification_id", :null => false
t.boolean "is_read", :default => false
t.boolean "trashed", :default => false
t.boolean "deleted", :default => false
t.string "mailbox_type", :limit => 25
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
add_index "mailboxer_receipts", ["notification_id"], :name => "index_mailboxer_receipts_on_notification_id"
create_table "users", :force => true do |t|
t.string "name"
t.string "email"
t.datetime "created_at"
t.datetime "updated_at"
end
end
| div/mailboxer | spec/dummy/db/schema.rb | Ruby | mit | 3,203 |
package provider
import (
stdprometheus "github.com/prometheus/client_golang/prometheus"
"github.com/go-kit/kit/metrics"
"github.com/go-kit/kit/metrics/prometheus"
)
type prometheusProvider struct {
namespace string
subsystem string
}
// NewPrometheusProvider returns a Provider that produces Prometheus metrics.
// Namespace and subsystem are applied to all produced metrics.
func NewPrometheusProvider(namespace, subsystem string) Provider {
return &prometheusProvider{
namespace: namespace,
subsystem: subsystem,
}
}
// NewCounter implements Provider via prometheus.NewCounterFrom, i.e. the
// counter is registered. The metric's namespace and subsystem are taken from
// the Provider. Help is set to the name of the metric, and no const label names
// are set.
func (p *prometheusProvider) NewCounter(name string) metrics.Counter {
return prometheus.NewCounterFrom(stdprometheus.CounterOpts{
Namespace: p.namespace,
Subsystem: p.subsystem,
Name: name,
Help: name,
}, []string{})
}
// NewGauge implements Provider via prometheus.NewGaugeFrom, i.e. the gauge is
// registered. The metric's namespace and subsystem are taken from the Provider.
// Help is set to the name of the metric, and no const label names are set.
func (p *prometheusProvider) NewGauge(name string) metrics.Gauge {
return prometheus.NewGaugeFrom(stdprometheus.GaugeOpts{
Namespace: p.namespace,
Subsystem: p.subsystem,
Name: name,
Help: name,
}, []string{})
}
// NewGauge implements Provider via prometheus.NewSummaryFrom, i.e. the summary
// is registered. The metric's namespace and subsystem are taken from the
// Provider. Help is set to the name of the metric, and no const label names are
// set. Buckets are ignored.
func (p *prometheusProvider) NewHistogram(name string, _ int) metrics.Histogram {
return prometheus.NewSummaryFrom(stdprometheus.SummaryOpts{
Namespace: p.namespace,
Subsystem: p.subsystem,
Name: name,
Help: name,
}, []string{})
}
// Stop implements Provider, but is a no-op.
func (p *prometheusProvider) Stop() {}
| Hyperpilotio/goddd | vendor/github.com/go-kit/kit/metrics/provider/prometheus.go | GO | mit | 2,091 |
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.co=e()}}(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){var toString=Object.prototype.toString;var slice=Array.prototype.slice;module.exports=co;function co(fn){var isGenFun=isGeneratorFunction(fn);return function(done){var ctx=this;var gen=fn;if(isGenFun){var args=slice.call(arguments),len=args.length;var hasCallback=len&&"function"==typeof args[len-1];done=hasCallback?args.pop():error;gen=fn.apply(this,args)}else{done=done||error}next();function next(err,res){var ret;if(arguments.length>2)res=slice.call(arguments,1);if(err){try{ret=gen.throw(err)}catch(e){return done(e)}}if(!err){try{ret=gen.next(res)}catch(e){return done(e)}}if(ret.done)return done(null,ret.value);ret.value=toThunk(ret.value,ctx);if("function"==typeof ret.value){var called=false;try{ret.value.call(ctx,function(){if(called)return;called=true;next.apply(ctx,arguments)})}catch(e){setImmediate(function(){if(called)return;called=true;next(e)})}return}next(new Error("yield a function, promise, generator, array, or object"))}}}function toThunk(obj,ctx){if(Array.isArray(obj)){return objectToThunk.call(ctx,obj)}if(isGeneratorFunction(obj)){return co(obj.call(ctx))}if(isGenerator(obj)){return co(obj)}if(isPromise(obj)){return promiseToThunk(obj)}if("function"==typeof obj){return obj}if(obj&&"object"==typeof obj){return objectToThunk.call(ctx,obj)}return obj}function objectToThunk(obj){var ctx=this;return function(done){var keys=Object.keys(obj);var pending=keys.length;var results=new obj.constructor;var finished;if(!pending){setImmediate(function(){done(null,results)});return}for(var i=0;i<keys.length;i++){run(obj[keys[i]],keys[i])}function run(fn,key){if(finished)return;try{fn=toThunk(fn,ctx);if("function"!=typeof fn){results[key]=fn;return--pending||done(null,results)}fn.call(ctx,function(err,res){if(finished)return;if(err){finished=true;return done(err)}results[key]=res;--pending||done(null,results)})}catch(err){finished=true;done(err)}}}}function promiseToThunk(promise){return function(fn){promise.then(function(res){fn(null,res)},fn)}}function isPromise(obj){return obj&&"function"==typeof obj.then}function isGenerator(obj){return obj&&"function"==typeof obj.next&&"function"==typeof obj.throw}function isGeneratorFunction(obj){return obj&&obj.constructor&&"GeneratorFunction"==obj.constructor.name}function error(err){if(!err)return;setImmediate(function(){throw err})}},{}]},{},[1])(1)}); | taydakov/cdnjs | ajax/libs/co/3.0.4/index.min.js | JavaScript | mit | 3,132 |
/**
* Module dependencies.
*/
var Suite = require('../suite')
, Test = require('../test');
/**
* BDD-style interface:
*
* describe('Array', function(){
* describe('#indexOf()', function(){
* it('should return -1 when not present', function(){
*
* });
*
* it('should return the index when present', function(){
*
* });
* });
* });
*
*/
module.exports = function(suite){
var suites = [suite];
suite.on('pre-require', function(context){
// noop variants
context.xdescribe = function(){};
context.xit = function(){};
/**
* Execute before running tests.
*/
context.before = function(fn){
suites[0].beforeAll(fn);
};
/**
* Execute after running tests.
*/
context.after = function(fn){
suites[0].afterAll(fn);
};
/**
* Execute before each test case.
*/
context.beforeEach = function(fn){
suites[0].beforeEach(fn);
};
/**
* Execute after each test case.
*/
context.afterEach = function(fn){
suites[0].afterEach(fn);
};
/**
* Describe a "suite" with the given `title`
* and callback `fn` containing nested suites
* and/or tests.
*/
context.describe = function(title, fn){
var suite = Suite.create(suites[0], title);
suites.unshift(suite);
fn();
suites.shift();
};
/**
* Describe a specification or test-case
* with the given `title` and callback `fn`
* acting as a thunk.
*/
context.it = function(title, fn){
suites[0].addTest(new Test(title, fn));
};
});
};
| tengyifei/cdnjs | ajax/libs/mocha/1.0.2/package/lib/interfaces/bdd.js | JavaScript | mit | 1,676 |
!function(){var shim=function(){window.requestDraw=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}}()}({}),constants=function(){var t=Math.PI;return{CROSS:"crosshair",HAND:"pointer",MOVE:"move",TEXT:"text",WAIT:"wait",HALF_PI:t/2,PI:t,QUARTER_PI:t/4,TAU:2*t,TWO_PI:2*t,DEGREES:"degrees",RADIANS:"radians",CORNER:"corner",CORNERS:"corners",RADIUS:"radius",RIGHT:"right",LEFT:"left",CENTER:"center",POINTS:"points",LINES:"lines",TRIANGLES:"triangles",TRIANGLE_FAN:"triangles_fan",TRIANGLE_STRIP:"triangles_strip",QUADS:"quads",QUAD_STRIP:"quad_strip",CLOSE:"close",OPEN:"open",CHORD:"chord",PIE:"pie",PROJECT:"square",SQUARE:"butt",ROUND:"round",BEVEL:"bevel",MITER:"miter",RGB:"rgb",HSB:"hsb",AUTO:"auto",NORMAL:"normal",ITALIC:"italic",BOLD:"bold"}}({}),core=function(t,e,n){"use strict";var n=n,o=function(t,e){var r=this;if(this.startTime=(new Date).getTime(),this.preload_count=0,this.isGlobal=!1,this.frameCount=0,this._frameRate=0,this._lastFrameTime=0,this._targetFrameRate=60,this.focused=!0,this.displayWidth=screen.width,this.displayHeight=screen.height,this.shapeKind=null,this.shapeInited=!1,this.mouseX=0,this.mouseY=0,this.pmouseX=0,this.pmouseY=0,this.mouseButton=0,this.key="",this.keyCode=0,this.keyDown=!1,this.touchX=0,this.touchY=0,this.pWriters=[],this._textLeading=15,this._textFont="sans-serif",this._textSize=12,this._textStyle=n.NORMAL,this.curElement=null,this.matrices=[[1,0,0,1,0,0]],this.settings={loop:!0,fill:!1,startTime:0,updateInterval:0,rectMode:n.CORNER,imageMode:n.CORNER,ellipseMode:n.CENTER,colorMode:n.RGB,mousePressed:!1,angleMode:n.RADIANS},this.styles=[],e)e(this);else{this.isGlobal=!0;for(var i in o.prototype)window[i]=o.prototype[i].bind(this);for(var s in this)this.hasOwnProperty(s)&&(window[s]=this[s]);for(var a in n)n.hasOwnProperty(a)&&(window[a]=n[a])}"complete"===document.readyState?this._start():window.addEventListener("load",r._start.bind(r),!1)};return o._init=function(){window.setup&&"function"==typeof window.setup&&new o},o.prototype._start=function(){this.createGraphics(800,600,!0);var t=this.preload||window.preload,e=this.isGlobal?window:this;t?(e.loadJSON=function(t){return e.preloadFunc("loadJSON",t)},e.loadStrings=function(t){return e.preloadFunc("loadStrings",t)},e.loadXML=function(t){return e.preloadFunc("loadXML",t)},e.loadImage=function(t){return e.preloadFunc("loadImage",t)},t(),e.loadJSON=o.prototype.loadJSON,e.loadStrings=o.prototype.loadStrings,e.loadXML=o.prototype.loadXML,e.loadImage=o.prototype.loadImage):(this._setup(),this._runFrames(),this._drawSketch())},o.prototype.preloadFunc=function(t,e){var n=this.isGlobal?window:this;return n._setProperty("preload_count",n.preload_count+1),this[t](e,function(){n._setProperty("preload_count",n.preload_count-1),0===n.preload_count&&(n._setup(),n._runFrames(),n._drawSketch())})},o.prototype._setup=function(){var t=this.setup||window.setup;if("function"!=typeof t)throw"sketch must include a setup function";t()},o.prototype._drawSketch=function(){var t=this,e=(new Date).getTime();t._frameRate=1e3/(e-t._lastFrameTime),t._lastFrameTime=e;var n=t.draw||window.draw;t.settings.loop&&setTimeout(function(){window.requestDraw(t._drawSketch.bind(t))},1e3/t._targetFrameRate),"function"==typeof n&&n(),t.curElement.context.setTransform(1,0,0,1,0,0)},o.prototype._runFrames=function(){var t=this;this.updateInterval&&clearInterval(this.updateInterval),this.updateInterval=setInterval(function(){t._setProperty("frameCount",t.frameCount+1)},1e3/t._targetFrameRate)},o.prototype._applyDefaults=function(){this.curElement.context.fillStyle="#FFFFFF",this.curElement.context.strokeStyle="#000000",this.curElement.context.lineCap=n.ROUND},o.prototype._setProperty=function(t,e){this[t]=e,this.isGlobal&&(window[t]=e)},o}({},shim,constants),mathpvector=function(){"use strict";function t(t,e,n){this.x=t||0,this.y=e||0,this.z=n||0}return t.prototype.set=function(e,n,o){return e instanceof t?this.set(e.x,e.y,e.z):e instanceof Array?this.set(e[0],e[1],e[2]):(this.x=e||0,this.y=n||0,this.z=o||0,void 0)},t.prototype.get=function(){return new t(this.x,this.y,this.z)},t.prototype.add=function(e,n,o){return e instanceof t?this.add(e.x,e.y,e.z):e instanceof Array?this.add(e[0],e[1],e[2]):(this.x+=e||0,this.y+=n||0,this.z+=o||0,this)},t.prototype.sub=function(e,n,o){return e instanceof t?this.sub(e.x,e.y,e.z):e instanceof Array?this.sub(e[0],e[1],e[2]):(this.x-=e||0,this.y-=n||0,this.z-=o||0,this)},t.prototype.mult=function(t){return this.x*=t||0,this.y*=t||0,this.z*=t||0,this},t.prototype.div=function(t){return this.x/=t,this.y/=t,this.z/=t,this},t.prototype.mag=function(){return Math.sqrt(this.magSq())},t.prototype.magSq=function(){var t=this.x,e=this.y,n=this.z;return t*t+e*e+n*n},t.prototype.dot=function(e,n,o){return e instanceof t?this.dot(e.x,e.y,e.z):this.x*(e||0)+this.y*(n||0)+this.z*(o||0)},t.prototype.cross=function(e){var n=this.y*e.z-this.z*e.y,o=this.z*e.x-this.x*e.z,r=this.x*e.y-this.y*e.x;return new t(n,o,r)},t.prototype.dist=function(t){var e=t.get().sub(this);return e.mag()},t.prototype.normalize=function(){return this.div(this.mag())},t.prototype.limit=function(t){var e=this.magSq();return e>t*t&&(this.div(Math.sqrt(e)),this.mult(t)),this},t.prototype.setMag=function(t){return this.normalize().mult(t)},t.prototype.heading=function(){return Math.atan2(this.y,this.x)},t.prototype.rotate2D=function(t){var e=this.heading()+t,n=this.mag();return this.x=Math.cos(e)*n,this.y=Math.sin(e)*n,this},t.prototype.lerp=function(e,n,o,r){return e instanceof t?this.lerp(e.x,e.y,e.z,n):(this.x+=(e-this.x)*r||0,this.y+=(n-this.y)*r||0,this.z+=(o-this.z)*r||0,this)},t.prototype.array=function(){return[this.x||0,this.y||0,this.z||0]},t.fromAngle=function(e){return new t(Math.cos(e),Math.sin(e),0)},t.random2D=function(){return this.fromAngle(Math.random(2*Math.PI))},t.random3D=function(){var e=Math.random()*Math.PI*2,n=2*Math.random()-1,o=Math.sqrt(1-n*n)*Math.cos(e),r=Math.sqrt(1-n*n)*Math.sin(e);return new t(o,r,n)},t.add=function(t,e){return t.get().add(e)},t.sub=function(t,e){return t.get().sub(e)},t.mult=function(t,e){return t.get().mult(e)},t.div=function(t,e){return t.get().div(e)},t.dot=function(t,e){return t.dot(e)},t.cross=function(t,e){return t.cross(e)},t.dist=function(t,e){return t.dist(e)},t.lerp=function(t,e,n){return t.get().lerp(e,n)},t.angleBetween=function(t,e){return Math.acos(t.dot(e)/(t.mag()*e.mag()))},t}({}),mathcalculation=function(t,e){"use strict";var n=e;return n.prototype.abs=Math.abs,n.prototype.ceil=Math.ceil,n.prototype.constrain=function(t,e,n){return this.max(this.min(t,n),e)},n.prototype.dist=function(t,e,n,o){var r=n-t,i=o-e;return Math.sqrt(r*r+i*i)},n.prototype.exp=Math.exp,n.prototype.floor=Math.floor,n.prototype.lerp=function(t,e,n){return n*(e-t)+t},n.prototype.log=Math.log,n.prototype.mag=function(t,e){return Math.sqrt(t*t+e*e)},n.prototype.map=function(t,e,n,o,r){return(t-e)/(n-e)*(r-o)+o},n.prototype.max=Math.max,n.prototype.min=Math.min,n.prototype.norm=function(t,e,n){return this.map(t,e,n,0,1)},n.prototype.pow=Math.pow,n.prototype.round=Math.round,n.prototype.sq=function(t){return t*t},n.prototype.sqrt=Math.sqrt,n}({},core),colorcreating_reading=function(t,e,n){"use strict";var o=e,r=n;return o.prototype.alpha=function(t){return t.length>3?t[3]:255},o.prototype.blue=function(t){return t.length>2?t[2]:0},o.prototype.brightness=function(t){return t.length>2?t[2]:0},o.prototype.color=function(){return this.getNormalizedColor(arguments)},o.prototype.green=function(t){return t.length>2?t[1]:0},o.prototype.hue=function(t){return t.length>2?t[0]:0},o.prototype.lerpColor=function(t,e,n){for(var o=[],i=0;i<t.length;i++)o.push(r.lerp(t[i],e[i],n));return o},o.prototype.red=function(t){return t.length>2?t[0]:0},o.prototype.saturation=function(t){return t.length>2?t[1]:0},o}({},core,mathcalculation),colorsetting=function(t,e,n){"use strict";var o=e,n=n;return o.prototype.background=function(){var t=this.getNormalizedColor(arguments),e=this.curElement.context.fillStyle;this.curElement.context.fillStyle=this.getCSSRGBAColor(t),this.curElement.context.fillRect(0,0,this.width,this.height),this.curElement.context.fillStyle=e},o.prototype.clear=function(){this.curElement.context.clearRect(0,0,this.width,this.height)},o.prototype.colorMode=function(t){(t===n.RGB||t===n.HSB)&&(this.settings.colorMode=t)},o.prototype.fill=function(){var t=this.getNormalizedColor(arguments);this.curElement.context.fillStyle=this.getCSSRGBAColor(t)},o.prototype.noFill=function(){this.curElement.context.fillStyle="rgba(0,0,0,0)"},o.prototype.noStroke=function(){this.curElement.context.strokeStyle="rgba(0,0,0,0)"},o.prototype.stroke=function(){var t=this.getNormalizedColor(arguments);this.curElement.context.strokeStyle=this.getCSSRGBAColor(t)},o.prototype.getNormalizedColor=function(t){var e,o,r,i,s,a="number"==typeof t[0].length?t[0]:t;return a.length>=3?(e=a[0],o=a[1],r=a[2],i="number"==typeof a[3]?a[3]:255):(e=o=r=a[0],i="number"==typeof a[1]?a[1]:255),s=this.settings.colorMode===n.HSB?this.hsv2rgb(e,o,r).concat(i):[e,o,r,i]},o.prototype.hsv2rgb=function(t,e,n){return[t,e,n]},o.prototype.getCSSRGBAColor=function(t){var e=t.map(function(t){return Math.floor(t)}),n=e[3]?e[3]/255:1;return"rgba("+e[0]+","+e[1]+","+e[2]+","+n+")"},o}({},core,constants),dataarray_functions=function(t,e){"use strict";var n=e;return n.prototype.append=function(t,e){return t.push(e),t},n.prototype.arrayCopy=function(t,e,n,o,r){if("undefined"!=typeof r)for(var i=e;i<Math.min(e+r,t.length);i++)n[o+i]=t[i];else e="undefined"!=typeof n?t.slice(0,Math.min(n,t.length)):t.slice(0)},n.prototype.concat=function(t,e){return t.concat(e)},n.prototype.reverse=function(t){return t.reverse()},n.prototype.shorten=function(t){return t.pop(),t},n.prototype.sort=function(t,e){var n=e?t.slice(0,Math.min(e,t.length)):t,o=e?t.slice(Math.min(e,t.length)):[];return n="string"==typeof n[0]?n.sort():n.sort(function(t,e){return t-e}),n.concat(o)},n.prototype.splice=function(t,e,n){return t.splice(n,0,e)},n.prototype.subset=function(t,e,n){return"undefined"!=typeof n?t.slice(e,e+n):t.slice(e,t.length-1)},n}({},core),datastring_functions=function(t,e){"use strict";function n(){var t=arguments[0],e=0>t,n=e?t.toString().substring(1):t.toString(),o=n.indexOf("."),r=-1!==o?n.substring(0,o):n,i=-1!==o?n.substring(o+1):"",s=e?"-":"";if(3===arguments.length){for(var a=0;a<arguments[1]-r.length;a++)s+="0";s+=r,s+=".",s+=i;for(var u=0;u<arguments[2]-i.length;u++)s+="0";return s}for(var c=0;c<Math.max(arguments[1]-r.length,0);c++)s+="0";return s+=n}function o(){var t=arguments[0].toString(),e=t.indexOf("."),n=-1!==e?t.substring(e):"",o=-1!==e?t.substring(0,e):t;return o=o.toString().replace(/\B(?=(\d{3})+(?!\d))/g,","),arguments.length>1&&(n=n.substring(0,arguments[1]+1)),o+n}function r(){return parseFloat(arguments[0])>0?"+"+arguments[0].toString():arguments[0].toString()}function i(){return parseFloat(arguments[0])>0?" "+arguments[0].toString():arguments[0].toString()}var s=e;return s.prototype.join=function(t,e){return t.join(e)},s.prototype.match=function(t,e){return t.match(e)},s.prototype.matchAll=function(t,e){for(var n=new RegExp(e,"g"),o=n.exec(t),r=[];null!==o;)r.push(o),o=n.exec(t);return r},s.prototype.nf=function(){if(arguments[0]instanceof Array){var t=arguments[1],e=arguments[2];return arguments[0].map(function(o){return n(o,t,e)})}return n.apply(this,arguments)},s.prototype.nfc=function(){if(arguments[0]instanceof Array){var t=arguments[1];return arguments[0].map(function(e){return o(e,t)})}return o.apply(this,arguments)},s.prototype.nfp=function(){var t=this.nf(arguments);return t instanceof Array?t.map(r):r(t)},s.prototype.nfs=function(){var t=this.nf(arguments);return t instanceof Array?t.map(i):i(t)},s.prototype.split=function(t,e){return t.split(e)},s.prototype.splitTokens=function(){var t=arguments.length>0?arguments[1]:/\s/g;return arguments[0].split(t).filter(function(t){return t})},s.prototype.trim=function(t){return t instanceof Array?t.map(this.trim):t.trim()},s}({},core),inputmouse=function(t,e,n){"use strict";var o=e,n=n;return o.prototype.isMousePressed=o.prototype.mouseIsPressed=function(){return this.settings.mousePressed},o.prototype.updateMouseCoords=function(t){this._setProperty("pmouseX",this.mouseX),this._setProperty("pmouseY",this.mouseY),this._setProperty("mouseX",t.offsetX),this._setProperty("mouseY",t.offsetY),this._setProperty("pwindowMouseX",this.windowMouseX),this._setProperty("pwindowMouseY",this.windowMouseY),this._setProperty("windowMouseX",t.pageX),this._setProperty("windowMouseY",t.pageY)},o.prototype.setMouseButton=function(t){1===t.button?this._setProperty("mouseButton",n.CENTER):2===t.button?this._setProperty("mouseButton",n.RIGHT):this._setProperty("mouseButton",n.LEFT)},o.prototype.onmousemove=function(t){var e=this.isGlobal?window:this;this.updateMouseCoords(t),this.isMousePressed()||"function"!=typeof e.mouseMoved||e.mouseMoved(t),this.isMousePressed()&&"function"==typeof e.mouseDragged&&e.mouseDragged(t)},o.prototype.onmousedown=function(t){var e=this.isGlobal?window:this;this.settings.mousePressed=!0,this.setMouseButton(t),"function"==typeof e.mousePressed&&e.mousePressed(t)},o.prototype.onmouseup=function(t){var e=this.isGlobal?window:this;this.settings.mousePressed=!1,"function"==typeof e.mouseReleased&&e.mouseReleased(t)},o.prototype.onmouseclick=function(t){var e=this.isGlobal?window:this;"function"==typeof e.mouseClicked&&e.mouseClicked(t)},o.prototype.onmousewheel=function(t){var e=this.isGlobal?window:this;"function"==typeof e.mouseWheel&&e.mouseWheel(t)},o}({},core,constants),inputtouch=function(t,e){"use strict";var n=e;return n.prototype.setTouchPoints=function(t){this._setProperty("touchX",t.changedTouches[0].pageX),this._setProperty("touchY",t.changedTouches[0].pageY);for(var e=[],n=0;n<t.changedTouches.length;n++){var o=t.changedTouches[n];e[n]={x:o.pageX,y:o.pageY}}this._setProperty("touches",e)},n.prototype.ontouchstart=function(t){this.setTouchPoints(t),"function"==typeof this.touchStarted&&this.touchStarted(t);var e="function"==typeof touchMoved;e&&t.preventDefault()},n.prototype.ontouchmove=function(t){this.setTouchPoints(t),"function"==typeof this.touchMoved&&this.touchMoved(t)},n.prototype.ontouchend=function(t){this.setTouchPoints(t),"function"==typeof this.touchEnded&&this.touchEnded(t)},n}({},core),dompelement=function(t,e){function n(t,e){this.elt=t,this.pInst=e,this.width=this.elt.offsetWidth,this.height=this.elt.offsetHeight,this.elt.style.position="absolute",this.x=0,this.y=0,this.elt.style.left=this.x+"px",this.elt.style.top=this.y+"px",t instanceof HTMLCanvasElement&&(this.context=t.getContext("2d"))}var e=e;return n.prototype.html=function(t){this.elt.innerHTML=t},n.prototype.position=function(t,e){this.x=t,this.y=e,this.elt.style.left=t+"px",this.elt.style.top=e+"px"},n.prototype.size=function(t,n){var o=t,r=n,i=e.AUTO;(o!==i||r!==i)&&(o===i?o=n*this.elt.width/this.elt.height:r===i&&(r=t*this.elt.height/this.elt.width),this.elt instanceof HTMLCanvasElement?(this.elt.setAttribute("width",o),this.elt.setAttribute("height",r)):(this.elt.style.width=o,this.elt.style.height=r),this.width=this.elt.offsetWidth,this.height=this.elt.offsetHeight,this.pInst.curElement.elt===this.elt&&(this.pInst.width=this.elt.offsetWidth,this.pInst.height=this.elt.offsetHeight))},n.prototype.style=function(t){this.elt.style.cssText+=t},n.prototype.id=function(t){this.elt.id=t},n.prototype.class=function(t){this.elt.className=t},n.prototype.show=function(){this.elt.style.display="block"},n.prototype.hide=function(){this.elt.style.display="none"},n.prototype.mousePressed=function(t){var e=this;this.elt.addEventListener("click",function(n){t(n,e)},!1)},n.prototype.mouseOver=function(t){var e=this;this.elt.addEventListener("mouseover",function(n){t(n,e)},!1)},n.prototype.mouseOut=function(t){var e=this;this.elt.addEventListener("mouseout",function(n){t(n,e)},!1)},n}({},constants),dommanipulate=function(t,e,n,o,r){var i=e,s=r;return i.prototype.createGraphics=function(t,e,n,o){var r=document.createElement("canvas");if(r.setAttribute("width",t),r.setAttribute("height",e),n)r.id="defaultCanvas",document.body.appendChild(r);else{var i=document.getElementById("defaultCanvas");if(i&&i.parentNode.removeChild(i),o){var a=document.getElementById(o);a?a.appendChild(r):document.body.appendChild(r)}else document.body.appendChild(r)}var u=new s(r,this);return this.context(u),this._applyDefaults(),u},i.prototype.createHTML=function(t){var e=document.createElement("div");e.innerHTML=t,document.body.appendChild(e);var n=new s(e,this);return this.context(n),n},i.prototype.createHTMLImage=function(t,e){var n=document.createElement("img");n.src=t,"undefined"!=typeof e&&(n.alt=e),document.body.appendChild(n);var o=new s(n,this);return this.context(o),o},i.prototype.find=function(t){var e=document.getElementById(t);if(e)return[new s(e,this)];if(e=document.getElementsByClassName(t)){for(var n=[],o=0,r=e.length;o!==r;o++)n.push(new s(e[o],this));return n}return[]},i.prototype.context=function(t){var e;if("string"==typeof t||t instanceof String){var n=document.getElementById(t);e=n?new s(n,this):null}else e=t;"undefined"!=typeof e&&(this.curElement=e,this._setProperty("width",e.elt.offsetWidth),this._setProperty("height",e.elt.offsetHeight),this.curElement.onfocus=function(){this.focused=!0},this.curElement.onblur=function(){this.focused=!1},this.isGlobal||(this.curElement.context.canvas.onmousemove=this.onmousemove.bind(this),this.curElement.context.canvas.onmousedown=this.onmousedown.bind(this),this.curElement.context.canvas.onmouseup=this.onmouseup.bind(this),this.curElement.context.canvas.onmouseclick=this.onmouseclick.bind(this),this.curElement.context.canvas.onmousewheel=this.onmousewheel.bind(this),this.curElement.context.canvas.onkeydown=this.onkeydown.bind(this),this.curElement.context.canvas.onkeyup=this.onkeyup.bind(this),this.curElement.context.canvas.onkeypress=this.onkeypress.bind(this),this.curElement.context.canvas.ontouchstart=this.ontouchstart.bind(this),this.curElement.context.canvas.ontouchmove=this.ontouchmove.bind(this),this.curElement.context.canvas.ontouchend=this.ontouchend.bind(this)),"undefined"!=typeof this.curElement.context&&this.curElement.context.setTransform(1,0,0,1,0,0))},i}({},core,inputmouse,inputtouch,dompelement),environment=function(t,e){"use strict";var n=e;return n.prototype.cursor=function(t){this.curElement.style.cursor=t||"auto"},n.prototype.frameRate=function(t){return"undefined"==typeof t?this._frameRate:(this._setProperty("_targetFrameRate",t),this._runFrames(),this)},n.prototype.getFrameRate=function(){return this.frameRate()},n.prototype.setFrameRate=function(t){return this.frameRate(t)},n.prototype.noCursor=function(){this.curElement.style.cursor="none"},n}({},core),canvas=function(t,e){var e=e;return{modeAdjust:function(t,n,o,r,i){return i===e.CORNER?{x:t,y:n,w:o,h:r}:i===e.CORNERS?{x:t,y:n,w:o-t,h:r-n}:i===e.RADIUS?{x:t-o,y:n-r,w:2*o,h:2*r}:i===e.CENTER?{x:t-.5*o,y:n-.5*r,w:o,h:r}:void 0}}}({},constants),filters=function(){"use strict";var t={};return t._toPixels=function(t){return t instanceof ImageData?t.data:t.getContext("2d").getImageData(0,0,t.width,t.height).data},t._getARGB=function(t,e){var n=4*e;return t[n+3]<<24&4278190080|t[n]<<16&16711680|t[n+1]<<8&65280|255&t[n+2]},t._setPixels=function(t,e){for(var n=0,o=0,r=t.length;r>o;o++)n=4*o,t[n+0]=(16711680&e[o])>>>16,t[n+1]=(65280&e[o])>>>8,t[n+2]=255&e[o],t[n+3]=(4278190080&e[o])>>>24},t._toImageData=function(t){return t instanceof ImageData?t:t.getContext("2d").getImageData(0,0,t.width,t.height)},t._createImageData=function(e,n){return t._tmpCanvas=document.createElement("canvas"),t._tmpCtx=t._tmpCanvas.getContext("2d"),this._tmpCtx.createImageData(e,n)},t.apply=function(t,e,n){var o=t.getContext("2d"),r=o.getImageData(0,0,t.width,t.height),i=e(r,n);i instanceof ImageData?o.putImageData(i,0,0,0,0,t.width,t.height):o.putImageData(r,0,0,0,0,t.width,t.height)},t.threshold=function(e,n){var o=t._toPixels(e);void 0===n&&(n=.5);for(var r=Math.floor(255*n),i=0;i<o.length;i+=4){var s,a=o[i],u=o[i+1],c=o[i+2],h=.2126*a+.7152*u+.0722*c;s=h>=r?255:0,o[i]=o[i+1]=o[i+2]=s}},t.gray=function(e){for(var n=t._toPixels(e),o=0;o<n.length;o+=4){var r=n[o],i=n[o+1],s=n[o+2],a=.2126*r+.7152*i+.0722*s;n[o]=n[o+1]=n[o+2]=a}},t.opaque=function(e){for(var n=t._toPixels(e),o=0;o<n.length;o+=4)n[o+3]=255;return n},t.invert=function(e){for(var n=t._toPixels(e),o=0;o<n.length;o+=4)n[o]=255-n[o],n[o+1]=255-n[o+1],n[o+2]=255-n[o+2]},t.posterize=function(e,n){var o=t._toPixels(e);if(2>n||n>255)throw new Error("Level must be greater than 2 and less than 255 for posterize");for(var r=n-1,i=0;i<o.length;i++){var s=o[i]>>16&255,a=o[i]>>8&255,u=255&o[i];s=255*(s*n>>8)/r,a=255*(a*n>>8)/r,u=255*(u*n>>8)/r,o[i]=4278190080&o[i]|s<<16|a<<8|u}},t.dilate=function(e){for(var n,o,r,i,s,a,u,c,h,p,l,f,d,m,y,g,x,v=t._toPixels(e),w=0,E=v.length?v.length/4:0,_=new Int32Array(E);E>w;)for(n=w,o=w+e.width;o>w;)r=i=t._getARGB(v,w),u=w-1,a=w+1,c=w-e.width,h=w+e.width,n>u&&(u=w),a>=o&&(a=w),0>c&&(c=0),h>=E&&(h=w),f=t._getARGB(v,c),l=t._getARGB(v,u),d=t._getARGB(v,h),p=t._getARGB(v,a),s=77*(r>>16&255)+151*(r>>8&255)+28*(255&r),y=77*(l>>16&255)+151*(l>>8&255)+28*(255&l),m=77*(p>>16&255)+151*(p>>8&255)+28*(255&p),g=77*(f>>16&255)+151*(f>>8&255)+28*(255&f),x=77*(d>>16&255)+151*(d>>8&255)+28*(255&d),y>s&&(i=l,s=y),m>s&&(i=p,s=m),g>s&&(i=f,s=g),x>s&&(i=d,s=x),_[w++]=i;t._setPixels(v,_)},t.erode=function(e){for(var n,o,r,i,s,a,u,c,h,p,l,f,d,m,y,g,x,v=t._toPixels(e),w=0,E=v.length?v.length/4:0,_=new Int32Array(E);E>w;)for(n=w,o=w+e.width;o>w;)r=i=t._getARGB(v,w),u=w-1,a=w+1,c=w-e.width,h=w+e.width,n>u&&(u=w),a>=o&&(a=w),0>c&&(c=0),h>=E&&(h=w),f=t._getARGB(v,c),l=t._getARGB(v,u),d=t._getARGB(v,h),p=t._getARGB(v,a),s=77*(r>>16&255)+151*(r>>8&255)+28*(255&r),y=77*(l>>16&255)+151*(l>>8&255)+28*(255&l),m=77*(p>>16&255)+151*(p>>8&255)+28*(255&p),g=77*(f>>16&255)+151*(f>>8&255)+28*(255&f),x=77*(d>>16&255)+151*(d>>8&255)+28*(255&d),s>y&&(i=l,s=y),s>m&&(i=p,s=m),s>g&&(i=f,s=g),s>x&&(i=d,s=x),_[w++]=i;t._setPixels(v,_)},t}({}),image=function(t,e,n,o,r){"use strict";function i(t,e,n){this.width=t,this.height=e,this.pInst=n,this.canvas=document.createElement("canvas"),this.canvas.width=this.width,this.canvas.height=this.height,this.pixels=[]}var s=e,n=n,o=o,a=r;return s.prototype.createImage=function(t,e){return new i(t,e,this)},s.prototype.loadImage=function(t,e){var n=new Image,o=new i(1,1,this);return n.onload=function(){o.width=o.canvas.width=n.width,o.height=o.canvas.height=n.height,o.canvas.getContext("2d").drawImage(n,0,0),"undefined"!=typeof e&&e(o)},n.crossOrigin="Anonymous",n.src=t,o},s.prototype.image=function(t,e,o,r,i){void 0===r&&(r=t.width),void 0===i&&(i=t.height);var s=n.modeAdjust(e,o,r,i,this.settings.imageMode);this.curElement.context.drawImage(t.canvas,s.x,s.y,s.w,s.h)},s.prototype.imageMode=function(t){(t===o.CORNER||t===o.CORNERS||t===o.CENTER)&&(this.settings.imageMode=t)},i.prototype.loadPixels=function(){for(var t=0,e=0,n=this.width,o=this.height,r=this.canvas.getContext("2d").getImageData(t,e,n,o),i=r.data,s=[],a=0;a<i.length;a+=4)s.push([i[a],i[a+1],i[a+2],i[a+3]]);this.pixels=s},i.prototype.updatePixels=function(t,e,n,o){void 0===t&&void 0===e&&void 0===n&&void 0===o&&(t=0,e=0,n=this.width,o=this.height);for(var r=this.canvas.getContext("2d").getImageData(t,e,n,o),i=r.data,s=0;s<this.pixels.length;s+=1){var a=4*s;i[a]=this.pixels[s][0],i[a+1]=this.pixels[s][1],i[a+2]=this.pixels[s][2],i[a+3]=this.pixels[s][3]}this.canvas.getContext("2d").putImageData(r,t,e,0,0,n,o)},i.prototype.get=function(t,e,n,o){if(void 0===t&&void 0===e&&void 0===n&&void 0===o?(t=0,e=0,n=this.width,o=this.height):void 0===n&&void 0===o&&(n=1,o=1),t>this.width||e>this.height)return void 0;var r=this.canvas.getContext("2d").getImageData(t,e,n,o),s=r.data;if(1===n&&1===o){for(var a=[],u=0;u<s.length;u+=4)a.push(s[u],s[u+1],s[u+2],s[u+3]);return a}n=Math.min(n,this.width),o=Math.min(o,this.height);var c=new i(n,o,this.pInst);return c.canvas.getContext("2d").putImageData(r,0,0,0,0,n,o),c},i.prototype.set=function(t,e,n){var o=e*this.width+t;n instanceof Array?o<this.pixels.length&&(this.pixels[o]=n,this.updatePixels()):(this.canvas.getContext("2d").drawImage(n.canvas,0,0),this.loadPixels())},i.prototype.resize=function(t,e){var n=document.createElement("canvas");n.width=t,n.height=e,n.getContext("2d").drawImage(this.canvas,0,0,this.canvas.width,this.canvas.height,0,0,n.width,n.width),this.canvas.width=this.width=t,this.canvas.height=this.height=e,this.canvas.getContext("2d").drawImage(n,0,0,t,e,0,0,t,e),this.pixels.length>0&&this.loadPixels()},i.prototype.copy=function(){var t,e,n,o,r,i,s,a,u;if(9===arguments.length)t=arguments[0],e=arguments[1],n=arguments[2],o=arguments[3],r=arguments[4],i=arguments[5],s=arguments[6],a=arguments[7],u=arguments[8];else{if(8!==arguments.length)throw new Error("Signature not supported");e=arguments[0],n=arguments[1],o=arguments[2],r=arguments[3],i=arguments[4],s=arguments[5],a=arguments[6],u=arguments[7],t=this}this.canvas.getContext("2d").drawImage(t.canvas,e,n,o,r,i,s,a,u)},i.prototype.mask=function(t){void 0===t&&(t=this);var e=this.canvas.getContext("2d").globalCompositeOperation,n=[t,0,0,t.width,t.height,0,0,this.width,this.height];this.canvas.getContext("2d").globalCompositeOperation="destination-out",this.copy.apply(this,n),this.canvas.getContext("2d").globalCompositeOperation=e},i.prototype.filter=function(t,e){a.apply(this.canvas,a[t.toLowerCase()],e)},i.prototype.blend=function(){var t=this.canvas.getContext("2d").globalCompositeOperation,e=arguments[arguments.length-1],n=Array.prototype.slice.call(arguments,0,arguments.length-1);this.canvas.getContext("2d").globalCompositeOperation=e,this.copy.apply(this,n),this.canvas.getContext("2d").globalCompositeOperation=t},i.prototype.save=function(t){var e;switch(t.toLowerCase()){case"png":e="image/png";break;case"jpeg":e="image/jpeg";break;case"jpg":e="image/jpeg";break;default:e="image/png"}if(void 0!==e){var n="image/octet-stream",o=this.canvas.toDataURL(e);o=o.replace(e,n),window.location.href=o}},i}({},core,canvas,constants,filters),imageloading_displaying=function(t,e){"use strict";var n=e;return n.prototype.blend=function(){},n.prototype.copy=function(){},n.prototype.filter=function(){},n.prototype.get=function(t,e){var n=this.width,o=this.height,r=this.curElement.context.getImageData(0,0,n,o).data;if("undefined"!=typeof t&&"undefined"!=typeof e){if(t>=0&&n>t&&e>=0&&o>e){var i=4*e*n+4*t,s=[r[i],r[i+1],r[i+2],r[i+3]];return s}return[0,0,0,255]}return[0,0,0,255]},n.prototype.loadPixels=function(){for(var t=this.width,e=this.height,n=this.curElement.context.getImageData(0,0,t,e).data,o=[],r=0;r<n.length;r+=4)o.push([n[r],n[r+1],n[r+2],n[r+3]]);this._setProperty("pixels",o)},n.prototype.set=function(){},n.prototype.updatePixels=function(){},n}({},core);!function(t,e,n){"undefined"!=typeof module&&module.exports?module.exports=n():"function"==typeof define&&define.amd?define("reqwest",n):e[t]=n()}("reqwest",this,function(){function handleReadyState(t,e,n){return function(){return t._aborted?n(t.request):(t.request&&4==t.request[readyState]&&(t.request.onreadystatechange=noop,twoHundo.test(t.request.status)?e(t.request):n(t.request)),void 0)}}function setHeaders(t,e){var n,o=e.headers||{};o.Accept=o.Accept||defaultHeaders.accept[e.type]||defaultHeaders.accept["*"],e.crossOrigin||o[requestedWith]||(o[requestedWith]=defaultHeaders.requestedWith),o[contentType]||(o[contentType]=e.contentType||defaultHeaders.contentType);for(n in o)o.hasOwnProperty(n)&&"setRequestHeader"in t&&t.setRequestHeader(n,o[n])}function setCredentials(t,e){"undefined"!=typeof e.withCredentials&&"undefined"!=typeof t.withCredentials&&(t.withCredentials=!!e.withCredentials)}function generalCallback(t){lastValue=t}function urlappend(t,e){return t+(/\?/.test(t)?"&":"?")+e}function handleJsonp(t,e,n,o){var r=uniqid++,i=t.jsonpCallback||"callback",s=t.jsonpCallbackName||reqwest.getcallbackPrefix(r),a=new RegExp("((^|\\?|&)"+i+")=([^&]+)"),u=o.match(a),c=doc.createElement("script"),h=0,p=-1!==navigator.userAgent.indexOf("MSIE 10.0");return u?"?"===u[3]?o=o.replace(a,"$1="+s):s=u[3]:o=urlappend(o,i+"="+s),win[s]=generalCallback,c.type="text/javascript",c.src=o,c.async=!0,"undefined"==typeof c.onreadystatechange||p||(c.event="onclick",c.htmlFor=c.id="_reqwest_"+r),c.onload=c.onreadystatechange=function(){return c[readyState]&&"complete"!==c[readyState]&&"loaded"!==c[readyState]||h?!1:(c.onload=c.onreadystatechange=null,c.onclick&&c.onclick(),e(lastValue),lastValue=void 0,head.removeChild(c),h=1,void 0)},head.appendChild(c),{abort:function(){c.onload=c.onreadystatechange=null,n({},"Request is aborted: timeout",{}),lastValue=void 0,head.removeChild(c),h=1}}}function getRequest(t,e){var n,o=this.o,r=(o.method||"GET").toUpperCase(),i="string"==typeof o?o:o.url,s=o.processData!==!1&&o.data&&"string"!=typeof o.data?reqwest.toQueryString(o.data):o.data||null,a=!1;return"jsonp"!=o.type&&"GET"!=r||!s||(i=urlappend(i,s),s=null),"jsonp"==o.type?handleJsonp(o,t,e,i):(n=o.xhr&&o.xhr(o)||xhr(o),n.open(r,i,o.async===!1?!1:!0),setHeaders(n,o),setCredentials(n,o),win[xDomainRequest]&&n instanceof win[xDomainRequest]?(n.onload=t,n.onerror=e,n.onprogress=function(){},a=!0):n.onreadystatechange=handleReadyState(this,t,e),o.before&&o.before(n),a?setTimeout(function(){n.send(s)},200):n.send(s),n)}function Reqwest(t,e){this.o=t,this.fn=e,init.apply(this,arguments)}function setType(t){var e=t.match(/\.(json|jsonp|html|xml)(\?|$)/);return e?e[1]:"js"}function init(o,fn){function complete(t){for(o.timeout&&clearTimeout(self.timeout),self.timeout=null;self._completeHandlers.length>0;)self._completeHandlers.shift()(t)}function success(resp){resp="jsonp"!==type?self.request:resp;var filteredResponse=globalSetupOptions.dataFilter(resp.responseText,type),r=filteredResponse;try{resp.responseText=r}catch(e){}if(r)switch(type){case"json":try{resp=win.JSON?win.JSON.parse(r):eval("("+r+")")}catch(err){return error(resp,"Could not parse JSON in response",err)}break;case"js":resp=eval(r);break;case"html":resp=r;break;case"xml":resp=resp.responseXML&&resp.responseXML.parseError&&resp.responseXML.parseError.errorCode&&resp.responseXML.parseError.reason?null:resp.responseXML}for(self._responseArgs.resp=resp,self._fulfilled=!0,fn(resp),self._successHandler(resp);self._fulfillmentHandlers.length>0;)resp=self._fulfillmentHandlers.shift()(resp);complete(resp)}function error(t,e,n){for(t=self.request,self._responseArgs.resp=t,self._responseArgs.msg=e,self._responseArgs.t=n,self._erred=!0;self._errorHandlers.length>0;)self._errorHandlers.shift()(t,e,n);complete(t)}this.url="string"==typeof o?o:o.url,this.timeout=null,this._fulfilled=!1,this._successHandler=function(){},this._fulfillmentHandlers=[],this._errorHandlers=[],this._completeHandlers=[],this._erred=!1,this._responseArgs={};var self=this,type=o.type||setType(this.url);fn=fn||function(){},o.timeout&&(this.timeout=setTimeout(function(){self.abort()},o.timeout)),o.success&&(this._successHandler=function(){o.success.apply(o,arguments)}),o.error&&this._errorHandlers.push(function(){o.error.apply(o,arguments)}),o.complete&&this._completeHandlers.push(function(){o.complete.apply(o,arguments)}),this.request=getRequest.call(this,success,error)}function reqwest(t,e){return new Reqwest(t,e)}function normalize(t){return t?t.replace(/\r?\n/g,"\r\n"):""}function serial(t,e){var n,o,r,i,s=t.name,a=t.tagName.toLowerCase(),u=function(t){t&&!t.disabled&&e(s,normalize(t.attributes.value&&t.attributes.value.specified?t.value:t.text))};if(!t.disabled&&s)switch(a){case"input":/reset|button|image|file/i.test(t.type)||(n=/checkbox/i.test(t.type),o=/radio/i.test(t.type),r=t.value,(!(n||o)||t.checked)&&e(s,normalize(n&&""===r?"on":r)));
break;case"textarea":e(s,normalize(t.value));break;case"select":if("select-one"===t.type.toLowerCase())u(t.selectedIndex>=0?t.options[t.selectedIndex]:null);else for(i=0;t.length&&i<t.length;i++)t.options[i].selected&&u(t.options[i])}}function eachFormElement(){var t,e,n=this,o=function(t,e){var o,r,i;for(o=0;o<e.length;o++)for(i=t[byTag](e[o]),r=0;r<i.length;r++)serial(i[r],n)};for(e=0;e<arguments.length;e++)t=arguments[e],/input|select|textarea/i.test(t.tagName)&&serial(t,n),o(t,["input","select","textarea"])}function serializeQueryString(){return reqwest.toQueryString(reqwest.serializeArray.apply(null,arguments))}function serializeHash(){var t={};return eachFormElement.apply(function(e,n){e in t?(t[e]&&!isArray(t[e])&&(t[e]=[t[e]]),t[e].push(n)):t[e]=n},arguments),t}function buildParams(t,e,n,o){var r,i,s,a=/\[\]$/;if(isArray(e))for(i=0;e&&i<e.length;i++)s=e[i],n||a.test(t)?o(t,s):buildParams(t+"["+("object"==typeof s?i:"")+"]",s,n,o);else if(e&&"[object Object]"===e.toString())for(r in e)buildParams(t+"["+r+"]",e[r],n,o);else o(t,e)}var win=window,doc=document,twoHundo=/^(20\d|1223)$/,byTag="getElementsByTagName",readyState="readyState",contentType="Content-Type",requestedWith="X-Requested-With",head=doc[byTag]("head")[0],uniqid=0,callbackPrefix="reqwest_"+ +new Date,lastValue,xmlHttpRequest="XMLHttpRequest",xDomainRequest="XDomainRequest",noop=function(){},isArray="function"==typeof Array.isArray?Array.isArray:function(t){return t instanceof Array},defaultHeaders={contentType:"application/x-www-form-urlencoded",requestedWith:xmlHttpRequest,accept:{"*":"text/javascript, text/html, application/xml, text/xml, */*",xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript",js:"application/javascript, text/javascript"}},xhr=function(t){if(t.crossOrigin===!0){var e=win[xmlHttpRequest]?new XMLHttpRequest:null;if(e&&"withCredentials"in e)return e;if(win[xDomainRequest])return new XDomainRequest;throw new Error("Browser does not support cross-origin requests")}return win[xmlHttpRequest]?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")},globalSetupOptions={dataFilter:function(t){return t}};return Reqwest.prototype={abort:function(){this._aborted=!0,this.request.abort()},retry:function(){init.call(this,this.o,this.fn)},then:function(t,e){return t=t||function(){},e=e||function(){},this._fulfilled?this._responseArgs.resp=t(this._responseArgs.resp):this._erred?e(this._responseArgs.resp,this._responseArgs.msg,this._responseArgs.t):(this._fulfillmentHandlers.push(t),this._errorHandlers.push(e)),this},always:function(t){return this._fulfilled||this._erred?t(this._responseArgs.resp):this._completeHandlers.push(t),this},fail:function(t){return this._erred?t(this._responseArgs.resp,this._responseArgs.msg,this._responseArgs.t):this._errorHandlers.push(t),this}},reqwest.serializeArray=function(){var t=[];return eachFormElement.apply(function(e,n){t.push({name:e,value:n})},arguments),t},reqwest.serialize=function(){if(0===arguments.length)return"";var t,e,n=Array.prototype.slice.call(arguments,0);return t=n.pop(),t&&t.nodeType&&n.push(t)&&(t=null),t&&(t=t.type),e="map"==t?serializeHash:"array"==t?reqwest.serializeArray:serializeQueryString,e.apply(null,n)},reqwest.toQueryString=function(t,e){var n,o,r=e||!1,i=[],s=encodeURIComponent,a=function(t,e){e="function"==typeof e?e():null==e?"":e,i[i.length]=s(t)+"="+s(e)};if(isArray(t))for(o=0;t&&o<t.length;o++)a(t[o].name,t[o].value);else for(n in t)t.hasOwnProperty(n)&&buildParams(n,t[n],r,a);return i.join("&").replace(/%20/g,"+")},reqwest.getcallbackPrefix=function(){return callbackPrefix},reqwest.compat=function(t,e){return t&&(t.type&&(t.method=t.type)&&delete t.type,t.dataType&&(t.type=t.dataType),t.jsonpCallback&&(t.jsonpCallbackName=t.jsonpCallback)&&delete t.jsonpCallback,t.jsonp&&(t.jsonpCallback=t.jsonp)),new Reqwest(t,e)},reqwest.ajaxSetup=function(t){t=t||{};for(var e in t)globalSetupOptions[e]=t[e]},reqwest});var inputfiles=function(t,e,n){"use strict";var o=e,n=n;return o.prototype.createInput=function(){},o.prototype.createReader=function(){},o.prototype.loadBytes=function(){},o.prototype.loadJSON=function(t,e){var o=[];return n(t,function(t){for(var n in t)o[n]=t[n];e(t)}),o},o.prototype.loadStrings=function(t,e){var n=[],o=new XMLHttpRequest;return o.open("GET",t,!0),o.onreadystatechange=function(){if(4===o.readyState&&(200===o.status||0===o.status)){var t=o.responseText.match(/[^\r\n]+/g);for(var r in t)n[r]=t[r];"undefined"!=typeof e&&e(n)}},o.send(null),n},o.prototype.loadTable=function(){},o.prototype.loadXML=function(t,e){var o=[],r=this;r.temp=[],n(t,function(t){r.log(t),r.temp=t,o[0]=t,"undefined"!=typeof e&&e(o)})},o.prototype.open=function(){},o.prototype.parseXML=function(){},o.prototype.saveTable=function(){},o.prototype.selectFolder=function(){},o.prototype.selectInput=function(){},o}({},core,reqwest),inputkeyboard=function(t,e){"use strict";var n=e;return n.prototype.isKeyPressed=n.prototype.keyIsPressed=function(){return this.keyDown},n.prototype.onkeydown=function(t){var e=this.keyPressed||window.keyPressed;this._setProperty("keyDown",!0),this._setProperty("keyCode",t.keyCode),this._setProperty("key",String.fromCharCode(t.keyCode)),"function"==typeof e&&e(t)},n.prototype.onkeyup=function(t){var e=this.keyReleased||window.keyReleased;this._setProperty("keyDown",!1),"function"==typeof e&&e(t)},n.prototype.onkeypress=function(t){var e=this.keyTyped||window.keyTyped;"function"==typeof e&&e(t)},n}({},core),inputtime_date=function(t,e){"use strict";var n=e;return n.prototype.day=function(){return(new Date).getDate()},n.prototype.hour=function(){return(new Date).getHours()},n.prototype.minute=function(){return(new Date).getMinutes()},n.prototype.millis=function(){return(new Date).getTime()-this.startTime},n.prototype.month=function(){return(new Date).getMonth()},n.prototype.second=function(){return(new Date).getSeconds()},n.prototype.year=function(){return(new Date).getFullYear()},n}({},core),mathrandom=function(t,e){"use strict";var n=e;return n.prototype.random=function(t,e){return"undefined"!=typeof t&&"undefined"!=typeof e?(e-t)*Math.random()+t:"undefined"!=typeof t?t*Math.random():Math.random()},n}({},core),mathnoise=function(t,e){"use strict";for(var n=e,o=4,r=1<<o,i=8,s=1<<i,a=4095,u=4,c=.5,h=.5,p=Math.floor(360/h),l=new Array(p),f=new Array(p),d=Math.PI/180,m=0;p>m;m++)l[m]=Math.sin(m*d*h),f[m]=Math.cos(m*d*h);var y=p;y>>=1;var g;return n.prototype.noise=function(t,e,n){if(e=e||0,n=n||0,null==g){g=new Array(a+1);for(var h=0;a+1>h;h++)g[h]=Math.random()}0>t&&(t=-t),0>e&&(e=-e),0>n&&(n=-n);for(var l,d,m,x,v,w=Math.floor(t),E=Math.floor(e),_=Math.floor(n),b=t-w,M=e-E,R=n-_,S=0,C=.5,T=function(t){return.5*(1-f[Math.floor(t*y)%p])},A=0;u>A;A++){var P=w+(E<<o)+(_<<i);l=T(b),d=T(M),m=g[P&a],m+=l*(g[P+1&a]-m),x=g[P+r&a],x+=l*(g[P+r+1&a]-x),m+=d*(x-m),P+=s,x=g[P&a],x+=l*(g[P+1&a]-x),v=g[P+r&a],v+=l*(g[P+r+1&a]-v),x+=d*(v-x),m+=T(R)*(x-m),S+=m*C,C*=c,w<<=1,b*=2,E<<=1,M*=2,_<<=1,R*=2,b>=1&&(w++,b--),M>=1&&(E++,M--),R>=1&&(_++,R--)}return S},n.prototype.noiseDetail=function(t,e){t>0&&(u=t),e>0&&(c=e)},n.prototype.noiseSeed=function(){},n}({},core),polargeometry=function(){return{degreesToRadians:function(t){return 2*Math.PI*t/360},radiansToDegrees:function(t){return 360*t/(2*Math.PI)}}}({}),mathtrigonometry=function(t,e,n,o){"use strict";var r=e,i=n,o=o;return r.prototype.acos=Math.acos,r.prototype.asin=Math.asin,r.prototype.atan=Math.atan,r.prototype.atan2=Math.atan2,r.prototype.cos=function(t){return Math.cos(this.radians(t))},r.prototype.degrees=function(t){return this.settings.angleMode===o.DEGREES?t:i.radiansToDegrees(t)},r.prototype.radians=function(t){return this.settings.angleMode===o.RADIANS?t:i.degreesToRadians(t)},r.prototype.sin=function(t){return Math.sin(this.radians(t))},r.prototype.tan=function(t){return Math.tan(this.radians(t))},r.prototype.angleMode=function(t){(t===o.DEGREES||t===o.RADIANS)&&(this.settings.angleMode=t)},r}({},core,polargeometry,constants),outputfiles=function(t,e){"use strict";var n=e;return n.prototype.beginRaw=function(){},n.prototype.beginRecord=function(){},n.prototype.createOutput=function(){},n.prototype.createWriter=function(t){-1===this.pWriters.indexOf(t)&&(this.pWriters.name=new this.PrintWriter(t))},n.prototype.endRaw=function(){},n.prototype.endRecord=function(){},n.prototype.escape=function(t){return t},n.prototype.PrintWriter=function(t){this.name=t,this.content="",this.print=function(t){this.content+=t},this.println=function(t){this.content+=t+"\n"},this.flush=function(){this.content=""},this.close=function(){this.writeFile(this.content)}},n.prototype.saveBytes=function(){},n.prototype.saveJSONArray=function(){},n.prototype.saveJSONObject=function(){},n.prototype.saveStream=function(){},n.prototype.saveStrings=function(t){this.writeFile(t.join("\n"))},n.prototype.saveXML=function(){},n.prototype.selectOutput=function(){},n.prototype.writeFile=function(t){this.open("data:text/json;charset=utf-8,"+this.escape(t),"download")},n}({},core),outputimage=function(t,e){"use strict";var n=e;return n.prototype.save=function(){this.open(this.curElement.elt.toDataURL("image/png"))},n}({},core),log=function(t,e){"use strict";var n=e;return n.prototype.log=function(){window.console&&console.log&&console.log.apply(console,arguments)},n}({},core),outputtext_area=function(t,e){"use strict";var n=e;return n.prototype.print=n.prototype.log,n.prototype.println=n.prototype.log,n}({},core,log),shape2d_primitives=function(t,e,n,o){"use strict";var r=e,n=n,o=o;return r.prototype.arc=function(t,e,r,i,s,a,u){var c=n.modeAdjust(t,e,r,i,this.settings.ellipseMode),h=c.h>c.w?c.h/2:c.w/2,p=c.h>c.w?c.w/c.h:1,l=c.h>c.w?1:c.h/c.w;return this.curElement.context.scale(p,l),this.curElement.context.beginPath(),this.curElement.context.arc(c.x,c.y,h,s,a),this.curElement.context.stroke(),u===o.CHORD||u===o.OPEN?this.curElement.context.closePath():(u===o.PIE||void 0===u)&&(this.curElement.context.lineTo(c.x,c.y),this.curElement.context.closePath()),this.curElement.context.fill(),u!==o.OPEN&&void 0!==u&&this.curElement.context.stroke(),this},r.prototype.ellipse=function(t,e,o,r){var i=n.modeAdjust(t,e,o,r,this.settings.ellipseMode),s=.5522848,a=i.w/2*s,u=i.h/2*s,c=i.x+i.w,h=i.y+i.h,p=i.x+i.w/2,l=i.y+i.h/2;return this.curElement.context.beginPath(),this.curElement.context.moveTo(i.x,l),this.curElement.context.bezierCurveTo(i.x,l-u,p-a,i.y,p,i.y),this.curElement.context.bezierCurveTo(p+a,i.y,c,l-u,c,l),this.curElement.context.bezierCurveTo(c,l+u,p+a,h,p,h),this.curElement.context.bezierCurveTo(p-a,h,i.x,l+u,i.x,l),this.curElement.context.closePath(),this.curElement.context.fill(),this.curElement.context.stroke(),this},r.prototype.line=function(t,e,n,o){return"rgba(0,0,0,0)"!==this.curElement.context.strokeStyle?(this.curElement.context.beginPath(),this.curElement.context.moveTo(t,e),this.curElement.context.lineTo(n,o),this.curElement.context.stroke(),this):void 0},r.prototype.point=function(t,e){var n=this.curElement.context.strokeStyle,r=this.curElement.context.fillStyle;return"rgba(0,0,0,0)"!==n?(t=Math.round(t),e=Math.round(e),this.curElement.context.fillStyle=n,this.curElement.context.lineWidth>1?(this.curElement.context.beginPath(),this.curElement.context.arc(t,e,this.curElement.context.lineWidth/2,0,o.TWO_PI,!1),this.curElement.context.fill()):this.curElement.context.fillRect(t,e,1,1),this.curElement.context.fillStyle=r,this):void 0},r.prototype.quad=function(t,e,n,o,r,i,s,a){return this.curElement.context.beginPath(),this.curElement.context.moveTo(t,e),this.curElement.context.lineTo(n,o),this.curElement.context.lineTo(r,i),this.curElement.context.lineTo(s,a),this.curElement.context.closePath(),this.curElement.context.fill(),this.curElement.context.stroke(),this},r.prototype.rect=function(t,e,o,r){var i=n.modeAdjust(t,e,o,r,this.settings.rectMode);return this.curElement.context.beginPath(),this.curElement.context.rect(i.x,i.y,i.w,i.h),this.curElement.context.fill(),this.curElement.context.stroke(),this},r.prototype.triangle=function(t,e,n,o,r,i){return this.curElement.context.beginPath(),this.curElement.context.moveTo(t,e),this.curElement.context.lineTo(n,o),this.curElement.context.lineTo(r,i),this.curElement.context.closePath(),this.curElement.context.fill(),this.curElement.context.stroke(),this},r}({},core,canvas,constants),shapeattributes=function(t,e,n){"use strict";var o=e,n=n;return o.prototype.ellipseMode=function(t){return(t===n.CORNER||t===n.CORNERS||t===n.RADIUS||t===n.CENTER)&&(this.settings.ellipseMode=t),this},o.prototype.noSmooth=function(){return this.curElement.context.mozImageSmoothingEnabled=!1,this.curElement.context.webkitImageSmoothingEnabled=!1,this},o.prototype.rectMode=function(t){return(t===n.CORNER||t===n.CORNERS||t===n.RADIUS||t===n.CENTER)&&(this.settings.rectMode=t),this},o.prototype.smooth=function(){return this.curElement.context.mozImageSmoothingEnabled=!0,this.curElement.context.webkitImageSmoothingEnabled=!0,this},o.prototype.strokeCap=function(t){return(t===n.ROUND||t===n.SQUARE||t===n.PROJECT)&&(this.curElement.context.lineCap=t),this},o.prototype.strokeJoin=function(t){return(t===n.ROUND||t===n.BEVEL||t===n.MITER)&&(this.curElement.context.lineJoin=t),this},o.prototype.strokeWeight=function(t){return this.curElement.context.lineWidth="undefined"==typeof t||0===t?1e-4:t,this},o}({},core,constants),shapecurves=function(t,e){"use strict";var n=e;return n.prototype.bezier=function(t,e,n,o,r,i,s,a){return this.curElement.context.beginPath(),this.curElement.context.moveTo(t,e),this.curElement.context.bezierCurveTo(n,o,r,i,s,a),this.curElement.context.stroke(),this},n.prototype.bezierDetail=function(){},n.prototype.bezierPoint=function(){},n.prototype.bezierTangent=function(){},n.prototype.curve=function(){},n.prototype.curveDetail=function(){},n.prototype.curvePoint=function(){},n.prototype.curveTangent=function(){},n.prototype.curveTightness=function(){},n}({},core),shapevertex=function(t,e,n){"use strict";var o=e,n=n;return o.prototype.beginContour=function(){},o.prototype.beginShape=function(t){return this.shapeKind=t===n.POINTS||t===n.LINES||t===n.TRIANGLES||t===n.TRIANGLE_FAN||t===n.TRIANGLE_STRIP||t===n.QUADS||t===n.QUAD_STRIP?t:null,this.shapeInited=!0,this.curElement.context.beginPath(),this},o.prototype.bezierVertex=function(t,e,n,o,r,i){return this.curElement.context.bezierCurveTo(t,e,n,o,r,i),this},o.prototype.curveVertex=function(){},o.prototype.endContour=function(){},o.prototype.endShape=function(t){return t===n.CLOSE&&(this.curElement.context.closePath(),this.curElement.context.fill()),this.curElement.context.stroke(),this},o.prototype.quadraticVertex=function(t,e,n,o){return this.curElement.context.quadraticCurveTo(t,e,n,o),this},o.prototype.vertex=function(t,e){return this.shapeInited?this.curElement.context.moveTo(t,e):this.curElement.context.lineTo(t,e),this.shapeInited=!1,this},o}({},core,constants),structure=function(t,e){"use strict";var n=e;return n.prototype.exit=function(){throw"Not implemented"},n.prototype.noLoop=function(){this.settings.loop=!1},n.prototype.loop=function(){this.settings.loop=!0},n.prototype.pushStyle=function(){this.styles.push({fillStyle:this.curElement.context.fillStyle,strokeStyle:this.curElement.context.strokeStyle,lineWidth:this.curElement.context.lineWidth,lineCap:this.curElement.context.lineCap,lineJoin:this.curElement.context.lineJoin,imageMode:this.settings.imageMode,rectMode:this.settings.rectMode,ellipseMode:this.settings.ellipseMode,colorMode:this.settings.colorMode,textAlign:this.curElement.context.textAlign,textFont:this.settings.textFont,textLeading:this.settings.textLeading,textSize:this.settings.textSize,textStyle:this.settings.textStyle})},n.prototype.popStyle=function(){var t=this.styles.pop();this.curElement.context.fillStyle=t.fillStyle,this.curElement.context.strokeStyle=t.strokeStyle,this.curElement.context.lineWidth=t.lineWidth,this.curElement.context.lineCap=t.lineCap,this.curElement.context.lineJoin=t.lineJoin,this.settings.imageMode=t.imageMode,this.settings.rectMode=t.rectMode,this.settings.ellipseMode=t.ellipseMode,this.settings.colorMode=t.colorMode,this.curElement.context.textAlign=t.textAlign,this.settings.textFont=t.textFont,this.settings.textLeading=t.textLeading,this.settings.textSize=t.textSize,this.settings.textStyle=t.textStyle},n.prototype.redraw=function(){throw"Not implemented"},n.prototype.size=function(){throw"Not implemented"},n}({},core),linearalgebra=function(){return{pMultiplyMatrix:function(t,e){for(var n=[],o=t.length,r=e.length,i=t[0].length,s=0;r>s;s++){n[s]=[];for(var a=0;i>a;a++){for(var u=0,c=0;o>c;c++)u+=t[c][a]*e[s][c];n[s].push(u)}}return n}}}({}),transform=function(t,e,n){"use strict";var o=e,r=n;return o.prototype.applyMatrix=function(t,e,n,o,i,s){this.curElement.context.transform(t,e,n,o,i,s);var a=this.matrices[this.matrices.length-1];return a=r.pMultiplyMatrix(a,[t,e,n,o,i,s]),this},o.prototype.popMatrix=function(){return this.curElement.context.restore(),this.matrices.pop(),this},o.prototype.printMatrix=function(){return this.log(this.matrices[this.matrices.length-1]),this},o.prototype.pushMatrix=function(){return this.curElement.context.save(),this.matrices.push([1,0,0,1,0,0]),this},o.prototype.resetMatrix=function(){return this.curElement.context.setTransform(),this.matrices[this.matrices.length-1]=[1,0,0,1,0,0],this},o.prototype.rotate=function(t){t=this.radians(t),this.curElement.context.rotate(t);var e=this.matrices[this.matrices.length-1],n=Math.cos(t),o=Math.sin(t),r=e[0]*n+e[2]*o,i=e[1]*n+e[3]*o,s=e[0]*-o+e[2]*n,a=e[1]*-o+e[3]*n;return e[0]=r,e[1]=i,e[2]=s,e[3]=a,this},o.prototype.rotateX=function(){},o.prototype.rotateY=function(){},o.prototype.rotateZ=function(){},o.prototype.scale=function(){var t=1,e=1;1===arguments.length?t=e=arguments[0]:(t=arguments[0],e=arguments[1]),this.curElement.context.scale(t,e);var n=this.matrices[this.matrices.length-1];return n[0]*=t,n[1]*=t,n[2]*=e,n[3]*=e,this},o.prototype.shearX=function(t){this.curElement.context.transform(1,0,this.tan(t),1,0,0);var e=this.matrices[this.matrices.length-1];return e=r.pMultiplyMatrix(e,[1,0,this.tan(t),1,0,0]),this},o.prototype.shearY=function(t){this.curElement.context.transform(1,this.tan(t),0,1,0,0);var e=this.matrices[this.matrices.length-1];return e=r.pMultiplyMatrix(e,[1,this.tan(t),0,1,0,0]),this},o.prototype.translate=function(t,e){this.curElement.context.translate(t,e);var n=this.matrices[this.matrices.length-1];return n[4]+=n[0]*t+n[2]*e,n[5]+=n[1]*t+n[3]*e,this},o}({},core,linearalgebra,log),typographyattributes=function(t,e,n){"use strict";var o=e,n=n;return o.prototype.textAlign=function(t){(t===n.LEFT||t===n.RIGHT||t===n.CENTER)&&(this.curElement.context.textAlign=t)},o.prototype.textFont=function(t){this._setProperty("_textFont",t)},o.prototype.textHeight=function(t){return this.curElement.context.measureText(t).height},o.prototype.textLeading=function(t){this._setProperty("_textLeading",t)},o.prototype.textSize=function(t){this._setProperty("_textSize",t)},o.prototype.textStyle=function(t){(t===n.NORMAL||t===n.ITALIC||t===n.BOLD)&&this._setProperty("_textStyle",t)},o.prototype.textWidth=function(t){return this.curElement.context.measureText(t).width},o}({},core,constants),typographyloading_displaying=function(t,e){"use strict";var n=e;return n.prototype.text=function(){if(this.curElement.context.font=this._textStyle+" "+this._textSize+"px "+this._textFont,3===arguments.length)this.curElement.context.fillText(arguments[0],arguments[1],arguments[2]),this.curElement.context.strokeText(arguments[0],arguments[1],arguments[2]);else if(5===arguments.length){var t=arguments[0].split(" "),e="",n=this.modeAdjust(arguments[1],arguments[2],arguments[3],arguments[4],this.rectMode);n.y+=this.textLeading;for(var o=0;o<t.length;o++){var r=e+t[o]+" ",i=this.curElement.context.measureText(r),s=i.width;if(n.y>n.h)break;s>n.w&&o>0?(this.curElement.context.fillText(e,n.x,n.y),this.curElement.context.strokeText(e,n.x,n.y),e=t[o]+" ",n.y+=this.textLeading):e=r}n.y<=n.h&&(this.curElement.context.fillText(e,n.x,n.y),this.curElement.context.strokeText(e,n.x,n.y))}},n}({},core),src_p5=function(t,e,n){"use strict";var o=e,r=n;return"complete"===document.readyState?o._init():window.addEventListener("load",o._init,!1),window.p5=o,window.PVector=r,o}({},core,mathpvector,colorcreating_reading,colorsetting,dataarray_functions,datastring_functions,dommanipulate,dompelement,environment,image,imageloading_displaying,inputfiles,inputkeyboard,inputmouse,inputtime_date,inputtouch,mathcalculation,mathrandom,mathnoise,mathtrigonometry,outputfiles,outputimage,outputtext_area,shape2d_primitives,shapeattributes,shapecurves,shapevertex,structure,transform,typographyattributes,typographyloading_displaying)}(); | mival/cdnjs | ajax/libs/p5.js/0.2.0/p5.min.js | JavaScript | mit | 52,819 |
var requirejs,require,define;(function(global){function isFunction(a){return"[object Function]"===ostring.call(a)}function isArray(a){return"[object Array]"===ostring.call(a)}function each(a,b){if(a){var c;for(c=0;a.length>c&&(!a[c]||!b(a[c],c,a));c+=1);}}function eachReverse(a,b){if(a){var c;for(c=a.length-1;c>-1&&(!a[c]||!b(a[c],c,a));c-=1);}}function hasProp(a,b){return hasOwn.call(a,b)}function getOwn(a,b){return hasProp(a,b)&&a[b]}function eachProp(a,b){var c;for(c in a)if(hasProp(a,c)&&b(a[c],c))break}function mixin(a,b,c,d){return b&&eachProp(b,function(b,e){(c||!hasProp(a,e))&&(d&&"string"!=typeof b?(a[e]||(a[e]={}),mixin(a[e],b,c,d)):a[e]=b)}),a}function bind(a,b){return function(){return b.apply(a,arguments)}}function scripts(){return document.getElementsByTagName("script")}function getGlobal(a){if(!a)return a;var b=global;return each(a.split("."),function(a){b=b[a]}),b}function makeError(a,b,c,d){var e=Error(b+"\nhttp://requirejs.org/docs/errors.html#"+a);return e.requireType=a,e.requireModules=d,c&&(e.originalError=c),e}function newContext(a){function o(a){var b,c;for(b=0;a[b];b+=1)if(c=a[b],"."===c)a.splice(b,1),b-=1;else if(".."===c){if(1===b&&(".."===a[2]||".."===a[0]))break;b>0&&(a.splice(b-1,2),b-=2)}}function p(a,b,c){var d,e,f,h,i,j,k,l,m,n,p,q=b&&b.split("/"),r=q,s=g.map,t=s&&s["*"];if(a&&"."===a.charAt(0)&&(b?(r=getOwn(g.pkgs,b)?q=[b]:q.slice(0,q.length-1),a=r.concat(a.split("/")),o(a),e=getOwn(g.pkgs,d=a[0]),a=a.join("/"),e&&a===d+"/"+e.main&&(a=d)):0===a.indexOf("./")&&(a=a.substring(2))),c&&(q||t)&&s){for(h=a.split("/"),i=h.length;i>0;i-=1){if(k=h.slice(0,i).join("/"),q)for(j=q.length;j>0;j-=1)if(f=getOwn(s,q.slice(0,j).join("/")),f&&(f=getOwn(f,k))){l=f,m=i;break}if(l)break;!n&&t&&getOwn(t,k)&&(n=getOwn(t,k),p=i)}!l&&n&&(l=n,m=p),l&&(h.splice(0,m,l),a=h.join("/"))}return a}function q(a){isBrowser&&each(scripts(),function(b){return b.getAttribute("data-requiremodule")===a&&b.getAttribute("data-requirecontext")===d.contextName?(b.parentNode.removeChild(b),!0):void 0})}function r(a){var b=getOwn(g.paths,a);return b&&isArray(b)&&b.length>1?(q(a),b.shift(),d.require.undef(a),d.require([a]),!0):void 0}function s(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function t(a,b,c,e){var f,g,h,i,j=null,l=b?b.name:null,o=a,q=!0,r="";return a||(q=!1,a="_@r"+(m+=1)),i=s(a),j=i[0],a=i[1],j&&(j=p(j,l,e),g=getOwn(k,j)),a&&(j?r=g&&g.normalize?g.normalize(a,function(a){return p(a,l,e)}):p(a,l,e):(r=p(a,l,e),i=s(r),j=i[0],r=i[1],c=!0,f=d.nameToUrl(r))),h=!j||g||c?"":"_unnormalized"+(n+=1),{prefix:j,name:r,parentMap:b,unnormalized:!!h,url:f,originalName:o,isDefine:q,id:(j?j+"!"+r:r)+h}}function u(a){var b=a.id,c=getOwn(h,b);return c||(c=h[b]=new d.Module(a)),c}function v(a,b,c){var d=a.id,e=getOwn(h,d);!hasProp(k,d)||e&&!e.defineEmitComplete?u(a).on(b,c):"defined"===b&&c(k[d])}function w(a,b){var c=a.requireModules,d=!1;b?b(a):(each(c,function(b){var c=getOwn(h,b);c&&(c.error=a,c.events.error&&(d=!0,c.emit("error",a)))}),d||req.onError(a))}function x(){globalDefQueue.length&&(apsp.apply(j,[j.length-1,0].concat(globalDefQueue)),globalDefQueue=[])}function y(a){delete h[a]}function z(a,b,c){var d=a.map.id;a.error?a.emit("error",a.error):(b[d]=!0,each(a.depMaps,function(d,e){var f=d.id,g=getOwn(h,f);!g||a.depMatched[e]||c[f]||(getOwn(b,f)?(a.defineDep(e,k[f]),a.check()):z(g,b,c))}),c[d]=!0)}function A(){var a,c,e,i,j=1e3*g.waitSeconds,k=j&&d.startTime+j<(new Date).getTime(),l=[],m=[],n=!1,o=!0;if(!b){if(b=!0,eachProp(h,function(b){if(a=b.map,c=a.id,b.enabled&&(a.isDefine||m.push(b),!b.error))if(!b.inited&&k)r(c)?(i=!0,n=!0):(l.push(c),q(c));else if(!b.inited&&b.fetched&&a.isDefine&&(n=!0,!a.prefix))return o=!1}),k&&l.length)return e=makeError("timeout","Load timeout for modules: "+l,null,l),e.contextName=d.contextName,w(e);o&&each(m,function(a){z(a,{},{})}),k&&!i||!n||!isBrowser&&!isWebWorker||f||(f=setTimeout(function(){f=0,A()},50)),b=!1}}function B(a){hasProp(k,a[0])||u(t(a[0],null,!0)).init(a[1],a[2])}function C(a,b,c,d){a.detachEvent&&!isOpera?d&&a.detachEvent(d,b):a.removeEventListener(c,b,!1)}function D(a){var b=a.currentTarget||a.srcElement;return C(b,d.onScriptLoad,"load","onreadystatechange"),C(b,d.onScriptError,"error"),{node:b,id:b&&b.getAttribute("data-requiremodule")}}function E(){var a;for(x();j.length;){if(a=j.shift(),null===a[0])return w(makeError("mismatch","Mismatched anonymous define() module: "+a[a.length-1]));B(a)}}var b,c,d,e,f,g={waitSeconds:7,baseUrl:"./",paths:{},pkgs:{},shim:{},map:{},config:{}},h={},i={},j=[],k={},l={},m=1,n=1;return e={require:function(a){return a.require?a.require:a.require=d.makeRequire(a.map)},exports:function(a){return a.usingExports=!0,a.map.isDefine?a.exports?a.exports:a.exports=k[a.map.id]={}:void 0},module:function(a){return a.module?a.module:a.module={id:a.map.id,uri:a.map.url,config:function(){return g.config&&getOwn(g.config,a.map.id)||{}},exports:k[a.map.id]}}},c=function(a){this.events=getOwn(i,a.id)||{},this.map=a,this.shim=getOwn(g.shim,a.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0},c.prototype={init:function(a,b,c,d){d=d||{},this.inited||(this.factory=b,c?this.on("error",c):this.events.error&&(c=bind(this,function(a){this.emit("error",a)})),this.depMaps=a&&a.slice(0),this.errback=c,this.inited=!0,this.ignore=d.ignore,d.enabled||this.enabled?this.enable():this.check())},defineDep:function(a,b){this.depMatched[a]||(this.depMatched[a]=!0,this.depCount-=1,this.depExports[a]=b)},fetch:function(){if(!this.fetched){this.fetched=!0,d.startTime=(new Date).getTime();var a=this.map;return this.shim?(d.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],bind(this,function(){return a.prefix?this.callPlugin():this.load()})),void 0):a.prefix?this.callPlugin():this.load()}},load:function(){var a=this.map.url;l[a]||(l[a]=!0,d.load(this.map.id,a))},check:function(){if(this.enabled&&!this.enabling){var a,b,c=this.map.id,e=this.depExports,f=this.exports,g=this.factory;if(this.inited){if(this.error)this.emit("error",this.error);else if(!this.defining){if(this.defining=!0,1>this.depCount&&!this.defined){if(isFunction(g)){if(this.events.error)try{f=d.execCb(c,g,e,f)}catch(i){a=i}else f=d.execCb(c,g,e,f);if(this.map.isDefine&&(b=this.module,b&&void 0!==b.exports&&b.exports!==this.exports?f=b.exports:void 0===f&&this.usingExports&&(f=this.exports)),a)return a.requireMap=this.map,a.requireModules=[this.map.id],a.requireType="define",w(this.error=a)}else f=g;this.exports=f,this.map.isDefine&&!this.ignore&&(k[c]=f,req.onResourceLoad&&req.onResourceLoad(d,this.map,this.depMaps)),delete h[c],this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else this.fetch()}},callPlugin:function(){var a=this.map,b=a.id,c=t(a.prefix);this.depMaps.push(c),v(c,"defined",bind(this,function(c){var e,f,i,j=this.map.name,k=this.map.parentMap?this.map.parentMap.name:null,l=d.makeRequire(a.parentMap,{enableBuildCallback:!0,skipMap:!0});return this.map.unnormalized?(c.normalize&&(j=c.normalize(j,function(a){return p(a,k,!0)})||""),f=t(a.prefix+"!"+j,this.map.parentMap),v(f,"defined",bind(this,function(a){this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),i=getOwn(h,f.id),i&&(this.depMaps.push(f),this.events.error&&i.on("error",bind(this,function(a){this.emit("error",a)})),i.enable()),void 0):(e=bind(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),e.error=bind(this,function(a){this.inited=!0,this.error=a,a.requireModules=[b],eachProp(h,function(a){0===a.map.id.indexOf(b+"_unnormalized")&&y(a.map.id)}),w(a)}),e.fromText=bind(this,function(c,f){var h=a.name,i=t(h),j=useInteractive;f&&(c=f),j&&(useInteractive=!1),u(i),hasProp(g.config,b)&&(g.config[h]=g.config[b]);try{req.exec(c)}catch(k){throw Error("fromText eval for "+h+" failed: "+k)}j&&(useInteractive=!0),this.depMaps.push(i),d.completeLoad(h),l([h],e)}),c.load(a.name,l,e,g),void 0)})),d.enable(c,this),this.pluginMaps[c.id]=c},enable:function(){this.enabled=!0,this.enabling=!0,each(this.depMaps,bind(this,function(a,b){var c,f,g;if("string"==typeof a){if(a=t(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[b]=a,g=getOwn(e,a.id))return this.depExports[b]=g(this),void 0;this.depCount+=1,v(a,"defined",bind(this,function(a){this.defineDep(b,a),this.check()})),this.errback&&v(a,"error",this.errback)}c=a.id,f=h[c],hasProp(e,c)||!f||f.enabled||d.enable(a,this)})),eachProp(this.pluginMaps,bind(this,function(a){var b=getOwn(h,a.id);b&&!b.enabled&&d.enable(a,this)})),this.enabling=!1,this.check()},on:function(a,b){var c=this.events[a];c||(c=this.events[a]=[]),c.push(b)},emit:function(a,b){each(this.events[a],function(a){a(b)}),"error"===a&&delete this.events[a]}},d={config:g,contextName:a,registry:h,defined:k,urlFetched:l,defQueue:j,Module:c,makeModuleMap:t,nextTick:req.nextTick,configure:function(a){a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/");var b=g.pkgs,c=g.shim,e={paths:!0,config:!0,map:!0};eachProp(a,function(a,b){e[b]?"map"===b?mixin(g[b],a,!0,!0):mixin(g[b],a,!0):g[b]=a}),a.shim&&(eachProp(a.shim,function(a,b){isArray(a)&&(a={deps:a}),!a.exports&&!a.init||a.exportsFn||(a.exportsFn=d.makeShimExports(a)),c[b]=a}),g.shim=c),a.packages&&(each(a.packages,function(a){var c;a="string"==typeof a?{name:a}:a,c=a.location,b[a.name]={name:a.name,location:c||a.name,main:(a.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}}),g.pkgs=b),eachProp(h,function(a,b){a.inited||a.map.unnormalized||(a.map=t(b))}),(a.deps||a.callback)&&d.require(a.deps||[],a.callback)},makeShimExports:function(a){function b(){var b;return a.init&&(b=a.init.apply(global,arguments)),b||a.exports&&getGlobal(a.exports)}return b},makeRequire:function(b,c){function f(g,i,j){var l,m,n;return c.enableBuildCallback&&i&&isFunction(i)&&(i.__requireJsBuild=!0),"string"==typeof g?isFunction(i)?w(makeError("requireargs","Invalid require call"),j):b&&hasProp(e,g)?e[g](h[b.id]):req.get?req.get(d,g,b):(m=t(g,b,!1,!0),l=m.id,hasProp(k,l)?k[l]:w(makeError("notloaded",'Module name "'+l+'" has not been loaded yet for context: '+a+(b?"":". Use require([])")))):(E(),d.nextTick(function(){E(),n=u(t(null,b)),n.skipMap=c.skipMap,n.init(g,i,j,{enabled:!0}),A()}),f)}return c=c||{},mixin(f,{isBrowser:isBrowser,toUrl:function(a){var c=a.lastIndexOf("."),e=null;return-1!==c&&(e=a.substring(c,a.length),a=a.substring(0,c)),d.nameToUrl(p(a,b&&b.id,!0),e)},defined:function(a){return hasProp(k,t(a,b,!1,!0).id)},specified:function(a){return a=t(a,b,!1,!0).id,hasProp(k,a)||hasProp(h,a)}}),b||(f.undef=function(a){x();var c=t(a,b,!0),d=getOwn(h,a);delete k[a],delete l[c.url],delete i[a],d&&(d.events.defined&&(i[a]=d.events),y(a))}),f},enable:function(a){var c=getOwn(h,a.id);c&&u(a).enable()},completeLoad:function(a){var b,c,d,e=getOwn(g.shim,a)||{},f=e.exports;for(x();j.length;){if(c=j.shift(),null===c[0]){if(c[0]=a,b)break;b=!0}else c[0]===a&&(b=!0);B(c)}if(d=getOwn(h,a),!b&&!hasProp(k,a)&&d&&!d.inited){if(!(!g.enforceDefine||f&&getGlobal(f)))return r(a)?void 0:w(makeError("nodefine","No define call for "+a,null,[a]));B([a,e.deps||[],e.exportsFn])}A()},nameToUrl:function(a,b){var c,d,e,f,h,i,j,k,l;if(req.jsExtRegExp.test(a))k=a+(b||"");else{for(c=g.paths,d=g.pkgs,h=a.split("/"),i=h.length;i>0;i-=1){if(j=h.slice(0,i).join("/"),e=getOwn(d,j),l=getOwn(c,j)){isArray(l)&&(l=l[0]),h.splice(0,i,l);break}if(e){f=a===e.name?e.location+"/"+e.main:e.location,h.splice(0,i,f);break}}k=h.join("/"),k+=b||(/\?/.test(k)?"":".js"),k=("/"===k.charAt(0)||k.match(/^[\w\+\.\-]+:/)?"":g.baseUrl)+k}return g.urlArgs?k+((-1===k.indexOf("?")?"?":"&")+g.urlArgs):k},load:function(a,b){req.load(d,a,b)},execCb:function(a,b,c,d){return b.apply(d,c)},onScriptLoad:function(a){if("load"===a.type||readyRegExp.test((a.currentTarget||a.srcElement).readyState)){interactiveScript=null;var b=D(a);d.completeLoad(b.id)}},onScriptError:function(a){var b=D(a);return r(b.id)?void 0:w(makeError("scripterror","Script error",a,[b.id]))}},d.require=d.makeRequire(),d}function getInteractiveScript(){return interactiveScript&&"interactive"===interactiveScript.readyState?interactiveScript:(eachReverse(scripts(),function(a){return"interactive"===a.readyState?interactiveScript=a:void 0}),interactiveScript)}var req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.1.2",commentRegExp=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,ap=Array.prototype,aps=ap.slice,apsp=ap.splice,isBrowser=!("undefined"==typeof window||!navigator||!document),isWebWorker=!isBrowser&&"undefined"!=typeof importScripts,readyRegExp=isBrowser&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera="undefined"!=typeof opera&&"[object Opera]"==""+opera,contexts={},cfg={},globalDefQueue=[],useInteractive=!1;if(void 0===define){if(requirejs!==void 0){if(isFunction(requirejs))return;cfg=requirejs,requirejs=void 0}void 0===require||isFunction(require)||(cfg=require,require=void 0),req=requirejs=function(a,b,c,d){var e,f,g=defContextName;return isArray(a)||"string"==typeof a||(f=a,isArray(b)?(a=b,b=c,c=d):a=[]),f&&f.context&&(g=f.context),e=getOwn(contexts,g),e||(e=contexts[g]=req.s.newContext(g)),f&&e.configure(f),e.require(a,b,c)},req.config=function(a){return req(a)},req.nextTick="undefined"!=typeof setTimeout?function(a){setTimeout(a,4)}:function(a){a()},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),each(["toUrl","undef","defined","specified"],function(a){req[a]=function(){var b=contexts[defContextName];return b.require[a].apply(b,arguments)}}),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],baseElement=document.getElementsByTagName("base")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=function(a){throw a},req.load=function(a,b,c){var e,d=a&&a.config||{};return isBrowser?(e=d.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script"),e.type=d.scriptType||"text/javascript",e.charset="utf-8",e.async=!0,e.setAttribute("data-requirecontext",a.contextName),e.setAttribute("data-requiremodule",b),!e.attachEvent||e.attachEvent.toString&&0>(""+e.attachEvent).indexOf("[native code")||isOpera?(e.addEventListener("load",a.onScriptLoad,!1),e.addEventListener("error",a.onScriptError,!1)):(useInteractive=!0,e.attachEvent("onreadystatechange",a.onScriptLoad)),e.src=c,currentlyAddingScript=e,baseElement?head.insertBefore(e,baseElement):head.appendChild(e),currentlyAddingScript=null,e):(isWebWorker&&(importScripts(c),a.completeLoad(b)),void 0)},isBrowser&&eachReverse(scripts(),function(a){return head||(head=a.parentNode),dataMain=a.getAttribute("data-main"),dataMain?(cfg.baseUrl||(src=dataMain.split("/"),mainScript=src.pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath,dataMain=mainScript),dataMain=dataMain.replace(jsSuffixRegExp,""),cfg.deps=cfg.deps?cfg.deps.concat(dataMain):[dataMain],!0):void 0}),define=function(a,b,c){var d,e;"string"!=typeof a&&(c=b,b=a,a=null),isArray(b)||(c=b,b=[]),!b.length&&isFunction(c)&&c.length&&((""+c).replace(commentRegExp,"").replace(cjsRequireRegExp,function(a,c){b.push(c)}),b=(1===c.length?["require"]:["require","exports","module"]).concat(b)),useInteractive&&(d=currentlyAddingScript||getInteractiveScript(),d&&(a||(a=d.getAttribute("data-requiremodule")),e=contexts[d.getAttribute("data-requirecontext")])),(e?e.defQueue:globalDefQueue).push([a,b,c])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg)}})(this),function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&1===a.nodeType){var e="data-"+c.replace(I,"-$1").toLowerCase();if(d=a.getAttribute(e),"string"==typeof d){try{d="true"===d?!0:"false"===d?!1:"null"===d?null:+d+""===d?+d:H.test(d)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in a)if(("data"!==b||!p.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function ab(){return!1}function bb(){return!0}function hb(a){return!a||!a.parentNode||11===a.parentNode.nodeType}function ib(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}function jb(a,b,c){if(b=b||0,p.isFunction(b))return p.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a){return a===b===c});if("string"==typeof b){var d=p.grep(a,function(a){return 1===a.nodeType});if(eb.test(b))return p.filter(b,d,!c);b=p.filter(b,d)}return p.grep(a,function(a){return p.inArray(a,b)>=0===c})}function kb(a){var b=lb.split("|"),c=a.createDocumentFragment();if(c.createElement)for(;b.length;)c.createElement(b.pop());return c}function Cb(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function Db(a,b){if(1===b.nodeType&&p.hasData(a)){var c,d,e,f=p._data(a),g=p._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)p.event.add(b,c,h[c][d])}g.data&&(g.data=p.extend({},g.data))}}function Eb(a,b){var c;1===b.nodeType&&(b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),p.support.html5Clone&&a.innerHTML&&!p.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&vb.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.selected=a.defaultSelected:"input"===c||"textarea"===c?b.defaultValue=a.defaultValue:"script"===c&&b.text!==a.text&&(b.text=a.text),b.removeAttribute(p.expando))}function Fb(a){return a.getElementsByTagName!==b?a.getElementsByTagName("*"):a.querySelectorAll!==b?a.querySelectorAll("*"):[]}function Gb(a){vb.test(a.type)&&(a.defaultChecked=a.checked)}function Yb(a,b){if(b in a)return b;for(var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Wb.length;e--;)if(b=Wb[e]+c,b in a)return b;return d}function Zb(a,b){return a=b||a,"none"===p.css(a,"display")||!p.contains(a.ownerDocument,a)}function $b(a,b){for(var c,d,e=[],f=0,g=a.length;g>f;f++)c=a[f],c.style&&(e[f]=p._data(c,"olddisplay"),b?(e[f]||"none"!==c.style.display||(c.style.display=""),""===c.style.display&&Zb(c)&&(e[f]=p._data(c,"olddisplay",cc(c.nodeName)))):(d=Hb(c,"display"),e[f]||"none"===d||p._data(c,"olddisplay",d)));for(f=0;g>f;f++)c=a[f],c.style&&(b&&"none"!==c.style.display&&""!==c.style.display||(c.style.display=b?e[f]||"":"none"));return a}function _b(a,b,c){var d=Pb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function ac(a,b,c,d){for(var e=c===(d?"border":"content")?4:"width"===b?1:0,f=0;4>e;e+=2)"margin"===c&&(f+=p.css(a,c+Vb[e],!0)),d?("content"===c&&(f-=parseFloat(Hb(a,"padding"+Vb[e]))||0),"margin"!==c&&(f-=parseFloat(Hb(a,"border"+Vb[e]+"Width"))||0)):(f+=parseFloat(Hb(a,"padding"+Vb[e]))||0,"padding"!==c&&(f+=parseFloat(Hb(a,"border"+Vb[e]+"Width"))||0));return f}function bc(a,b,c){var d="width"===b?a.offsetWidth:a.offsetHeight,e=!0,f=p.support.boxSizing&&"border-box"===p.css(a,"boxSizing");if(0>=d||null==d){if(d=Hb(a,b),(0>d||null==d)&&(d=a.style[b]),Qb.test(d))return d;e=f&&(p.support.boxSizingReliable||d===a.style[b]),d=parseFloat(d)||0}return d+ac(a,b,c||(f?"border":"content"),e)+"px"}function cc(a){if(Sb[a])return Sb[a];var b=p("<"+a+">").appendTo(e.body),c=b.css("display");return b.remove(),("none"===c||""===c)&&(Ib=e.body.appendChild(Ib||p.extend(e.createElement("iframe"),{frameBorder:0,width:0,height:0})),Jb&&Ib.createElement||(Jb=(Ib.contentWindow||Ib.contentDocument).document,Jb.write("<!doctype html><html><body>"),Jb.close()),b=Jb.body.appendChild(Jb.createElement(a)),c=Hb(b,"display"),e.body.removeChild(Ib)),Sb[a]=c,c}function ic(a,b,c,d){var e;if(p.isArray(b))p.each(b,function(b,e){c||ec.test(a)?d(a,e):ic(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==p.type(b))d(a,b);else for(e in b)ic(a+"["+e+"]",b[e],c,d)}function zc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e,f,g=b.toLowerCase().split(s),h=0,i=g.length;if(p.isFunction(c))for(;i>h;h++)d=g[h],f=/^\+/.test(d),f&&(d=d.substr(1)||"*"),e=a[d]=a[d]||[],e[f?"unshift":"push"](c)}}function Ac(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;for(var h,i=a[f],j=0,k=i?i.length:0,l=a===vc;k>j&&(l||!h);j++)h=i[j](c,d,e),"string"==typeof h&&(!l||g[h]?h=b:(c.dataTypes.unshift(h),h=Ac(a,c,d,e,h,g)));return!l&&h||g["*"]||(h=Ac(a,c,d,e,"*",g)),h}function Bc(a,c){var d,e,f=p.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((f[d]?a:e||(e={}))[d]=c[d]);e&&p.extend(!0,a,e)}function Cc(a,c,d){var e,f,g,h,i=a.contents,j=a.dataTypes,k=a.responseFields;for(f in k)f in d&&(c[k[f]]=d[f]);for(;"*"===j[0];)j.shift(),e===b&&(e=a.mimeType||c.getResponseHeader("content-type"));if(e)for(f in i)if(i[f]&&i[f].test(e)){j.unshift(f);break}if(j[0]in d)g=j[0];else{for(f in d){if(!j[0]||a.converters[f+" "+j[0]]){g=f;break}h||(h=f)}g=g||h}return g?(g!==j[0]&&j.unshift(g),d[g]):b}function Dc(a,b){var c,d,e,f,g=a.dataTypes.slice(),h=g[0],i={},j=0;if(a.dataFilter&&(b=a.dataFilter(b,a.dataType)),g[1])for(c in a.converters)i[c.toLowerCase()]=a.converters[c];for(;e=g[++j];)if("*"!==e){if("*"!==h&&h!==e){if(c=i[h+" "+e]||i["* "+e],!c)for(d in i)if(f=d.split(" "),f[1]===e&&(c=i[h+" "+f[0]]||i["* "+f[0]])){c===!0?c=i[d]:i[d]!==!0&&(e=f[0],g.splice(j--,0,e));break}if(c!==!0)if(c&&a["throws"])b=c(b);else try{b=c(b)}catch(k){return{state:"parsererror",error:c?k:"No conversion from "+h+" to "+e}}}h=e}return{state:"success",data:b}}function Lc(){try{return new a.XMLHttpRequest}catch(b){}}function Mc(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function Uc(){return setTimeout(function(){Nc=b},0),Nc=p.now()}function Vc(a,b){p.each(b,function(b,c){for(var d=(Tc[b]||[]).concat(Tc["*"]),e=0,f=d.length;f>e;e++)if(d[e].call(a,b,c))return})}function Wc(a,b,c){var d,e=0,g=Sc.length,h=p.Deferred().always(function(){delete i.elem}),i=function(){for(var b=Nc||Uc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,e=1-d,f=0,g=j.tweens.length;g>f;f++)j.tweens[f].run(e);return h.notifyWith(a,[j,e,c]),1>e&&g?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:p.extend({},b),opts:p.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Nc||Uc(),duration:c.duration,tweens:[],createTween:function(b,c){var e=p.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(e),e},stop:function(b){for(var c=0,d=b?j.tweens.length:0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Xc(k,j.opts.specialEasing);g>e;e++)if(d=Sc[e].call(j,a,k,j.opts))return d;return Vc(j,k),p.isFunction(j.opts.start)&&j.opts.start.call(a,j),p.fx.timer(p.extend(i,{anim:j,queue:j.opts.queue,elem:a})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}function Xc(a,b){var c,d,e,f,g;for(c in a)if(d=p.camelCase(c),e=b[d],f=a[c],p.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=p.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Yc(a,b,c){var d,e,f,g,h,i,j,k,l,m=this,n=a.style,o={},q=[],r=a.nodeType&&Zb(a);c.queue||(k=p._queueHooks(a,"fx"),null==k.unqueued&&(k.unqueued=0,l=k.empty.fire,k.empty.fire=function(){k.unqueued||l()}),k.unqueued++,m.always(function(){m.always(function(){k.unqueued--,p.queue(a,"fx").length||k.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[n.overflow,n.overflowX,n.overflowY],"inline"===p.css(a,"display")&&"none"===p.css(a,"float")&&(p.support.inlineBlockNeedsLayout&&"inline"!==cc(a.nodeName)?n.zoom=1:n.display="inline-block")),c.overflow&&(n.overflow="hidden",p.support.shrinkWrapBlocks||m.done(function(){n.overflow=c.overflow[0],n.overflowX=c.overflow[1],n.overflowY=c.overflow[2]}));for(d in b)if(f=b[d],Pc.exec(f)){if(delete b[d],i=i||"toggle"===f,f===(r?"hide":"show"))continue;q.push(d)}if(g=q.length){h=p._data(a,"fxshow")||p._data(a,"fxshow",{}),"hidden"in h&&(r=h.hidden),i&&(h.hidden=!r),r?p(a).show():m.done(function(){p(a).hide()}),m.done(function(){var b;p.removeData(a,"fxshow",!0);for(b in o)p.style(a,b,o[b])});for(d=0;g>d;d++)e=q[d],j=m.createTween(e,r?h[e]:0),o[e]=h[e]||p.style(a,e),e in h||(h[e]=j.start,r&&(j.end=j.start,j.start="width"===e||"height"===e?1:0))}}function Zc(a,b,c,d,e){return new Zc.prototype.init(a,b,c,d,e)}function $c(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=Vb[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function ad(a){return p.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}var c,d,e=a.document,f=a.location,g=a.navigator,h=a.jQuery,i=a.$,j=Array.prototype.push,k=Array.prototype.slice,l=Array.prototype.indexOf,m=Object.prototype.toString,n=Object.prototype.hasOwnProperty,o=String.prototype.trim,p=function(a,b){return new p.fn.init(a,b,c)},q=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,r=/\S/,s=/\s+/,t=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,u=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,y=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,z=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,A=/^-ms-/,B=/-([\da-z])/gi,C=function(a,b){return(b+"").toUpperCase()},D=function(){e.addEventListener?(e.removeEventListener("DOMContentLoaded",D,!1),p.ready()):"complete"===e.readyState&&(e.detachEvent("onreadystatechange",D),p.ready())},E={};p.fn=p.prototype={constructor:p,init:function(a,c,d){var f,g,i;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if("string"==typeof a){if(f="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:u.exec(a),!f||!f[1]&&c)return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a);if(f[1])return c=c instanceof p?c[0]:c,i=c&&c.nodeType?c.ownerDocument||c:e,a=p.parseHTML(f[1],i,!0),v.test(f[1])&&p.isPlainObject(c)&&this.attr.call(a,c,!0),p.merge(this,a);if(g=e.getElementById(f[2]),g&&g.parentNode){if(g.id!==f[2])return d.find(a);this.length=1,this[0]=g}return this.context=e,this.selector=a,this}return p.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),p.makeArray(a,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return k.call(this)},get:function(a){return null==a?this.toArray():0>a?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=p.merge(this.constructor(),a);return d.prevObject=this,d.context=this.context,"find"===b?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return p.each(this,a,b)},ready:function(a){return p.ready.promise().done(a),this},eq:function(a){return a=+a,-1===a?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(k.apply(this,arguments),"slice",k.call(arguments).join(","))},map:function(a){return this.pushStack(p.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:j,sort:[].sort,splice:[].splice},p.fn.init.prototype=p.fn,p.extend=p.fn.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;for("boolean"==typeof h&&(k=h,h=arguments[1]||{},i=2),"object"==typeof h||p.isFunction(h)||(h={}),j===i&&(h=this,--i);j>i;i++)if(null!=(a=arguments[i]))for(c in a)d=h[c],e=a[c],h!==e&&(k&&e&&(p.isPlainObject(e)||(f=p.isArray(e)))?(f?(f=!1,g=d&&p.isArray(d)?d:[]):g=d&&p.isPlainObject(d)?d:{},h[c]=p.extend(k,g,e)):e!==b&&(h[c]=e));return h},p.extend({noConflict:function(b){return a.$===p&&(a.$=i),b&&a.jQuery===p&&(a.jQuery=h),p},isReady:!1,readyWait:1,holdReady:function(a){a?p.readyWait++:p.ready(!0)},ready:function(a){if(a===!0?!--p.readyWait:!p.isReady){if(!e.body)return setTimeout(p.ready,1);p.isReady=!0,a!==!0&&--p.readyWait>0||(d.resolveWith(e,[p]),p.fn.trigger&&p(e).trigger("ready").off("ready"))}},isFunction:function(a){return"function"===p.type(a)},isArray:Array.isArray||function(a){return"array"===p.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return null==a?a+"":E[m.call(a)]||"object"},isPlainObject:function(a){if(!a||"object"!==p.type(a)||a.nodeType||p.isWindow(a))return!1;try{if(a.constructor&&!n.call(a,"constructor")&&!n.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||n.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw Error(a)},parseHTML:function(a,b,c){var d;return a&&"string"==typeof a?("boolean"==typeof b&&(c=b,b=0),b=b||e,(d=v.exec(a))?[b.createElement(d[1])]:(d=p.buildFragment([a],b,c?null:[]),p.merge([],(d.cacheable?p.clone(d.fragment):d.fragment).childNodes))):null},parseJSON:function(c){return c&&"string"==typeof c?(c=p.trim(c),a.JSON&&a.JSON.parse?a.JSON.parse(c):w.test(c.replace(y,"@").replace(z,"]").replace(x,""))?Function("return "+c)():(p.error("Invalid JSON: "+c),b)):null},parseXML:function(c){var d,e;if(!c||"string"!=typeof c)return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return d&&d.documentElement&&!d.getElementsByTagName("parsererror").length||p.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&r.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(A,"ms-").replace(B,C)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,c,d){var e,f=0,g=a.length,h=g===b||p.isFunction(a);if(d)if(h){for(e in a)if(c.apply(a[e],d)===!1)break}else for(;g>f&&c.apply(a[f++],d)!==!1;);else if(h){for(e in a)if(c.call(a[e],e,a[e])===!1)break}else for(;g>f&&c.call(a[f],f,a[f++])!==!1;);return a},trim:o&&!o.call("\ufeff\u00a0")?function(a){return null==a?"":o.call(a)}:function(a){return null==a?"":(a+"").replace(t,"")},makeArray:function(a,b){var c,d=b||[];return null!=a&&(c=p.type(a),null==a.length||"string"===c||"function"===c||"regexp"===c||p.isWindow(a)?j.call(d,a):p.merge(d,a)),d},inArray:function(a,b,c){var d;if(b){if(l)return l.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=c.length,e=a.length,f=0;if("number"==typeof d)for(;d>f;f++)a[e++]=c[f];else for(;c[f]!==b;)a[e++]=c[f++];return a.length=e,a},grep:function(a,b,c){var d,e=[],f=0,g=a.length;for(c=!!c;g>f;f++)d=!!b(a[f],f),c!==d&&e.push(a[f]);return e},map:function(a,c,d){var e,f,g=[],h=0,i=a.length,j=a instanceof p||i!==b&&"number"==typeof i&&(i>0&&a[0]&&a[i-1]||0===i||p.isArray(a));if(j)for(;i>h;h++)e=c(a[h],h,d),null!=e&&(g[g.length]=e);else for(f in a)e=c(a[f],f,d),null!=e&&(g[g.length]=e);return g.concat.apply([],g)},guid:1,proxy:function(a,c){var d,e,f;return"string"==typeof c&&(d=a[c],c=a,a=d),p.isFunction(a)?(e=k.call(arguments,2),f=function(){return a.apply(c,e.concat(k.call(arguments)))},f.guid=a.guid=a.guid||p.guid++,f):b},access:function(a,c,d,e,f,g,h){var i,j=null==d,k=0,l=a.length;if(d&&"object"==typeof d){for(k in d)p.access(a,c,k,d[k],1,g,e);f=1}else if(e!==b){if(i=h===b&&p.isFunction(e),j&&(i?(i=c,c=function(a,b,c){return i.call(p(a),c)}):(c.call(a,e),c=null)),c)for(;l>k;k++)c(a[k],d,i?e.call(a[k],k,c(a[k],d)):e,h);f=1}return f?a:j?c.call(a):l?c(a[0],d):g},now:function(){return(new Date).getTime()}}),p.ready.promise=function(b){if(!d)if(d=p.Deferred(),"complete"===e.readyState)setTimeout(p.ready,1);
else if(e.addEventListener)e.addEventListener("DOMContentLoaded",D,!1),a.addEventListener("load",p.ready,!1);else{e.attachEvent("onreadystatechange",D),a.attachEvent("onload",p.ready);var c=!1;try{c=null==a.frameElement&&e.documentElement}catch(f){}c&&c.doScroll&&function g(){if(!p.isReady){try{c.doScroll("left")}catch(a){return setTimeout(g,50)}p.ready()}}()}return d.promise(b)},p.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){E["[object "+b+"]"]=b.toLowerCase()}),c=p(e);var F={};p.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):p.extend({},a);var c,d,e,f,g,h,i=[],j=!a.once&&[],k=function(b){for(c=a.memory&&b,d=!0,h=f||0,f=0,g=i.length,e=!0;i&&g>h;h++)if(i[h].apply(b[0],b[1])===!1&&a.stopOnFalse){c=!1;break}e=!1,i&&(j?j.length&&k(j.shift()):c?i=[]:l.disable())},l={add:function(){if(i){var b=i.length;(function d(b){p.each(b,function(b,c){var e=p.type(c);"function"===e?a.unique&&l.has(c)||i.push(c):c&&c.length&&"string"!==e&&d(c)})})(arguments),e?g=i.length:c&&(f=b,k(c))}return this},remove:function(){return i&&p.each(arguments,function(a,b){for(var c;(c=p.inArray(b,i,c))>-1;)i.splice(c,1),e&&(g>=c&&g--,h>=c&&h--)}),this},has:function(a){return p.inArray(a,i)>-1},empty:function(){return i=[],this},disable:function(){return i=j=c=b,this},disabled:function(){return!i},lock:function(){return j=b,c||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],!i||d&&!j||(e?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!d}};return l},p.extend({Deferred:function(a){var b=[["resolve","done",p.Callbacks("once memory"),"resolved"],["reject","fail",p.Callbacks("once memory"),"rejected"],["notify","progress",p.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return p.Deferred(function(c){p.each(b,function(b,d){var f=d[0],g=a[b];e[d[1]](p.isFunction(g)?function(){var a=g.apply(this,arguments);a&&p.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f+"With"](this===e?c:this,[a])}:c[f])}),a=null}).promise()},promise:function(a){return null!=a?p.extend(a,d):d}},e={};return d.pipe=d.then,p.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=g.fire,e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var h,i,j,b=0,c=k.call(arguments),d=c.length,e=1!==d||a&&p.isFunction(a.promise)?d:0,f=1===e?a:p.Deferred(),g=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?k.call(arguments):d,c===h?f.notifyWith(b,c):--e||f.resolveWith(b,c)}};if(d>1)for(h=Array(d),i=Array(d),j=Array(d);d>b;b++)c[b]&&p.isFunction(c[b].promise)?c[b].promise().done(g(b,j,c)).fail(f.reject).progress(g(b,i,h)):--e;return e||f.resolveWith(j,c),f.promise()}}),p.support=function(){var c,d,f,g,h,i,j,k,l,m,n,o=e.createElement("div");if(o.setAttribute("className","t"),o.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=o.getElementsByTagName("*"),f=o.getElementsByTagName("a")[0],!d||!f||!d.length)return{};g=e.createElement("select"),h=g.appendChild(e.createElement("option")),i=o.getElementsByTagName("input")[0],f.style.cssText="top:1px;float:left;opacity:.5",c={leadingWhitespace:3===o.firstChild.nodeType,tbody:!o.getElementsByTagName("tbody").length,htmlSerialize:!!o.getElementsByTagName("link").length,style:/top/.test(f.getAttribute("style")),hrefNormalized:"/a"===f.getAttribute("href"),opacity:/^0.5/.test(f.style.opacity),cssFloat:!!f.style.cssFloat,checkOn:"on"===i.value,optSelected:h.selected,getSetAttribute:"t"!==o.className,enctype:!!e.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==e.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===e.compatMode,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},i.checked=!0,c.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,c.optDisabled=!h.disabled;try{delete o.test}catch(q){c.deleteExpando=!1}if(!o.addEventListener&&o.attachEvent&&o.fireEvent&&(o.attachEvent("onclick",n=function(){c.noCloneEvent=!1}),o.cloneNode(!0).fireEvent("onclick"),o.detachEvent("onclick",n)),i=e.createElement("input"),i.value="t",i.setAttribute("type","radio"),c.radioValue="t"===i.value,i.setAttribute("checked","checked"),i.setAttribute("name","t"),o.appendChild(i),j=e.createDocumentFragment(),j.appendChild(o.lastChild),c.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,c.appendChecked=i.checked,j.removeChild(i),j.appendChild(o),o.attachEvent)for(l in{submit:!0,change:!0,focusin:!0})k="on"+l,m=k in o,m||(o.setAttribute(k,"return;"),m="function"==typeof o[k]),c[l+"Bubbles"]=m;return p(function(){var d,f,g,h,i="padding:0;margin:0;border:0;display:block;overflow:hidden;",j=e.getElementsByTagName("body")[0];j&&(d=e.createElement("div"),d.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",j.insertBefore(d,j.firstChild),f=e.createElement("div"),d.appendChild(f),f.innerHTML="<table><tr><td></td><td>t</td></tr></table>",g=f.getElementsByTagName("td"),g[0].style.cssText="padding:0;margin:0;border:0;display:none",m=0===g[0].offsetHeight,g[0].style.display="",g[1].style.display="none",c.reliableHiddenOffsets=m&&0===g[0].offsetHeight,f.innerHTML="",f.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",c.boxSizing=4===f.offsetWidth,c.doesNotIncludeMarginInBodyOffset=1!==j.offsetTop,a.getComputedStyle&&(c.pixelPosition="1%"!==(a.getComputedStyle(f,null)||{}).top,c.boxSizingReliable="4px"===(a.getComputedStyle(f,null)||{width:"4px"}).width,h=e.createElement("div"),h.style.cssText=f.style.cssText=i,h.style.marginRight=h.style.width="0",f.style.width="1px",f.appendChild(h),c.reliableMarginRight=!parseFloat((a.getComputedStyle(h,null)||{}).marginRight)),f.style.zoom!==b&&(f.innerHTML="",f.style.cssText=i+"width:1px;padding:1px;display:inline;zoom:1",c.inlineBlockNeedsLayout=3===f.offsetWidth,f.style.display="block",f.style.overflow="visible",f.innerHTML="<div></div>",f.firstChild.style.width="5px",c.shrinkWrapBlocks=3!==f.offsetWidth,d.style.zoom=1),j.removeChild(d),d=f=g=h=null)}),j.removeChild(o),d=f=g=h=i=j=o=null,c}();var H=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,I=/([A-Z])/g;p.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(p.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?p.cache[a[p.expando]]:a[p.expando],!!a&&!K(a)},data:function(a,c,d,e){if(p.acceptData(a)){var f,g,h=p.expando,i="string"==typeof c,j=a.nodeType,k=j?p.cache:a,l=j?a[h]:a[h]&&h;if(l&&k[l]&&(e||k[l].data)||!i||d!==b)return l||(j?a[h]=l=p.deletedIds.pop()||p.guid++:l=h),k[l]||(k[l]={},j||(k[l].toJSON=p.noop)),("object"==typeof c||"function"==typeof c)&&(e?k[l]=p.extend(k[l],c):k[l].data=p.extend(k[l].data,c)),f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[p.camelCase(c)]=d),i?(g=f[c],null==g&&(g=f[p.camelCase(c)])):g=f,g}},removeData:function(a,b,c){if(p.acceptData(a)){var d,e,f,g=a.nodeType,h=g?p.cache:a,i=g?a[p.expando]:p.expando;if(h[i]){if(b&&(d=c?h[i]:h[i].data)){p.isArray(b)||(b in d?b=[b]:(b=p.camelCase(b),b=b in d?[b]:b.split(" ")));for(e=0,f=b.length;f>e;e++)delete d[b[e]];if(!(c?K:p.isEmptyObject)(d))return}(c||(delete h[i].data,K(h[i])))&&(g?p.cleanData([a],!0):p.support.deleteExpando||h!=h.window?delete h[i]:h[i]=null)}}},_data:function(a,b,c){return p.data(a,b,c,!0)},acceptData:function(a){var b=a.nodeName&&p.noData[a.nodeName.toLowerCase()];return!b||b!==!0&&a.getAttribute("classid")===b}}),p.fn.extend({data:function(a,c){var d,e,f,g,h,i=this[0],j=0,k=null;if(a===b){if(this.length&&(k=p.data(i),1===i.nodeType&&!p._data(i,"parsedAttrs"))){for(f=i.attributes,h=f.length;h>j;j++)g=f[j].name,g.indexOf("data-")||(g=p.camelCase(g.substring(5)),J(i,g,k[g]));p._data(i,"parsedAttrs",!0)}return k}return"object"==typeof a?this.each(function(){p.data(this,a)}):(d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!",p.access(this,function(c){return c===b?(k=this.triggerHandler("getData"+e,[d[0]]),k===b&&i&&(k=p.data(i,a),k=J(i,a,k)),k===b&&d[1]?this.data(d[0]):k):(d[1]=c,this.each(function(){var b=p(this);b.triggerHandler("setData"+e,d),p.data(this,a,c),b.triggerHandler("changeData"+e,d)}),b)},null,c,arguments.length>1,null,!1))},removeData:function(a){return this.each(function(){p.removeData(this,a)})}}),p.extend({queue:function(a,c,d){var e;return a?(c=(c||"fx")+"queue",e=p._data(a,c),d&&(!e||p.isArray(d)?e=p._data(a,c,p.makeArray(d)):e.push(d)),e||[]):b},dequeue:function(a,b){b=b||"fx";var c=p.queue(a,b),d=c.length,e=c.shift(),f=p._queueHooks(a,b),g=function(){p.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return p._data(a,c)||p._data(a,c,{empty:p.Callbacks("once memory").add(function(){p.removeData(a,b+"queue",!0),p.removeData(a,c,!0)})})}}),p.fn.extend({queue:function(a,c){var d=2;return"string"!=typeof a&&(c=a,a="fx",d--),d>arguments.length?p.queue(this[0],a):c===b?this:this.each(function(){var b=p.queue(this,a,c);p._queueHooks(this,a),"fx"===a&&"inprogress"!==b[0]&&p.dequeue(this,a)})},dequeue:function(a){return this.each(function(){p.dequeue(this,a)})},delay:function(a,b){return a=p.fx?p.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){var d,e=1,f=p.Deferred(),g=this,h=this.length,i=function(){--e||f.resolveWith(g,[g])};for("string"!=typeof a&&(c=a,a=b),a=a||"fx";h--;)d=p._data(g[h],a+"queueHooks"),d&&d.empty&&(e++,d.empty.add(i));return i(),f.promise(c)}});var L,M,N,O=/[\t\r\n]/g,P=/\r/g,Q=/^(?:button|input)$/i,R=/^(?:button|input|object|select|textarea)$/i,S=/^a(?:rea|)$/i,T=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,U=p.support.getSetAttribute;p.fn.extend({attr:function(a,b){return p.access(this,p.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){p.removeAttr(this,a)})},prop:function(a,b){return p.access(this,p.prop,a,b,arguments.length>1)},removeProp:function(a){return a=p.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g,h;if(p.isFunction(a))return this.each(function(b){p(this).addClass(a.call(this,b,this.className))});if(a&&"string"==typeof a)for(b=a.split(s),c=0,d=this.length;d>c;c++)if(e=this[c],1===e.nodeType)if(e.className||1!==b.length){for(f=" "+e.className+" ",g=0,h=b.length;h>g;g++)0>f.indexOf(" "+b[g]+" ")&&(f+=b[g]+" ");e.className=p.trim(f)}else e.className=a;return this},removeClass:function(a){var c,d,e,f,g,h,i;if(p.isFunction(a))return this.each(function(b){p(this).removeClass(a.call(this,b,this.className))});if(a&&"string"==typeof a||a===b)for(c=(a||"").split(s),h=0,i=this.length;i>h;h++)if(e=this[h],1===e.nodeType&&e.className){for(d=(" "+e.className+" ").replace(O," "),f=0,g=c.length;g>f;f++)for(;d.indexOf(" "+c[f]+" ")>=0;)d=d.replace(" "+c[f]+" "," ");e.className=a?p.trim(d):""}return this},toggleClass:function(a,b){var c=typeof a,d="boolean"==typeof b;return p.isFunction(a)?this.each(function(c){p(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if("string"===c)for(var e,f=0,g=p(this),h=b,i=a.split(s);e=i[f++];)h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e);else("undefined"===c||"boolean"===c)&&(this.className&&p._data(this,"__className__",this.className),this.className=this.className||a===!1?"":p._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(O," ").indexOf(b)>=0)return!0;return!1},val:function(a){var c,d,e,f=this[0];{if(arguments.length)return e=p.isFunction(a),this.each(function(d){var f,g=p(this);1===this.nodeType&&(f=e?a.call(this,d,g.val()):a,null==f?f="":"number"==typeof f?f+="":p.isArray(f)&&(f=p.map(f,function(a){return null==a?"":a+""})),c=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()],c&&"set"in c&&c.set(this,f,"value")!==b||(this.value=f))});if(f)return c=p.valHooks[f.type]||p.valHooks[f.nodeName.toLowerCase()],c&&"get"in c&&(d=c.get(f,"value"))!==b?d:(d=f.value,"string"==typeof d?d.replace(P,""):null==d?"":d)}}}),p.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(p.support.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&p.nodeName(c.parentNode,"optgroup"))){if(b=p(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c=p.makeArray(b);return p(a).find("option").each(function(){this.selected=p.inArray(p(this).val(),c)>=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{},attr:function(a,c,d,e){var f,g,h,i=a.nodeType;if(a&&3!==i&&8!==i&&2!==i)return e&&p.isFunction(p.fn[c])?p(a)[c](d):a.getAttribute===b?p.prop(a,c,d):(h=1!==i||!p.isXMLDoc(a),h&&(c=c.toLowerCase(),g=p.attrHooks[c]||(T.test(c)?M:L)),d!==b?null===d?(p.removeAttr(a,c),b):g&&"set"in g&&h&&(f=g.set(a,d,c))!==b?f:(a.setAttribute(c,d+""),d):g&&"get"in g&&h&&null!==(f=g.get(a,c))?f:(f=a.getAttribute(c),null===f?b:f))},removeAttr:function(a,b){var c,d,e,f,g=0;if(b&&1===a.nodeType)for(d=b.split(s);d.length>g;g++)e=d[g],e&&(c=p.propFix[e]||e,f=T.test(e),f||p.attr(a,e,""),a.removeAttribute(U?e:c),f&&c in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(Q.test(a.nodeName)&&a.parentNode)p.error("type property can't be changed");else if(!p.support.radioValue&&"radio"===b&&p.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}},value:{get:function(a,b){return L&&p.nodeName(a,"button")?L.get(a,b):b in a?a.value:null},set:function(a,c,d){return L&&p.nodeName(a,"button")?L.set(a,c,d):(a.value=c,b)}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,f,g,h=a.nodeType;if(a&&3!==h&&8!==h&&2!==h)return g=1!==h||!p.isXMLDoc(a),g&&(c=p.propFix[c]||c,f=p.propHooks[c]),d!==b?f&&"set"in f&&(e=f.set(a,d,c))!==b?e:a[c]=d:f&&"get"in f&&null!==(e=f.get(a,c))?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):R.test(a.nodeName)||S.test(a.nodeName)&&a.href?0:b}}}}),M={get:function(a,c){var d,e=p.prop(a,c);return e===!0||"boolean"!=typeof e&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;return b===!1?p.removeAttr(a,c):(d=p.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase())),c}},U||(N={name:!0,id:!0,coords:!0},L=p.valHooks.button={get:function(a,c){var d;return d=a.getAttributeNode(c),d&&(N[c]?""!==d.value:d.specified)?d.value:b},set:function(a,b,c){var d=a.getAttributeNode(c);return d||(d=e.createAttribute(c),a.setAttributeNode(d)),d.value=b+""}},p.each(["width","height"],function(a,c){p.attrHooks[c]=p.extend(p.attrHooks[c],{set:function(a,d){return""===d?(a.setAttribute(c,"auto"),d):b}})}),p.attrHooks.contenteditable={get:L.get,set:function(a,b,c){""===b&&(b="false"),L.set(a,b,c)}}),p.support.hrefNormalized||p.each(["href","src","width","height"],function(a,c){p.attrHooks[c]=p.extend(p.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return null===d?b:d}})}),p.support.style||(p.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=b+""}}),p.support.optSelected||(p.propHooks.selected=p.extend(p.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),p.support.enctype||(p.propFix.enctype="encoding"),p.support.checkOn||p.each(["radio","checkbox"],function(){p.valHooks[this]={get:function(a){return null===a.getAttribute("value")?"on":a.value}}}),p.each(["radio","checkbox"],function(){p.valHooks[this]=p.extend(p.valHooks[this],{set:function(a,c){return p.isArray(c)?a.checked=p.inArray(p(a).val(),c)>=0:b}})});var V=/^(?:textarea|input|select)$/i,W=/^([^\.]*|)(?:\.(.+)|)$/,X=/(?:^|\s)hover(\.\S+|)\b/,Y=/^key/,Z=/^(?:mouse|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=function(a){return p.event.special.hover?a:a.replace(X,"mouseenter$1 mouseleave$1")};p.event={add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,q,r;if(3!==a.nodeType&&8!==a.nodeType&&c&&d&&(g=p._data(a))){for(d.handler&&(o=d,d=o.handler,f=o.selector),d.guid||(d.guid=p.guid++),i=g.events,i||(g.events=i={}),h=g.handle,h||(g.handle=h=function(a){return p===b||a&&p.event.triggered===a.type?b:p.event.dispatch.apply(h.elem,arguments)},h.elem=a),c=p.trim(_(c)).split(" "),j=0;c.length>j;j++)k=W.exec(c[j])||[],l=k[1],m=(k[2]||"").split(".").sort(),r=p.event.special[l]||{},l=(f?r.delegateType:r.bindType)||l,r=p.event.special[l]||{},n=p.extend({type:l,origType:k[1],data:e,handler:d,guid:d.guid,selector:f,needsContext:f&&p.expr.match.needsContext.test(f),namespace:m.join(".")},o),q=i[l],q||(q=i[l]=[],q.delegateCount=0,r.setup&&r.setup.call(a,e,m,h)!==!1||(a.addEventListener?a.addEventListener(l,h,!1):a.attachEvent&&a.attachEvent("on"+l,h))),r.add&&(r.add.call(a,n),n.handler.guid||(n.handler.guid=d.guid)),f?q.splice(q.delegateCount++,0,n):q.push(n),p.event.global[l]=!0;a=null}},global:{},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,q,r=p.hasData(a)&&p._data(a);if(r&&(m=r.events)){for(b=p.trim(_(b||"")).split(" "),f=0;b.length>f;f++)if(g=W.exec(b[f])||[],h=i=g[1],j=g[2],h){for(n=p.event.special[h]||{},h=(d?n.delegateType:n.bindType)||h,o=m[h]||[],k=o.length,j=j?RegExp("(^|\\.)"+j.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null,l=0;o.length>l;l++)q=o[l],!e&&i!==q.origType||c&&c.guid!==q.guid||j&&!j.test(q.namespace)||d&&d!==q.selector&&("**"!==d||!q.selector)||(o.splice(l--,1),q.selector&&o.delegateCount--,n.remove&&n.remove.call(a,q));0===o.length&&k!==o.length&&(n.teardown&&n.teardown.call(a,j,r.handle)!==!1||p.removeEvent(a,h,r.handle),delete m[h])}else for(h in m)p.event.remove(a,h+b[f],c,d,!0);p.isEmptyObject(m)&&(delete r.handle,p.removeData(a,"events",!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,f,g){if(!f||3!==f.nodeType&&8!==f.nodeType){var h,i,j,k,l,m,n,o,q,r,s=c.type||c,t=[];if(!$.test(s+p.event.triggered)&&(s.indexOf("!")>=0&&(s=s.slice(0,-1),i=!0),s.indexOf(".")>=0&&(t=s.split("."),s=t.shift(),t.sort()),f&&!p.event.customEvent[s]||p.event.global[s]))if(c="object"==typeof c?c[p.expando]?c:new p.Event(s,c):new p.Event(s),c.type=s,c.isTrigger=!0,c.exclusive=i,c.namespace=t.join("."),c.namespace_re=c.namespace?RegExp("(^|\\.)"+t.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,m=0>s.indexOf(":")?"on"+s:"",f){if(c.result=b,c.target||(c.target=f),d=null!=d?p.makeArray(d):[],d.unshift(c),n=p.event.special[s]||{},!n.trigger||n.trigger.apply(f,d)!==!1){if(q=[[f,n.bindType||s]],!g&&!n.noBubble&&!p.isWindow(f)){for(r=n.delegateType||s,k=$.test(r+s)?f:f.parentNode,l=f;k;k=k.parentNode)q.push([k,r]),l=k;l===(f.ownerDocument||e)&&q.push([l.defaultView||l.parentWindow||a,r])}for(j=0;q.length>j&&!c.isPropagationStopped();j++)k=q[j][0],c.type=q[j][1],o=(p._data(k,"events")||{})[c.type]&&p._data(k,"handle"),o&&o.apply(k,d),o=m&&k[m],o&&p.acceptData(k)&&o.apply&&o.apply(k,d)===!1&&c.preventDefault();return c.type=s,g||c.isDefaultPrevented()||n._default&&n._default.apply(f.ownerDocument,d)!==!1||"click"===s&&p.nodeName(f,"a")||!p.acceptData(f)||m&&f[s]&&("focus"!==s&&"blur"!==s||0!==c.target.offsetWidth)&&!p.isWindow(f)&&(l=f[m],l&&(f[m]=null),p.event.triggered=s,f[s](),p.event.triggered=b,l&&(f[m]=l)),c.result}}else{h=p.cache;for(j in h)h[j].events&&h[j].events[s]&&p.event.trigger(c,d,h[j].handle.elem,!0)}}},dispatch:function(c){c=p.event.fix(c||a.event);var d,e,f,g,h,i,j,l,m,o=(p._data(this,"events")||{})[c.type]||[],q=o.delegateCount,r=k.call(arguments),s=!c.exclusive&&!c.namespace,t=p.event.special[c.type]||{},u=[];if(r[0]=c,c.delegateTarget=this,!t.preDispatch||t.preDispatch.call(this,c)!==!1){if(q&&(!c.button||"click"!==c.type))for(f=c.target;f!=this;f=f.parentNode||this)if(f.disabled!==!0||"click"!==c.type){for(h={},j=[],d=0;q>d;d++)l=o[d],m=l.selector,h[m]===b&&(h[m]=l.needsContext?p(m,this).index(f)>=0:p.find(m,this,null,[f]).length),h[m]&&j.push(l);j.length&&u.push({elem:f,matches:j})}for(o.length>q&&u.push({elem:this,matches:o.slice(q)}),d=0;u.length>d&&!c.isPropagationStopped();d++)for(i=u[d],c.currentTarget=i.elem,e=0;i.matches.length>e&&!c.isImmediatePropagationStopped();e++)l=i.matches[e],(s||!c.namespace&&!l.namespace||c.namespace_re&&c.namespace_re.test(l.namespace))&&(c.data=l.data,c.handleObj=l,g=((p.event.special[l.origType]||{}).handle||l.handler).apply(i.elem,r),g!==b&&(c.result=g,g===!1&&(c.preventDefault(),c.stopPropagation())));return t.postDispatch&&t.postDispatch.call(this,c),c.result}},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,c){var d,f,g,h=c.button,i=c.fromElement;return null==a.pageX&&null!=c.clientX&&(d=a.target.ownerDocument||e,f=d.documentElement,g=d.body,a.pageX=c.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=c.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?c.toElement:i),a.which||h===b||(a.which=1&h?1:2&h?3:4&h?2:0),a}},fix:function(a){if(a[p.expando])return a;var b,c,d=a,f=p.event.fixHooks[a.type]||{},g=f.props?this.props.concat(f.props):this.props;for(a=p.Event(d),b=g.length;b;)c=g[--b],a[c]=d[c];return a.target||(a.target=d.srcElement||e),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,f.filter?f.filter(a,d):a},special:{load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){p.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=p.extend(new p.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?p.event.trigger(e,null,b):p.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},p.event.handle=p.event.dispatch,p.removeEvent=e.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,c,d){var e="on"+c;a.detachEvent&&(a[e]===b&&(a[e]=null),a.detachEvent(e,d))},p.Event=function(a,c){return this instanceof p.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?bb:ab):this.type=a,c&&p.extend(this,c),this.timeStamp=a&&a.timeStamp||p.now(),this[p.expando]=!0,b):new p.Event(a,c)},p.Event.prototype={preventDefault:function(){this.isDefaultPrevented=bb;var a=this.originalEvent;a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=bb;var a=this.originalEvent;a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()},isDefaultPrevented:ab,isPropagationStopped:ab,isImmediatePropagationStopped:ab},p.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){p.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return f.selector,(!e||e!==d&&!p.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),p.support.submitBubbles||(p.event.special.submit={setup:function(){return p.nodeName(this,"form")?!1:(p.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=p.nodeName(c,"input")||p.nodeName(c,"button")?c.form:b;d&&!p._data(d,"_submit_attached")&&(p.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),p._data(d,"_submit_attached",!0))}),b)},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&p.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return p.nodeName(this,"form")?!1:(p.event.remove(this,"._submit"),b)}}),p.support.changeBubbles||(p.event.special.change={setup:function(){return V.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(p.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),p.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),p.event.simulate("change",this,a,!0)})),!1):(p.event.add(this,"beforeactivate._change",function(a){var b=a.target;V.test(b.nodeName)&&!p._data(b,"_change_attached")&&(p.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||p.event.simulate("change",this.parentNode,a,!0)}),p._data(b,"_change_attached",!0))}),b)},handle:function(a){var c=a.target;return this!==c||a.isSimulated||a.isTrigger||"radio"!==c.type&&"checkbox"!==c.type?a.handleObj.handler.apply(this,arguments):b},teardown:function(){return p.event.remove(this,"._change"),!V.test(this.nodeName)}}),p.support.focusinBubbles||p.each({focus:"focusin",blur:"focusout"},function(a,b){var c=0,d=function(a){p.event.simulate(b,a.target,p.event.fix(a),!0)};p.event.special[b]={setup:function(){0===c++&&e.addEventListener(a,d,!0)},teardown:function(){0===--c&&e.removeEventListener(a,d,!0)}}}),p.fn.extend({on:function(a,c,d,e,f){var g,h;if("object"==typeof a){"string"!=typeof c&&(d=d||c,c=b);for(h in a)this.on(h,c,d,a[h],f);return this}if(null==d&&null==e?(e=c,d=c=b):null==e&&("string"==typeof c?(e=d,d=b):(e=d,d=c,c=b)),e===!1)e=ab;else if(!e)return this;return 1===f&&(g=e,e=function(a){return p().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=p.guid++)),this.each(function(){p.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){var e,f;if(a&&a.preventDefault&&a.handleObj)return e=a.handleObj,p(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler),this;if("object"==typeof a){for(f in a)this.off(f,c,a[f]);return this}return(c===!1||"function"==typeof c)&&(d=c,c=b),d===!1&&(d=ab),this.each(function(){p.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){return p(this.context).on(a,this.selector,b,c),this},die:function(a,b){return p(this.context).off(a,this.selector||"**",b),this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)},trigger:function(a,b){return this.each(function(){p.event.trigger(a,b,this)})},triggerHandler:function(a,c){return this[0]?p.event.trigger(a,c,this[0],!0):b},toggle:function(a){var b=arguments,c=a.guid||p.guid++,d=0,e=function(c){var e=(p._data(this,"lastToggle"+a.guid)||0)%d;return p._data(this,"lastToggle"+a.guid,e+1),c.preventDefault(),b[e].apply(this,arguments)||!1};for(e.guid=c;b.length>d;)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),p.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){p.fn[b]=function(a,c){return null==c&&(c=a,a=null),arguments.length>0?this.on(b,null,a,c):this.trigger(b)},Y.test(b)&&(p.event.fixHooks[b]=p.event.keyHooks),Z.test(b)&&(p.event.fixHooks[b]=p.event.mouseHooks)}),function(a,b){function cb(a,b,c,d){c=c||[],b=b||r;var e,f,i,j,k=b.nodeType;if(!a||"string"!=typeof a)return c;if(1!==k&&9!==k)return[];if(i=g(b),!i&&!d&&(e=P.exec(a)))if(j=e[1]){if(9===k){if(f=b.getElementById(j),!f||!f.parentNode)return c;if(f.id===j)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(j))&&h(b,f)&&f.id===j)return c.push(f),c}else{if(e[2])return w.apply(c,x.call(b.getElementsByTagName(a),0)),c;if((j=e[3])&&_&&b.getElementsByClassName)return w.apply(c,x.call(b.getElementsByClassName(j),0)),c}return pb(a.replace(L,"$1"),b,c,d,i)}function db(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function eb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function fb(a){return z(function(b){return b=+b,z(function(c,d){for(var e,f=a([],c.length,b),g=f.length;g--;)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function gb(a,b,c){if(a===b)return c;for(var d=a.nextSibling;d;){if(d===b)return-1;d=d.nextSibling}return 1}function hb(a,b){var c,d,f,g,h,i,j,k=C[o][a+" "];if(k)return b?0:k.slice(0);for(h=a,i=[],j=e.preFilter;h;){(!c||(d=M.exec(h)))&&(d&&(h=h.slice(d[0].length)||h),i.push(f=[])),c=!1,(d=N.exec(h))&&(f.push(c=new q(d.shift())),h=h.slice(c.length),c.type=d[0].replace(L," "));for(g in e.filter)!(d=W[g].exec(h))||j[g]&&!(d=j[g](d))||(f.push(c=new q(d.shift())),h=h.slice(c.length),c.type=g,c.matches=d);if(!c)break}return b?h.length:h?cb.error(a):C(a,i).slice(0)}function ib(a,b,d){var e=b.dir,f=d&&"parentNode"===b.dir,g=u++;return b.first?function(b,c,d){for(;b=b[e];)if(f||1===b.nodeType)return a(b,c,d)}:function(b,d,h){if(h){for(;b=b[e];)if((f||1===b.nodeType)&&a(b,d,h))return b}else for(var i,j=t+" "+g+" ",k=j+c;b=b[e];)if(f||1===b.nodeType){if((i=b[o])===k)return b.sizset;if("string"==typeof i&&0===i.indexOf(j)){if(b.sizset)return b}else{if(b[o]=k,a(b,d,h))return b.sizset=!0,b;b.sizset=!1}}}}function jb(a){return a.length>1?function(b,c,d){for(var e=a.length;e--;)if(!a[e](b,c,d))return!1;return!0}:a[0]}function kb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function lb(a,b,c,d,e,f){return d&&!d[o]&&(d=lb(d)),e&&!e[o]&&(e=lb(e,f)),z(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ob(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:kb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d)for(j=kb(r,n),d(j,[],h,i),k=j.length;k--;)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l));if(f){if(e||a){if(e){for(j=[],k=r.length;k--;)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}for(k=r.length;k--;)(l=r[k])&&(j=e?y.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=kb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):w.apply(g,r)})}function mb(a){for(var b,c,d,f=a.length,g=e.relative[a[0].type],h=g||e.relative[" "],i=g?1:0,j=ib(function(a){return a===b},h,!0),k=ib(function(a){return y.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==l)||((b=c).nodeType?j(a,c,d):k(a,c,d))}];f>i;i++)if(c=e.relative[a[i].type])m=[ib(jb(m),c)];else{if(c=e.filter[a[i].type].apply(null,a[i].matches),c[o]){for(d=++i;f>d&&!e.relative[a[d].type];d++);return lb(i>1&&jb(m),i>1&&a.slice(0,i-1).join("").replace(L,"$1"),c,d>i&&mb(a.slice(i,d)),f>d&&mb(a=a.slice(d)),f>d&&a.join(""))}m.push(c)}return jb(m)}function nb(a,b){var d=b.length>0,f=a.length>0,g=function(h,i,j,k,m){var n,o,p,q=[],s=0,u="0",x=h&&[],y=null!=m,z=l,A=h||f&&e.find.TAG("*",m&&i.parentNode||i),B=t+=null==z?1:Math.E;
for(y&&(l=i!==r&&i,c=g.el);null!=(n=A[u]);u++){if(f&&n){for(o=0;p=a[o];o++)if(p(n,i,j)){k.push(n);break}y&&(t=B,c=++g.el)}d&&((n=!p&&n)&&s--,h&&x.push(n))}if(s+=u,d&&u!==s){for(o=0;p=b[o];o++)p(x,q,i,j);if(h){if(s>0)for(;u--;)x[u]||q[u]||(q[u]=v.call(k));q=kb(q)}w.apply(k,q),y&&!h&&q.length>0&&s+b.length>1&&cb.uniqueSort(k)}return y&&(t=B,l=z),x};return g.el=0,d?z(g):g}function ob(a,b,c){for(var d=0,e=b.length;e>d;d++)cb(a,b[d],c);return c}function pb(a,b,c,d,f){var g,h,j,k,l,m=hb(a);if(m.length,!d&&1===m.length){if(h=m[0]=m[0].slice(0),h.length>2&&"ID"===(j=h[0]).type&&9===b.nodeType&&!f&&e.relative[h[1].type]){if(b=e.find.ID(j.matches[0].replace(V,""),b,f)[0],!b)return c;a=a.slice(h.shift().length)}for(g=W.POS.test(a)?-1:h.length-1;g>=0&&(j=h[g],!e.relative[k=j.type]);g--)if((l=e.find[k])&&(d=l(j.matches[0].replace(V,""),R.test(h[0].type)&&b.parentNode||b,f))){if(h.splice(g,1),a=d.length&&h.join(""),!a)return w.apply(c,x.call(d,0)),c;break}}return i(a,m)(d,b,f,c,R.test(a)),c}function qb(){}var c,d,e,f,g,h,i,j,k,l,m=!0,n="undefined",o=("sizcache"+Math.random()).replace(".",""),q=String,r=a.document,s=r.documentElement,t=0,u=0,v=[].pop,w=[].push,x=[].slice,y=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},z=function(a,b){return a[o]=null==b||b,a},A=function(){var a={},b=[];return z(function(c,d){return b.push(c)>e.cacheLength&&delete a[b.shift()],a[c+" "]=d},a)},B=A(),C=A(),D=A(),E="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",G=F.replace("w","w#"),H="([*^$|!~]?=)",I="\\["+E+"*("+F+")"+E+"*(?:"+H+E+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+G+")|)|)"+E+"*\\]",J=":("+F+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+I+")|[^:]|\\\\.)*|.*))\\)|)",K=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+E+"*((?:-\\d)?\\d*)"+E+"*\\)|)(?=[^-]|$)",L=RegExp("^"+E+"+|((?:^|[^\\\\])(?:\\\\.)*)"+E+"+$","g"),M=RegExp("^"+E+"*,"+E+"*"),N=RegExp("^"+E+"*([\\x20\\t\\r\\n\\f>+~])"+E+"*"),O=RegExp(J),P=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,R=/[\x20\t\r\n\f]*[+~]/,T=/h\d/i,U=/input|select|textarea|button/i,V=/\\(?!\\)/g,W={ID:RegExp("^#("+F+")"),CLASS:RegExp("^\\.("+F+")"),NAME:RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:RegExp("^("+F.replace("w","w*")+")"),ATTR:RegExp("^"+I),PSEUDO:RegExp("^"+J),POS:RegExp(K,"i"),CHILD:RegExp("^:(only|nth|first|last)-child(?:\\("+E+"*(even|odd|(([+-]|)(\\d*)n|)"+E+"*(?:([+-]|)"+E+"*(\\d+)|))"+E+"*\\)|)","i"),needsContext:RegExp("^"+E+"*[>+~]|"+K,"i")},X=function(a){var b=r.createElement("div");try{return a(b)}catch(c){return!1}finally{b=null}},Y=X(function(a){return a.appendChild(r.createComment("")),!a.getElementsByTagName("*").length}),Z=X(function(a){return a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!==n&&"#"===a.firstChild.getAttribute("href")}),$=X(function(a){a.innerHTML="<select></select>";var b=typeof a.lastChild.getAttribute("multiple");return"boolean"!==b&&"string"!==b}),_=X(function(a){return a.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",a.getElementsByClassName&&a.getElementsByClassName("e").length?(a.lastChild.className="e",2===a.getElementsByClassName("e").length):!1}),ab=X(function(a){a.id=o+0,a.innerHTML="<a name='"+o+"'></a><div name='"+o+"'></div>",s.insertBefore(a,s.firstChild);var b=r.getElementsByName&&r.getElementsByName(o).length===2+r.getElementsByName(o+0).length;return d=!r.getElementById(o),s.removeChild(a),b});try{x.call(s.childNodes,0)[0].nodeType}catch(bb){x=function(a){for(var b,c=[];b=this[a];a++)c.push(b);return c}}cb.matches=function(a,b){return cb(a,null,null,b)},cb.matchesSelector=function(a,b){return cb(b,null,null,[a]).length>0},f=cb.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(1===e||9===e||11===e){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=f(a)}else if(3===e||4===e)return a.nodeValue}else for(;b=a[d];d++)c+=f(b);return c},g=cb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},h=cb.contains=s.contains?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!!(d&&1===d.nodeType&&c.contains&&c.contains(d))}:s.compareDocumentPosition?function(a,b){return b&&!!(16&a.compareDocumentPosition(b))}:function(a,b){for(;b=b.parentNode;)if(b===a)return!0;return!1},cb.attr=function(a,b){var c,d=g(a);return d||(b=b.toLowerCase()),(c=e.attrHandle[b])?c(a):d||$?a.getAttribute(b):(c=a.getAttributeNode(b),c?"boolean"==typeof a[b]?a[b]?b:null:c.specified?c.value:null:null)},e=cb.selectors={cacheLength:50,createPseudo:z,match:W,attrHandle:Z?{}:{href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}},find:{ID:d?function(a,b,c){if(typeof b.getElementById!==n&&!c){var d=b.getElementById(a);return d&&d.parentNode?[d]:[]}}:function(a,c,d){if(typeof c.getElementById!==n&&!d){var e=c.getElementById(a);return e?e.id===a||typeof e.getAttributeNode!==n&&e.getAttributeNode("id").value===a?[e]:b:[]}},TAG:Y?function(a,c){return typeof c.getElementsByTagName!==n?c.getElementsByTagName(a):b}:function(a,b){var c=b.getElementsByTagName(a);if("*"===a){for(var d,e=[],f=0;d=c[f];f++)1===d.nodeType&&e.push(d);return e}return c},NAME:ab&&function(a,c){return typeof c.getElementsByName!==n?c.getElementsByName(name):b},CLASS:_&&function(a,c,d){return typeof c.getElementsByClassName===n||d?b:c.getElementsByClassName(a)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(V,""),a[3]=(a[4]||a[5]||"").replace(V,""),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1]?(a[2]||cb.error(a[0]),a[3]=+(a[3]?a[4]+(a[5]||1):2*("even"===a[2]||"odd"===a[2])),a[4]=+(a[6]+a[7]||"odd"===a[2])):a[2]&&cb.error(a[0]),a},PSEUDO:function(a){var b,c;return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[3]:(b=a[4])&&(O.test(b)&&(c=hb(b,!0))&&(c=b.indexOf(")",b.length-c)-b.length)&&(b=b.slice(0,c),a[0]=a[0].slice(0,c)),a[2]=b),a.slice(0,3))}},filter:{ID:d?function(a){return a=a.replace(V,""),function(b){return b.getAttribute("id")===a}}:function(a){return a=a.replace(V,""),function(b){var c=typeof b.getAttributeNode!==n&&b.getAttributeNode("id");return c&&c.value===a}},TAG:function(a){return"*"===a?function(){return!0}:(a=a.replace(V,"").toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=B[o][a+" "];return b||(b=RegExp("(^|"+E+")"+a+"("+E+"|$)"))&&B(a,function(a){return b.test(a.className||typeof a.getAttribute!==n&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var f=cb.attr(d,a);return null==f?"!="===b:b?(f+="","="===b?f===c:"!="===b?f!==c:"^="===b?c&&0===f.indexOf(c):"*="===b?c&&f.indexOf(c)>-1:"$="===b?c&&f.substr(f.length-c.length)===c:"~="===b?(" "+f+" ").indexOf(c)>-1:"|="===b?f===c||f.substr(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d){return"nth"===a?function(a){var b,e,f=a.parentNode;if(1===c&&0===d)return!0;if(f)for(e=0,b=f.firstChild;b&&(1!==b.nodeType||(e++,a!==b));b=b.nextSibling);return e-=d,e===c||0===e%c&&e/c>=0}:function(b){var c=b;switch(a){case"only":case"first":for(;c=c.previousSibling;)if(1===c.nodeType)return!1;if("first"===a)return!0;c=b;case"last":for(;c=c.nextSibling;)if(1===c.nodeType)return!1;return!0}}},PSEUDO:function(a,b){var c,d=e.pseudos[a]||e.setFilters[a.toLowerCase()]||cb.error("unsupported pseudo: "+a);return d[o]?d(b):d.length>1?(c=[a,a,"",b],e.setFilters.hasOwnProperty(a.toLowerCase())?z(function(a,c){for(var e,f=d(a,b),g=f.length;g--;)e=y.call(a,f[g]),a[e]=!(c[e]=f[g])}):function(a){return d(a,0,c)}):d}},pseudos:{not:z(function(a){var b=[],c=[],d=i(a.replace(L,"$1"));return d[o]?z(function(a,b,c,e){for(var f,g=d(a,null,e,[]),h=a.length;h--;)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:z(function(a){return function(b){return cb(a,b).length>0}}),contains:z(function(a){return function(b){return(b.textContent||b.innerText||f(b)).indexOf(a)>-1}}),enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!e.pseudos.empty(a)},empty:function(a){var b;for(a=a.firstChild;a;){if(a.nodeName>"@"||3===(b=a.nodeType)||4===b)return!1;a=a.nextSibling}return!0},header:function(a){return T.test(a.nodeName)},text:function(a){var b,c;return"input"===a.nodeName.toLowerCase()&&"text"===(b=a.type)&&(null==(c=a.getAttribute("type"))||c.toLowerCase()===b)},radio:db("radio"),checkbox:db("checkbox"),file:db("file"),password:db("password"),image:db("image"),submit:eb("submit"),reset:eb("reset"),button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},input:function(a){return U.test(a.nodeName)},focus:function(a){var b=a.ownerDocument;return a===b.activeElement&&(!b.hasFocus||b.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},active:function(a){return a===a.ownerDocument.activeElement},first:fb(function(){return[0]}),last:fb(function(a,b){return[b-1]}),eq:fb(function(a,b,c){return[0>c?c+b:c]}),even:fb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:fb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:fb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:fb(function(a,b,c){for(var d=0>c?c+b:c;b>++d;)a.push(d);return a})}},j=s.compareDocumentPosition?function(a,b){return a===b?(k=!0,0):(a.compareDocumentPosition&&b.compareDocumentPosition?4&a.compareDocumentPosition(b):a.compareDocumentPosition)?-1:1}:function(a,b){if(a===b)return k=!0,0;if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,h=b.parentNode,i=g;if(g===h)return gb(a,b);if(!g)return-1;if(!h)return 1;for(;i;)e.unshift(i),i=i.parentNode;for(i=h;i;)f.unshift(i),i=i.parentNode;c=e.length,d=f.length;for(var j=0;c>j&&d>j;j++)if(e[j]!==f[j])return gb(e[j],f[j]);return j===c?gb(a,f[j],-1):gb(e[j],b,1)},[0,0].sort(j),m=!k,cb.uniqueSort=function(a){var b,c=[],d=1,e=0;if(k=m,a.sort(j),k){for(;b=a[d];d++)b===a[d-1]&&(e=c.push(d));for(;e--;)a.splice(c[e],1)}return a},cb.error=function(a){throw Error("Syntax error, unrecognized expression: "+a)},i=cb.compile=function(a,b){var c,d=[],e=[],f=D[o][a+" "];if(!f){for(b||(b=hb(a)),c=b.length;c--;)f=mb(b[c]),f[o]?d.push(f):e.push(f);f=D(a,nb(e,d))}return f},r.querySelectorAll&&function(){var a,b=pb,c=/'|\\/g,d=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,e=[":focus"],f=[":active"],h=s.matchesSelector||s.mozMatchesSelector||s.webkitMatchesSelector||s.oMatchesSelector||s.msMatchesSelector;X(function(a){a.innerHTML="<select><option selected=''></option></select>",a.querySelectorAll("[selected]").length||e.push("\\["+E+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||e.push(":checked")}),X(function(a){a.innerHTML="<p test=''></p>",a.querySelectorAll("[test^='']").length&&e.push("[*^$]="+E+"*(?:\"\"|'')"),a.innerHTML="<input type='hidden'/>",a.querySelectorAll(":enabled").length||e.push(":enabled",":disabled")}),e=RegExp(e.join("|")),pb=function(a,d,f,g,h){if(!g&&!h&&!e.test(a)){var i,j,k=!0,l=o,m=d,n=9===d.nodeType&&a;if(1===d.nodeType&&"object"!==d.nodeName.toLowerCase()){for(i=hb(a),(k=d.getAttribute("id"))?l=k.replace(c,"\\$&"):d.setAttribute("id",l),l="[id='"+l+"'] ",j=i.length;j--;)i[j]=l+i[j].join("");m=R.test(a)&&d.parentNode||d,n=i.join(",")}if(n)try{return w.apply(f,x.call(m.querySelectorAll(n),0)),f}catch(p){}finally{k||d.removeAttribute("id")}}return b(a,d,f,g,h)},h&&(X(function(b){a=h.call(b,"div");try{h.call(b,"[test!='']:sizzle"),f.push("!=",J)}catch(c){}}),f=RegExp(f.join("|")),cb.matchesSelector=function(b,c){if(c=c.replace(d,"='$1']"),!g(b)&&!f.test(c)&&!e.test(c))try{var i=h.call(b,c);if(i||a||b.document&&11!==b.document.nodeType)return i}catch(j){}return cb(c,null,null,[b]).length>0})}(),e.pseudos.nth=e.pseudos.eq,e.filters=qb.prototype=e.pseudos,e.setFilters=new qb,cb.attr=p.attr,p.find=cb,p.expr=cb.selectors,p.expr[":"]=p.expr.pseudos,p.unique=cb.uniqueSort,p.text=cb.getText,p.isXMLDoc=cb.isXML,p.contains=cb.contains}(a);var cb=/Until$/,db=/^(?:parents|prev(?:Until|All))/,eb=/^.[^:#\[\.,]*$/,fb=p.expr.match.needsContext,gb={children:!0,contents:!0,next:!0,prev:!0};p.fn.extend({find:function(a){var b,c,d,e,f,g,h=this;if("string"!=typeof a)return p(a).filter(function(){for(b=0,c=h.length;c>b;b++)if(p.contains(h[b],this))return!0});for(g=this.pushStack("","find",a),b=0,c=this.length;c>b;b++)if(d=g.length,p.find(a,this[b],g),b>0)for(e=d;g.length>e;e++)for(f=0;d>f;f++)if(g[f]===g[e]){g.splice(e--,1);break}return g},has:function(a){var b,c=p(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(p.contains(this,c[b]))return!0})},not:function(a){return this.pushStack(jb(this,a,!1),"not",a)},filter:function(a){return this.pushStack(jb(this,a,!0),"filter",a)},is:function(a){return!!a&&("string"==typeof a?fb.test(a)?p(a,this.context).index(this[0])>=0:p.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=fb.test(a)||"string"!=typeof a?p(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c.ownerDocument&&c!==b&&11!==c.nodeType;){if(g?g.index(c)>-1:p.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}return f=f.length>1?p.unique(f):f,this.pushStack(f,"closest",a)},index:function(a){return a?"string"==typeof a?p.inArray(this[0],p(a)):p.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c="string"==typeof a?p(a,b):p.makeArray(a&&a.nodeType?[a]:a),d=p.merge(this.get(),c);return this.pushStack(hb(c[0])||hb(d[0])?d:p.unique(d))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}}),p.fn.andSelf=p.fn.addBack,p.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return p.dir(a,"parentNode")},parentsUntil:function(a,b,c){return p.dir(a,"parentNode",c)},next:function(a){return ib(a,"nextSibling")},prev:function(a){return ib(a,"previousSibling")},nextAll:function(a){return p.dir(a,"nextSibling")},prevAll:function(a){return p.dir(a,"previousSibling")},nextUntil:function(a,b,c){return p.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return p.dir(a,"previousSibling",c)},siblings:function(a){return p.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return p.sibling(a.firstChild)},contents:function(a){return p.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:p.merge([],a.childNodes)}},function(a,b){p.fn[a]=function(c,d){var e=p.map(this,b,c);return cb.test(a)||(d=c),d&&"string"==typeof d&&(e=p.filter(d,e)),e=this.length>1&&!gb[a]?p.unique(e):e,this.length>1&&db.test(a)&&(e=e.reverse()),this.pushStack(e,a,k.call(arguments).join(","))}}),p.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),1===b.length?p.find.matchesSelector(b[0],a)?[b[0]]:[]:p.find.matches(a,b)},dir:function(a,c,d){for(var e=[],f=a[c];f&&9!==f.nodeType&&(d===b||1!==f.nodeType||!p(f).is(d));)1===f.nodeType&&e.push(f),f=f[c];return e},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}});var lb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",mb=/ jQuery\d+="(?:null|\d+)"/g,nb=/^\s+/,ob=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,pb=/<([\w:]+)/,qb=/<tbody/i,rb=/<|&#?\w+;/,sb=/<(?:script|style|link)/i,tb=/<(?:script|object|embed|option|style)/i,ub=RegExp("<(?:"+lb+")[\\s/>]","i"),vb=/^(?:checkbox|radio)$/,wb=/checked\s*(?:[^=]|=\s*.checked.)/i,xb=/\/(java|ecma)script/i,yb=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,zb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},Ab=kb(e),Bb=Ab.appendChild(e.createElement("div"));zb.optgroup=zb.option,zb.tbody=zb.tfoot=zb.colgroup=zb.caption=zb.thead,zb.th=zb.td,p.support.htmlSerialize||(zb._default=[1,"X<div>","</div>"]),p.fn.extend({text:function(a){return p.access(this,function(a){return a===b?p.text(this):this.empty().append((this[0]&&this[0].ownerDocument||e).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(p.isFunction(a))return this.each(function(b){p(this).wrapAll(a.call(this,b))});if(this[0]){var b=p(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){for(var a=this;a.firstChild&&1===a.firstChild.nodeType;)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return p.isFunction(a)?this.each(function(b){p(this).wrapInner(a.call(this,b))}):this.each(function(){var b=p(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=p.isFunction(a);return this.each(function(c){p(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){p.nodeName(this,"body")||p(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){(1===this.nodeType||11===this.nodeType)&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){(1===this.nodeType||11===this.nodeType)&&this.insertBefore(a,this.firstChild)})},before:function(){if(!hb(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(a,this),"before",this.selector)}},after:function(){if(!hb(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(this,a),"after",this.selector)}},remove:function(a,b){for(var c,d=0;null!=(c=this[d]);d++)(!a||p.filter(a,[c]).length)&&(b||1!==c.nodeType||(p.cleanData(c.getElementsByTagName("*")),p.cleanData([c])),c.parentNode&&c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)for(1===a.nodeType&&p.cleanData(a.getElementsByTagName("*"));a.firstChild;)a.removeChild(a.firstChild);return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return p.clone(this,a,b)})},html:function(a){return p.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return 1===c.nodeType?c.innerHTML.replace(mb,""):b;if(!("string"!=typeof a||sb.test(a)||!p.support.htmlSerialize&&ub.test(a)||!p.support.leadingWhitespace&&nb.test(a)||zb[(pb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ob,"<$1></$2>");try{for(;e>d;d++)c=this[d]||{},1===c.nodeType&&(p.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(f){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){return hb(this[0])?this.length?this.pushStack(p(p.isFunction(a)?a():a),"replaceWith",a):this:p.isFunction(a)?this.each(function(b){var c=p(this),d=c.html();c.replaceWith(a.call(this,b,d))}):("string"!=typeof a&&(a=p(a).detach()),this.each(function(){var b=this.nextSibling,c=this.parentNode;p(this).remove(),b?p(b).before(a):p(c).append(a)}))},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){a=[].concat.apply([],a);var e,f,g,h,i=0,j=a[0],k=[],l=this.length;if(!p.support.checkClone&&l>1&&"string"==typeof j&&wb.test(j))return this.each(function(){p(this).domManip(a,c,d)});if(p.isFunction(j))return this.each(function(e){var f=p(this);a[0]=j.call(this,e,c?f.html():b),f.domManip(a,c,d)});if(this[0]){if(e=p.buildFragment(a,this,k),g=e.fragment,f=g.firstChild,1===g.childNodes.length&&(g=f),f)for(c=c&&p.nodeName(f,"tr"),h=e.cacheable||l-1;l>i;i++)d.call(c&&p.nodeName(this[i],"table")?Cb(this[i],"tbody"):this[i],i===h?g:p.clone(g,!0,!0));g=f=null,k.length&&p.each(k,function(a,b){b.src?p.ajax?p.ajax({url:b.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):p.error("no ajax"):p.globalEval((b.text||b.textContent||b.innerHTML||"").replace(yb,"")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),p.buildFragment=function(a,c,d){var f,g,h,i=a[0];return c=c||e,c=!c.nodeType&&c[0]||c,c=c.ownerDocument||c,!(1===a.length&&"string"==typeof i&&512>i.length&&c===e&&"<"===i.charAt(0))||tb.test(i)||!p.support.checkClone&&wb.test(i)||!p.support.html5Clone&&ub.test(i)||(g=!0,f=p.fragments[i],h=f!==b),f||(f=c.createDocumentFragment(),p.clean(a,c,f,d),g&&(p.fragments[i]=h&&f)),{fragment:f,cacheable:g}},p.fragments={},p.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){p.fn[a]=function(c){var d,e=0,f=[],g=p(c),h=g.length,i=1===this.length&&this[0].parentNode;if((null==i||i&&11===i.nodeType&&1===i.childNodes.length)&&1===h)return g[b](this[0]),this;for(;h>e;e++)d=(e>0?this.clone(!0):this).get(),p(g[e])[b](d),f=f.concat(d);return this.pushStack(f,a,g.selector)}}),p.extend({clone:function(a,b,c){var d,e,f,g;if(p.support.html5Clone||p.isXMLDoc(a)||!ub.test("<"+a.nodeName+">")?g=a.cloneNode(!0):(Bb.innerHTML=a.outerHTML,Bb.removeChild(g=Bb.firstChild)),!(p.support.noCloneEvent&&p.support.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||p.isXMLDoc(a)))for(Eb(a,g),d=Fb(a),e=Fb(g),f=0;d[f];++f)e[f]&&Eb(d[f],e[f]);if(b&&(Db(a,g),c))for(d=Fb(a),e=Fb(g),f=0;d[f];++f)Db(d[f],e[f]);return d=e=null,g},clean:function(a,c,d,f){var g,h,i,j,k,l,m,n,o,r,s,t=c===e&&Ab,u=[];for(c&&c.createDocumentFragment!==b||(c=e),g=0;null!=(i=a[g]);g++)if("number"==typeof i&&(i+=""),i){if("string"==typeof i)if(rb.test(i)){for(t=t||kb(c),m=c.createElement("div"),t.appendChild(m),i=i.replace(ob,"<$1></$2>"),j=(pb.exec(i)||["",""])[1].toLowerCase(),k=zb[j]||zb._default,l=k[0],m.innerHTML=k[1]+i+k[2];l--;)m=m.lastChild;if(!p.support.tbody)for(n=qb.test(i),o="table"!==j||n?"<table>"!==k[1]||n?[]:m.childNodes:m.firstChild&&m.firstChild.childNodes,h=o.length-1;h>=0;--h)p.nodeName(o[h],"tbody")&&!o[h].childNodes.length&&o[h].parentNode.removeChild(o[h]);!p.support.leadingWhitespace&&nb.test(i)&&m.insertBefore(c.createTextNode(nb.exec(i)[0]),m.firstChild),i=m.childNodes,m.parentNode.removeChild(m)}else i=c.createTextNode(i);i.nodeType?u.push(i):p.merge(u,i)}if(m&&(i=m=t=null),!p.support.appendChecked)for(g=0;null!=(i=u[g]);g++)p.nodeName(i,"input")?Gb(i):i.getElementsByTagName!==b&&p.grep(i.getElementsByTagName("input"),Gb);if(d)for(r=function(a){return!a.type||xb.test(a.type)?f?f.push(a.parentNode?a.parentNode.removeChild(a):a):d.appendChild(a):b},g=0;null!=(i=u[g]);g++)p.nodeName(i,"script")&&r(i)||(d.appendChild(i),i.getElementsByTagName!==b&&(s=p.grep(p.merge([],i.getElementsByTagName("script")),r),u.splice.apply(u,[g+1,0].concat(s)),g+=s.length));return u},cleanData:function(a,b){for(var c,d,e,f,g=0,h=p.expando,i=p.cache,j=p.support.deleteExpando,k=p.event.special;null!=(e=a[g]);g++)if((b||p.acceptData(e))&&(d=e[h],c=d&&i[d])){if(c.events)for(f in c.events)k[f]?p.event.remove(e,f):p.removeEvent(e,f,c.handle);i[d]&&(delete i[d],j?delete e[h]:e.removeAttribute?e.removeAttribute(h):e[h]=null,p.deletedIds.push(d))}}}),function(){var a,b;p.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||0>a.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a=p.uaMatch(g.userAgent),b={},a.browser&&(b[a.browser]=!0,b.version=a.version),b.chrome?b.webkit=!0:b.webkit&&(b.safari=!0),p.browser=b,p.sub=function(){function a(b,c){return new a.fn.init(b,c)}p.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(b,d){return d&&d instanceof p&&!(d instanceof a)&&(d=a(d)),p.fn.init.call(this,b,d,c)},a.fn.init.prototype=a.fn;var c=a(e);return a}}();var Hb,Ib,Jb,Kb=/alpha\([^)]*\)/i,Lb=/opacity=([^)]*)/,Mb=/^(top|right|bottom|left)$/,Nb=/^(none|table(?!-c[ea]).+)/,Ob=/^margin/,Pb=RegExp("^("+q+")(.*)$","i"),Qb=RegExp("^("+q+")(?!px)[a-z%]+$","i"),Rb=RegExp("^([-+])=("+q+")","i"),Sb={BODY:"block"},Tb={position:"absolute",visibility:"hidden",display:"block"},Ub={letterSpacing:0,fontWeight:400},Vb=["Top","Right","Bottom","Left"],Wb=["Webkit","O","Moz","ms"],Xb=p.fn.toggle;p.fn.extend({css:function(a,c){return p.access(this,function(a,c,d){return d!==b?p.style(a,c,d):p.css(a,c)},a,c,arguments.length>1)},show:function(){return $b(this,!0)},hide:function(){return $b(this)},toggle:function(a,b){var c="boolean"==typeof a;return p.isFunction(a)&&p.isFunction(b)?Xb.apply(this,arguments):this.each(function(){(c?a:Zb(this))?p(this).show():p(this).hide()})}}),p.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Hb(a,"opacity");return""===c?"1":c}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":p.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var f,g,h,i=p.camelCase(c),j=a.style;if(c=p.cssProps[i]||(p.cssProps[i]=Yb(j,i)),h=p.cssHooks[c]||p.cssHooks[i],d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];if(g=typeof d,"string"===g&&(f=Rb.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(p.css(a,c)),g="number"),!(null==d||"number"===g&&isNaN(d)||("number"!==g||p.cssNumber[i]||(d+="px"),h&&"set"in h&&(d=h.set(a,d,e))===b)))try{j[c]=d}catch(k){}}},css:function(a,c,d,e){var f,g,h,i=p.camelCase(c);return c=p.cssProps[i]||(p.cssProps[i]=Yb(a.style,i)),h=p.cssHooks[c]||p.cssHooks[i],h&&"get"in h&&(f=h.get(a,!0,e)),f===b&&(f=Hb(a,c)),"normal"===f&&c in Ub&&(f=Ub[c]),d||e!==b?(g=parseFloat(f),d||p.isNumeric(g)?g||0:f):f},swap:function(a,b,c){var d,e,f={};for(e in b)f[e]=a.style[e],a.style[e]=b[e];d=c.call(a);for(e in b)a.style[e]=f[e];return d}}),a.getComputedStyle?Hb=function(b,c){var d,e,f,g,h=a.getComputedStyle(b,null),i=b.style;return h&&(d=h.getPropertyValue(c)||h[c],""!==d||p.contains(b.ownerDocument,b)||(d=p.style(b,c)),Qb.test(d)&&Ob.test(c)&&(e=i.width,f=i.minWidth,g=i.maxWidth,i.minWidth=i.maxWidth=i.width=d,d=h.width,i.width=e,i.minWidth=f,i.maxWidth=g)),d}:e.documentElement.currentStyle&&(Hb=function(a,b){var c,d,e=a.currentStyle&&a.currentStyle[b],f=a.style;return null==e&&f&&f[b]&&(e=f[b]),Qb.test(e)&&!Mb.test(b)&&(c=f.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),f.left="fontSize"===b?"1em":e,e=f.pixelLeft+"px",f.left=c,d&&(a.runtimeStyle.left=d)),""===e?"auto":e}),p.each(["height","width"],function(a,c){p.cssHooks[c]={get:function(a,d,e){return d?0===a.offsetWidth&&Nb.test(Hb(a,"display"))?p.swap(a,Tb,function(){return bc(a,c,e)}):bc(a,c,e):b},set:function(a,b,d){return _b(a,b,d?ac(a,c,d,p.support.boxSizing&&"border-box"===p.css(a,"boxSizing")):0)}}}),p.support.opacity||(p.cssHooks.opacity={get:function(a,b){return Lb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=p.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,b>=1&&""===p.trim(f.replace(Kb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),d&&!d.filter)||(c.filter=Kb.test(f)?f.replace(Kb,e):f+" "+e)}}),p(function(){p.support.reliableMarginRight||(p.cssHooks.marginRight={get:function(a,c){return p.swap(a,{display:"inline-block"},function(){return c?Hb(a,"marginRight"):b})}}),!p.support.pixelPosition&&p.fn.position&&p.each(["top","left"],function(a,b){p.cssHooks[b]={get:function(a,c){if(c){var d=Hb(a,b);return Qb.test(d)?p(a).position()[b]+"px":d}}}})}),p.expr&&p.expr.filters&&(p.expr.filters.hidden=function(a){return 0===a.offsetWidth&&0===a.offsetHeight||!p.support.reliableHiddenOffsets&&"none"===(a.style&&a.style.display||Hb(a,"display"))},p.expr.filters.visible=function(a){return!p.expr.filters.hidden(a)}),p.each({margin:"",padding:"",border:"Width"},function(a,b){p.cssHooks[a+b]={expand:function(c){var d,e="string"==typeof c?c.split(" "):[c],f={};for(d=0;4>d;d++)f[a+Vb[d]+b]=e[d]||e[d-2]||e[0];return f}},Ob.test(a)||(p.cssHooks[a+b].set=_b)});var dc=/%20/g,ec=/\[\]$/,fc=/\r?\n/g,gc=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,hc=/^(?:select|textarea)/i;p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?p.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||hc.test(this.nodeName)||gc.test(this.type))}).map(function(a,b){var c=p(this).val();return null==c?null:p.isArray(c)?p.map(c,function(a){return{name:b.name,value:a.replace(fc,"\r\n")}}):{name:b.name,value:c.replace(fc,"\r\n")}}).get()}}),p.param=function(a,c){var d,e=[],f=function(a,b){b=p.isFunction(b)?b():null==b?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(c===b&&(c=p.ajaxSettings&&p.ajaxSettings.traditional),p.isArray(a)||a.jquery&&!p.isPlainObject(a))p.each(a,function(){f(this.name,this.value)});else for(d in a)ic(d,a[d],c,f);return e.join("&").replace(dc,"+")};var jc,kc,lc=/#.*$/,mc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,nc=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,oc=/^(?:GET|HEAD)$/,pc=/^\/\//,qc=/\?/,rc=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,sc=/([?&])_=[^&]*/,tc=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,uc=p.fn.load,vc={},wc={},xc=["*/"]+["*"];try{kc=f.href}catch(yc){kc=e.createElement("a"),kc.href="",kc=kc.href}jc=tc.exec(kc.toLowerCase())||[],p.fn.load=function(a,c,d){if("string"!=typeof a&&uc)return uc.apply(this,arguments);if(!this.length)return this;var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),p.isFunction(c)?(d=c,c=b):c&&"object"==typeof c&&(f="POST"),p.ajax({url:a,type:f,dataType:"html",data:c,complete:function(a,b){d&&h.each(d,g||[a.responseText,b,a])}}).done(function(a){g=arguments,h.html(e?p("<div>").append(a.replace(rc,"")).find(e):a)}),this},p.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){p.fn[b]=function(a){return this.on(b,a)}}),p.each(["get","post"],function(a,c){p[c]=function(a,d,e,f){return p.isFunction(d)&&(f=f||e,e=d,d=b),p.ajax({type:c,url:a,data:d,success:e,dataType:f})}}),p.extend({getScript:function(a,c){return p.get(a,b,c,"script")},getJSON:function(a,b,c){return p.get(a,b,c,"json")},ajaxSetup:function(a,b){return b?Bc(a,p.ajaxSettings):(b=a,a=p.ajaxSettings),Bc(a,b),a},ajaxSettings:{url:kc,isLocal:nc.test(jc[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":xc},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":p.parseJSON,"text xml":p.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:zc(vc),ajaxTransport:zc(wc),ajax:function(a,c){function y(a,c,f,i){var k,s,t,u,w,y=c;2!==v&&(v=2,h&&clearTimeout(h),g=b,e=i||"",x.readyState=a>0?4:0,f&&(u=Cc(l,x,f)),a>=200&&300>a||304===a?(l.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(p.lastModified[d]=w),w=x.getResponseHeader("Etag"),w&&(p.etag[d]=w)),304===a?(y="notmodified",k=!0):(k=Dc(l,u),y=k.state,s=k.data,t=k.error,k=!t)):(t=y,(!y||a)&&(y="error",0>a&&(a=0))),x.status=a,x.statusText=(c||y)+"",k?o.resolveWith(m,[s,y,x]):o.rejectWith(m,[x,y,t]),x.statusCode(r),r=b,j&&n.trigger("ajax"+(k?"Success":"Error"),[x,l,k?s:t]),q.fireWith(m,[x,y]),j&&(n.trigger("ajaxComplete",[x,l]),--p.active||p.event.trigger("ajaxStop")))
}"object"==typeof a&&(c=a,a=b),c=c||{};var d,e,f,g,h,i,j,k,l=p.ajaxSetup({},c),m=l.context||l,n=m!==l&&(m.nodeType||m instanceof p)?p(m):p.event,o=p.Deferred(),q=p.Callbacks("once memory"),r=l.statusCode||{},t={},u={},v=0,w="canceled",x={readyState:0,setRequestHeader:function(a,b){if(!v){var c=a.toLowerCase();a=u[c]=u[c]||a,t[a]=b}return this},getAllResponseHeaders:function(){return 2===v?e:null},getResponseHeader:function(a){var c;if(2===v){if(!f)for(f={};c=mc.exec(e);)f[c[1].toLowerCase()]=c[2];c=f[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){return v||(l.mimeType=a),this},abort:function(a){return a=a||w,g&&g.abort(a),y(0,a),this}};if(o.promise(x),x.success=x.done,x.error=x.fail,x.complete=q.add,x.statusCode=function(a){if(a){var b;if(2>v)for(b in a)r[b]=[r[b],a[b]];else b=a[x.status],x.always(b)}return this},l.url=((a||l.url)+"").replace(lc,"").replace(pc,jc[1]+"//"),l.dataTypes=p.trim(l.dataType||"*").toLowerCase().split(s),null==l.crossDomain&&(i=tc.exec(l.url.toLowerCase()),l.crossDomain=!(!i||i[1]===jc[1]&&i[2]===jc[2]&&(i[3]||("http:"===i[1]?80:443))==(jc[3]||("http:"===jc[1]?80:443)))),l.data&&l.processData&&"string"!=typeof l.data&&(l.data=p.param(l.data,l.traditional)),Ac(vc,l,c,x),2===v)return x;if(j=l.global,l.type=l.type.toUpperCase(),l.hasContent=!oc.test(l.type),j&&0===p.active++&&p.event.trigger("ajaxStart"),!l.hasContent&&(l.data&&(l.url+=(qc.test(l.url)?"&":"?")+l.data,delete l.data),d=l.url,l.cache===!1)){var z=p.now(),A=l.url.replace(sc,"$1_="+z);l.url=A+(A===l.url?(qc.test(l.url)?"&":"?")+"_="+z:"")}(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&x.setRequestHeader("Content-Type",l.contentType),l.ifModified&&(d=d||l.url,p.lastModified[d]&&x.setRequestHeader("If-Modified-Since",p.lastModified[d]),p.etag[d]&&x.setRequestHeader("If-None-Match",p.etag[d])),x.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+("*"!==l.dataTypes[0]?", "+xc+"; q=0.01":""):l.accepts["*"]);for(k in l.headers)x.setRequestHeader(k,l.headers[k]);if(l.beforeSend&&(l.beforeSend.call(m,x,l)===!1||2===v))return x.abort();w="abort";for(k in{success:1,error:1,complete:1})x[k](l[k]);if(g=Ac(wc,l,c,x)){x.readyState=1,j&&n.trigger("ajaxSend",[x,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){x.abort("timeout")},l.timeout));try{v=1,g.send(t,y)}catch(B){if(!(2>v))throw B;y(-1,B)}}else y(-1,"No Transport");return x},active:0,lastModified:{},etag:{}});var Ec=[],Fc=/\?/,Gc=/(=)\?(?=&|$)|\?\?/,Hc=p.now();p.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Ec.pop()||p.expando+"_"+Hc++;return this[a]=!0,a}}),p.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.data,j=c.url,k=c.jsonp!==!1,l=k&&Gc.test(j),m=k&&!l&&"string"==typeof i&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&Gc.test(i);return"jsonp"===c.dataTypes[0]||l||m?(f=c.jsonpCallback=p.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,g=a[f],l?c.url=j.replace(Gc,"$1"+f):m?c.data=i.replace(Gc,"$1"+f):k&&(c.url+=(Fc.test(j)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||p.error(f+" was not called"),h[0]},c.dataTypes[0]="json",a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,Ec.push(f)),h&&p.isFunction(g)&&g(h[0]),h=g=b}),"script"):b}),p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){return p.globalEval(a),a}}}),p.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),p.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=e.head||e.getElementsByTagName("head")[0]||e.documentElement;return{send:function(f,g){c=e.createElement("script"),c.async="async",a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,e){(e||!c.readyState||/loaded|complete/.test(c.readyState))&&(c.onload=c.onreadystatechange=null,d&&c.parentNode&&d.removeChild(c),c=b,e||g(200,"success"))},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(0,1)}}}});var Ic,Jc=a.ActiveXObject?function(){for(var a in Ic)Ic[a](0,1)}:!1,Kc=0;p.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&Lc()||Mc()}:Lc,function(a){p.extend(p.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(p.ajaxSettings.xhr()),p.support.ajax&&p.ajaxTransport(function(c){if(!c.crossDomain||p.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();if(c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async),c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),c.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l,m;try{if(d&&(e||4===i.readyState))if(d=b,g&&(i.onreadystatechange=p.noop,Jc&&delete Ic[g]),e)4!==i.readyState&&i.abort();else{h=i.status,k=i.getAllResponseHeaders(),l={},m=i.responseXML,m&&m.documentElement&&(l.xml=m);try{l.text=i.responseText}catch(n){}try{j=i.statusText}catch(n){j=""}h||!c.isLocal||c.crossDomain?1223===h&&(h=204):h=l.text?200:404}}catch(o){e||f(-1,o)}l&&f(h,j,l,k)},c.async?4===i.readyState?setTimeout(d,0):(g=++Kc,Jc&&(Ic||(Ic={},p(a).unload(Jc)),Ic[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(0,1)}}}});var Nc,Oc,Pc=/^(?:toggle|show|hide)$/,Qc=RegExp("^(?:([-+])=|)("+q+")([a-z%]*)$","i"),Rc=/queueHooks$/,Sc=[Yc],Tc={"*":[function(a,b){var c,d,e=this.createTween(a,b),f=Qc.exec(b),g=e.cur(),h=+g||0,i=1,j=20;if(f){if(c=+f[2],d=f[3]||(p.cssNumber[a]?"":"px"),"px"!==d&&h){h=p.css(e.elem,a,!0)||c||1;do i=i||".5",h/=i,p.style(e.elem,a,h+d);while(i!==(i=e.cur()/g)&&1!==i&&--j)}e.unit=d,e.start=h,e.end=f[1]?h+(f[1]+1)*c:c}return e}]};p.Animation=p.extend(Wc,{tweener:function(a,b){p.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Tc[c]=Tc[c]||[],Tc[c].unshift(b)},prefilter:function(a,b){b?Sc.unshift(a):Sc.push(a)}}),p.Tween=Zc,Zc.prototype={constructor:Zc,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(p.cssNumber[c]?"":"px")},cur:function(){var a=Zc.propHooks[this.prop];return a&&a.get?a.get(this):Zc.propHooks._default.get(this)},run:function(a){var b,c=Zc.propHooks[this.prop];return this.pos=b=this.options.duration?p.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Zc.propHooks._default.set(this),this}},Zc.prototype.init.prototype=Zc.prototype,Zc.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=p.css(a.elem,a.prop,!1,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){p.fx.step[a.prop]?p.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[p.cssProps[a.prop]]||p.cssHooks[a.prop])?p.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Zc.propHooks.scrollTop=Zc.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},p.each(["toggle","show","hide"],function(a,b){var c=p.fn[b];p.fn[b]=function(d,e,f){return null==d||"boolean"==typeof d||!a&&p.isFunction(d)&&p.isFunction(e)?c.apply(this,arguments):this.animate($c(b,!0),d,e,f)}}),p.fn.extend({fadeTo:function(a,b,c,d){return this.filter(Zb).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=p.isEmptyObject(a),f=p.speed(b,c,d),g=function(){var b=Wc(this,p.extend({},a),f);e&&b.stop(!0)};return e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,c,d){var e=function(a){var b=a.stop;delete a.stop,b(d)};return"string"!=typeof a&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,c=null!=a&&a+"queueHooks",f=p.timers,g=p._data(this);if(c)g[c]&&g[c].stop&&e(g[c]);else for(c in g)g[c]&&g[c].stop&&Rc.test(c)&&e(g[c]);for(c=f.length;c--;)f[c].elem!==this||null!=a&&f[c].queue!==a||(f[c].anim.stop(d),b=!1,f.splice(c,1));(b||!d)&&p.dequeue(this,a)})}}),p.each({slideDown:$c("show"),slideUp:$c("hide"),slideToggle:$c("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){p.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),p.speed=function(a,b,c){var d=a&&"object"==typeof a?p.extend({},a):{complete:c||!c&&b||p.isFunction(a)&&a,duration:a,easing:c&&b||b&&!p.isFunction(b)&&b};return d.duration=p.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in p.fx.speeds?p.fx.speeds[d.duration]:p.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){p.isFunction(d.old)&&d.old.call(this),d.queue&&p.dequeue(this,d.queue)},d},p.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},p.timers=[],p.fx=Zc.prototype.init,p.fx.tick=function(){var a,c=p.timers,d=0;for(Nc=p.now();c.length>d;d++)a=c[d],a()||c[d]!==a||c.splice(d--,1);c.length||p.fx.stop(),Nc=b},p.fx.timer=function(a){a()&&p.timers.push(a)&&!Oc&&(Oc=setInterval(p.fx.tick,p.fx.interval))},p.fx.interval=13,p.fx.stop=function(){clearInterval(Oc),Oc=null},p.fx.speeds={slow:600,fast:200,_default:400},p.fx.step={},p.expr&&p.expr.filters&&(p.expr.filters.animated=function(a){return p.grep(p.timers,function(b){return a===b.elem}).length});var _c=/^(?:body|html)$/i;p.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){p.offset.setOffset(this,a,b)});var c,d,e,f,g,h,i,j={top:0,left:0},k=this[0],l=k&&k.ownerDocument;if(l)return(d=l.body)===k?p.offset.bodyOffset(k):(c=l.documentElement,p.contains(c,k)?(k.getBoundingClientRect!==b&&(j=k.getBoundingClientRect()),e=ad(l),f=c.clientTop||d.clientTop||0,g=c.clientLeft||d.clientLeft||0,h=e.pageYOffset||c.scrollTop,i=e.pageXOffset||c.scrollLeft,{top:j.top+h-f,left:j.left+i-g}):j)},p.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;return p.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(p.css(a,"marginTop"))||0,c+=parseFloat(p.css(a,"marginLeft"))||0),{top:b,left:c}},setOffset:function(a,b,c){var d=p.css(a,"position");"static"===d&&(a.style.position="relative");var l,m,e=p(a),f=e.offset(),g=p.css(a,"top"),h=p.css(a,"left"),i=("absolute"===d||"fixed"===d)&&p.inArray("auto",[g,h])>-1,j={},k={};i?(k=e.position(),l=k.top,m=k.left):(l=parseFloat(g)||0,m=parseFloat(h)||0),p.isFunction(b)&&(b=b.call(a,c,f)),null!=b.top&&(j.top=b.top-f.top+l),null!=b.left&&(j.left=b.left-f.left+m),"using"in b?b.using.call(a,j):e.css(j)}},p.fn.extend({position:function(){if(this[0]){var a=this[0],b=this.offsetParent(),c=this.offset(),d=_c.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(p.css(a,"marginTop"))||0,c.left-=parseFloat(p.css(a,"marginLeft"))||0,d.top+=parseFloat(p.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(p.css(b[0],"borderLeftWidth"))||0,{top:c.top-d.top,left:c.left-d.left}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||e.body;a&&!_c.test(a.nodeName)&&"static"===p.css(a,"position");)a=a.offsetParent;return a||e.body})}}),p.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);p.fn[a]=function(e){return p.access(this,function(a,e,f){var g=ad(a);return f===b?g?c in g?g[c]:g.document.documentElement[e]:a[e]:(g?g.scrollTo(d?p(g).scrollLeft():f,d?f:p(g).scrollTop()):a[e]=f,b)},a,e,arguments.length,null)}}),p.each({Height:"height",Width:"width"},function(a,c){p.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){p.fn[e]=function(e,f){var g=arguments.length&&(d||"boolean"!=typeof e),h=d||(e===!0||f===!0?"margin":"border");return p.access(this,function(c,d,e){var f;return p.isWindow(c)?c.document.documentElement["client"+a]:9===c.nodeType?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?p.css(c,d,e,h):p.style(c,d,e,h)},c,g?e:b,g,null)}})}),a.jQuery=a.$=p,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return p})}(window); | dominic/cdnjs | ajax/libs/require-jquery/0.25.0/require-jquery.min.js | JavaScript | mit | 108,631 |
/*!
* GMaps.js v0.2.27
* http://hpneo.github.com/gmaps/
*
* Copyright 2012, Gustavo Leon
* Released under the MIT License.
*/
if(window.google && window.google.maps){
var GMaps = (function(global) {
"use strict";
var doc = document;
var getElementById = function(id, context) {
var ele
if('jQuery' in global && context){
ele = $("#"+id.replace('#', ''), context)[0]
}else{
ele = doc.getElementById(id.replace('#', ''));
};
return ele;
};
var GMaps = function(options) {
var self = this;
window.context_menu = {};
if (typeof(options.el) === 'string' || typeof(options.div) === 'string') {
this.el = getElementById(options.el || options.div, options.context);
} else {
this.el = options.el || options.div;
};
this.el.style.width = options.width || this.el.scrollWidth || this.el.offsetWidth;
this.el.style.height = options.height || this.el.scrollHeight || this.el.offsetHeight;
this.controls = [];
this.overlays = [];
this.layers = []; // array with kml and ft layers, can be as many
this.singleLayers = {}; // object with the other layers, only one per layer
this.markers = [];
this.polylines = [];
this.routes = [];
this.polygons = [];
this.infoWindow = null;
this.overlay_el = null;
this.zoom = options.zoom || 15;
var markerClusterer = options.markerClusterer;
//'Hybrid', 'Roadmap', 'Satellite' or 'Terrain'
var mapType;
if (options.mapType) {
mapType = google.maps.MapTypeId[options.mapType.toUpperCase()];
}
else {
mapType = google.maps.MapTypeId.ROADMAP;
}
var map_center = new google.maps.LatLng(options.lat, options.lng);
delete options.el;
delete options.lat;
delete options.lng;
delete options.mapType;
delete options.width;
delete options.height;
delete options.markerClusterer;
var zoomControlOpt = options.zoomControlOpt || {
style: 'DEFAULT',
position: 'TOP_LEFT'
};
var zoomControl = options.zoomControl || true,
zoomControlStyle = zoomControlOpt.style || 'DEFAULT',
zoomControlPosition = zoomControlOpt.position || 'TOP_LEFT',
panControl = options.panControl || true,
mapTypeControl = options.mapTypeControl || true,
scaleControl = options.scaleControl || true,
streetViewControl = options.streetViewControl || true,
overviewMapControl = overviewMapControl || true;
var map_options = {};
var map_base_options = {
zoom: this.zoom,
center: map_center,
mapTypeId: mapType
};
var map_controls_options = {
panControl: panControl,
zoomControl: zoomControl,
zoomControlOptions: {
style: google.maps.ZoomControlStyle[zoomControlStyle], // DEFAULT LARGE SMALL
position: google.maps.ControlPosition[zoomControlPosition]
},
mapTypeControl: mapTypeControl,
scaleControl: scaleControl,
streetViewControl: streetViewControl,
overviewMapControl: overviewMapControl
}
if(options.disableDefaultUI != true)
map_base_options = extend_object(map_base_options, map_controls_options);
map_options = extend_object(map_base_options, options);
this.map = new google.maps.Map(this.el, map_options);
if(markerClusterer)
this.markerClusterer = markerClusterer.apply(this, [this.map]);
// Context menus
var buildContextMenuHTML = function(control, e) {
var html = '';
var options = window.context_menu[control];
for (var i in options){
if (options.hasOwnProperty(i)){
var option = options[i];
html += '<li><a id="' + control + '_' + i + '" href="#">' +
option.title + '</a></li>';
}
}
if(!getElementById('gmaps_context_menu')) return;
var context_menu_element = getElementById('gmaps_context_menu');
context_menu_element.innerHTML = html;
var context_menu_items = context_menu_element.getElementsByTagName('a');
var context_menu_items_count = context_menu_items.length;
for(var i = 0; i < context_menu_items_count; i++){
var context_menu_item = context_menu_items[i];
var assign_menu_item_action = function(ev){
ev.preventDefault();
options[this.id.replace(control + '_', '')].action.apply(self, [e]);
self.hideContextMenu();
};
google.maps.event.clearListeners(context_menu_item, 'click');
google.maps.event.addDomListenerOnce(context_menu_item, 'click', assign_menu_item_action, false);
}
var left = self.el.offsetLeft + e.pixel.x - 15;
var top = self.el.offsetTop + e.pixel.y - 15;
context_menu_element.style.left = left + "px";
context_menu_element.style.top = top + "px";
context_menu_element.style.display = 'block';
};
var buildContextMenu = function(control, e) {
if (control === 'marker') {
e.pixel = {};
var overlay = new google.maps.OverlayView();
overlay.setMap(self.map);
overlay.draw = function() {
var projection = overlay.getProjection();
var position = e.marker.getPosition();
e.pixel = projection.fromLatLngToContainerPixel(position);
buildContextMenuHTML(control, e);
};
}
else {
buildContextMenuHTML(control, e);
}
};
this.setContextMenu = function(options) {
window.context_menu[options.control] = {};
for (var i in options.options){
if (options.options.hasOwnProperty(i)){
var option = options.options[i];
window.context_menu[options.control][option.name] = {
title: option.title,
action: option.action
};
}
}
var ul = doc.createElement('ul');
ul.id = 'gmaps_context_menu';
ul.style.display = 'none';
ul.style.position = 'absolute';
ul.style.minWidth = '100px';
ul.style.background = 'white';
ul.style.listStyle = 'none';
ul.style.padding = '8px';
ul.style.boxShadow = '2px 2px 6px #ccc';
doc.body.appendChild(ul);
var context_menu_element = getElementById('gmaps_context_menu');
google.maps.event.addDomListener(context_menu_element, 'mouseout', function(ev) {
if(!ev.relatedTarget || !this.contains(ev.relatedTarget)){
window.setTimeout(function(){
context_menu_element.style.display = 'none';
}, 400);
}
}, false);
};
this.hideContextMenu = function() {
var context_menu_element = getElementById('gmaps_context_menu');
if(context_menu_element)
context_menu_element.style.display = 'none';
};
//Events
var events_that_hide_context_menu = ['bounds_changed', 'center_changed', 'click', 'dblclick', 'drag', 'dragend', 'dragstart', 'idle', 'maptypeid_changed', 'projection_changed', 'resize', 'tilesloaded', 'zoom_changed'];
var events_that_doesnt_hide_context_menu = ['mousemove', 'mouseout', 'mouseover'];
for (var ev = 0; ev < events_that_hide_context_menu.length; ev++) {
(function(object, name) {
google.maps.event.addListener(object, name, function(e){
if(e == undefined)
e = this;
if (options[name])
options[name].apply(this, [e]);
self.hideContextMenu();
});
})(this.map, events_that_hide_context_menu[ev]);
}
for (var ev = 0; ev < events_that_doesnt_hide_context_menu.length; ev++) {
(function(object, name) {
google.maps.event.addListener(object, name, function(e){
if(e == undefined)
e = this;
if (options[name])
options[name].apply(this, [e]);
});
})(this.map, events_that_doesnt_hide_context_menu[ev]);
}
google.maps.event.addListener(this.map, 'rightclick', function(e) {
if (options.rightclick) {
options.rightclick.apply(this, [e]);
}
if(window.context_menu['map'] != undefined) {
buildContextMenu('map', e);
}
});
this.refresh = function() {
google.maps.event.trigger(this.map, 'resize');
};
this.fitZoom = function() {
var latLngs = [];
var markers_length = this.markers.length;
for(var i=0; i < markers_length; i++) {
latLngs.push(this.markers[i].getPosition());
}
this.fitLatLngBounds(latLngs);
};
this.fitLatLngBounds = function(latLngs) {
var total = latLngs.length;
var bounds = new google.maps.LatLngBounds();
for(var i=0; i < total; i++) {
bounds.extend(latLngs[i]);
}
this.map.fitBounds(bounds);
};
// Map methods
this.setCenter = function(lat, lng, callback) {
this.map.panTo(new google.maps.LatLng(lat, lng));
if (callback) {
callback();
}
};
this.getElement = function() {
return this.el;
};
this.zoomIn = function(value) {
this.zoom = this.map.getZoom() + value;
this.map.setZoom(this.zoom);
};
this.zoomOut = function(value) {
this.zoom = this.map.getZoom() - value;
this.map.setZoom(this.zoom);
};
var native_methods = [];
for(var method in this.map){
if(typeof(this.map[method]) == 'function' && !this[method]){
native_methods.push(method);
}
}
for(var i=0; i < native_methods.length; i++){
(function(gmaps, scope, method_name) {
gmaps[method_name] = function(){
return scope[method_name].apply(scope, arguments);
};
})(this, this.map, native_methods[i]);
}
this.createControl = function(options) {
var control = doc.createElement('div');
control.style.cursor = 'pointer';
control.style.fontFamily = 'Arial, sans-serif';
control.style.fontSize = '13px';
control.style.boxShadow = 'rgba(0, 0, 0, 0.398438) 0px 2px 4px';
for(var option in options.style)
control.style[option] = options.style[option];
if(options.id) {
control.id = options.id;
}
if(options.classes) {
control.className = options.classes;
}
if(options.content) {
control.innerHTML = options.content;
}
for (var ev in options.events) {
(function(object, name) {
google.maps.event.addDomListener(object, name, function(){
options.events[name].apply(this, [this]);
});
})(control, ev);
}
control.index = 1;
return control;
};
this.addControl = function(options) {
var position = google.maps.ControlPosition[options.position.toUpperCase()];
delete options.position;
var control = this.createControl(options);
this.controls.push(control);
this.map.controls[position].push(control);
return control;
};
// Markers
this.createMarker = function(options) {
if ((options.hasOwnProperty('lat') && options.hasOwnProperty('lng')) || options.position) {
var self = this;
var details = options.details;
var fences = options.fences;
var outside = options.outside;
var base_options = {
position: new google.maps.LatLng(options.lat, options.lng),
map: null
};
delete options.lat;
delete options.lng;
delete options.fences;
delete options.outside;
var marker_options = extend_object(base_options, options);
var marker = new google.maps.Marker(marker_options);
marker.fences = fences;
if (options.infoWindow) {
marker.infoWindow = new google.maps.InfoWindow(options.infoWindow);
var info_window_events = ['closeclick', 'content_changed', 'domready', 'position_changed', 'zindex_changed'];
for (var ev = 0; ev < info_window_events.length; ev++) {
(function(object, name) {
google.maps.event.addListener(object, name, function(e){
if (options.infoWindow[name])
options.infoWindow[name].apply(this, [e]);
});
})(marker.infoWindow, info_window_events[ev]);
}
}
var marker_events = ['animation_changed', 'clickable_changed', 'cursor_changed', 'draggable_changed', 'flat_changed', 'icon_changed', 'position_changed', 'shadow_changed', 'shape_changed', 'title_changed', 'visible_changed', 'zindex_changed'];
var marker_events_with_mouse = ['dblclick', 'drag', 'dragend', 'dragstart', 'mousedown', 'mouseout', 'mouseover', 'mouseup'];
for (var ev = 0; ev < marker_events.length; ev++) {
(function(object, name) {
google.maps.event.addListener(object, name, function(){
if (options[name])
options[name].apply(this, [this]);
});
})(marker, marker_events[ev]);
}
for (var ev = 0; ev < marker_events_with_mouse.length; ev++) {
(function(map, object, name) {
google.maps.event.addListener(object, name, function(me){
if(!me.pixel){
me.pixel = map.getProjection().fromLatLngToPoint(me.latLng)
}
if (options[name])
options[name].apply(this, [me]);
});
})(this.map, marker, marker_events_with_mouse[ev]);
}
google.maps.event.addListener(marker, 'click', function() {
this.details = details;
if (options.click) {
options.click.apply(this, [this]);
}
if (marker.infoWindow) {
self.hideInfoWindows();
marker.infoWindow.open(self.map, marker);
}
});
google.maps.event.addListener(marker, 'rightclick', function(e) {
e.marker = this;
if (options.rightclick) {
options.rightclick.apply(this, [e]);
}
if (window.context_menu['marker'] != undefined) {
buildContextMenu('marker', e);
}
});
if (options.dragend || marker.fences) {
google.maps.event.addListener(marker, 'dragend', function() {
if (marker.fences) {
self.checkMarkerGeofence(marker, function(m, f) {
outside(m, f);
});
}
});
}
return marker;
}
else {
throw 'No latitude or longitude defined';
}
};
this.addMarker = function(options) {
var marker;
if(options.hasOwnProperty('gm_accessors_')) {
// Native google.maps.Marker object
marker = options;
}
else {
if ((options.hasOwnProperty('lat') && options.hasOwnProperty('lng')) || options.position) {
marker = this.createMarker(options);
}
else {
throw 'No latitude or longitude defined';
}
}
marker.setMap(this.map);
if(this.markerClusterer)
this.markerClusterer.addMarker(marker);
this.markers.push(marker);
return marker;
};
this.addMarkers = function(array) {
for (var i=0, marker; marker=array[i]; i++) {
this.addMarker(marker);
}
return this.markers;
};
this.hideInfoWindows = function() {
for (var i=0, marker; marker=this.markers[i]; i++){
if (marker.infoWindow){
marker.infoWindow.close();
}
}
};
this.removeMarker = function(marker) {
for(var i=0; i < this.markers.length; i++) {
if(this.markers[i] === marker) {
this.markers[i].setMap(null);
this.markers.splice(i, 1);
break;
}
}
return marker;
};
this.removeMarkers = function(collection) {
var collection = (collection || this.markers);
for(var i=0;i < this.markers.length; i++){
if(this.markers[i] === collection[i])
this.markers[i].setMap(null);
}
var new_markers = [];
for(var i=0;i < this.markers.length; i++){
if(this.markers[i].getMap() != null)
new_markers.push(this.markers[i]);
}
this.markers = new_markers;
};
// Overlays
this.drawOverlay = function(options) {
var overlay = new google.maps.OverlayView();
overlay.setMap(self.map);
var auto_show = true;
if(options.auto_show != null)
auto_show = options.auto_show;
overlay.onAdd = function() {
var el = doc.createElement('div');
el.style.borderStyle = "none";
el.style.borderWidth = "0px";
el.style.position = "absolute";
el.style.zIndex = 100;
el.innerHTML = options.content;
overlay.el = el;
var panes = this.getPanes();
if (!options.layer) {
options.layer = 'overlayLayer';
}
var overlayLayer = panes[options.layer];
overlayLayer.appendChild(el);
var stop_overlay_events = ['contextmenu', 'DOMMouseScroll', 'dblclick', 'mousedown'];
for (var ev = 0; ev < stop_overlay_events.length; ev++) {
(function(object, name) {
google.maps.event.addDomListener(object, name, function(e){
if(navigator.userAgent.toLowerCase().indexOf('msie') != -1 && document.all) {
e.cancelBubble = true;
e.returnValue = false;
}
else {
e.stopPropagation();
}
});
})(el, stop_overlay_events[ev]);
}
google.maps.event.trigger(this, 'ready');
};
overlay.draw = function() {
var projection = this.getProjection();
var pixel = projection.fromLatLngToDivPixel(new google.maps.LatLng(options.lat, options.lng));
options.horizontalOffset = options.horizontalOffset || 0;
options.verticalOffset = options.verticalOffset || 0;
var el = overlay.el;
var content = el.children[0];
var content_height = content.clientHeight;
var content_width = content.clientWidth;
switch (options.verticalAlign) {
case 'top':
el.style.top = (pixel.y - content_height + options.verticalOffset) + 'px';
break;
default:
case 'middle':
el.style.top = (pixel.y - (content_height / 2) + options.verticalOffset) + 'px';
break;
case 'bottom':
el.style.top = (pixel.y + options.verticalOffset) + 'px';
break;
}
switch (options.horizontalAlign) {
case 'left':
el.style.left = (pixel.x - content_width + options.horizontalOffset) + 'px';
break;
default:
case 'center':
el.style.left = (pixel.x - (content_width / 2) + options.horizontalOffset) + 'px';
break;
case 'right':
el.style.left = (pixel.x + options.horizontalOffset) + 'px';
break;
}
el.style.display = auto_show ? 'block' : 'none';
if(!auto_show){
options.show.apply(this, [el]);
}
};
overlay.onRemove = function() {
var el = overlay.el;
if(options.remove){
options.remove.apply(this, [el]);
}
else{
overlay.el.parentNode.removeChild(overlay.el);
overlay.el = null;
}
};
self.overlays.push(overlay);
return overlay;
};
this.removeOverlay = function(overlay) {
overlay.setMap(null);
};
this.removeOverlays = function() {
for (var i=0, item; item=self.overlays[i]; i++){
item.setMap(null);
}
self.overlays = [];
};
this.removePolylines = function() {
for (var i=0, item; item=self.polylines[i]; i++){
item.setMap(null);
}
self.polylines = [];
};
this.drawPolyline = function(options) {
var path = [];
var points = options.path;
if (points.length){
if (points[0][0] === undefined){
path = points;
}
else {
for (var i=0, latlng; latlng=points[i]; i++){
path.push(new google.maps.LatLng(latlng[0], latlng[1]));
}
}
}
var polyline_options = {
map: this.map,
path: path,
strokeColor: options.strokeColor,
strokeOpacity: options.strokeOpacity,
strokeWeight: options.strokeWeight,
geodesic: options.geodesic,
clickable: true,
editable: false,
visible: true
};
if(options.hasOwnProperty("clickable"))
polyline_options.clickable = options.clickable;
if(options.hasOwnProperty("editable"))
polyline_options.editable = options.editable;
if(options.hasOwnProperty("icons"))
polyline_options.icons = options.icons;
if(options.hasOwnProperty("zIndex"))
polyline_options.zIndex = options.zIndex;
var polyline = new google.maps.Polyline(polyline_options);
var polyline_events = ['click', 'dblclick', 'mousedown', 'mousemove', 'mouseout', 'mouseover', 'mouseup', 'rightclick'];
for (var ev = 0; ev < polyline_events.length; ev++) {
(function(object, name) {
google.maps.event.addListener(object, name, function(e){
if (options[name])
options[name].apply(this, [e]);
});
})(polyline, polyline_events[ev]);
}
this.polylines.push(polyline);
return polyline;
};
this.drawCircle = function(options) {
options = extend_object({
map: this.map,
center: new google.maps.LatLng(options.lat, options.lng)
}, options);
delete options.lat;
delete options.lng;
var polygon = new google.maps.Circle(options);
var polygon_events = ['click', 'dblclick', 'mousedown', 'mousemove', 'mouseout', 'mouseover', 'mouseup', 'rightclick'];
for (var ev = 0; ev < polygon_events.length; ev++) {
(function(object, name) {
google.maps.event.addListener(object, name, function(e){
if (options[name])
options[name].apply(this, [e]);
});
})(polygon, polygon_events[ev]);
}
this.polygons.push(polygon);
return polygon;
};
this.drawRectangle = function(options) {
options = extend_object({
map: this.map
}, options);
var latLngBounds = new google.maps.LatLngBounds(
new google.maps.LatLng(options.bounds[0][0], options.bounds[0][1]),
new google.maps.LatLng(options.bounds[1][0], options.bounds[1][1])
);
options.bounds = latLngBounds;
var polygon = new google.maps.Rectangle(options);
var polygon_events = ['click', 'dblclick', 'mousedown', 'mousemove', 'mouseout', 'mouseover', 'mouseup', 'rightclick'];
for (var ev = 0; ev < polygon_events.length; ev++) {
(function(object, name) {
google.maps.event.addListener(object, name, function(e){
if (options[name])
options[name].apply(this, [e]);
});
})(polygon, polygon_events[ev]);
}
this.polygons.push(polygon);
return polygon;
};
this.drawPolygon = function(options) {
var useGeoJSON = false;
if(options.hasOwnProperty("useGeoJSON"))
useGeoJSON = options.useGeoJSON;
delete options.useGeoJSON;
options = extend_object({
map: this.map
}, options);
if(useGeoJSON == false)
options.paths = [options.paths.slice(0)];
if(options.paths.length > 0) {
if(options.paths[0].length > 0) {
options.paths = array_flat(array_map(options.paths, arrayToLatLng, useGeoJSON));
}
}
var polygon = new google.maps.Polygon(options);
var polygon_events = ['click', 'dblclick', 'mousedown', 'mousemove', 'mouseout', 'mouseover', 'mouseup', 'rightclick'];
for (var ev = 0; ev < polygon_events.length; ev++) {
(function(object, name) {
google.maps.event.addListener(object, name, function(e){
if (options[name])
options[name].apply(this, [e]);
});
})(polygon, polygon_events[ev]);
}
this.polygons.push(polygon);
return polygon;
};
this.removePolygon = this.removeOverlay;
this.removePolygons = function() {
for (var i=0, item; item=self.polygons[i]; i++){
item.setMap(null);
}
self.polygons = [];
};
this.getFromFusionTables = function(options) {
var events = options.events;
delete options.events;
var fusion_tables_options = options;
var layer = new google.maps.FusionTablesLayer(fusion_tables_options);
for (var ev in events) {
(function(object, name) {
google.maps.event.addListener(object, name, function(e){
events[name].apply(this, [e]);
});
})(layer, ev);
}
this.layers.push(layer);
return layer;
};
this.loadFromFusionTables = function(options) {
var layer = this.getFromFusionTables(options);
layer.setMap(this.map);
return layer;
};
this.getFromKML = function(options) {
var url = options.url;
var events = options.events;
delete options.url;
delete options.events;
var kml_options = options;
var layer = new google.maps.KmlLayer(url, kml_options);
for (var ev in events) {
(function(object, name) {
google.maps.event.addListener(object, name, function(e){
events[name].apply(this, [e]);
});
})(layer, ev);
}
this.layers.push(layer);
return layer;
};
this.loadFromKML = function(options) {
var layer = this.getFromKML(options);
layer.setMap(this.map);
return layer;
};
// Services
var travelMode, unitSystem;
this.getRoutes = function(options) {
switch (options.travelMode) {
case 'bicycling':
travelMode = google.maps.TravelMode.BICYCLING;
break;
case 'transit':
travelMode = google.maps.TravelMode.TRANSIT;
break;
case 'driving':
travelMode = google.maps.TravelMode.DRIVING;
break;
// case 'walking':
default:
travelMode = google.maps.TravelMode.WALKING;
break;
}
if (options.unitSystem === 'imperial') {
unitSystem = google.maps.UnitSystem.IMPERIAL;
}
else {
unitSystem = google.maps.UnitSystem.METRIC;
}
var base_options = {
avoidHighways: false,
avoidTolls: false,
optimizeWaypoints: false,
waypoints: []
};
var request_options = extend_object(base_options, options);
request_options.origin = new google.maps.LatLng(options.origin[0], options.origin[1]);
request_options.destination = new google.maps.LatLng(options.destination[0], options.destination[1]);
request_options.travelMode = travelMode;
request_options.unitSystem = unitSystem;
delete request_options.callback;
var self = this;
var service = new google.maps.DirectionsService();
service.route(request_options, function(result, status) {
if (status === google.maps.DirectionsStatus.OK) {
for (var r in result.routes) {
if (result.routes.hasOwnProperty(r)) {
self.routes.push(result.routes[r]);
}
}
}
if (options.callback) {
options.callback(self.routes);
}
});
};
this.removeRoutes = function() {
this.routes = [];
};
this.getElevations = function(options) {
options = extend_object({
locations: [],
path : false,
samples : 256
}, options);
if(options.locations.length > 0) {
if(options.locations[0].length > 0) {
options.locations = array_flat(array_map([options.locations], arrayToLatLng, false));
}
}
var callback = options.callback;
delete options.callback;
var service = new google.maps.ElevationService();
//location request
if (!options.path) {
delete options.path;
delete options.samples;
service.getElevationForLocations(options, function(result, status){
if (callback && typeof(callback) === "function") {
callback(result, status);
}
});
//path request
} else {
var pathRequest = {
path : options.locations,
samples : options.samples
};
service.getElevationAlongPath(pathRequest, function(result, status){
if (callback && typeof(callback) === "function") {
callback(result, status);
}
});
}
};
// Alias for the method "drawRoute"
this.cleanRoute = this.removePolylines;
this.drawRoute = function(options) {
var self = this;
this.getRoutes({
origin: options.origin,
destination: options.destination,
travelMode: options.travelMode,
waypoints: options.waypoints,
unitSystem: options.unitSystem,
callback: function(e) {
if (e.length > 0) {
self.drawPolyline({
path: e[e.length - 1].overview_path,
strokeColor: options.strokeColor,
strokeOpacity: options.strokeOpacity,
strokeWeight: options.strokeWeight
});
if (options.callback) {
options.callback(e[e.length - 1]);
}
}
}
});
};
this.travelRoute = function(options) {
if (options.origin && options.destination) {
this.getRoutes({
origin: options.origin,
destination: options.destination,
travelMode: options.travelMode,
waypoints : options.waypoints,
callback: function(e) {
//start callback
if (e.length > 0 && options.start) {
options.start(e[e.length - 1]);
}
//step callback
if (e.length > 0 && options.step) {
var route = e[e.length - 1];
if (route.legs.length > 0) {
var steps = route.legs[0].steps;
for (var i=0, step; step=steps[i]; i++) {
step.step_number = i;
options.step(step, (route.legs[0].steps.length - 1));
}
}
}
//end callback
if (e.length > 0 && options.end) {
options.end(e[e.length - 1]);
}
}
});
}
else if (options.route) {
if (options.route.legs.length > 0) {
var steps = options.route.legs[0].steps;
for (var i=0, step; step=steps[i]; i++) {
step.step_number = i;
options.step(step);
}
}
}
};
this.drawSteppedRoute = function(options) {
if (options.origin && options.destination) {
this.getRoutes({
origin: options.origin,
destination: options.destination,
travelMode: options.travelMode,
waypoints : options.waypoints,
callback: function(e) {
//start callback
if (e.length > 0 && options.start) {
options.start(e[e.length - 1]);
}
//step callback
if (e.length > 0 && options.step) {
var route = e[e.length - 1];
if (route.legs.length > 0) {
var steps = route.legs[0].steps;
for (var i=0, step; step=steps[i]; i++) {
step.step_number = i;
self.drawPolyline({
path: step.path,
strokeColor: options.strokeColor,
strokeOpacity: options.strokeOpacity,
strokeWeight: options.strokeWeight
});
options.step(step, (route.legs[0].steps.length - 1));
}
}
}
//end callback
if (e.length > 0 && options.end) {
options.end(e[e.length - 1]);
}
}
});
}
else if (options.route) {
if (options.route.legs.length > 0) {
var steps = options.route.legs[0].steps;
for (var i=0, step; step=steps[i]; i++) {
step.step_number = i;
self.drawPolyline({
path: step.path,
strokeColor: options.strokeColor,
strokeOpacity: options.strokeOpacity,
strokeWeight: options.strokeWeight
});
options.step(step);
}
}
}
};
// Geofence
this.checkGeofence = function(lat, lng, fence) {
return fence.containsLatLng(new google.maps.LatLng(lat, lng));
};
this.checkMarkerGeofence = function(marker, outside_callback) {
if (marker.fences) {
for (var i=0, fence; fence=marker.fences[i]; i++) {
var pos = marker.getPosition();
if (!self.checkGeofence(pos.lat(), pos.lng(), fence)) {
outside_callback(marker, fence);
}
}
}
};
//add layers to the maps
this.addLayer = function(layerName, options) {
//var default_layers = ['weather', 'clouds', 'traffic', 'transit', 'bicycling', 'panoramio', 'places'];
options = options || {};
var layer;
switch(layerName) {
case 'weather': this.singleLayers.weather = layer = new google.maps.weather.WeatherLayer();
break;
case 'clouds': this.singleLayers.clouds = layer = new google.maps.weather.CloudLayer();
break;
case 'traffic': this.singleLayers.traffic = layer = new google.maps.TrafficLayer();
break;
case 'transit': this.singleLayers.transit = layer = new google.maps.TransitLayer();
break;
case 'bicycling': this.singleLayers.bicycling = layer = new google.maps.BicyclingLayer();
break;
case 'panoramio':
this.singleLayers.panoramio = layer = new google.maps.panoramio.PanoramioLayer();
layer.setTag(options.filter);
delete options.filter;
//click event
if(options.click) {
google.maps.event.addListener(layer, 'click', function(event) {
options.click(event);
delete options.click;
});
}
break;
case 'places':
this.singleLayers.places = layer = new google.maps.places.PlacesService(this.map);
//search and nearbySearch callback, Both are the same
if(options.search || options.nearbySearch) {
var placeSearchRequest = {
bounds : options.bounds || null,
keyword : options.keyword || null,
location : options.location || null,
name : options.name || null,
radius : options.radius || null,
rankBy : options.rankBy || null,
types : options.types || null
};
if(options.search) {
layer.search(placeSearchRequest, options.search);
}
if(options.nearbySearch) {
layer.nearbySearch(placeSearchRequest, options.nearbySearch);
}
}
//textSearch callback
if(options.textSearch) {
var textSearchRequest = {
bounds : options.bounds || null,
location : options.location || null,
query : options.query || null,
radius : options.radius || null
};
layer.textSearch(textSearchRequest, options.textSearch);
}
break;
}
if(layer !== undefined) {
if(typeof layer.setOptions == 'function') {
layer.setOptions(options);
}
if(typeof layer.setMap == 'function') {
layer.setMap(this.map);
}
return layer;
}
};
//remove layers
this.removeLayer = function(layerName) {
if(this.singleLayers[layerName] !== undefined) {
this.singleLayers[layerName].setMap(null);
delete this.singleLayers[layerName];
}
};
this.toImage = function(options) {
var options = options || {};
var static_map_options = {};
static_map_options['size'] = options['size'] || [this.el.clientWidth, this.el.clientHeight];
static_map_options['lat'] = this.getCenter().lat();
static_map_options['lng'] = this.getCenter().lng();
if(this.markers.length > 0) {
static_map_options['markers'] = [];
for(var i=0; i < this.markers.length; i++) {
static_map_options['markers'].push({
lat: this.markers[i].getPosition().lat(),
lng: this.markers[i].getPosition().lng()
});
}
}
if(this.polylines.length > 0) {
var polyline = this.polylines[0];
static_map_options['polyline'] = {};
static_map_options['polyline']['path'] = google.maps.geometry.encoding.encodePath(polyline.getPath());
static_map_options['polyline']['strokeColor'] = polyline.strokeColor
static_map_options['polyline']['strokeOpacity'] = polyline.strokeOpacity
static_map_options['polyline']['strokeWeight'] = polyline.strokeWeight
}
return GMaps.staticMapURL(static_map_options);
};
this.addMapType = function(mapTypeId, options) {
if(options.hasOwnProperty("getTileUrl") && typeof(options["getTileUrl"]) == "function") {
options.tileSize = options.tileSize || new google.maps.Size(256, 256);
var mapType = new google.maps.ImageMapType(options);
this.map.mapTypes.set(mapTypeId, mapType);
}
else {
throw "'getTileUrl' function required";
}
};
this.addOverlayMapType = function(options) {
if(options.hasOwnProperty("getTile") && typeof(options["getTile"]) == "function") {
var overlayMapTypeIndex = options.index;
delete options.index;
this.map.overlayMapTypes.insertAt(overlayMapTypeIndex, options);
}
else {
throw "'getTile' function required";
}
};
this.removeOverlayMapType = function(overlayMapTypeIndex) {
this.map.overlayMapTypes.removeAt(overlayMapTypeIndex);
};
};
GMaps.Route = function(options) {
this.map = options.map;
this.route = options.route;
this.step_count = 0;
this.steps = this.route.legs[0].steps;
this.steps_length = this.steps.length;
this.polyline = this.map.drawPolyline({
path: new google.maps.MVCArray(),
strokeColor: options.strokeColor,
strokeOpacity: options.strokeOpacity,
strokeWeight: options.strokeWeight
}).getPath();
this.back = function() {
if (this.step_count > 0) {
this.step_count--;
var path = this.route.legs[0].steps[this.step_count].path;
for (var p in path){
if (path.hasOwnProperty(p)){
this.polyline.pop();
}
}
}
};
this.forward = function() {
if (this.step_count < this.steps_length) {
var path = this.route.legs[0].steps[this.step_count].path;
for (var p in path){
if (path.hasOwnProperty(p)){
this.polyline.push(path[p]);
}
}
this.step_count++;
}
};
};
// Geolocation (Modern browsers only)
GMaps.geolocate = function(options) {
var complete_callback = options.always || options.complete;
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
options.success(position);
if (complete_callback) {
complete_callback();
}
}, function(error) {
options.error(error);
if (complete_callback) {
complete_callback();
}
}, options.options);
}
else {
options.not_supported();
if (complete_callback) {
complete_callback();
}
}
};
// Geocoding
GMaps.geocode = function(options) {
this.geocoder = new google.maps.Geocoder();
var callback = options.callback;
if (options.hasOwnProperty('lat') && options.hasOwnProperty('lng')) {
options.latLng = new google.maps.LatLng(options.lat, options.lng);
}
delete options.lat;
delete options.lng;
delete options.callback;
this.geocoder.geocode(options, function(results, status) {
callback(results, status);
});
};
// Static maps
GMaps.staticMapURL = function(options){
var parameters = [];
var data;
var static_root = 'http://maps.googleapis.com/maps/api/staticmap';
if (options.url){
static_root = options.url;
delete options.url;
}
static_root += '?';
var markers = options.markers;
delete options.markers;
if (!markers && options.marker){
markers = [options.marker];
delete options.marker;
}
var polyline = options.polyline;
delete options.polyline;
/** Map options **/
if (options.center){
parameters.push('center=' + options.center);
delete options.center;
}
else if (options.address){
parameters.push('center=' + options.address);
delete options.address;
}
else if (options.lat){
parameters.push(['center=', options.lat, ',', options.lng].join(''));
delete options.lat;
delete options.lng;
}
else if (options.visible){
var visible = encodeURI(options.visible.join('|'));
parameters.push('visible=' + visible);
}
var size = options.size;
if (size){
if (size.join){
size = size.join('x');
}
delete options.size;
}
else {
size = '630x300';
}
parameters.push('size=' + size);
if (!options.zoom){
options.zoom = 15;
}
var sensor = options.hasOwnProperty('sensor') ? !!options.sensor : true;
delete options.sensor;
parameters.push('sensor=' + sensor);
for (var param in options){
if (options.hasOwnProperty(param)){
parameters.push(param + '=' + options[param]);
}
}
/** Markers **/
if (markers){
var marker, loc;
for (var i=0; data=markers[i]; i++){
marker = [];
if (data.size && data.size !== 'normal'){
marker.push('size:' + data.size);
}
else if (data.icon){
marker.push('icon:' + encodeURI(data.icon));
}
if (data.color){
marker.push('color:' + data.color.replace('#', '0x'));
}
if (data.label){
marker.push('label:' + data.label[0].toUpperCase());
}
loc = (data.address ? data.address : data.lat + ',' + data.lng);
if (marker.length || i === 0){
marker.push(loc);
marker = marker.join('|');
parameters.push('markers=' + encodeURI(marker));
}
// New marker without styles
else {
marker = parameters.pop() + encodeURI('|' + loc);
parameters.push(marker);
}
}
}
/** Polylines **/
function parseColor(color, opacity){
if (color[0] === '#'){
color = color.replace('#', '0x');
if (opacity){
opacity = parseFloat(opacity);
opacity = Math.min(1, Math.max(opacity, 0));
if (opacity === 0){
return '0x00000000';
}
opacity = (opacity * 255).toString(16);
if (opacity.length === 1){
opacity += opacity;
}
color = color.slice(0,8) + opacity;
}
}
return color;
}
if (polyline){
data = polyline;
polyline = [];
if (data.strokeWeight){
polyline.push('weight:' + parseInt(data.strokeWeight, 10));
}
if (data.strokeColor){
var color = parseColor(data.strokeColor, data.strokeOpacity);
polyline.push('color:' + color);
}
if (data.fillColor){
var fillcolor = parseColor(data.fillColor, data.fillOpacity);
polyline.push('fillcolor:' + fillcolor);
}
var path = data.path;
if (path.join){
for (var j=0, pos; pos=path[j]; j++){
polyline.push(pos.join(','));
}
}
else {
polyline.push('enc:' + path);
}
polyline = polyline.join('|');
parameters.push('path=' + encodeURI(polyline));
}
parameters = parameters.join('&');
return static_root + parameters;
};
//==========================
// Polygon containsLatLng
// https://github.com/tparkin/Google-Maps-Point-in-Polygon
// Poygon getBounds extension - google-maps-extensions
// http://code.google.com/p/google-maps-extensions/source/browse/google.maps.Polygon.getBounds.js
if (!google.maps.Polygon.prototype.getBounds) {
google.maps.Polygon.prototype.getBounds = function(latLng) {
var bounds = new google.maps.LatLngBounds();
var paths = this.getPaths();
var path;
for (var p = 0; p < paths.getLength(); p++) {
path = paths.getAt(p);
for (var i = 0; i < path.getLength(); i++) {
bounds.extend(path.getAt(i));
}
}
return bounds;
};
}
// Polygon containsLatLng - method to determine if a latLng is within a polygon
google.maps.Polygon.prototype.containsLatLng = function(latLng) {
// Exclude points outside of bounds as there is no way they are in the poly
var bounds = this.getBounds();
if (bounds !== null && !bounds.contains(latLng)) {
return false;
}
// Raycast point in polygon method
var inPoly = false;
var numPaths = this.getPaths().getLength();
for (var p = 0; p < numPaths; p++) {
var path = this.getPaths().getAt(p);
var numPoints = path.getLength();
var j = numPoints - 1;
for (var i = 0; i < numPoints; i++) {
var vertex1 = path.getAt(i);
var vertex2 = path.getAt(j);
if (vertex1.lng() < latLng.lng() && vertex2.lng() >= latLng.lng() || vertex2.lng() < latLng.lng() && vertex1.lng() >= latLng.lng()) {
if (vertex1.lat() + (latLng.lng() - vertex1.lng()) / (vertex2.lng() - vertex1.lng()) * (vertex2.lat() - vertex1.lat()) < latLng.lat()) {
inPoly = !inPoly;
}
}
j = i;
}
}
return inPoly;
};
google.maps.LatLngBounds.prototype.containsLatLng = function(latLng) {
return this.contains(latLng);
};
google.maps.Marker.prototype.setFences = function(fences) {
this.fences = fences;
};
google.maps.Marker.prototype.addFence = function(fence) {
this.fences.push(fence);
};
return GMaps;
}(this));
var coordsToLatLngs = function(coords, useGeoJSON) {
var first_coord = coords[0];
var second_coord = coords[1];
if(useGeoJSON) {
first_coord = coords[1];
second_coord = coords[0];
}
return new google.maps.LatLng(first_coord, second_coord);
};
var arrayToLatLng = function(coords, useGeoJSON) {
for(var i=0; i < coords.length; i++) {
if(coords[i].length > 0 && typeof(coords[i][0]) != "number") {
coords[i] = arrayToLatLng(coords[i], useGeoJSON);
}
else {
coords[i] = coordsToLatLngs(coords[i], useGeoJSON);
}
}
return coords;
};
var extend_object = function(obj, new_obj) {
if(obj === new_obj) return obj;
for(var name in new_obj) {
obj[name] = new_obj[name];
}
return obj;
};
var replace_object = function(obj, replace) {
if(obj === replace) return obj;
for(var name in replace) {
if(obj[name] != undefined)
obj[name] = replace[name];
}
return obj;
};
var array_map = function(array, callback) {
var original_callback_params = Array.prototype.slice.call(arguments, 2);
if (Array.prototype.map && array.map === Array.prototype.map) {
return Array.prototype.map.call(array, function(item) {
callback_params = original_callback_params;
callback_params.splice(0, 0, item);
return callback.apply(this, callback_params);
});
}
else {
var array_return = [];
var array_length = array.length;
for(var i = 0; i < array_length; i++) {
callback_params = original_callback_params;
callback_params = callback_params.splice(0, 0, array[i]);
array_return.push(callback.apply(this, callback_params));
}
return array_return;
}
};
var array_flat = function(array) {
new_array = [];
for(var i=0; i < array.length; i++) {
new_array = new_array.concat(array[i]);
}
return new_array;
};
if(this.GMaps) {
/*Extension: Styled map*/
GMaps.prototype.addStyle = function(options){
var styledMapType = new google.maps.StyledMapType(options.styles, options.styledMapName);
this.map.mapTypes.set(options.mapTypeId, styledMapType);
};
GMaps.prototype.setStyle = function(mapTypeId){
this.map.setMapTypeId(mapTypeId);
};
}
}
| tomalec/cdnjs | ajax/libs/gmaps.js/0.2.27/gmaps.js | JavaScript | mit | 52,207 |
/*
* SPServices - Work with SharePoint's Web Services using jQuery
* Version 0.5.8
* @requires jQuery v1.4.2 or greater
*
* Copyright (c) 2009-2010 Sympraxis Consulting LLC
* Examples and docs at:
* http://spservices.codeplex.com
* Licensed under the MIT license:
* http://www.opensource.org/licenses/mit-license.php
*/
/**
* @description Work with SharePoint's Web Services using jQuery
* @type jQuery
* @name SPServices
* @category Plugins/SPServices
* @author Sympraxis Consulting LLC/marc.anderson@sympraxisconsulting.com
*/
(function(D){var g="/";var m="Alerts";var l="Authentication";var p="Copy";var J="Forms";var n="Lists";var H="Meetings";var d="People";var b="Permissions";var q="PublishedLinksService";var x="Search";var t="SiteData";var K="SocialDataService";var I="usergroup";var F="UserProfileService";var R="Versions";var j="Views";var C="WebPartPages";var o="Webs";var c="Workflow";var e="";var G=new Array();G.GetAlerts=[m,false];G.DeleteAlerts=[m,true];G.Mode=[l,false];G.Login=[l,false];G.CopyIntoItems=[p,true];G.CopyIntoItemsLocal=[p,true];G.GetItem=[p,false];G.GetForm=[J,false];G.GetFormCollection=[J,false];G.AddAttachment=[n,true];G.AddList=[n,true];G.CheckInFile=[n,true];G.CheckOutFile=[n,true];G.DeleteList=[n,true];G.GetAttachmentCollection=[n,false];G.GetList=[n,false];G.GetListAndView=[n,false];G.GetListCollection=[n,false];G.GetListContentType=[n,false];G.GetListContentTypes=[n,false];G.GetListItems=[n,false];G.UpdateList=[n,true];G.UpdateListItems=[n,true];G.AddMeeting=[H,true];G.CreateWorkspace=[H,true];G.RemoveMeeting=[H,true];G.SetWorkSpaceTitle=[H,true];G.SearchPrincipals=[d,false];G.AddPermission=[b,true];G.AddPermissionCollection=[b,true];G.GetPermissionCollection=[b,true];G.RemovePermission=[b,true];G.RemovePermissionCollection=[b,true];G.UpdatePermission=[b,true];G.GetLinks=[q,true];G.GetPortalSearchInfo=[x,false];G.GetSearchMetadata=[x,false];G.Query=[x,false];G.QueryEx=[x,false];G.Status=[x,false];G.EnumerateFolder=[t,false];G.AddComment=[K,true];G.AddTag=[K,true];G.AddTagByKeyword=[K,true];G.CountCommentsOfUser=[K,false];G.CountCommentsOfUserOnUrl=[K,false];G.CountCommentsOnUrl=[K,false];G.CountRatingsOnUrl=[K,false];G.CountTagsOfUser=[K,false];G.DeleteComment=[K,true];G.DeleteRating=[K,true];G.DeleteTag=[K,true];G.DeleteTagByKeyword=[K,true];G.DeleteTags=[K,true];G.GetAllTagTerms=[K,false];G.GetAllTagTermsForUrlFolder=[K,false];G.GetAllTagUrls=[K,false];G.GetAllTagUrlsByKeyword=[K,false];G.GetCommentsOfUser=[K,false];G.GetCommentsOfUserOnUrl=[K,false];G.GetCommentsOnUrl=[K,false];G.GetRatingAverageOnUrl=[K,false];G.GetRatingOfUserOnUrl=[K,false];G.GetRatingOnUrl=[K,false];G.GetRatingsOfUser=[K,false];G.GetRatingsOnUrl=[K,false];G.GetSocialDataForFullReplication=[K,false];G.GetTags=[K,true];G.GetTagsOfUser=[K,true];G.GetTagTerms=[K,true];G.GetTagTermsOfUser=[K,true];G.GetTagTermsOnUrl=[K,true];G.GetTagUrlsOfUser=[K,true];G.GetTagUrlsOfUserByKeyword=[K,true];G.GetTagUrls=[K,true];G.GetTagUrlsByKeyword=[K,true];G.SetRating=[K,true];G.UpdateComment=[K,true];G.AddGroup=[I,true];G.AddGroupToRole=[I,true];G.AddRole=[I,true];G.AddUserToGroup=[I,true];G.AddUserToRole=[I,true];G.GetAllUserCollectionFromWeb=[I,false];G.GetGroupCollection=[I,false];G.GetGroupCollectionFromRole=[I,false];G.GetGroupCollectionFromSite=[I,false];G.GetGroupCollectionFromUser=[I,false];G.GetGroupCollectionFromWeb=[I,false];G.GetGroupInfo=[I,false];G.GetRoleCollection=[I,false];G.GetRoleCollectionFromGroup=[I,false];G.GetRoleCollectionFromUser=[I,false];G.GetRoleCollectionFromWeb=[I,false];G.GetRoleInfo=[I,false];G.GetRolesAndPermissionsForCurrentUser=[I,false];G.GetRolesAndPermissionsForSite=[I,false];G.GetUserCollection=[I,false];G.GetUserCollectionFromGroup=[I,false];G.GetUserCollectionFromRole=[I,false];G.GetUserCollectionFromSite=[I,false];G.GetUserCollectionFromWeb=[I,false];G.GetUserInfo=[I,false];G.GetUserLoginFromEmail=[I,false];G.RemoveGroup=[I,true];G.RemoveRole=[I,true];G.RemoveUserFromGroup=[I,true];G.GetCommonMemberships=[F,false];G.GetUserColleagues=[F,false];G.GetUserLinks=[F,false];G.GetUserMemberships=[F,false];G.GetUserPinnedLinks=[F,false];G.GetUserProfileByName=[F,false];G.GetUserProfileCount=[F,false];G.GetUserProfileSchema=[F,false];G.ModifyUserPropertyByAccountName=[F,true];G.DeleteAllVersions=[R,true];G.DeleteVersion=[R,true];G.GetVersions=[R,false];G.RestoreVersion=[R,true];G.GetViewCollection=[j,false];G.AddWebPart=[C,true];G.GetWebPart2=[C,false];G.GetWebPartPage=[C,false];G.GetWebPartProperties=[C,false];G.GetWebPartProperties2=[C,false];G.CreateContentType=[o,true];G.GetColumns=[o,false];G.GetContentType=[o,false];G.GetContentTypes=[o,false];G.GetCustomizedPageStatus=[o,false];G.GetListTemplates=[o,false];G.GetWeb=[o,false];G.GetWebCollection=[o,false];G.GetAllSubWebCollection=[o,false];G.UpdateColumns=[o,true];G.UpdateContentType=[o,true];G.WebUrlFromPageUrl=[o,false];G.GetTemplatesForItem=[c,false];G.GetToDosForItem=[c,false];G.GetWorkflowDataForItem=[c,false];G.GetWorkflowTaskData=[c,false];G.StartWorkflow=[c,true];var A=new Object();A.header="<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'><soap:Body>";A.footer="</soap:Body></soap:Envelope>";A.payload="";D.fn.SPServices=function(S){var T=D.extend({},D.fn.SPServices.defaults,S);A.opheader="<"+T.operation+" ";switch(G[T.operation][0]){case m:A.opheader+="xmlns='http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/' >";SOAPAction="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/";break;case H:A.opheader+="xmlns='http://schemas.microsoft.com/sharepoint/soap/meetings/' >";SOAPAction="http://schemas.microsoft.com/sharepoint/soap/meetings/";break;case b:A.opheader+="xmlns='http://schemas.microsoft.com/sharepoint/soap/directory/' >";SOAPAction="http://schemas.microsoft.com/sharepoint/soap/directory/";break;case q:A.opheader+="xmlns='http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService/' >";SOAPAction="http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService/";break;case x:A.opheader+="xmlns='urn:Microsoft.Search' >";SOAPAction="urn:Microsoft.Search/";break;case K:A.opheader+="xmlns='http://microsoft.com/webservices/SharePointPortalServer/SocialDataService' >";SOAPAction="http://microsoft.com/webservices/SharePointPortalServer/SocialDataService/";break;case I:A.opheader+="xmlns='http://schemas.microsoft.com/sharepoint/soap/directory/' >";SOAPAction="http://schemas.microsoft.com/sharepoint/soap/directory/";break;case F:A.opheader+="xmlns='http://microsoft.com/webservices/SharePointPortalServer/UserProfileService' >";SOAPAction="http://microsoft.com/webservices/SharePointPortalServer/UserProfileService/";break;case C:A.opheader+="xmlns='http://microsoft.com/sharepoint/webpartpages' >";SOAPAction="http://microsoft.com/sharepoint/webpartpages/";break;case c:A.opheader+="xmlns='http://schemas.microsoft.com/sharepoint/soap/workflow/' >";SOAPAction="http://schemas.microsoft.com/sharepoint/soap/workflow/";break;default:A.opheader+="xmlns='http://schemas.microsoft.com/sharepoint/soap/'>";SOAPAction="http://schemas.microsoft.com/sharepoint/soap/";break}SOAPAction+=T.operation;A.opfooter="</"+T.operation+">";var U="_vti_bin/"+G[T.operation][0]+".asmx";if(T.webURL.charAt(T.webURL.length-1)==g){U=T.webURL+U}else{if(T.webURL.length>0){U=T.webURL+g+U}else{U=D().SPServices.SPGetCurrentSite()+g+U}}A.payload="";switch(T.operation){case"GetAlerts":break;case"DeleteAlerts":A.payload+="<IDs>";for(i=0;i<T.IDs.length;i++){A.payload+=v("string",T.IDs[i])}A.payload+="</IDs>";break;case"Mode":break;case"Login":A.payload+=v("username",T.username);A.payload+=v("password",T.password);break;case"CopyIntoItems":A.payload+=v("SourceUrl",T.SourceUrl);A.payload+="<DestinationUrls>";for(i=0;i<T.DestinationUrls.length;i++){A.payload+=v("string",T.DestinationUrls[i])}A.payload+="</DestinationUrls>";A.payload+=v("Fields",T.Fields);A.payload+=v("Stream",T.Stream);A.payload+=v("Results",T.Results);break;case"CopyIntoItemsLocal":A.payload+=v("SourceUrl",T.SourceUrl);A.payload+="<DestinationUrls>";for(i=0;i<T.DestinationUrls.length;i++){A.payload+=v("string",T.DestinationUrls[i])}A.payload+="</DestinationUrls>";break;case"GetItem":A.payload+=v("Url",T.Url);A.payload+=v("Fields",T.Fields);A.payload+=v("Stream",T.Stream);break;case"GetForm":A.payload+=v("listName",T.listName);A.payload+=v("formUrl",T.formUrl);break;case"GetFormCollection":A.payload+=v("listName",T.listName);break;case"AddAttachment":A.payload+=v("listName",T.listName);A.payload+=v("listItemID",T.listItemID);A.payload+=v("fileName",T.fileName);A.payload+=v("attachment",T.attachment);break;case"AddList":A.payload+=v("listName",T.listName);A.payload+=v("description",T.description);A.payload+=v("templateID",T.templateID);break;case"CheckInFile":A.payload+=v("pageUrl",T.pageUrl);A.payload+=v("comment",T.comment);A.payload+=v("CheckinType",T.CheckinType);break;case"CheckOutFile":A.payload+=v("pageUrl",T.pageUrl);A.payload+=v("checkoutToLocal",T.checkoutToLocal);A.payload+=v("lastmodified",T.lastmodified);break;case"DeleteList":A.payload+=v("listName",T.listName);break;case"GetAttachmentCollection":A.payload+=v("listName",T.listName);A.payload+=v("listItemID",T.ID);break;case"GetList":A.payload+=v("listName",T.listName);break;case"GetListAndView":A.payload+=v("listName",T.listName);A.payload+=v("viewName",T.viewName);break;case"GetListCollection":break;case"GetListContentType":A.payload+=v("listName",T.listName);A.payload+=v("contentTypeId",T.contentTypeId);break;case"GetListContentTypes":A.payload+=v("listName",T.listName);break;case"GetListItems":A.payload+=v("listName",T.listName);A.payload+=v("viewName",T.viewName);A.payload+=v("query",T.CAMLQuery);A.payload+=v("viewFields",T.CAMLViewFields);A.payload+=v("rowLimit",T.CAMLRowLimit);A.payload+=v("queryOptions",T.CAMLQueryOptions);break;case"UpdateList":A.payload+=v("listName",T.listName);A.payload+=v("listProperties",T.listProperties);A.payload+=v("newFields",T.newFields);A.payload+=v("updateFields",T.updateFields);A.payload+=v("deleteFields",T.deleteFields);A.payload+=v("listVersion",T.listVersion);break;case"UpdateListItems":A.payload+=v("listName",T.listName);if(T.updates.length>0){A.payload+=v("updates",T.updates)}else{A.payload+="<updates><Batch OnError='Continue'><Method ID='1' Cmd='"+T.batchCmd+"'>";for(i=0;i<T.valuepairs.length;i++){A.payload+="<Field Name='"+T.valuepairs[i][0]+"'>"+T.valuepairs[i][1]+"</Field>"}if(T.batchCmd!="New"){A.payload+="<Field Name='ID'>"+T.ID+"</Field>"}A.payload+="</Method></Batch></updates>"}break;case"AddMeeting":A.payload+=v("organizerEmail",T.organizerEmail);A.payload+=v("uid",T.uid);A.payload+=v("sequence",T.sequence);A.payload+=v("utcDateStamp",T.utcDateStamp);A.payload+=v("title",T.title);A.payload+=v("location",T.location);A.payload+=v("utcDateStart",T.utcDateStart);A.payload+=v("utcDateEnd",T.utcDateEnd);A.payload+=v("nonGregorian",T.nonGregorian);break;case"CreateWorkspace":A.payload+=v("title",T.title);A.payload+=v("templateName",T.templateName);A.payload+=v("lcid",T.lcid);A.payload+=v("timeZoneInformation",T.timeZoneInformation);case"RemoveMeeting":A.payload+=v("recurrenceId",T.recurrenceId);A.payload+=v("uid",T.uid);A.payload+=v("sequence",T.sequence);A.payload+=v("utcDateStamp",T.utcDateStamp);A.payload+=v("cancelMeeting",T.cancelMeeting);case"SetWorkspaceTitle":A.payload+=v("title",T.title);case"SearchPrincipals":A.payload+=v("searchText",T.searchText);A.payload+=v("maxResults",T.maxResults);A.payload+=v("principalType",T.principalType);break;case"AddPermission":A.payload+=v("objectName",T.objectName);A.payload+=v("objectType",T.objectType);A.payload+=v("permissionIdentifier",T.permissionIdentifier);A.payload+=v("permissionType",T.permissionType);A.payload+=v("permissionMask",T.permissionMask);break;case"AddPermissionCollection":A.payload+=v("objectName",T.objectName);A.payload+=v("objectType",T.objectType);A.payload+=v("permissionsInfoXml",T.permissionsInfoXml);break;case"GetPermissionCollection":A.payload+=v("objectName",T.objectName);A.payload+=v("objectType",T.objectType);break;case"RemovePermission":A.payload+=v("objectName",T.objectName);A.payload+=v("objectType",T.objectType);A.payload+=v("permissionIdentifier",T.permissionIdentifier);A.payload+=v("permissionType",T.permissionType);break;case"RemovePermissionCollection":A.payload+=v("objectName",T.objectName);A.payload+=v("objectType",T.objectType);A.payload+=v("memberIdsXml",T.memberIdsXml);break;case"UpdatePermission":A.payload+=v("objectName",T.objectName);A.payload+=v("objectType",T.objectType);A.payload+=v("permissionIdentifier",T.permissionIdentifier);A.payload+=v("permissionType",T.permissionType);A.payload+=v("permissionMask",T.permissionMask);break;case"GetLinks":break;case"GetPortalSearchInfo":A.opheader="<"+T.operation+" xmlns='http://microsoft.com/webservices/OfficeServer/QueryService'/>";SOAPAction="http://microsoft.com/webservices/OfficeServer/QueryService/"+T.operation;break;case"GetSearchMetadata":A.opheader="<"+T.operation+" xmlns='http://microsoft.com/webservices/OfficeServer/QueryService'/>";SOAPAction="http://microsoft.com/webservices/OfficeServer/QueryService/"+T.operation;break;case"Query":A.payload+=v("queryXml",a(T.queryXml));break;case"QueryEx":A.opheader="<"+T.operation+" xmlns='http://microsoft.com/webservices/OfficeServer/QueryService'>";SOAPAction="http://microsoft.com/webservices/OfficeServer/QueryService/"+T.operation;A.payload+=v("queryXml",a(T.queryXml));break;case"Status":break;case"EnumerateFolder":A.payload+=v("strFolderUrl",T.strFolderUrl);break;case"AddComment":A.payload+=v("url",T.url);A.payload+=v("comment",T.comment);A.payload+=v("isHighPriority",T.isHighPriority);A.payload+=v("title",T.title);break;case"AddTag":A.payload+=v("url",T.url);A.payload+=v("termID",T.termID);A.payload+=v("title",T.title);A.payload+=v("isPrivate",T.isPrivate);break;case"AddTagByKeyword":A.payload+=v("url",T.url);A.payload+=v("keyword",T.keyword);A.payload+=v("title",T.title);A.payload+=v("isPrivate",T.isPrivate);break;case"CountCommentsOfUser":A.payload+=v("userAccountName",T.userAccountName);break;case"CountCommentsOfUserOnUrl":A.payload+=v("userAccountName",T.userAccountName);A.payload+=v("url",T.url);break;case"CountCommentsOnUrl":A.payload+=v("url",T.url);break;case"CountRatingsOnUrl":A.payload+=v("url",T.url);break;case"CountTagsOfUser":A.payload+=v("userAccountName",T.userAccountName);break;case"DeleteComment":A.payload+=v("url",T.url);A.payload+=v("lastModifiedTime",T.lastModifiedTime);break;case"DeleteRating":A.payload+=v("url",T.url);break;case"DeleteTag":A.payload+=v("url",T.url);A.payload+=v("termID",T.termID);break;case"DeleteTagByKeyword":A.payload+=v("url",T.url);A.payload+=v("keyword",T.keyword);break;case"DeleteTags":A.payload+=v("url",T.url);break;case"GetAllTagTerms":A.payload+=v("maximumItemsToReturn",T.maximumItemsToReturn);break;case"GetAllTagTermsForUrlFolder":A.payload+=v("urlFolder",T.urlFolder);A.payload+=v("maximumItemsToReturn",T.maximumItemsToReturn);break;case"GetAllTagUrls":A.payload+=v("termID",T.termID);break;case"GetAllTagUrlsByKeyword":A.payload+=v("keyword",T.keyword);break;case"GetCommentsOfUser":A.payload+=v("userAccountName",T.userAccountName);A.payload+=v("maximumItemsToReturn",T.maximumItemsToReturn);A.payload+=v("startIndex",T.startIndex);break;case"GetCommentsOfUserOnUrl":A.payload+=v("userAccountName",T.userAccountName);A.payload+=v("url",T.url);break;case"GetCommentsOnUrl":A.payload+=v("url",T.url);A.payload+=v("maximumItemsToReturn",T.maximumItemsToReturn);A.payload+=v("startIndex",T.startIndex);if(T.excludeItemsTime.length>0){A.payload+=v("excludeItemsTime",T.excludeItemsTime)}break;case"GetRatingAverageOnUrl":A.payload+=v("url",T.url);break;case"GetRatingOfUserOnUrl":A.payload+=v("userAccountName",T.userAccountName);A.payload+=v("url",T.url);break;case"GetRatingOnUrl":A.payload+=v("url",T.url);break;case"GetRatingsOfUser":A.payload+=v("userAccountName",T.userAccountName);break;case"GetRatingsOnUrl":A.payload+=v("url",T.url);break;case"GetSocialDataForFullReplication":A.payload+=v("userAccountName",T.userAccountName);break;case"GetTags":A.payload+=v("url",T.url);break;case"GetTagsOfUser":A.payload+=v("userAccountName",T.userAccountName);A.payload+=v("maximumItemsToReturn",T.maximumItemsToReturn);A.payload+=v("startIndex",T.startIndex);break;case"GetTagTerms":A.payload+=v("maximumItemsToReturn",T.maximumItemsToReturn);break;case"GetTagTermsOfUser":A.payload+=v("userAccountName",T.userAccountName);A.payload+=v("maximumItemsToReturn",T.maximumItemsToReturn);break;case"GetTagTermsOnUrl":A.payload+=v("url",T.url);A.payload+=v("maximumItemsToReturn",T.maximumItemsToReturn);break;case"GetTagUrls":A.payload+=v("termID",T.termID);break;case"GetTagUrlsByKeyword":A.payload+=v("keyword",T.keyword);break;case"GetTagUrlsOfUser":A.payload+=v("termID",T.termID);A.payload+=v("userAccountName",T.userAccountName);break;case"GetTagUrlsOfUserByKeyword":A.payload+=v("keyword",T.keyword);A.payload+=v("userAccountName",T.userAccountName);break;case"SetRating":A.payload+=v("url",T.url);A.payload+=v("rating",T.rating);A.payload+=v("title",T.title);A.payload+=v("analysisDataEntry",T.analysisDataEntry);break;case"UpdateComment":A.payload+=v("url",T.url);A.payload+=v("lastModifiedTime",T.lastModifiedTime);A.payload+=v("comment",T.comment);A.payload+=v("isHighPriority",T.isHighPriority);break;case"AddGroup":A.payload+=v("groupName",T.groupName);A.payload+=v("ownerIdentifier",T.ownerIdentifier);A.payload+=v("ownerType",T.ownerType);A.payload+=v("defaultUserLoginName",T.defaultUserLoginName);A.payload+=v("groupName",T.groupName);A.payload+=v("description",T.description);break;case"AddGroupToRole":A.payload+=v("groupName",T.groupName);A.payload+=v("roleName",T.roleName);break;case"AddRole":A.payload+=v("roleName",T.roleName);A.payload+=v("description",T.description);A.payload+=v("permissionMask",T.permissionMask);break;case"AddUserToGroup":A.payload+=v("groupName",T.groupName);A.payload+=v("userName",T.userName);A.payload+=v("userLoginName",T.userLoginName);A.payload+=v("userEmail",T.userEmail);A.payload+=v("userNotes",T.userNotes);break;case"AddUserToRole":A.payload+=v("roleName",T.roleName);A.payload+=v("userName",T.userName);A.payload+=v("userLoginName",T.userLoginName);A.payload+=v("userEmail",T.userEmail);A.payload+=v("userNotes",T.userNotes);break;case"GetAllUserCollectionFromWeb":break;case"GetGroupCollectionFromRole":A.payload+=v("roleName",T.roleName);break;case"GetGroupCollection":A.payload+=v("groupNamesXml",T.groupNamesXml);break;case"GetGroupCollectionFromSite":break;case"GetGroupCollectionFromUser":A.payload+=v("userLoginName",T.userLoginName);break;case"GetGroupCollectionFromWeb":break;case"GetGroupInfo":A.payload+=v("groupName",T.groupName);break;case"GetRoleCollection":A.payload+=v("roleNamesXml",T.roleNamesXml);break;case"GetRoleCollectionFromGroup":A.payload+=v("groupName",T.groupName);break;case"GetRoleCollectionFromUser":A.payload+=v("userLoginName",T.userLoginName);break;case"GetRoleCollectionFromWeb":break;case"GetRoleInfo":A.payload+=v("roleName",T.roleName);break;case"GetRolesAndPermissionsForCurrentUser":break;case"GetRolesAndPermissionsForSite":break;case"GetUserCollection":A.payload+=v("userLoginNamesXml",T.userLoginNamesXml);break;case"GetUserCollectionFromGroup":A.payload+=v("groupName",T.groupName);break;case"GetUserCollectionFromRole":A.payload+=v("roleName",T.roleName);break;case"GetUserCollectionFromSite":break;case"GetUserCollectionFromWeb":break;case"GetUserInfo":A.payload+=v("userLoginName",T.userLoginName);break;case"GetUserLoginFromEmail":A.payload+=v("emailXml",T.emailXml);break;case"RemoveGroup":A.payload+=v("groupName",T.groupName);break;case"RemoveRole":A.payload+=v("roleName",T.roleName);break;case"RemoveUserFromGroup":A.payload+=v("groupName",T.groupName);A.payload+=v("userLoginName",T.userLoginName);break;case"GetCommonMemberships":A.payload+=v("accountName",T.accountName);break;case"GetUserColleagues":A.payload+=v("accountName",T.accountName);break;case"GetUserLinks":A.payload+=v("accountName",T.accountName);break;case"GetUserMemberships":A.payload+=v("accountName",T.accountName);break;case"GetUserPinnedLinks":A.payload+=v("accountName",T.accountName);break;case"GetUserProfileByName":if(T.accountName.length>0){A.payload+=v("AccountName",T.accountName)}else{A.payload+=v("AccountName",T.AccountName)}break;case"GetUserProfileCount":break;case"GetUserProfileSchema":break;case"ModifyUserPropertyByAccountName":A.payload+=v("accountName",T.accountName);A.payload+=v("newData",T.newData);break;case"GetViewCollection":A.payload+=v("listName",T.listName);break;case"DeleteAllVersions":A.payload+=v("fileName",T.fileName);break;case"DeleteVersion":A.payload+=v("fileName",T.fileName);A.payload+=v("fileVersion",T.fileVersion);break;case"GetVersions":A.payload+=v("fileName",T.fileName);break;case"RestoreVersion":A.payload+=v("fileName",T.fileName);A.payload+=v("fileVersion",T.fileVersion);break;case"AddWebPart":A.payload+=v("pageUrl",T.pageUrl);A.payload+=v("webPartXml",T.webPartXml);A.payload+=v("storage",T.storage);break;case"GetWebPart2":A.payload+=v("pageUrl",T.pageUrl);A.payload+=v("storageKey",T.storageKey);A.payload+=v("storage",T.storage);A.payload+=v("behavior",T.behavior);break;case"GetWebPartPage":A.payload+=v("documentName",T.documentName);A.payload+=v("behavior",T.behavior);break;case"GetWebPartProperties":A.payload+=v("pageUrl",T.pageUrl);A.payload+=v("storage",T.storage);break;case"GetWebPartProperties2":A.payload+=v("pageUrl",T.pageUrl);A.payload+=v("storage",T.storage);A.payload+=v("behavior",T.behavior);break;case"CreateContentType":A.payload+=v("displayName",T.displayName);A.payload+=v("parentType",T.parentType);A.payload+=v("newFields",T.newFields);A.payload+=v("contentTypeProperties",T.contentTypeProperties);break;case"GetColumns":A.payload+=v("webUrl",T.webURL);break;case"GetContentType":A.payload+=v("contentTypeId",T.contentTypeId);break;case"GetContentTypes":break;case"GetCustomizedPageStatus":A.payload+=v("fileUrl",T.fileUrl);break;case"GetListTemplates":break;case"GetWeb":A.payload+=v("webUrl",T.webURL);break;case"GetWebCollection":break;case"GetAllSubWebCollection":break;case"UpdateColumns":A.payload+=v("newFields",T.newFields);A.payload+=v("updateFields",T.updateFields);A.payload+=v("deleteFields",T.deleteFields);break;case"UpdateContentType":A.payload+=v("contentTypeId",T.contentTypeId);A.payload+=v("contentTypeProperties",T.contentTypeProperties);A.payload+=v("newFields",T.newFields);A.payload+=v("updateFields",T.updateFields);A.payload+=v("deleteFields",T.deleteFields);break;case"WebUrlFromPageUrl":A.payload+=v("pageUrl",T.pageURL);break;case"GetTemplatesForItem":A.payload+=v("item",T.item);break;case"GetToDosForItem":A.payload+=v("item",T.item);break;case"GetWorkflowDataForItem":A.payload+=v("item",T.item);break;case"GetWorkflowTaskData":A.payload+=v("item",T.item);A.payload+=v("listId",T.listId);A.payload+=v("taskId",T.taskId);break;case"StartWorkflow":A.payload+=v("item",T.item);A.payload+=v("templateId",T.templateId);A.payload+=v("workflowParameters",T.workflowParameters);break;default:break}var V=A.header+A.opheader+A.payload+A.opfooter+A.footer;D.ajax({url:U,async:T.async,beforeSend:function(W){if(G[T.operation][1]){W.setRequestHeader("SOAPAction",SOAPAction)}},type:"POST",data:V,dataType:"xml",contentType:"text/xml;charset='utf-8'",complete:T.completefunc})};D.fn.SPServices.defaults={operation:"",webURL:"",pageURL:"",listName:"",description:"",templateID:"",viewName:"",formUrl:"",fileName:"",fileVersion:"",ID:1,updates:"",comment:"",CheckinType:"",checkoutToLocal:"",lastmodified:"",CAMLViewName:"",CAMLQuery:"",CAMLViewFields:"",CAMLRowLimit:0,CAMLQueryOptions:"<QueryOptions></QueryOptions>",batchCmd:"Update",valuepairs:[],listProperties:"",newFields:"",updateFields:"",deleteFields:"",contentTypeId:"",contentTypeProperties:"",listVersion:"",contentTypeId:"",username:"",password:"",accountName:"",newData:"",AccountName:"",userName:"",userLoginName:"",userEmail:"",userNotes:"",groupNamesXml:"",groupName:"",ownerIdentifier:"",ownerType:"",defaultUserLoginName:"",roleNamesXml:"",roleName:"",permissionIdentifier:"",permissionType:"",permissionMask:"",permissionsInfoXml:"",memberIdsXml:"",userLoginNamesXml:"",emailXml:"",objectName:"",objectType:"List",IDs:null,listItemID:"",attachment:"",SourceUrl:"",Url:"",DestinationUrls:[],Fields:"",Stream:"",Results:"",documentName:"",behavior:"Version3",storageKey:"",storage:"Shared",webPartXml:"",item:"",listId:"",taskId:"",templateId:"",workflowParameters:"",fClaim:false,queryXml:"",cancelMeeting:true,lcid:"",location:"",nonGregorian:false,organizerEmail:"",recurrenceId:0,sequence:0,templateName:"",timeZoneInformation:"",title:"",uid:"",utcDateStamp:"",utcDateStart:"",utcDateEnd:"",searchText:"",maxResults:10,principalType:"User",strFolderUrl:"",fileUrl:"",displayName:"",parentType:"",contentTypeProperties:"",url:"",termID:"",userAccountName:"",maximumItemsToReturn:0,urlFolder:"",keyword:"",startIndex:0,excludeItemsTime:"",isHighPriority:false,isPrivate:false,lastModifiedTime:"",rating:1,analysisDataEntry:"",async:true,completefunc:null};D.fn.SPServices.SPGetCurrentSite=function(){if(e.length>0){return e}var S=A.header+"<WebUrlFromPageUrl xmlns='http://schemas.microsoft.com/sharepoint/soap/' ><pageUrl>"+((location.href.indexOf("?")>0)?location.href.substr(0,location.href.indexOf("?")):location.href)+"</pageUrl></WebUrlFromPageUrl>"+A.footer;D.ajax({async:false,url:"/_vti_bin/Webs.asmx",type:"POST",data:S,dataType:"xml",contentType:'text/xml;charset="utf-8"',complete:function(U,T){e=D(U.responseXML).find("WebUrlFromPageUrlResult").text()}});return e};D.fn.SPServices.SPCascadeDropdowns=function(S){var U=D.extend({},{relationshipWebURL:"",relationshipList:"",relationshipListParentColumn:"",relationshipListChildColumn:"",relationshipListSortColumn:"",parentColumn:"",childColumn:"",listName:D().SPServices.SPListNameFromUrl(),CAMLQuery:"",promptText:"Choose {0}...",completefunc:null,debug:false},S);var T=new L(U.parentColumn);if(T.Obj.html()==null&&U.debug){B("SPServices.SPCascadeDropdowns","parentColumn: "+U.parentColumn,"Column not found on page");return}switch(T.Type){case"S":T.Obj.bind("change",function(){N(U)});T.Obj.change();break;case"C":T.Obj.bind("propertychange",function(){N(U)});T.Obj.trigger("propertychange");break;case"M":T.Obj.bind("dblclick",function(){N(U)});parentSelections=T.Obj.closest("span").find("select[ID$='SelectResult'][Title^='"+U.parentColumn+" ']");parentSelections.bind("dblclick",function(){N(U)});T.Obj.closest("span").find("button").each(function(){D(this).bind("click",function(){N(U)})});N(U);break;default:break}};function N(V){var af="";var Z=null;var Y=[];var U;var aa;var ac;var ad;var X=new L(V.parentColumn);switch(X.Type){case"S":Y.push(X.Obj.find("option:selected").text());break;case"C":Y.push(X.Obj.attr("value"));break;case"M":parentSelections=X.Obj.closest("span").find("select[ID$='SelectResult'][Title^='"+V.parentColumn+" ']");D(parentSelections).find("option").each(function(){Y.push(D(this).html())});break;default:break}var ab=D().SPServices.SPGetStaticFromDisplay({listName:V.listName,columnDisplayName:V.childColumn});if(X.Obj.attr("SPCascadeDropdown_Selected_"+ab)==Y.join(";#")){return}X.Obj.attr("SPCascadeDropdown_Selected_"+ab,Y.join(";#"));var T=new L(V.childColumn);if(T.Obj.html()==null&&V.debug){B("SPServices.SPCascadeDropdowns","childColumn: "+V.childColumn,"Column not found on page");return}switch(T.Type){case"S":Z=T.Obj.find("option:selected").val();break;case"C":Z=T.Obj.attr("value");break;case"M":aa=T.Obj.closest("span").find("input[name$='MultiLookupPicker$data']");U=window[T.Obj.closest("tr").find("button[id$='AddButton']").attr("id").replace(/AddButton/,"MultiLookupPicker_m")];currentSelection=T.Obj.closest("span").find("select[ID$='SelectResult'][Title^='"+V.childColumn+" ']");U.data="";break;default:break}var W=(V.relationshipListSortColumn.length>0)?V.relationshipListSortColumn:V.relationshipListChildColumn;var S="<Query><OrderBy><FieldRef Name='"+W+"'/></OrderBy><Where>";if(V.CAMLQuery.length>0){S+="<And>"}if(Y.length==0){S+="<Eq><FieldRef Name='"+V.relationshipListParentColumn+"'/><Value Type='Text'></Value></Eq>"}else{if(Y.length==1){S+="<Eq><FieldRef Name='"+V.relationshipListParentColumn+"'/><Value Type='Text'>"+s(Y[0])+"</Value></Eq>"}else{var ae=(Y.length>2)?true:false;for(i=0;i<(Y.length-1);i++){S+="<Or>"}for(i=0;i<Y.length;i++){S+="<Eq><FieldRef Name='"+V.relationshipListParentColumn+"'/><Value Type='Text'>"+s(Y[i])+"</Value></Eq>";if(i>0&&(i<(Y.length-1))&&ae){S+="</Or>"}}S+="</Or>"}}if(V.CAMLQuery.length>0){S+=V.CAMLQuery+"</And>"}S+="</Where></Query>";D().SPServices({operation:"GetList",async:false,listName:V.listName,completefunc:function(ah,ag){D(ah.responseXML).find("Fields").each(function(){D(this).find("Field").each(function(){if(D(this).attr("DisplayName")==V.childColumn){ad=(D(this).attr("Required")=="TRUE")?true:false;return false}})})}});D().SPServices({operation:"GetListItems",async:false,webURL:V.relationshipWebURL,listName:V.relationshipList,CAMLQuery:S,CAMLViewFields:"<ViewFields><FieldRef Name='"+V.relationshipListParentColumn+"' /><FieldRef Name='"+V.relationshipListChildColumn+"' /></ViewFields>",CAMLRowLimit:0,CAMLQueryOptions:"<QueryOptions><IncludeMandatoryColumns>FALSE</IncludeMandatoryColumns></QueryOptions>",completefunc:function(ah,ag){D(ah.responseXML).find("faultcode").each(function(){if(V.debug){B("SPServices.SPCascadeDropdowns","relationshipListParentColumn: "+V.relationshipListParentColumn+" or relationshipListChildColumn: "+V.relationshipListChildColumn,"Not found in relationshipList "+V.relationshipList)}return});switch(T.Type){case"S":T.Obj.attr({length:0});if(!ad&&(V.promptText.length>0)){T.Obj.append("<option value='0'>"+V.promptText.replace(/\{0\}/g,V.childColumn)+"</option>")}break;case"C":af=ad?"":"(None)|0";T.Obj.attr("value","");break;case"M":T.Obj.attr({length:0});ac="";break;default:break}D(ah.responseXML).find("[nodeName=z:row]").each(function(){var aj=(D(this).attr("ows_"+V.relationshipListChildColumn).indexOf(";#")>0)?D(this).attr("ows_"+V.relationshipListChildColumn).split(";#")[0]:D(this).attr("ows_ID");if(isNaN(aj)){aj=D(this).attr("ows_ID")}var ai=(D(this).attr("ows_"+V.relationshipListChildColumn).indexOf(";#")>0)?D(this).attr("ows_"+V.relationshipListChildColumn).split(";#")[1]:D(this).attr("ows_"+V.relationshipListChildColumn);switch(T.Type){case"S":var ak=(D(this).attr("ows_ID")==Z)?" selected='selected'":"";T.Obj.append("<option"+ak+" value='"+aj+"'>"+ai+"</option>");break;case"C":if(ai==Z){T.Obj.attr("value",Z)}af=af+((af.length>0)?"|":"")+ai+"|"+aj;break;case"M":T.Obj.append("<option value='"+aj+"'>"+ai+"</option>");ac+=aj+"|t"+ai+"|t |t |t";break;default:break}});switch(T.Type){case"S":T.Obj.trigger("change");break;case"C":T.Obj.attr("choices",af);T.Obj.trigger("propertychange");break;case"M":aa.attr("value",ac);D(currentSelection).find("option").each(function(){var ai=D(this);D(this).attr("selected","selected");D(T.Obj).find("option").each(function(){if(D(this).html()==ai.html()){ai.attr("selected","")}})});GipRemoveSelectedItems(U);D(T.Obj).find("option").each(function(){var ai=D(this);D(currentSelection).find("option").each(function(){if(D(this).html()==ai.html()){ai.remove()}})});GipAddSelectedItems(U);U.data=GipGetGroupData(ac);break;default:break}}});if(V.completefunc!=null){V.completefunc()}}D.fn.SPServices.SPDisplayRelatedInfo=function(S){var T=D.extend({},{columnName:"",relatedWebURL:"",relatedList:"",relatedListColumn:"",relatedColumns:[],displayFormat:"table",headerCSSClass:"ms-vh2",rowCSSClass:"ms-vb",CAMLQuery:"",numChars:0,matchType:"Eq",completefunc:null,debug:false},S);var U=new L(T.columnName);if(U.Obj.html()==null&&T.debug){B("SPServices.SPDisplayRelatedInfo","columnName: "+T.columnName,"Column not found on page");return}switch(U.Type){case"S":U.Obj.bind("change",function(){y(T)});U.Obj.change();break;case"C":U.Obj.bind("propertychange",function(){y(T)});U.Obj.trigger("propertychange");break;case"M":if(T.debug){B("SPServices.SPDisplayRelatedInfo","columnName: "+T.columnName,"Multi-select columns not supported by this function")}break;default:break}};function y(X){var T=null;var Y=new L(X.columnName);switch(Y.Type){case"S":T=Y.Obj.find("option:selected").text();break;case"C":T=Y.Obj.attr("value");if(X.numChars>0&&T.length<X.numChars){return}break;case"M":break;default:break}if(Y.Obj.attr("showRelatedSelected")==T){return}Y.Obj.attr("showRelatedSelected",T);var V=h("SPDisplayRelatedInfo",X.columnName);D("#"+V).remove();Y.Obj.parent().append("<div id="+V+"></div>");var W=[];D().SPServices({operation:"GetList",async:false,webURL:X.relatedWebURL,listName:X.relatedList,completefunc:function(aa,Z){D(aa.responseXML).find("faultcode").each(function(){if(X.debug){B("SPServices.SPDisplayRelatedInfo","relatedList: "+X.relatedList,"List not found")}return});D(aa.responseXML).find("Fields").each(function(){D(aa.responseXML).find("Field").each(function(){for(i=0;i<X.relatedColumns.length;i++){if(D(this).attr("Name")==X.relatedColumns[i]){W[i]=D(this)}}})})}});var S="<Query><Where>";if(X.CAMLQuery.length>0){S+="<And>"}S+="<"+X.matchType+"><FieldRef Name='"+X.relatedListColumn+"'/><Value Type='Text'>"+s(T)+"</Value></"+X.matchType+">";if(X.CAMLQuery.length>0){S+=X.CAMLQuery+"</And>"}S+="</Where></Query>";var U=" ";for(i=0;i<X.relatedColumns.length;i++){U+="<FieldRef Name='"+X.relatedColumns[i]+"' />"}D().SPServices({operation:"GetListItems",async:false,webURL:X.relatedWebURL,listName:X.relatedList,CAMLQuery:S,CAMLViewFields:"<ViewFields>"+U+"</ViewFields>",CAMLRowLimit:0,completefunc:function(ab,aa){D(ab.responseXML).find("faultcode").each(function(){if(X.debug){B("SPServices.SPDisplayRelatedInfo","relatedListColumn: "+X.relatedListColumn,"Column not found in relatedList "+X.relatedList)}return});var Z;switch(X.displayFormat){case"table":Z="<table>";Z+="<tr>";for(i=0;i<X.relatedColumns.length;i++){if(W[i]==undefined&&X.debug){B("SPServices.SPDisplayRelatedInfo","columnName: "+X.relatedColumns[i],"Column not found in relatedList");return}Z+="<th class='"+X.headerCSSClass+"'>"+W[i].attr("DisplayName")+"</th>"}Z+="</tr>";D(ab.responseXML).find("[nodeName=z:row]").each(function(){Z+="<tr>";for(i=0;i<X.relatedColumns.length;i++){Z+="<td class='"+X.rowCSSClass+"'>"+u(W[i],D(this).attr("ows_"+X.relatedColumns[i]),X)+"</td>"}Z+="</tr>"});Z+="</table>";break;case"list":Z="<table>";for(i=0;i<X.relatedColumns.length;i++){D(ab.responseXML).find("[nodeName=z:row]").each(function(){Z+="<tr>";Z+="<th class='"+X.headerCSSClass+"'>"+W[i].attr("DisplayName")+"</th>";Z+="<td class='"+X.rowCSSClass+"'>"+u(W[i],D(this).attr("ows_"+X.relatedColumns[i]),X)+"</td>";Z+="</tr>"})}Z+="</table>";break;default:break}D("#"+V).html("").append(Z)}});if(X.completefunc!=null){X.completefunc()}}D.fn.SPServices.SPDebugXMLHttpResult=function(T){var V=D.extend({},{node:null,indent:0},T);var X=3;var W=4;var S="";S+="<table class='ms-vb' style='margin-left:"+V.indent*3+"px;' width='100%'>";if(V.node.nodeName=="DisplayPattern"){S+="<tr><td width='100px' style='font-weight:bold;'>"+V.node.nodeName+"</td><td><textarea readonly='readonly' rows='5' cols='50'>"+V.node.xml+"</textarea></td></tr>"}else{if(!V.node.hasChildNodes()){S+="<tr><td width='100px' style='font-weight:bold;'>"+V.node.nodeName+"</td><td>"+((V.node.nodeValue!=null)?r(V.node.nodeValue):" ")+"</td></tr>";if(V.node.attributes){S+="<tr><td colspan='99'>";S+=M(V.node,V);S+="</td></tr>"}}else{if(V.node.hasChildNodes()&&V.node.firstChild.nodeType==W){S+="<tr><td width='100px' style='font-weight:bold;'>"+V.node.nodeName+"</td><td><textarea readonly='readonly' rows='5' cols='50'>"+V.node.parentNode.text+"</textarea></td></tr>"}else{if(V.node.hasChildNodes()&&V.node.firstChild.nodeType==X){S+="<tr><td width='100px' style='font-weight:bold;'>"+V.node.nodeName+"</td><td>"+r(V.node.firstChild.nodeValue)+"</td></tr>"}else{S+="<tr><td width='100px' style='font-weight:bold;' colspan='99'>"+V.node.nodeName+"</td></tr>";if(V.node.attributes){S+="<tr><td colspan='99'>";S+=M(V.node,V);S+="</td></tr>"}S+="<tr><td>";for(var U=0;U<V.node.childNodes.length;U++){S+=D().SPServices.SPDebugXMLHttpResult({node:V.node.childNodes.item(U),indent:V.indent++})}S+="</td></tr>"}}}}S+="</table>";return S};D.fn.SPServices.SPGetCurrentUser=function(U){var V=D.extend({},{fieldName:"Name",debug:false},U);var T="";var S=RegExp('FieldInternalName="'+V.fieldName+'"',"gi");D.ajax({async:false,url:D().SPServices.SPGetCurrentSite()+"/_layouts/userdisp.aspx?Force=True&"+new Date().getTime(),complete:function(X,W){D(X.responseText).find("table.ms-formtable td[id^='SPField']").each(function(){if(S.test(D(this).html())){switch(D(this).attr("id")){case"SPFieldText":T=D(this).text();break;case"SPFieldNote":T=D(this).find("div").html();break;case"SPFieldURL":T=D(this).find("img").attr("src");break;default:T=D(this).text();break}return false}})}});return T.replace(/(^[\s\xA0]+|[\s\xA0]+$)/g,"")};D.fn.SPServices.SPLookupAddNew=function(U){var V=D.extend({},{lookupColumn:"",promptText:"Add new {0}",completefunc:null,debug:false},U);var T=new L(V.lookupColumn);if(T.Obj.html()==null&&V.debug){B("SPServices.SPLookupAddNew","lookupColumn: "+V.lookupColumn,"Column not found on page");return}var X="";var S="";var W="";D().SPServices({operation:"GetList",async:false,listName:D().SPServices.SPListNameFromUrl(),completefunc:function(Z,Y){D(Z.responseXML).find("Field").each(function(){if(D(this).attr("DisplayName")==V.lookupColumn){W=D(this).attr("StaticName");D().SPServices({operation:"GetList",async:false,listName:D(this).attr("List"),completefunc:function(ab,aa){D(ab.responseXML).find("List").each(function(){S=D(this).attr("WebFullUrl");S=S!=g?S+g:S})}});D().SPServices({operation:"GetFormCollection",async:false,listName:D(this).attr("List"),completefunc:function(ab,aa){D(ab.responseXML).find("Form").each(function(){if(D(this).attr("Type")=="NewForm"){X=D(this).attr("Url")}})}});return false}})}});if(S.length==0&&V.debug){B("SPServices.SPLookupAddNew","lookupColumn: "+V.lookupColumn,"This column does not appear to be a lookup column");return}if(X.length>0){newLink="<div id='SPLookupAddNew_"+W+"'><a href='"+S+X+"?Source="+Q(location.href)+"'>"+V.promptText.replace(/\{0\}/g,V.lookupColumn)+"</a></div>";D(T.Obj).parents("td.ms-formbody").append(newLink)}else{if(V.debug){B("SPServices.SPLookupAddNew","lookupColumn: "+V.lookupColumn,"NewForm cannot be found");return}}if(V.completefunc!=null){V.completefunc()}};D.fn.SPServices.SPGetLastItemId=function(T){var V=D.extend({},{webURL:"",listName:"",userAccount:"",CAMLQuery:""},T);var U;var W=0;D().SPServices({operation:"GetUserInfo",async:false,userLoginName:(V.userAccount!="")?V.userAccount:D().SPServices.SPGetCurrentUser(),completefunc:function(Y,X){D(Y.responseXML).find("User").each(function(){U=D(this).attr("ID")})}});var S="<Query><Where>";if(V.CAMLQuery.length>0){S+="<And>"}S+="<Eq><FieldRef Name='Author' LookupId='TRUE'/><Value Type='Integer'>"+U+"</Value></Eq>";if(V.CAMLQuery.length>0){S+=V.CAMLQuery+"</And>"}S+="</Where><OrderBy><FieldRef Name='Created_x0020_Date' Ascending='FALSE'/></OrderBy></Query>";D().SPServices({operation:"GetListItems",async:false,webURL:V.webURL,listName:V.listName,CAMLQuery:S,CAMLViewFields:"<ViewFields><FieldRef Name='ID'/></ViewFields>",CAMLRowLimit:1,CAMLQueryOptions:"<QueryOptions><ViewAttributes Scope='Recursive' /></QueryOptions>",completefunc:function(Y,X){D(Y.responseXML).find("[nodeName=z:row]").each(function(){W=D(this).attr("ows_ID")})}});return W};D.fn.SPServices.SPRequireUnique=function(ab){var S=D.extend({},{columnStaticName:"Title",duplicateAction:0,ignoreCase:false,initMsg:"This value must be unique.",initMsgCSSClass:"ms-vb",errMsg:"This value is not unique.",errMsgCSSClass:"ms-formvalidation",completefunc:null},ab);var U=D().SPServices.SPGetQueryString();var Z=U.ID;var Y=D().SPServices.SPListNameFromUrl();var T="<span id='SPRequireUnique"+S.columnStaticName+"' class='{0}'>{1}<br/></span>";var W=T.replace(/\{0\}/g,S.initMsgCSSClass).replace(/\{1\}/g,S.initMsg);var X=T.replace(/\{0\}/g,S.errMsgCSSClass).replace(/\{1\}/g,S.errMsg);var V=D().SPServices.SPGetDisplayFromStatic({listName:Y,columnStaticName:S.columnStaticName});var aa=D("input[Title='"+V+"']");D(aa).parent().append(W);D(aa).blur(function(){var ad=0;var ae=D(this).attr("value");D().SPServices({operation:"GetListItems",async:false,listName:Y,CAMLQuery:"<Query><Where><IsNotNull><FieldRef Name='"+S.columnStaticName+"'/></IsNotNull></Where></Query>",CAMLViewFields:"<ViewFields><FieldRef Name='ID' /><FieldRef Name='"+S.columnStaticName+"' /></ViewFields>",CAMLRowLimit:0,completefunc:function(ah,af){var ag=S.ignoreCase?ae.toUpperCase():ae;D(ah.responseXML).find("[nodeName=z:row]").each(function(){var ai=S.ignoreCase?D(this).attr("ows_"+S.columnStaticName).toUpperCase():D(this).attr("ows_"+S.columnStaticName);if((ag==ai)&&(D(this).attr("ows_ID")!=Z)){ad++}})}});var ac=W;D("input[value='OK']").attr("disabled","");if(ad>0){ac=X;if(S.duplicateAction==1){D("input[Title='"+S.columnDisplayName+"']").focus();D("input[value='OK']").attr("disabled","disabled")}}D("span#SPRequireUnique"+S.columnStaticName).html(ac)});if(S.completefunc!=null){S.completefunc()}};D.fn.SPServices.SPGetDisplayFromStatic=function(T){var V=D.extend({},{webURL:"",listName:"",columnStaticName:""},T);var U="";var S="";D().SPServices({operation:"GetList",async:false,webURL:V.webURL,listName:V.listName,completefunc:function(X,W){D(X.responseXML).find("Field").each(function(){if(D(this).attr("StaticName")==V.columnStaticName){S=D(this).attr("DisplayName");return false}})}});return S};D.fn.SPServices.SPGetStaticFromDisplay=function(T){var V=D.extend({},{webURL:"",listName:"",columnDisplayName:""},T);var S="";var U="";D().SPServices({operation:"GetList",async:false,listName:V.listName,completefunc:function(X,W){D(X.responseXML).find("Field").each(function(){if(D(this).attr("DisplayName")==V.columnDisplayName){U=D(this).attr("StaticName");return false}})}});return U};D.fn.SPServices.SPRedirectWithID=function(aa){var S=D.extend({},{redirectUrl:"",qsParamName:"ID"},aa);var Y=D().SPServices.SPListNameFromUrl();var T=D().SPServices.SPGetQueryString();var V=T.ID;var W=T.List;var Z=T.RootFolder;var X=T.ContentTypeId;if(T.ID==undefined){V=D().SPServices.SPGetLastItemId({listName:Y});D("form[name='aspnetForm']").each(function(){var ac=(location.href.indexOf("?")>0)?location.href.substring(0,location.href.indexOf("?")):location.href;var ad=(typeof T.Source=="string")?"Source="+T.Source.replace(/\//g,"%2f").replace(/:/g,"%3a"):"";var ab=new Array();if(W!=undefined){ab.push("List="+W)}if(Z!=undefined){ab.push("RootFolder="+Z)}if(X!=undefined){ab.push("ContentTypeId="+X)}var ae=ac+((ab.length>0)?("?"+ab.join("&")+"&"):"?")+"Source="+ac+"?ID="+V+((ad.length>0)?("%26RealSource="+T.Source):"")+((typeof T.RedirectURL=="string")?("%26RedirectURL="+T.RedirectURL):"");D(this).attr("action",ae)})}else{while(T.ID==V){V=D().SPServices.SPGetLastItemId({listName:Y})}var U=(typeof T.RedirectURL=="string")?T.RedirectURL:S.redirectUrl;location.href=U+"?"+S.qsParamName+"="+V+((typeof T.RealSource=="string")?("&Source="+T.RealSource):"")}};D.fn.SPServices.SPSetMultiSelectSizes=function(aa){var S=D.extend({},{multiSelectColumn:"",minWidth:0,maxWidth:0},aa);var W=D("select[ID$='SelectCandidate'][Title^='"+S.multiSelectColumn+" ']");var Y=W.closest("span").find("select[ID$='SelectResult'][Title^='"+S.multiSelectColumn+" ']");var X=h("SPSetMultiSelectSizes",S.multiSelectColumn);W.clone().appendTo(W.closest("span")).css({width:"auto",height:0,visibility:"hidden"}).attr({id:X,length:0});var V=D("#"+X);W.find("option").each(function(){V.append("<option value='"+D(this).html()+"'>"+D(this).html()+"</option>")});Y.find("option").each(function(){V.append("<option value='"+D(this).html()+"'>"+D(this).html()+"</option>")});var T=D("#"+X).width()+5;var Z=T;if(S.minWidth>0||S.maxWidth>0){if(T<S.minWidth){T=S.minWidth}if(Z<S.minWidth){Z=S.minWidth}if(Z>S.maxWidth){Z=S.maxWidth}}var U=T-17;W.css("width",U+"px").parent().css("width",Z+"px");Y.css("width",U+"px").parent().css("width",Z+"px");D("#"+X).remove()};D.fn.SPServices.SPScriptAudit=function(T){var U=D.extend({},{webURL:"",listName:"",outputId:"",auditForms:true,auditViews:true,auditPages:true,auditPagesListName:"Pages",showHiddenLists:false,showNoScript:false,showSrc:true},T);var S=["Display","Edit","New"];var V;D("#"+U.outputId).append("<table id='SPScriptAudit' width='100%' style='border-collapse: collapse;' border=0 cellSpacing=0 cellPadding=1><tr><th></th><th>List</th><th>Page Class</th><th>Page Type</th><th>Page</th>"+(U.showSrc?"<th>Script in the Page</th><th>Script in a Web Part</th>":"")+"<th>jQuery</th></tr></table>");D("#SPScriptAudit th").attr("class","ms-vh2-nofilter");if(U.auditForms||U.auditViews){D().SPServices({operation:"GetListCollection",webURL:U.webURL,async:false,completefunc:function(X,W){D(X.responseXML).find(n).each(function(){D(this).find("List").each(function(){V=D(this);if((U.showHiddenLists&&V.attr("Hidden")=="False")||!U.showHiddenLists){if(U.auditForms){D().SPServices({operation:"GetListContentTypes",webURL:U.webURL,listName:V.attr("ID"),async:false,completefunc:function(Z,Y){D(Z.responseXML).find("ContentType").each(function(){if(D(this).attr("ID").substring(0,6)!="0x0120"){D(this).find("FormUrls").each(function(){for(var aa=0;aa<S.length;aa++){D(this).find(S[aa]).each(function(){k(U,V,"Form",S[aa],((U.webURL.length>0)?U.webURL:D().SPServices.SPGetCurrentSite())+g+D(this).text())})}})}})}})}if(U.auditViews){D().SPServices({operation:"GetViewCollection",webURL:U.webURL,listName:V.attr("ID"),async:false,completefunc:function(Z,Y){D(Z.responseXML).find("View").each(function(){k(U,V,"View",D(this).attr("DisplayName"),D(this).attr("Url"))})}})}}})})}})}if(U.auditPages){D().SPServices({operation:"GetList",async:false,webURL:U.webURL,listName:U.auditPagesListName,completefunc:function(X,W){D(X.responseXML).find("List").each(function(){V=D(this)})}});D().SPServices({operation:"GetListItems",async:false,webURL:U.webURL,listName:U.auditPagesListName,CAMLQuery:"<Query><Where><Neq><FieldRef Name='ContentType'/><Value Type='Text'>Folder</Value></Neq></Where></Query>",CAMLViewFields:"<ViewFields><FieldRef Name='Title'/><FieldRef Name='FileRef'/></ViewFields>",CAMLRowLimit:0,completefunc:function(X,W){D(X.responseXML).find("[nodeName=z:row]").each(function(){var Z=D(this).attr("ows_FileRef").split(";#")[1];var Y=(D(this).attr("ows_Title")!=undefined)?D(this).attr("ows_Title"):"";if(Z.indexOf(".aspx")>0){k(U,V,"Page",Y,g+Z)}})}})}D("#SPScriptAudit tr[class='ms-alternating']:even").attr("class","")};function k(S,U,ae,Y,W){var ac=0;var ad=0;var V=new Object();V.type=[];V.src=[];V.script=[];var X=new Object();X.type=[];X.src=[];X.script=[];var T="$(";var Z=RegExp("<head[\\s\\S]*?/head>","gi");var ab=RegExp("<script[\\s\\S]*?/script>","gi");var aa;D.ajax({type:"GET",url:W,dataType:"text",success:function(ag){headHtml=Z.exec(ag);while(scriptMatch=ab.exec(headHtml)){var aj=z(scriptMatch,"language");var al=z(scriptMatch,"type");var af=z(scriptMatch,"src");if(af!=null&&af.length>0&&!E(af)){X.type.push((aj!=null&&aj.length>0)?aj:al);X.src.push(af)}var an=scriptMatch.innerHTML;if(an!=undefined&&an.indexOf(T)>-1){X.script.push(scriptMatch.innerHTML);ac++}}D(ag).find("script").each(function(){if(D(this).closest("td[id^='MSOZoneCell_WebPartWP']").html()==null){if((D(this).attr("src")!=undefined)&&(D(this).attr("src").length>0)&&!E(D(this).attr("src"))){X.type.push(D(this).attr("language").length>0?D(this).attr("language"):D(this).attr("type"));X.src.push(D(this).attr("src"))}if(D(this).html().indexOf(T)>-1){X.script.push(D(this).html());ac++}}else{if(D(this).attr("src")!=undefined&&D(this).attr("src").length>0){V.type.push(D(this).attr("language").length>0?D(this).attr("language"):D(this).attr("type"));V.src.push(D(this).attr("src"))}if(D(this).html().indexOf(T)>-1){V.script.push(D(this).html());ad++}}});if((!S.showNoScript&&(V.type.length>0||X.type.length>0))||S.showNoScript){var ak=W.substring(0,W.lastIndexOf(g)+1);var ah="<tr class=ms-alternating><td class=ms-vb-icon><a href='"+U.attr("DefaultViewUrl")+"'><IMG border=0 src='"+U.attr("ImageUrl")+"'width=16 height=16></A></TD><td class=ms-vb2><a href='"+U.attr("DefaultViewUrl")+"'>"+U.attr("Title")+((U.attr("Hidden")=="True")?"(Hidden)":"")+"</td><td class=ms-vb2>"+ae+"</td><td class=ms-vb2>"+Y+"</td><td class=ms-vb2><a href='"+W+"'>"+w(W)+"</td>";if(S.showSrc){ah+="<td valign='top'><table width='100%' style='border-collapse: collapse;' border=0 cellSpacing=0 cellPadding=1>";for(var ai=0;ai<X.type.length;ai++){var am=(X.src[ai].substr(0,1)!=g)?ak+X.src[ai]:X.src[ai];ah+="<tr><td class=ms-vb2 width='30%'>"+X.type[ai]+"</td>";ah+="<td class=ms-vb2 width='70%'><a href='"+am+"'>"+w(X.src[ai])+"</td></tr>"}if(ac>0){for(var ai=0;ai<X.script.length;ai++){ah+="<tr><td class=ms-vb2 colspan=99><textarea class=ms-vb2 readonly='readonly' rows='5' cols='50'>"+X.script[ai]+"</textarea></td></tr>"}}ah+="</table></td>";ah+="<td valign='top'><table width='100%' style='border-collapse: collapse;' border=0 cellSpacing=0 cellPadding=1>";for(var ai=0;ai<V.type.length;ai++){var am=(V.src[ai].substr(0,1)!=g)?ak+V.src[ai]:V.src[ai];ah+="<tr><td class=ms-vb2 width='30%'>"+V.type[ai]+"</td>";ah+="<td class=ms-vb2 width='70%'><a href='"+am+"'>"+w(V.src[ai])+"</td></tr>"}if(ad>0){for(var ai=0;ai<V.script.length;ai++){ah+="<tr><td class=ms-vb2 colspan=99><textarea class=ms-vb2 readonly='readonly' rows='5' cols='50'>"+V.script[ai]+"</textarea></td></tr>"}}ah+="</table></td>"}ah+="<td class=ms-vb2>"+(((ac+ad)>0)?"Yes":"No")+"</td></tr>";D("#SPScriptAudit").append(ah)}}})}function z(U,T){var S=RegExp(T+"=(\"([^\"]*)\")|('([^']*)')","gi");if(matches=S.exec(U)){return matches[2]}return null}function E(U){var T=["WebResource.axd","_layouts"];for(var S=0;S<T.length;S++){if(U.indexOf(T[S])>-1){return true}}return false}D.fn.SPServices.SPArrangeChoices=function(T){var U=D.extend({},{listName:"",columnName:"",perRow:99,randomize:false},T);var W=false;var T=new Array();var S;D().SPServices({operation:"GetList",async:false,listName:(U.listName.length>0)?U.listName:D().SPServices.SPListNameFromUrl(),completefunc:function(Y,X){D(Y.responseXML).find("Fields").each(function(){D(this).find("Field").each(function(){if(D(this).attr("DisplayName")==U.columnName){W=(D(this).attr("FillInChoice")=="TRUE")?true:false;return false}})})}});var V=RegExp('FieldName="'+U.columnName+'"',"gi");D("td.ms-formbody, td.ms-formbodysurvey").each(function(){if(V.test(D(this).html())){var Z=D(this).find("tr").length;var Y=0;var aa;var X;D(this).find("tr").each(function(){Y++;if(W&&Y==Z-1){aa=D(this).find("td").html()}else{if(W&&Y==Z){X=D(this).find("td").html()}else{T.push(D(this).html())}}});S="<TR>";if(U.randomize){T.sort(O)}for(i=0;i<T.length;i++){S+=T[i];if((i+1)%U.perRow==0){S+="</TR><TR>"}}S+="</TR>";if(W){S+="<TR><TD colspan='99'>"+aa+X+"</TD></TR>"}D(this).find("tr").remove();D(this).find("table").append(S);return false}})};D.fn.SPServices.SPAutocomplete=function(U){var V=D.extend({},{WebURL:"",sourceList:"",sourceColumn:"",columnName:"",CAMLQuery:"",numChars:0,ignoreCase:false,slideDownSpeed:"fast",processingIndicator:"<img src='_layouts/images/REFRESH.GIF'/>",debug:false},U);var T=D("input[Title='"+V.columnName+"']");D("input[Title='"+V.columnName+"']").css("position","");var X=D(T).attr("ID");var W=D(T).css("color");if(T.html()==null&&V.debug){B("SPServices.SPAutocomplete","columnName: "+V.columnName,"Column is not an input control or is not found on page");return}var S=h("SPAutocomplete",V.columnName);T.after("<ul id='"+S+"' style='display:none;padding:2px;border:1px solid #2A1FAA;background-color:#FFF;position:absolute;z-index:40;margin:0'>");D("#"+S).css("width",T.width());T.wrap("<table id='"+S+"container' cellpadding='0' cellspacing='0' width='100%'><tr><td width='"+T.width()+"'></td></tr></table>");T.closest("tr").append("<td id='"+S+"processingIndicator' style='display:none;'>"+V.processingIndicator+"</td>");D(T).keyup(function(){var ab=D(this).val();if(ab.length<V.numChars){D("#"+S).hide();return false}D("#"+S).hide();D("#"+S+"processingIndicator").show();var aa=new Array();var Y="<Query><OrderBy><FieldRef Name='"+V.sourceColumn+"'/></OrderBy><Where>";if(V.CAMLQuery.length>0){Y+="<And>"}Y+="<IsNotNull><FieldRef Name='"+V.sourceColumn+"'/></IsNotNull>";if(V.CAMLQuery.length>0){Y+=V.CAMLQuery+"</And>"}Y+="</Where></Query>";D().SPServices({operation:"GetListItems",async:false,webURL:V.WebURL,listName:V.sourceList,CAMLQuery:Y,CAMLViewFields:"<ViewFields><FieldRef Name='"+V.sourceColumn+"' /></ViewFields>",CAMLRowLimit:0,completefunc:function(ae,ac){var ad=V.ignoreCase?ab.toUpperCase():ab;D(ae.responseXML).find("[nodeName=z:row]").each(function(){var af=V.ignoreCase?D(this).attr("ows_"+V.sourceColumn).toUpperCase():D(this).attr("ows_"+V.sourceColumn);if(ad==af.substr(0,ad.length)){aa.push(D(this).attr("ows_"+V.sourceColumn))}})}});var Z="";for(i=0;i<aa.length;i++){Z+="<li style='display: block;position: relative;cursor: pointer;'>"+aa[i]+"</li>"}D("#"+S).html(Z);D("#"+S+" li").click(function(){D("#"+S).fadeOut(V.slideUpSpeed);D("#"+X).val(D(this).html())}).mouseover(function(){var ac={cursor:"hand",color:"#ffffff",background:"#3399ff"};D(this).css(ac)}).mouseout(function(){var ac={cursor:"inherit",color:W,background:"transparent"};D(this).css(ac)});D("#"+S+"processingIndicator").fadeOut("slow");if(aa.length>0){D("#"+S).slideDown(V.slideDownSpeed)}})};D.fn.SPServices.SPGetQueryString=function(){var X=new Object();var S=location.search.substring(1,location.search.length);var T=S.split("&");for(var V=0;V<T.length;V++){var U=/^([^=]+)=(.*)/i,W=U.exec(T[V]);if(U.test(location.href)){if(W.length>2){X[W[1]]=unescape(W[2]).replace("+"," ")}}}return X};D.fn.SPServices.SPListNameFromUrl=function(){var U=location.href;var T=U.substring(0,U.indexOf(".aspx"));var V=P(T.substring(0,T.lastIndexOf(g)+1)).toUpperCase();var S="";D().SPServices({operation:"GetListCollection",async:false,completefunc:function(X,W){D(X.responseXML).find("List").each(function(){var Y=D(this).attr("DefaultViewUrl");var Z=Y.substring(0,Y.lastIndexOf(g)+1).toUpperCase();if(V.indexOf(Z)>0){S=D(this).attr("ID");return false}})}});return S};D.fn.SPServices.SPUpdateMultipleListItems=function(U){var W=D.extend({},{webURL:"",listName:"",CAMLQuery:"",batchCmd:"Update",valuepairs:[],debug:false},U);var X=[];D().SPServices({operation:"GetListItems",async:false,webURL:W.webURL,listName:W.listName,CAMLQuery:W.CAMLQuery,CAMLQueryOptions:"<QueryOptions><ViewAttributes Scope='Recursive' /></QueryOptions>",completefunc:function(Z,Y){D(Z.responseXML).find("[nodeName=z:row]").each(function(){X.push(D(this).attr("ows_ID"))})}});var T="<Batch OnError='Continue'>";for(var V=0;V<X.length;V++){T+="<Method ID='"+V+1+"' Cmd='"+W.batchCmd+"'>";for(var S=0;S<W.valuepairs.length;S++){T+="<Field Name='"+W.valuepairs[S][0]+"'>"+W.valuepairs[S][1]+"</Field>"}T+="<Field Name='ID'>"+X[V]+"</Field></Method>"}T+="</Batch>";D().SPServices({operation:"UpdateListItems",async:false,webURL:W.webURL,listName:W.listName,updates:T,completefunc:function(Z,Y){}})};function u(X,W,V){if(W==undefined){return""}var S;switch(X.attr("Type")){case"Text":S=W;break;case"URL":switch(X.attr("Format")){case"Hyperlink":S="<a href='"+W.substring(0,W.search(","))+"'>"+W.substring(W.search(",")+1)+"</a>";break;case"Image":S="<img alt='"+W.substring(W.search(",")+1)+"' src='"+W.substring(0,W.search(","))+"'/>";break;default:S=W;break}break;case"User":S="<a href='/_layouts/userdisp.aspx?ID="+W.substring(0,W.search(";#"))+"&Source="+Q(location.href)+"'>"+W.substring(W.search(";#")+2)+"</a>";break;case"Calculated":var T=W.split(";#");S=T[1];break;case"Number":S=parseFloat(W).toFixed(X.attr("Decimals")).toString();break;case"Currency":S=parseFloat(W).toFixed(X.attr("Decimals")).toString();break;case"Lookup":var U;D().SPServices({operation:"GetFormCollection",async:false,listName:X.attr("List"),completefunc:function(Z,Y){D(Z.responseXML).find("Form").each(function(){if(D(this).attr("Type")=="DisplayForm"){U=D(this).attr("Url");return false}})}});S="<a href='"+V.relatedWebURL+g+U+"?ID="+W.substring(0,W.search(";#"))+"&RootFolder=*'>"+W.substring(W.search(";#")+2)+"</a>";break;case"Counter":S=W;break;default:S=W;break}return S}function M(V,U){var S="<table class='ms-vb' width='100%'>";for(var T=0;T<V.attributes.length;T++){S+="<tr><td width='10px' style='font-weight:bold;'>"+T+"</td><td width='100px'>"+V.attributes.item(T).nodeName+"</td><td>"+r(V.attributes.item(T).nodeValue)+"</td></tr>"}S+="</table>";return S}function L(S){if((this.Obj=D("select[Title='"+S+"']")).html()!=null){this.Type="S"}else{if((this.Obj=D("input[Title='"+S+"']")).html()!=null){this.Type="C"}else{if((this.Obj=D("select[ID$='SelectCandidate'][Title^='"+S+" ']")).html()!=null){this.Type="M"}else{if((this.Obj=D("select[ID$='SelectCandidate'][Title$=': "+S+"']")).html()!=null){this.Type="M"}else{this.Type=null}}}}}function B(T,V,U){var S="<b>Error in function</b><br/>"+T+"<br/><b>Parameter</b><br/>"+V+"<br/><b>Message</b><br/>"+U+"<br/><br/><span onmouseover='this.style.cursor=\"hand\";' onmouseout='this.style.cursor=\"inherit\";' style='width=100%;text-align:right;'>Click to continue</span></div>";f(S)}function f(X){var U="position:absolute;width:300px;height:150px;padding:10px;background-color:#000000;color:#ffffff;z-index:30;font-family:'Arial';font-size:12px;display:none;";D("#aspnetForm").parent().append("<div id='SPServices_msgBox' style="+U+">"+X);var S=D("#SPServices_msgBox").height();var W=D("#SPServices_msgBox").width();var V=(D(window).width()/2)-(W/2)+"px";var T=(D(window).height()/2)-(S/2)-100+"px";D("#SPServices_msgBox").css({border:"5px #C02000 solid",left:V,top:T}).show().fadeTo("slow",0.75).click(function(){D(this).fadeOut("3000",function(){D(this).remove()})})}function h(S,T){return S+"_"+D().SPServices.SPGetStaticFromDisplay({listName:D().SPServices.SPListNameFromUrl(),columnDisplayName:T})}function O(){return(Math.round(Math.random())-0.5)}function r(S){return((S.indexOf("http")==0)||(S.indexOf(g)==0))?"<a href='"+S+"'>"+S+"</a>":S}function w(S){return S.substring(S.lastIndexOf(g)+1,S.length)}function a(S){return S.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function s(S){return S.replace(/&/g,"&")}function P(S){return S.replace(/%20/g," ")}function Q(S){return S.replace(/&/g,"%26")}function v(T,S){return"<"+T+">"+S+"</"+T+">"}})(jQuery); | pcarrier/cdnjs | ajax/libs/jquery.SPServices/0.5.8/jquery.SPServices-0.5.8.min.js | JavaScript | mit | 58,775 |
//
// stopcensorship.js
//
// Author: Doug Martin (@dougmartin or http://dougmart.in/)
//
// Usage: Add to head or body of any page to automatically censor the content to protest censorship of the Internet
//
// Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
(function(){function m(){document.cookie="__REMOVE_STOP_CENSORSHIP__=1;path=/";window.location.reload();return!1}function n(){function a(c,g,d){function h(a){if(a)for(i in a)if(a.hasOwnProperty(i))try{j.style[i]=a[i]}catch(c){}}var i,j;j=document.createElement(c);j.innerHTML=g;h(b);h(d);return j}var b,c,g;b={background:"#000 none repeat scroll 0% 0%",borderCollapse:"separate",borderSpacing:"0",border:"medium none #000",bottom:"auto",captionSide:"top",clear:"none",clip:"auto",color:"#fff",cursor:"auto",
direction:"ltr",display:"inline",emptyCells:"show","float":"none",fontStyle:"normal",fontVariant:"normal",fontWeight:"bold",fontSize:"12px",fontFamily:"verdana,helvetica,arial,sans-serif",height:"auto",left:"auto",letterSpacing:"normal",lineHeight:"normal",listStyle:"disc outside none",margin:"0",maxHeight:"none",maxWidth:"none",minHeight:"0",minWidth:"0",orphans:"2",outline:"invert none medium",overflow:"visible",padding:"0",pageBreakAfter:"auto",pageBreakBefore:"auto",pageBreakInside:"auto",position:"static",
right:"auto",tableLayout:"auto",textAlign:"left",textDecoration:"none",textIndent:"0",textTransform:"none",top:"auto",unicodeBidi:"normal",verticalAlign:"baseline",visibility:"visible",whiteSpace:"normal",widows:"2",width:"auto",wordSpacing:"normal",zIndex:"auto"};d=a("div","",{position:"absolute",top:"0",left:"0",textAlign:"center",margin:"0",padding:"5px 0",width:"100%",borderTop:"2px solid #fff",borderBottom:"2px solid #fff",zIndex:2147483647});c=a("a","STOP CENSORSHIP",{textDecoration:"underline"});
c.href="http://americancensorship.org/";g=a("a","Remove this",{textDecoration:"underline"});g.href="#";g.onclick=m;d.appendChild(c);d.appendChild(a("span","|",{padding:"0 10px"}));d.appendChild(g);document.body.appendChild(d)}function l(){function d(a){var b,f,h;b=a.nodeValue.split(/\s/);for(f=0,h=b.length;f<h;f++)0.5>Math.random()&&(b[f]=c.slice(0,b[f].length).join(""));a.nodeValue=b.join(" ")}var b,c;b=String.fromCharCode(9608);for(c=[];1024>c.length;)c.push(b);if(document.createTreeWalker)for(e=
document.createTreeWalker(document.body,NodeFilter.SHOW_TEXT,null,!1);e.nextNode();)d(e.currentNode);else{k=document.body;for(a=k.childNodes[0];null!=a;)if(3==a.nodeType&&d(a),a.hasChildNodes())a=a.firstChild;else{for(;null==a.nextSibling&&a!=k;)a=a.parentNode;a=a.nextSibling}}n()}function o(a){function b(){if(!e){if(!document.body)return setTimeout(b,1);e=!0;a()}}function c(){document.addEventListener?(document.removeEventListener("DOMContentLoaded",c,!1),b()):document.attachEvent&&"complete"===
document.readyState&&(document.detachEvent("onreadystatechange",c),b())}function d(){if(!e){try{document.documentElement.doScroll("left")}catch(a){setTimeout(d,1);return}b()}}var e=!1;if(document.addEventListener)document.addEventListener("DOMContentLoaded",c,!1),window.addEventListener("load",b,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",c);window.attachEvent("onload",b);try{null===window.frameElement&&document.documentElement.doScroll&&d()}catch(f){}}}var e,a,k,d;
/__REMOVE_STOP_CENSORSHIP__=1/.test(document.cookie)||(document.body?l():o(l))})();
| NUKnightLab/cdnjs | ajax/libs/sopa/1.0/stopcensorship.js | JavaScript | mit | 3,423 |
<?php
/*
* This file is part of SwiftMailer.
* (c) 2004-2009 Chris Corbyn
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Allows reading and writing of bytes to and from a file.
*
* @author Chris Corbyn
*/
class Swift_ByteStream_FileByteStream extends Swift_ByteStream_AbstractFilterableInputStream implements Swift_FileStream
{
/** The internal pointer offset */
private $_offset = 0;
/** The path to the file */
private $_path;
/** The mode this file is opened in for writing */
private $_mode;
/** A lazy-loaded resource handle for reading the file */
private $_reader;
/** A lazy-loaded resource handle for writing the file */
private $_writer;
/** If magic_quotes_runtime is on, this will be true */
private $_quotes = false;
/** If stream is seekable true/false, or null if not known */
private $_seekable = null;
/**
* Create a new FileByteStream for $path.
*
* @param string $path
* @param bool $writable if true
*/
public function __construct($path, $writable = false)
{
if (empty($path)) {
throw new Swift_IoException('The path cannot be empty');
}
$this->_path = $path;
$this->_mode = $writable ? 'w+b' : 'rb';
if (function_exists('get_magic_quotes_runtime') && @get_magic_quotes_runtime() == 1) {
$this->_quotes = true;
}
}
/**
* Get the complete path to the file.
*
* @return string
*/
public function getPath()
{
return $this->_path;
}
/**
* Reads $length bytes from the stream into a string and moves the pointer
* through the stream by $length.
*
* If less bytes exist than are requested the
* remaining bytes are given instead. If no bytes are remaining at all, boolean
* false is returned.
*
* @param int $length
*
* @return string|bool
*
* @throws Swift_IoException
*/
public function read($length)
{
$fp = $this->_getReadHandle();
if (!feof($fp)) {
if ($this->_quotes) {
ini_set('magic_quotes_runtime', 0);
}
$bytes = fread($fp, $length);
if ($this->_quotes) {
ini_set('magic_quotes_runtime', 1);
}
$this->_offset = ftell($fp);
// If we read one byte after reaching the end of the file
// feof() will return false and an empty string is returned
if ($bytes === '' && feof($fp)) {
$this->_resetReadHandle();
return false;
}
return $bytes;
}
$this->_resetReadHandle();
return false;
}
/**
* Move the internal read pointer to $byteOffset in the stream.
*
* @param int $byteOffset
*
* @return bool
*/
public function setReadPointer($byteOffset)
{
if (isset($this->_reader)) {
$this->_seekReadStreamToPosition($byteOffset);
}
$this->_offset = $byteOffset;
}
/** Just write the bytes to the file */
protected function _commit($bytes)
{
fwrite($this->_getWriteHandle(), $bytes);
$this->_resetReadHandle();
}
/** Not used */
protected function _flush()
{
}
/** Get the resource for reading */
private function _getReadHandle()
{
if (!isset($this->_reader)) {
if (!$this->_reader = fopen($this->_path, 'rb')) {
throw new Swift_IoException(
'Unable to open file for reading ['.$this->_path.']'
);
}
if ($this->_offset != 0) {
$this->_getReadStreamSeekableStatus();
$this->_seekReadStreamToPosition($this->_offset);
}
}
return $this->_reader;
}
/** Get the resource for writing */
private function _getWriteHandle()
{
if (!isset($this->_writer)) {
if (!$this->_writer = fopen($this->_path, $this->_mode)) {
throw new Swift_IoException(
'Unable to open file for writing ['.$this->_path.']'
);
}
}
return $this->_writer;
}
/** Force a reload of the resource for reading */
private function _resetReadHandle()
{
if (isset($this->_reader)) {
fclose($this->_reader);
$this->_reader = null;
}
}
/** Check if ReadOnly Stream is seekable */
private function _getReadStreamSeekableStatus()
{
$metas = stream_get_meta_data($this->_reader);
$this->_seekable = $metas['seekable'];
}
/** Streams in a readOnly stream ensuring copy if needed */
private function _seekReadStreamToPosition($offset)
{
if ($this->_seekable === null) {
$this->_getReadStreamSeekableStatus();
}
if ($this->_seekable === false) {
$currentPos = ftell($this->_reader);
if ($currentPos<$offset) {
$toDiscard = $offset-$currentPos;
fread($this->_reader, $toDiscard);
return;
}
$this->_copyReadStream();
}
fseek($this->_reader, $offset, SEEK_SET);
}
/** Copy a readOnly Stream to ensure seekability */
private function _copyReadStream()
{
if ($tmpFile = fopen('php://temp/maxmemory:4096', 'w+b')) {
/* We have opened a php:// Stream Should work without problem */
} elseif (function_exists('sys_get_temp_dir') && is_writable(sys_get_temp_dir()) && ($tmpFile = tmpfile())) {
/* We have opened a tmpfile */
} else {
throw new Swift_IoException('Unable to copy the file to make it seekable, sys_temp_dir is not writable, php://memory not available');
}
$currentPos = ftell($this->_reader);
fclose($this->_reader);
$source = fopen($this->_path, 'rb');
if (!$source) {
throw new Swift_IoException('Unable to open file for copying ['.$this->_path.']');
}
fseek($tmpFile, 0, SEEK_SET);
while (!feof($source)) {
fwrite($tmpFile, fread($source, 4096));
}
fseek($tmpFile, $currentPos, SEEK_SET);
fclose($source);
$this->_reader = $tmpFile;
}
}
| quentinl-c/Player_manager | vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/FileByteStream.php | PHP | mit | 6,540 |
define("ace/snippets/xquery",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='snippet for\n for $${1:item} in ${2:expr}\nsnippet return\n return ${1:expr}\nsnippet import\n import module namespace ${1:ns} = "${2:http://www.example.com/}";\nsnippet some\n some $${1:varname} in ${2:expr} satisfies ${3:expr}\nsnippet every\n every $${1:varname} in ${2:expr} satisfies ${3:expr}\nsnippet if\n if(${1:true}) then ${2:expr} else ${3:true}\nsnippet switch\n switch(${1:"foo"})\n case ${2:"foo"}\n return ${3:true}\n default return ${4:false}\nsnippet try\n try { ${1:expr} } catch ${2:*} { ${3:expr} }\nsnippet tumbling\n for tumbling window $${1:varname} in ${2:expr}\n start at $${3:start} when ${4:expr}\n end at $${5:end} when ${6:expr}\n return ${7:expr}\nsnippet sliding\n for sliding window $${1:varname} in ${2:expr}\n start at $${3:start} when ${4:expr}\n end at $${5:end} when ${6:expr}\n return ${7:expr}\nsnippet let\n let $${1:varname} := ${2:expr}\nsnippet group\n group by $${1:varname} := ${2:expr}\nsnippet order\n order by ${1:expr} ${2:descending}\nsnippet stable\n stable order by ${1:expr}\nsnippet count\n count $${1:varname}\nsnippet ordered\n ordered { ${1:expr} }\nsnippet unordered\n unordered { ${1:expr} }\nsnippet treat \n treat as ${1:expr}\nsnippet castable\n castable as ${1:atomicType}\nsnippet cast\n cast as ${1:atomicType}\nsnippet typeswitch\n typeswitch(${1:expr})\n case ${2:type} return ${3:expr}\n default return ${4:expr}\nsnippet var\n declare variable $${1:varname} := ${2:expr};\nsnippet fn\n declare function ${1:ns}:${2:name}(){\n ${3:expr}\n };\nsnippet module\n module namespace ${1:ns} = "${2:http://www.example.com}";\n',t.scope="xquery"}) | CTres/jsdelivr | files/ace/1.1.6/min/snippets/xquery.js | JavaScript | mit | 1,712 |
.CodeMirror-lint-markers{width:16px}.CodeMirror-lint-tooltip{background-color:infobackground;border:1px solid black;border-radius:4px 4px 4px 4px;color:infotext;font-family:monospace;font-size:10pt;overflow:hidden;padding:2px 5px;position:fixed;white-space:pre;white-space:pre-wrap;z-index:100;max-width:600px;opacity:0;transition:opacity .4s;-moz-transition:opacity .4s;-webkit-transition:opacity .4s;-o-transition:opacity .4s;-ms-transition:opacity .4s}.CodeMirror-lint-mark-error,.CodeMirror-lint-mark-warning{background-position:left bottom;background-repeat:repeat-x}.CodeMirror-lint-mark-error{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==")}.CodeMirror-lint-mark-warning{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=")}.CodeMirror-lint-marker-error,.CodeMirror-lint-marker-warning{background-position:center center;background-repeat:no-repeat;cursor:pointer;display:inline-block;height:16px;width:16px;vertical-align:middle;position:relative}.CodeMirror-lint-message-error,.CodeMirror-lint-message-warning{padding-left:18px;background-position:top left;background-repeat:no-repeat}.CodeMirror-lint-marker-error,.CodeMirror-lint-message-error{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII=")}.CodeMirror-lint-marker-warning,.CodeMirror-lint-message-warning{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII=")}.CodeMirror-lint-marker-multiple{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC");background-repeat:no-repeat;background-position:right bottom;width:100%;height:100%} | dada0423/cdnjs | ajax/libs/codemirror/5.5.0/addon/lint/lint.min.css | CSS | mit | 2,758 |
/*************************************************************
*
* MathJax/fonts/HTML-CSS/TeX/png/AMS/Regular/MiscMathSymbolsB.js
*
* Defines the image size data needed for the HTML-CSS OutputJax
* to display mathematics using fallback images when the fonts
* are not availble to the client browser.
*
* ---------------------------------------------------------------------
*
* Copyright (c) 2009-2013 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
MathJax.OutputJax["HTML-CSS"].defineImageData({
"MathJax_AMS": {
0x29EB: [ // BLACK LOZENGE
[5,6,1],[6,8,2],[7,10,2],[8,11,2],[9,12,2],[11,15,3],[12,17,3],[15,21,4],
[17,24,4],[21,29,5],[25,35,6],[29,41,7],[34,48,8],[41,57,9]
]
}
});
MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].imgDir+"/AMS/Regular"+
MathJax.OutputJax["HTML-CSS"].imgPacked+"/MiscMathSymbolsB.js");
| the-destro/cdnjs | ajax/libs/mathjax/2.3/fonts/HTML-CSS/TeX/png/AMS/Regular/unpacked/MiscMathSymbolsB.js | JavaScript | mit | 1,436 |
/*************************************************************
*
* MathJax/fonts/HTML-CSS/TeX/png/AMS/Regular/MathOperators.js
*
* Defines the image size data needed for the HTML-CSS OutputJax
* to display mathematics using fallback images when the fonts
* are not availble to the client browser.
*
* ---------------------------------------------------------------------
*
* Copyright (c) 2009-2013 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
MathJax.OutputJax["HTML-CSS"].defineImageData({
"MathJax_AMS": {
0x2201: [ // COMPLEMENT
[3,6,0],[4,7,0],[5,9,0],[6,11,1],[7,13,1],[8,16,1],[9,18,1],[11,21,1],
[13,25,1],[15,29,1],[18,35,1],[21,41,1],[25,49,2],[30,58,2]
],
0x2204: [ // THERE DOES NOT EXIST
[4,8,2],[4,10,2],[5,11,2],[6,12,2],[7,15,3],[9,18,3],[10,22,4],[12,24,4],
[14,29,5],[17,35,6],[20,41,7],[24,48,8],[28,57,9],[33,68,11]
],
0x2205: [ // EMPTY SET
[5,4,0],[6,5,0],[8,6,0],[9,7,0],[11,8,0],[12,10,0],[14,12,0],[17,15,1],
[20,18,1],[24,21,1],[29,24,1],[34,29,1],[40,34,1],[48,40,1]
],
0x220D: [ // SMALL CONTAINS AS MEMBER
[3,4,0],[4,5,1],[5,6,1],[6,7,1],[7,8,1],[8,9,1],[9,10,1],[11,12,1],
[13,14,1],[16,16,1],[18,19,1],[22,22,1],[26,26,1],[31,30,1]
],
0x2212: [ // MINUS SIGN
[3,1,-1],[4,1,-2],[5,1,-2],[5,1,-2],[6,1,-3],[7,1,-4],[9,2,-4],[10,2,-5],
[12,2,-6],[14,2,-7],[17,2,-9],[20,3,-10],[23,3,-12],[28,3,-15]
],
0x2214: [ // DOT PLUS
[5,7,1],[6,8,1],[8,9,1],[9,11,2],[10,13,2],[12,15,2],[14,17,2],[17,21,3],
[20,25,3],[24,30,4],[28,34,4],[34,41,5],[40,49,6],[48,58,7]
],
0x2216: [ // SET MINUS
[5,4,1],[6,5,1],[7,6,1],[9,7,1],[10,7,1],[12,9,1],[14,10,1],[16,11,1],
[19,13,1],[23,16,1],[27,18,1],[32,22,2],[38,26,2],[46,31,2]
],
0x221D: [ // PROPORTIONAL TO
[5,4,0],[7,4,0],[7,5,0],[9,6,0],[11,7,0],[13,8,0],[15,9,0],[17,11,0],
[21,14,0],[24,16,0],[29,18,-1],[34,21,-1],[40,26,-1],[48,31,-1]
],
0x2220: [ // ANGLE
[5,5,0],[6,6,0],[7,7,0],[8,9,0],[10,10,0],[12,12,0],[13,14,0],[16,17,0],
[19,20,0],[22,23,0],[27,28,0],[31,33,0],[37,39,0],[44,46,0]
],
0x2221: [ // MEASURED ANGLE
[5,6,1],[6,7,1],[7,8,1],[8,10,1],[10,11,1],[12,13,1],[14,15,1],[16,18,1],
[19,21,1],[23,25,1],[27,29,1],[32,35,1],[38,42,2],[45,49,2]
],
0x2222: [ // SPHERICAL ANGLE
[5,5,1],[6,6,1],[7,7,1],[8,8,1],[10,9,1],[12,11,1],[13,12,1],[16,15,2],
[19,18,2],[22,21,2],[27,24,2],[31,29,3],[37,34,3],[44,41,4]
],
0x2223: [ // DIVIDES
[1,4,1],[1,5,1],[2,6,1],[2,7,1],[2,7,1],[2,9,1],[3,10,1],[4,11,1],
[4,13,1],[5,16,1],[6,18,1],[7,22,2],[8,26,2],[9,31,2]
],
0x2224: [ // DOES NOT DIVIDE
[3,8,2],[4,10,3],[4,11,3],[5,12,3],[5,15,4],[7,18,5],[7,20,5],[9,24,6],
[10,28,7],[11,34,9],[14,40,10],[16,47,12],[19,56,14],[22,67,17]
],
0x2225: [ // PARALLEL TO
[3,4,1],[3,5,1],[4,6,1],[4,7,1],[5,7,1],[6,9,1],[7,10,1],[8,11,1],
[10,13,1],[11,16,1],[13,18,1],[16,23,2],[19,26,2],[22,31,2]
],
0x2226: [ // NOT PARALLEL TO
[5,8,2],[6,10,3],[7,11,3],[8,12,3],[9,15,4],[10,18,5],[11,20,5],[14,24,6],
[16,28,7],[18,34,9],[22,40,10],[26,47,12],[31,56,14],[36,67,17]
],
0x2234: [ // THEREFORE
[5,5,1],[6,5,1],[7,6,1],[8,7,1],[9,9,2],[11,10,2],[13,12,2],[15,13,2],
[18,17,3],[22,19,3],[26,23,4],[30,26,4],[36,32,5],[43,37,6]
],
0x2235: [ // BECAUSE
[5,5,1],[6,5,1],[7,6,1],[8,7,1],[9,9,2],[11,10,2],[13,12,2],[15,13,2],
[18,17,3],[22,19,3],[26,23,4],[30,26,4],[36,32,5],[43,37,6]
],
0x223C: [ // TILDE OPERATOR
[5,2,-1],[6,2,-1],[8,3,-1],[9,4,-1],[10,5,-1],[13,5,-2],[15,6,-2],[17,6,-3],
[20,8,-3],[24,9,-4],[29,10,-5],[34,11,-6],[40,14,-7],[48,17,-8]
],
0x223D: [ // REVERSED TILDE
[5,2,-1],[6,3,-1],[8,3,-1],[9,4,-1],[10,4,-2],[12,5,-2],[15,6,-2],[17,6,-3],
[20,8,-3],[24,9,-4],[29,10,-5],[34,12,-6],[40,14,-7],[48,17,-8]
],
0x2241: [ // stix-not, vert, similar
[5,4,0],[6,4,0],[8,5,0],[9,6,0],[10,7,0],[13,8,0],[15,10,0],[17,11,0],
[20,13,0],[24,15,-1],[29,18,-1],[34,21,-1],[40,25,-1],[48,29,-2]
],
0x2242: [ // MINUS TILDE
[5,4,0],[6,4,0],[8,5,0],[9,6,0],[10,7,0],[12,8,0],[15,9,0],[17,11,0],
[20,13,0],[24,15,-1],[29,18,-1],[34,21,-1],[40,25,-1],[48,29,-2]
],
0x2246: [ // APPROXIMATELY BUT NOT ACTUALLY EQUAL TO
[5,7,2],[6,8,2],[8,9,2],[9,10,2],[10,12,3],[13,14,3],[15,17,4],[17,20,4],
[20,23,5],[24,28,6],[29,33,7],[34,39,8],[40,46,9],[48,54,11]
],
0x2248: [ // ALMOST EQUAL TO
[5,4,0],[6,4,0],[8,5,0],[9,6,0],[11,7,0],[13,8,0],[15,10,0],[17,11,-1],
[21,13,-1],[24,15,-1],[29,18,-1],[34,21,-2],[40,25,-2],[48,29,-3]
],
0x224A: [ // ALMOST EQUAL OR EQUAL TO
[5,5,1],[7,6,1],[8,7,1],[9,8,1],[11,9,1],[13,11,1],[15,13,1],[17,15,1],
[21,18,2],[24,22,2],[29,25,2],[34,29,2],[41,36,3],[48,42,3]
],
0x224E: [ // GEOMETRICALLY EQUIVALENT TO
[5,4,0],[6,4,0],[8,5,0],[9,6,0],[10,7,0],[12,8,0],[14,10,0],[17,12,0],
[20,14,0],[24,17,0],[29,20,0],[34,23,0],[40,28,0],[48,33,0]
],
0x224F: [ // DIFFERENCE BETWEEN
[5,3,-1],[6,3,-1],[8,4,-1],[9,5,-1],[10,5,-2],[12,6,-2],[14,8,-2],[17,9,-3],
[20,11,-3],[24,13,-4],[29,15,-5],[34,17,-6],[40,21,-7],[48,25,-8]
],
0x2251: [ // GEOMETRICALLY EQUAL TO
[5,6,1],[6,7,1],[8,8,2],[9,10,2],[10,11,2],[12,13,2],[15,15,3],[17,18,3],
[20,20,3],[24,25,4],[29,29,5],[34,34,5],[40,40,6],[48,49,8]
],
0x2252: [ // APPROXIMATELY EQUAL TO OR THE IMAGE OF
[6,5,1],[7,6,1],[8,7,1],[9,10,2],[11,11,2],[13,12,2],[15,14,2],[18,17,3],
[22,20,3],[25,24,4],[30,28,4],[36,33,5],[43,40,6],[51,47,7]
],
0x2253: [ // IMAGE OF OR APPROXIMATELY EQUAL TO
[6,5,1],[7,6,1],[8,7,1],[9,10,2],[11,11,2],[13,12,2],[15,14,2],[18,17,3],
[22,20,3],[25,24,4],[30,28,4],[36,33,5],[43,40,6],[51,47,7]
],
0x2256: [ // RING IN EQUAL TO
[5,2,-1],[6,2,-1],[8,3,-1],[9,4,-1],[10,3,-2],[12,4,-2],[15,5,-2],[17,6,-3],
[20,8,-3],[24,9,-4],[29,10,-5],[34,11,-6],[40,14,-7],[48,17,-8]
],
0x2257: [ // RING EQUAL TO
[5,4,-1],[6,5,-1],[8,6,-1],[9,8,-1],[10,8,-2],[12,10,-2],[15,12,-2],[17,14,-3],
[20,17,-3],[24,20,-4],[29,24,-5],[34,28,-6],[40,33,-7],[48,40,-8]
],
0x225C: [ // DELTA EQUAL TO
[5,5,-1],[6,7,-1],[8,8,-1],[9,9,-1],[10,10,-2],[12,13,-2],[15,15,-2],[17,17,-3],
[20,21,-3],[24,25,-4],[29,29,-5],[34,34,-6],[40,41,-7],[48,49,-8]
],
0x2266: [ // LESS-THAN OVER EQUAL TO
[5,8,2],[6,9,2],[8,10,2],[9,11,2],[10,14,3],[12,16,3],[15,19,4],[17,22,4],
[20,26,5],[24,31,6],[28,37,7],[34,44,9],[40,52,10],[48,62,12]
],
0x2267: [ // GREATER-THAN OVER EQUAL TO
[5,8,2],[6,9,2],[7,10,2],[9,11,2],[10,14,3],[12,16,3],[14,19,4],[17,22,4],
[20,26,5],[23,31,6],[28,37,7],[33,44,9],[39,52,10],[46,62,12]
],
0x2268: [ // stix-less, vert, not double equals
[5,8,2],[6,10,3],[7,11,3],[9,13,4],[10,15,4],[12,18,5],[14,21,6],[17,25,7],
[20,29,8],[23,35,10],[28,42,12],[33,49,14],[39,58,16],[46,69,19]
],
0x2269: [ // stix-gt, vert, not double equals
[5,8,2],[6,10,3],[7,11,3],[9,13,4],[10,15,4],[12,18,5],[14,21,6],[17,25,7],
[20,29,8],[23,35,10],[28,42,12],[33,49,14],[39,58,16],[46,69,19]
],
0x226C: [ // BETWEEN
[3,8,2],[4,10,3],[5,11,3],[5,12,3],[6,15,4],[8,18,5],[9,20,5],[10,24,6],
[12,28,7],[14,34,9],[17,40,10],[20,47,12],[24,56,14],[28,67,17]
],
0x226E: [ // stix-not, vert, less-than
[5,8,2],[6,9,2],[7,10,3],[9,12,3],[10,14,4],[12,16,4],[14,19,5],[17,22,5],
[20,26,6],[23,31,7],[28,37,9],[33,43,10],[39,52,12],[46,61,14]
],
0x226F: [ // stix-not, vert, greater-than
[5,8,2],[6,9,2],[7,10,3],[9,12,3],[10,14,4],[12,16,4],[14,19,5],[17,22,5],
[20,26,6],[23,31,7],[28,37,9],[33,43,10],[39,52,12],[46,61,14]
],
0x2270: [ // stix-not, vert, less-than-or-equal
[5,9,3],[6,10,3],[7,11,3],[9,14,4],[10,17,5],[12,20,6],[14,22,6],[17,26,7],
[20,32,9],[24,38,11],[28,44,12],[33,53,15],[39,62,17],[46,74,21]
],
0x2271: [ // stix-not, vert, greater-than-or-equal
[5,9,3],[6,10,3],[7,11,3],[9,14,4],[10,17,5],[12,20,6],[14,22,6],[17,26,7],
[20,32,9],[23,38,11],[28,44,12],[33,53,15],[39,62,17],[46,74,21]
],
0x2272: [ // stix-less-than or (contour) similar
[5,8,2],[6,9,2],[7,11,3],[9,12,3],[10,14,3],[12,17,4],[14,20,5],[17,23,6],
[20,28,7],[24,33,8],[29,38,9],[34,45,11],[40,54,13],[48,64,15]
],
0x2273: [ // stix-greater-than or (contour) similar
[5,8,2],[6,9,2],[7,10,2],[9,12,3],[10,14,3],[12,17,4],[14,20,5],[17,23,6],
[20,28,7],[24,33,8],[29,38,9],[34,45,11],[40,54,13],[48,64,15]
],
0x2276: [ // LESS-THAN OR GREATER-THAN
[6,7,2],[7,9,3],[8,10,3],[9,11,3],[11,14,4],[13,17,5],[15,19,5],[18,22,6],
[21,26,7],[25,32,9],[29,37,10],[35,44,12],[41,52,14],[49,62,17]
],
0x2277: [ // GREATER-THAN OR LESS-THAN
[5,7,2],[6,9,3],[7,10,3],[9,11,3],[10,14,4],[12,17,5],[14,19,5],[17,22,6],
[20,26,7],[23,32,9],[28,37,10],[33,44,12],[39,52,14],[46,62,17]
],
0x227C: [ // PRECEDES OR EQUAL TO
[5,6,2],[6,7,2],[7,8,2],[9,9,2],[10,12,3],[12,13,3],[14,15,3],[16,18,4],
[19,22,5],[23,25,5],[27,29,6],[32,34,7],[38,42,9],[46,49,10]
],
0x227D: [ // SUCCEEDS OR EQUAL TO
[5,6,2],[6,7,2],[7,8,2],[9,9,2],[10,11,3],[12,13,3],[14,16,4],[17,18,4],
[20,21,5],[23,26,6],[28,30,7],[33,35,8],[39,42,9],[46,50,11]
],
0x227E: [ // PRECEDES OR EQUIVALENT TO
[5,8,2],[6,9,2],[7,11,3],[9,12,3],[10,14,3],[12,17,4],[14,20,5],[17,23,6],
[20,28,7],[24,33,8],[29,38,9],[34,45,11],[40,54,13],[48,64,15]
],
0x227F: [ // SUCCEEDS OR EQUIVALENT TO
[5,8,2],[6,9,2],[7,11,3],[9,12,3],[10,14,3],[12,17,4],[14,20,5],[17,23,6],
[20,28,7],[24,33,8],[29,38,9],[34,45,11],[40,54,13],[48,65,16]
],
0x2280: [ // DOES NOT PRECEDE
[5,8,2],[6,9,2],[7,10,3],[9,12,3],[10,13,3],[12,16,4],[14,19,5],[17,22,5],
[20,26,6],[23,31,7],[28,37,9],[33,43,10],[39,52,12],[46,61,14]
],
0x2281: [ // stix-not (vert) succeeds
[5,7,2],[6,8,2],[7,10,3],[9,12,3],[10,14,4],[12,16,4],[14,19,5],[17,22,5],
[20,26,6],[23,31,7],[28,37,9],[33,43,10],[39,51,12],[46,61,14]
],
0x2288: [ // stix-/nsubseteq N: not (vert) subset, equals
[5,9,3],[6,10,3],[7,12,3],[9,14,4],[10,17,5],[12,20,6],[14,22,6],[17,26,7],
[20,32,9],[23,38,11],[28,44,12],[33,53,15],[39,62,17],[46,74,21]
],
0x2289: [ // stix-/nsupseteq N: not (vert) superset, equals
[5,9,3],[6,10,3],[7,11,3],[8,14,4],[10,17,5],[12,19,6],[14,22,6],[17,26,7],
[20,32,9],[23,37,11],[28,44,12],[33,53,15],[39,62,17],[46,73,20]
],
0x228A: [ // stix-subset, not equals, variant
[5,7,2],[6,8,2],[7,10,3],[9,11,3],[10,13,4],[12,16,5],[14,18,5],[17,21,6],
[20,25,7],[23,31,9],[28,36,10],[33,42,12],[39,50,14],[46,59,17]
],
0x228B: [ // stix-superset, not equals, variant
[5,7,2],[6,8,2],[7,10,3],[8,11,3],[10,13,4],[12,16,5],[14,18,5],[17,21,6],
[20,25,7],[23,30,9],[28,35,10],[33,42,12],[39,50,14],[46,59,17]
],
0x228F: [ // SQUARE IMAGE OF
[5,5,1],[6,6,1],[7,7,1],[9,8,1],[10,9,1],[12,10,1],[14,12,1],[17,14,1],
[19,17,2],[23,20,2],[28,24,2],[33,28,2],[39,33,3],[46,39,3]
],
0x2290: [ // SQUARE ORIGINAL OF
[5,5,1],[6,6,1],[7,7,1],[9,8,1],[10,9,1],[12,10,1],[14,12,1],[17,14,1],
[20,17,2],[24,20,2],[28,24,2],[34,28,2],[40,33,3],[47,39,3]
],
0x229A: [ // CIRCLED RING OPERATOR
[5,6,1],[6,6,1],[7,7,1],[9,8,1],[10,10,1],[12,12,2],[14,14,2],[17,16,2],
[20,20,3],[24,23,3],[29,27,4],[34,31,4],[40,38,5],[48,45,6]
],
0x229B: [ // CIRCLED ASTERISK OPERATOR
[5,6,1],[6,6,1],[7,7,1],[9,8,1],[10,10,1],[12,12,2],[14,14,2],[17,16,2],
[20,20,3],[24,23,3],[29,27,4],[34,31,4],[40,38,5],[48,45,6]
],
0x229D: [ // CIRCLED DASH
[5,6,1],[6,6,1],[7,7,1],[9,8,1],[10,10,1],[12,12,2],[14,14,2],[17,16,2],
[20,20,3],[24,23,3],[29,27,4],[34,31,4],[40,38,5],[48,45,6]
],
0x229E: [ // SQUARED PLUS
[5,5,0],[6,6,0],[8,7,0],[9,8,0],[11,10,0],[13,12,0],[15,14,0],[17,16,0],
[20,20,0],[24,23,0],[29,27,0],[34,32,0],[41,39,0],[48,46,0]
],
0x229F: [ // SQUARED MINUS
[5,5,0],[6,6,0],[7,7,0],[9,8,0],[10,10,0],[12,12,0],[14,14,0],[17,16,0],
[21,20,0],[24,23,0],[29,27,0],[34,32,0],[40,39,0],[48,46,0]
],
0x22A0: [ // SQUARED TIMES
[5,5,0],[6,6,0],[7,7,0],[9,8,0],[10,10,0],[12,12,0],[14,14,0],[17,16,0],
[21,20,0],[24,23,0],[29,27,0],[34,32,0],[40,39,0],[48,46,0]
],
0x22A1: [ // SQUARED DOT OPERATOR
[5,5,0],[6,6,0],[7,7,0],[9,8,0],[10,10,0],[12,12,0],[14,14,0],[17,16,0],
[21,20,0],[24,23,0],[29,27,0],[34,32,0],[40,39,0],[48,46,0]
],
0x22A8: [ // TRUE
[4,5,0],[5,6,0],[6,7,0],[7,9,0],[8,10,0],[10,12,0],[11,14,0],[13,17,0],
[16,20,0],[19,23,0],[22,28,0],[26,33,0],[31,39,0],[37,46,0]
],
0x22A9: [ // FORCES
[5,5,0],[6,6,0],[7,7,0],[8,9,0],[10,10,0],[12,12,0],[14,14,0],[16,17,0],
[19,20,0],[22,23,0],[26,28,0],[31,33,0],[37,39,0],[44,46,0]
],
0x22AA: [ // TRIPLE VERTICAL BAR RIGHT TURNSTILE
[6,5,0],[7,6,0],[9,7,0],[10,9,0],[12,10,0],[14,12,0],[17,14,0],[19,17,0],
[24,20,0],[28,23,0],[33,28,0],[39,33,0],[46,39,0],[55,46,0]
],
0x22AC: [ // DOES NOT PROVE
[5,5,0],[6,7,1],[7,8,1],[8,10,1],[9,11,1],[11,13,1],[13,15,1],[15,18,1],
[18,21,1],[21,24,1],[25,29,1],[30,34,1],[35,40,1],[41,47,1]
],
0x22AD: [ // NOT TRUE
[5,5,0],[6,7,1],[7,8,1],[8,10,1],[9,11,1],[11,13,1],[13,15,1],[15,18,1],
[18,21,1],[21,24,1],[25,29,1],[29,34,1],[35,40,1],[41,47,1]
],
0x22AE: [ // DOES NOT FORCE
[6,5,0],[7,7,1],[8,8,1],[9,10,1],[11,11,1],[13,13,1],[15,15,1],[18,18,1],
[21,21,1],[24,24,1],[29,29,1],[35,34,1],[41,40,1],[48,47,1]
],
0x22AF: [ // NEGATED DOUBLE VERTICAL BAR DOUBLE RIGHT TURNSTILE
[6,5,0],[7,7,1],[8,8,1],[9,10,1],[11,11,1],[13,13,1],[16,15,1],[18,18,1],
[21,21,1],[24,24,1],[30,29,1],[35,34,1],[41,40,1],[49,47,1]
],
0x22B2: [ // NORMAL SUBGROUP OF
[5,5,1],[6,6,1],[7,7,1],[8,8,1],[10,9,1],[12,10,1],[14,12,1],[16,14,1],
[20,17,2],[23,20,2],[28,24,2],[33,28,2],[39,33,3],[46,39,3]
],
0x22B3: [ // CONTAINS AS NORMAL SUBGROUP
[5,5,1],[6,6,1],[7,7,1],[9,8,1],[10,9,1],[12,10,1],[14,12,1],[17,14,1],
[20,17,2],[23,20,2],[28,24,2],[33,28,2],[39,33,3],[46,39,3]
],
0x22B4: [ // NORMAL SUBGROUP OF OR EQUAL TO
[5,6,1],[6,7,1],[7,9,2],[9,10,2],[10,11,2],[12,14,3],[14,16,3],[17,18,3],
[20,22,4],[23,26,5],[28,31,6],[33,37,7],[39,44,8],[46,52,10]
],
0x22B5: [ // CONTAINS AS NORMAL SUBGROUP OR EQUAL TO
[5,6,1],[6,7,1],[7,9,2],[9,10,2],[10,11,2],[12,14,3],[14,16,3],[17,18,3],
[20,22,4],[23,26,5],[28,31,6],[33,37,7],[39,44,8],[46,52,10]
],
0x22B8: [ // MULTIMAP
[8,3,0],[9,4,0],[11,3,-1],[13,4,-1],[15,5,-1],[18,6,-1],[21,6,-2],[25,8,-2],
[30,10,-2],[35,11,-3],[42,13,-3],[50,15,-4],[59,18,-5],[70,21,-6]
],
0x22BA: [ // INTERCALATE
[4,5,2],[5,6,2],[5,8,3],[6,8,3],[7,9,3],[9,12,4],[10,13,4],[12,15,5],
[14,18,6],[17,23,8],[20,26,9],[24,31,10],[28,36,12],[33,43,14]
],
0x22BB: [ // XOR
[4,5,0],[5,6,0],[6,8,0],[7,9,0],[8,10,0],[10,12,0],[11,14,0],[13,17,0],
[16,20,0],[19,24,0],[22,29,0],[26,34,0],[31,40,0],[37,48,0]
],
0x22BC: [ // NAND
[4,5,0],[5,6,0],[6,8,1],[7,9,0],[8,10,0],[10,12,0],[11,14,0],[13,17,0],
[16,20,0],[19,25,1],[22,29,0],[26,35,1],[31,41,1],[37,49,1]
],
0x22C5: [ // DOT OPERATOR
[2,2,0],[2,2,0],[3,2,0],[3,3,0],[4,3,0],[4,4,0],[5,4,0],[6,5,0],
[7,6,0],[8,7,0],[9,8,0],[11,9,0],[13,11,0],[15,13,0]
],
0x22C7: [ // DIVISION TIMES
[5,5,1],[6,6,1],[8,7,1],[9,8,1],[10,9,1],[12,11,1],[15,12,1],[17,15,2],
[20,18,2],[24,20,2],[29,24,2],[34,29,3],[40,34,3],[48,39,3]
],
0x22C9: [ // LEFT NORMAL FACTOR SEMIDIRECT PRODUCT
[5,4,0],[6,5,0],[7,5,0],[8,6,0],[9,7,0],[11,9,0],[13,10,0],[15,12,0],
[18,14,0],[21,17,0],[25,20,0],[30,23,0],[35,28,0],[42,33,0]
],
0x22CA: [ // RIGHT NORMAL FACTOR SEMIDIRECT PRODUCT
[5,4,0],[6,5,0],[6,5,0],[8,6,0],[9,7,0],[11,9,0],[13,10,0],[15,12,0],
[18,14,0],[21,17,0],[25,20,0],[30,23,0],[35,28,0],[42,33,0]
],
0x22CB: [ // LEFT SEMIDIRECT PRODUCT
[5,6,1],[6,7,1],[8,8,1],[9,10,1],[10,11,1],[12,13,1],[15,15,1],[17,18,1],
[20,21,1],[24,24,1],[29,29,1],[34,35,2],[40,41,2],[48,48,2]
],
0x22CC: [ // RIGHT SEMIDIRECT PRODUCT
[5,6,1],[6,7,1],[8,8,1],[9,10,1],[10,11,1],[12,13,1],[14,15,1],[17,18,1],
[20,21,1],[24,24,1],[29,29,1],[34,35,2],[40,41,2],[48,48,2]
],
0x22CD: [ // REVERSED TILDE EQUALS
[5,4,0],[6,4,0],[8,5,0],[9,6,0],[10,7,0],[12,8,0],[15,10,0],[17,10,-1],
[20,12,-1],[24,15,-1],[29,18,-1],[34,21,-1],[40,25,-1],[48,29,-2]
],
0x22CE: [ // CURLY LOGICAL OR
[5,5,1],[6,6,1],[7,7,1],[8,8,1],[10,10,1],[12,11,1],[14,13,1],[16,15,1],
[19,17,1],[23,20,1],[27,24,1],[32,28,1],[38,34,2],[45,41,2]
],
0x22CF: [ // CURLY LOGICAL AND
[5,5,1],[6,6,1],[7,7,1],[8,8,1],[10,9,1],[12,11,1],[14,13,1],[16,15,1],
[19,17,1],[23,20,1],[27,24,1],[32,29,2],[38,34,2],[45,40,2]
],
0x22D0: [ // DOUBLE SUBSET
[5,5,1],[6,6,1],[7,7,1],[8,8,1],[10,9,1],[12,10,1],[14,12,1],[16,14,1],
[19,17,2],[23,20,2],[27,23,2],[33,27,2],[39,33,3],[46,39,3]
],
0x22D1: [ // DOUBLE SUPERSET
[5,5,1],[6,6,1],[7,7,1],[8,8,1],[10,9,1],[12,10,1],[14,12,1],[17,14,1],
[20,17,2],[23,20,2],[28,24,2],[33,28,2],[39,33,3],[46,39,3]
],
0x22D2: [ // DOUBLE INTERSECTION
[5,5,1],[5,6,1],[6,7,1],[7,8,1],[9,10,1],[10,11,1],[12,13,1],[14,15,1],
[17,18,1],[21,21,1],[24,25,1],[29,30,2],[34,36,2],[41,42,2]
],
0x22D3: [ // DOUBLE UNION
[5,5,1],[6,6,1],[6,7,1],[8,8,1],[9,10,1],[11,11,1],[12,13,1],[14,15,1],
[18,18,1],[21,21,1],[24,25,1],[29,29,1],[34,36,2],[41,42,2]
],
0x22D4: [ // PITCHFORK
[5,7,1],[6,8,1],[6,9,1],[8,10,1],[9,12,1],[11,14,1],[12,16,1],[15,19,1],
[18,22,1],[21,26,1],[24,30,1],[29,37,2],[34,43,2],[41,51,2]
],
0x22D6: [ // LESS-THAN WITH DOT
[5,5,1],[6,6,1],[7,7,1],[9,8,1],[10,9,1],[12,10,1],[14,12,1],[17,14,1],
[20,17,2],[23,20,2],[28,24,2],[33,28,2],[39,33,3],[46,39,3]
],
0x22D7: [ // GREATER-THAN WITH DOT
[5,5,1],[6,6,1],[7,7,1],[9,8,1],[10,9,1],[12,10,1],[14,12,1],[17,14,1],
[20,17,2],[23,20,2],[27,24,2],[33,28,2],[39,33,3],[46,39,3]
],
0x22D8: [ // VERY MUCH LESS-THAN
[9,5,1],[11,6,1],[13,7,1],[15,8,1],[18,9,1],[22,12,2],[25,14,2],[30,16,2],
[36,18,2],[42,22,3],[50,26,3],[60,31,4],[71,36,4],[84,43,5]
],
0x22D9: [ // VERY MUCH GREATER-THAN
[9,5,1],[11,6,1],[13,7,1],[16,8,1],[18,9,1],[22,12,2],[25,14,2],[30,16,2],
[36,18,2],[43,22,3],[51,26,3],[60,31,4],[71,36,4],[85,43,5]
],
0x22DA: [ // stix-less, equal, slanted, greater
[5,10,3],[6,12,4],[7,13,4],[8,16,5],[10,19,6],[12,22,7],[14,26,8],[16,30,9],
[19,36,11],[23,43,13],[27,50,15],[32,60,18],[38,71,22],[45,85,26]
],
0x22DB: [ // stix-greater, equal, slanted, less
[5,10,3],[6,12,4],[7,13,4],[8,16,5],[10,19,6],[12,22,7],[14,26,8],[16,30,9],
[19,36,11],[23,43,13],[27,51,16],[32,60,18],[38,71,22],[45,85,26]
],
0x22DE: [ // EQUAL TO OR PRECEDES
[5,7,1],[6,8,1],[7,9,1],[9,10,1],[10,12,1],[12,14,1],[14,16,1],[17,18,1],
[20,22,1],[23,26,1],[28,30,1],[33,35,1],[39,42,1],[46,50,1]
],
0x22DF: [ // EQUAL TO OR SUCCEEDS
[5,6,0],[6,7,0],[7,8,0],[9,9,0],[10,11,0],[12,13,0],[14,15,0],[17,18,0],
[20,21,0],[23,25,0],[28,29,0],[33,35,0],[39,41,0],[46,49,0]
],
0x22E0: [ // stix-not (vert) precedes or contour equals
[5,9,3],[6,10,3],[7,11,3],[9,14,4],[10,17,5],[12,20,6],[14,22,6],[17,27,7],
[20,32,9],[23,38,11],[28,44,12],[33,53,15],[39,62,17],[46,74,21]
],
0x22E1: [ // stix-not (vert) succeeds or contour equals
[5,9,3],[6,10,3],[7,11,3],[9,14,4],[10,17,5],[12,20,6],[14,22,6],[17,26,7],
[20,32,9],[23,38,11],[28,44,12],[33,53,15],[39,62,17],[46,74,21]
],
0x22E6: [ // LESS-THAN BUT NOT EQUIVALENT TO
[5,9,3],[6,10,3],[8,12,4],[9,14,5],[10,16,5],[13,19,6],[15,22,7],[17,26,9],
[20,31,10],[24,37,12],[29,44,15],[34,51,17],[40,61,20],[48,73,24]
],
0x22E7: [ // GREATER-THAN BUT NOT EQUIVALENT TO
[5,9,3],[6,10,3],[8,12,4],[9,14,5],[10,16,5],[13,19,6],[15,22,7],[17,26,9],
[20,31,10],[24,37,12],[29,44,15],[34,51,17],[40,61,20],[48,73,24]
],
0x22E8: [ // PRECEDES BUT NOT EQUIVALENT TO
[5,9,3],[6,10,3],[8,12,4],[9,14,5],[10,16,5],[13,19,6],[15,22,7],[17,26,9],
[20,31,10],[24,37,12],[29,43,14],[34,51,17],[40,61,20],[48,73,24]
],
0x22E9: [ // SUCCEEDS BUT NOT EQUIVALENT TO
[5,9,3],[6,10,3],[8,12,4],[9,14,5],[10,16,5],[13,19,6],[15,23,8],[17,26,9],
[20,31,10],[24,37,12],[29,44,15],[34,51,17],[40,62,21],[48,73,24]
],
0x22EA: [ // NOT NORMAL SUBGROUP OF
[5,8,2],[6,9,2],[7,10,3],[8,12,3],[10,14,4],[12,16,4],[14,19,5],[17,22,5],
[20,26,6],[23,31,7],[28,37,9],[33,43,10],[39,52,12],[46,61,14]
],
0x22EB: [ // DOES NOT CONTAIN AS NORMAL SUBGROUP
[5,8,2],[6,9,2],[7,10,3],[9,12,3],[10,14,4],[12,16,4],[14,19,5],[17,22,5],
[19,26,6],[23,31,7],[27,37,9],[33,43,10],[39,52,12],[46,61,14]
],
0x22EC: [ // stix-not, vert, left triangle, equals
[5,9,3],[6,10,3],[7,11,3],[9,14,4],[10,17,5],[12,20,6],[14,22,6],[17,26,7],
[20,32,9],[23,38,11],[28,44,12],[33,53,15],[39,62,17],[46,74,21]
],
0x22ED: [ // stix-not, vert, right triangle, equals
[5,9,3],[6,10,3],[8,11,3],[9,14,4],[10,17,5],[12,20,6],[14,22,6],[17,26,7],
[20,32,9],[23,38,11],[28,44,12],[33,53,15],[39,62,17],[46,74,21]
]
}
});
MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].imgDir+"/AMS/Regular"+
MathJax.OutputJax["HTML-CSS"].imgPacked+"/MathOperators.js");
| chrisdavies/cdnjs | ajax/libs/mathjax/2.3.0/fonts/HTML-CSS/TeX/png/AMS/Regular/unpacked/MathOperators.js | JavaScript | mit | 22,900 |
/*!
* Connect - session - Store
* Copyright(c) 2010 Sencha Inc.
* Copyright(c) 2011 TJ Holowaychuk
* MIT Licensed
*/
/**
* Module dependencies.
*/
var EventEmitter = require('events').EventEmitter
, Session = require('./session')
, Cookie = require('./cookie');
/**
* Initialize abstract `Store`.
*
* @api private
*/
var Store = module.exports = function Store(options){};
/**
* Inherit from `EventEmitter.prototype`.
*/
Store.prototype.__proto__ = EventEmitter.prototype;
/**
* Re-generate the given requests's session.
*
* @param {IncomingRequest} req
* @return {Function} fn
* @api public
*/
Store.prototype.regenerate = function(req, fn){
var self = this;
this.destroy(req.sessionID, function(err){
self.generate(req);
fn(err);
});
};
/**
* Load a `Session` instance via the given `sid`
* and invoke the callback `fn(err, sess)`.
*
* @param {String} sid
* @param {Function} fn
* @api public
*/
Store.prototype.load = function(sid, fn){
var self = this;
this.get(sid, function(err, sess){
if (err) return fn(err);
if (!sess) return fn();
var req = { sessionID: sid, sessionStore: self };
sess = self.createSession(req, sess);
fn(null, sess);
});
};
/**
* Create session from JSON `sess` data.
*
* @param {IncomingRequest} req
* @param {Object} sess
* @return {Session}
* @api private
*/
Store.prototype.createSession = function(req, sess){
var expires = sess.cookie.expires
, orig = sess.cookie.originalMaxAge;
sess.cookie = new Cookie(sess.cookie);
if ('string' == typeof expires) sess.cookie.expires = new Date(expires);
sess.cookie.originalMaxAge = orig;
req.session = new Session(req, sess);
return req.session;
};
| NickersF/brackets | src/extensions/default/StaticServer/node/node_modules/connect/lib/middleware/session/store.js | JavaScript | mit | 1,728 |
YUI.add('widget-stack', function (Y, NAME) {
/**
* Provides stackable (z-index) support for Widgets through an extension.
*
* @module widget-stack
*/
var L = Y.Lang,
UA = Y.UA,
Node = Y.Node,
Widget = Y.Widget,
ZINDEX = "zIndex",
SHIM = "shim",
VISIBLE = "visible",
BOUNDING_BOX = "boundingBox",
RENDER_UI = "renderUI",
BIND_UI = "bindUI",
SYNC_UI = "syncUI",
OFFSET_WIDTH = "offsetWidth",
OFFSET_HEIGHT = "offsetHeight",
PARENT_NODE = "parentNode",
FIRST_CHILD = "firstChild",
OWNER_DOCUMENT = "ownerDocument",
WIDTH = "width",
HEIGHT = "height",
PX = "px",
// HANDLE KEYS
SHIM_DEFERRED = "shimdeferred",
SHIM_RESIZE = "shimresize",
// Events
VisibleChange = "visibleChange",
WidthChange = "widthChange",
HeightChange = "heightChange",
ShimChange = "shimChange",
ZIndexChange = "zIndexChange",
ContentUpdate = "contentUpdate",
// CSS
STACKED = "stacked";
/**
* Widget extension, which can be used to add stackable (z-index) support to the
* base Widget class along with a shimming solution, through the
* <a href="Base.html#method_build">Base.build</a> method.
*
* @class WidgetStack
* @param {Object} User configuration object
*/
function Stack(config) {
this._stackNode = this.get(BOUNDING_BOX);
this._stackHandles = {};
// WIDGET METHOD OVERLAP
Y.after(this._renderUIStack, this, RENDER_UI);
Y.after(this._syncUIStack, this, SYNC_UI);
Y.after(this._bindUIStack, this, BIND_UI);
}
// Static Properties
/**
* Static property used to define the default attribute
* configuration introduced by WidgetStack.
*
* @property ATTRS
* @type Object
* @static
*/
Stack.ATTRS = {
/**
* @attribute shim
* @type boolean
* @default false, for all browsers other than IE6, for which a shim is enabled by default.
*
* @description Boolean flag to indicate whether or not a shim should be added to the Widgets
* boundingBox, to protect it from select box bleedthrough.
*/
shim: {
value: (UA.ie == 6)
},
/**
* @attribute zIndex
* @type number
* @default 0
* @description The z-index to apply to the Widgets boundingBox. Non-numerical values for
* zIndex will be converted to 0
*/
zIndex: {
value : 0,
setter: '_setZIndex'
}
};
/**
* The HTML parsing rules for the WidgetStack class.
*
* @property HTML_PARSER
* @static
* @type Object
*/
Stack.HTML_PARSER = {
zIndex: function (srcNode) {
return this._parseZIndex(srcNode);
}
};
/**
* Default class used to mark the shim element
*
* @property SHIM_CLASS_NAME
* @type String
* @static
* @default "yui3-widget-shim"
*/
Stack.SHIM_CLASS_NAME = Widget.getClassName(SHIM);
/**
* Default class used to mark the boundingBox of a stacked widget.
*
* @property STACKED_CLASS_NAME
* @type String
* @static
* @default "yui3-widget-stacked"
*/
Stack.STACKED_CLASS_NAME = Widget.getClassName(STACKED);
/**
* Default markup template used to generate the shim element.
*
* @property SHIM_TEMPLATE
* @type String
* @static
*/
Stack.SHIM_TEMPLATE = '<iframe class="' + Stack.SHIM_CLASS_NAME + '" frameborder="0" title="Widget Stacking Shim" src="javascript:false" tabindex="-1" role="presentation"></iframe>';
Stack.prototype = {
/**
* Synchronizes the UI to match the Widgets stack state. This method in
* invoked after syncUI is invoked for the Widget class using YUI's aop infrastructure.
*
* @method _syncUIStack
* @protected
*/
_syncUIStack: function() {
this._uiSetShim(this.get(SHIM));
this._uiSetZIndex(this.get(ZINDEX));
},
/**
* Binds event listeners responsible for updating the UI state in response to
* Widget stack related state changes.
* <p>
* This method is invoked after bindUI is invoked for the Widget class
* using YUI's aop infrastructure.
* </p>
* @method _bindUIStack
* @protected
*/
_bindUIStack: function() {
this.after(ShimChange, this._afterShimChange);
this.after(ZIndexChange, this._afterZIndexChange);
},
/**
* Creates/Initializes the DOM to support stackability.
* <p>
* This method in invoked after renderUI is invoked for the Widget class
* using YUI's aop infrastructure.
* </p>
* @method _renderUIStack
* @protected
*/
_renderUIStack: function() {
this._stackNode.addClass(Stack.STACKED_CLASS_NAME);
},
/**
Parses a `zIndex` attribute value from this widget's `srcNode`.
@method _parseZIndex
@param {Node} srcNode The node to parse a `zIndex` value from.
@return {Mixed} The parsed `zIndex` value.
@protected
**/
_parseZIndex: function (srcNode) {
var zIndex;
// Prefers how WebKit handles `z-index` which better matches the
// spec:
//
// * http://www.w3.org/TR/CSS2/visuren.html#z-index
// * https://bugs.webkit.org/show_bug.cgi?id=15562
//
// When a node isn't rendered in the document, and/or when a
// node is not positioned, then it doesn't have a context to derive
// a valid `z-index` value from.
if (!srcNode.inDoc() || srcNode.getStyle('position') === 'static') {
zIndex = 'auto';
} else {
// Uses `getComputedStyle()` because it has greater accuracy in
// more browsers than `getStyle()` does for `z-index`.
zIndex = srcNode.getComputedStyle('zIndex');
}
// This extension adds a stacking context to widgets, therefore a
// `srcNode` witout a stacking context (i.e. "auto") will return
// `null` from this DOM parser. This way the widget's default or
// user provided value for `zIndex` will be used.
return zIndex === 'auto' ? null : zIndex;
},
/**
* Default setter for zIndex attribute changes. Normalizes zIndex values to
* numbers, converting non-numerical values to 0.
*
* @method _setZIndex
* @protected
* @param {String | Number} zIndex
* @return {Number} Normalized zIndex
*/
_setZIndex: function(zIndex) {
if (L.isString(zIndex)) {
zIndex = parseInt(zIndex, 10);
}
if (!L.isNumber(zIndex)) {
zIndex = 0;
}
return zIndex;
},
/**
* Default attribute change listener for the shim attribute, responsible
* for updating the UI, in response to attribute changes.
*
* @method _afterShimChange
* @protected
* @param {EventFacade} e The event facade for the attribute change
*/
_afterShimChange : function(e) {
this._uiSetShim(e.newVal);
},
/**
* Default attribute change listener for the zIndex attribute, responsible
* for updating the UI, in response to attribute changes.
*
* @method _afterZIndexChange
* @protected
* @param {EventFacade} e The event facade for the attribute change
*/
_afterZIndexChange : function(e) {
this._uiSetZIndex(e.newVal);
},
/**
* Updates the UI to reflect the zIndex value passed in.
*
* @method _uiSetZIndex
* @protected
* @param {number} zIndex The zindex to be reflected in the UI
*/
_uiSetZIndex: function (zIndex) {
this._stackNode.setStyle(ZINDEX, zIndex);
},
/**
* Updates the UI to enable/disable the shim. If the widget is not currently visible,
* creation of the shim is deferred until it is made visible, for performance reasons.
*
* @method _uiSetShim
* @protected
* @param {boolean} enable If true, creates/renders the shim, if false, removes it.
*/
_uiSetShim: function (enable) {
if (enable) {
// Lazy creation
if (this.get(VISIBLE)) {
this._renderShim();
} else {
this._renderShimDeferred();
}
// Eagerly attach resize handlers
//
// Required because of Event stack behavior, commit ref: cd8dddc
// Should be revisted after Ticket #2531067 is resolved.
if (UA.ie == 6) {
this._addShimResizeHandlers();
}
} else {
this._destroyShim();
}
},
/**
* Sets up change handlers for the visible attribute, to defer shim creation/rendering
* until the Widget is made visible.
*
* @method _renderShimDeferred
* @private
*/
_renderShimDeferred : function() {
this._stackHandles[SHIM_DEFERRED] = this._stackHandles[SHIM_DEFERRED] || [];
var handles = this._stackHandles[SHIM_DEFERRED],
createBeforeVisible = function(e) {
if (e.newVal) {
this._renderShim();
}
};
handles.push(this.on(VisibleChange, createBeforeVisible));
// Depending how how Ticket #2531067 is resolved, a reversal of
// commit ref: cd8dddc could lead to a more elagent solution, with
// the addition of this line here:
//
// handles.push(this.after(VisibleChange, this.sizeShim));
},
/**
* Sets up event listeners to resize the shim when the size of the Widget changes.
* <p>
* NOTE: This method is only used for IE6 currently, since IE6 doesn't support a way to
* resize the shim purely through CSS, when the Widget does not have an explicit width/height
* set.
* </p>
* @method _addShimResizeHandlers
* @private
*/
_addShimResizeHandlers : function() {
this._stackHandles[SHIM_RESIZE] = this._stackHandles[SHIM_RESIZE] || [];
var sizeShim = this.sizeShim,
handles = this._stackHandles[SHIM_RESIZE];
handles.push(this.after(VisibleChange, sizeShim));
handles.push(this.after(WidthChange, sizeShim));
handles.push(this.after(HeightChange, sizeShim));
handles.push(this.after(ContentUpdate, sizeShim));
},
/**
* Detaches any handles stored for the provided key
*
* @method _detachStackHandles
* @param String handleKey The key defining the group of handles which should be detached
* @private
*/
_detachStackHandles : function(handleKey) {
var handles = this._stackHandles[handleKey],
handle;
if (handles && handles.length > 0) {
while((handle = handles.pop())) {
handle.detach();
}
}
},
/**
* Creates the shim element and adds it to the DOM
*
* @method _renderShim
* @private
*/
_renderShim : function() {
var shimEl = this._shimNode,
stackEl = this._stackNode;
if (!shimEl) {
shimEl = this._shimNode = this._getShimTemplate();
stackEl.insertBefore(shimEl, stackEl.get(FIRST_CHILD));
this._detachStackHandles(SHIM_DEFERRED);
this.sizeShim();
}
},
/**
* Removes the shim from the DOM, and detaches any related event
* listeners.
*
* @method _destroyShim
* @private
*/
_destroyShim : function() {
if (this._shimNode) {
this._shimNode.get(PARENT_NODE).removeChild(this._shimNode);
this._shimNode = null;
this._detachStackHandles(SHIM_DEFERRED);
this._detachStackHandles(SHIM_RESIZE);
}
},
/**
* For IE6, synchronizes the size and position of iframe shim to that of
* Widget bounding box which it is protecting. For all other browsers,
* this method does not do anything.
*
* @method sizeShim
*/
sizeShim: function () {
var shim = this._shimNode,
node = this._stackNode;
if (shim && UA.ie === 6 && this.get(VISIBLE)) {
shim.setStyle(WIDTH, node.get(OFFSET_WIDTH) + PX);
shim.setStyle(HEIGHT, node.get(OFFSET_HEIGHT) + PX);
}
},
/**
* Creates a cloned shim node, using the SHIM_TEMPLATE html template, for use on a new instance.
*
* @method _getShimTemplate
* @private
* @return {Node} node A new shim Node instance.
*/
_getShimTemplate : function() {
return Node.create(Stack.SHIM_TEMPLATE, this._stackNode.get(OWNER_DOCUMENT));
}
};
Y.WidgetStack = Stack;
}, '@VERSION@', {"requires": ["base-build", "widget"], "skinnable": true});
| MisatoTremor/cdnjs | ajax/libs/yui/3.8.0pr1/widget-stack/widget-stack-debug.js | JavaScript | mit | 14,123 |
YUI.add('datatable-datasource-deprecated', function(Y) {
// API Doc comments disabled to avoid deprecated class leakage into
// non-deprecated class API docs. See the 3.4.1 datatable API doc files in the
// download at http://yui.zenfs.com/releases/yui3/yui_3.4.1.zip for reference.
/**
Plugs DataTable with DataSource integration.
DEPRECATED. As of YUI 3.5.0, DataTable has been rebuilt. This module
is designed to work with `datatable-base-deprecated` (effectively the 3.4.1
version of DataTable) and will be removed from the library in a future version.
See http://yuilibrary.com/yui/docs/migration.html for help upgrading to the
latest version.
For complete API docs for the classes in this and other deprecated
DataTable-related modules, refer to the static API doc files in the 3.4.1
download at http://yui.zenfs.com/releases/yui3/yui_3.4.1.zip
@module datatable-deprecated
@submodule datatable-datasource-deprecated
@deprecated
**/
/*
* Adds DataSource integration to DataTable.
* @class DataTableDataSource
* @extends Plugin.Base
*/
function DataTableDataSource() {
DataTableDataSource.superclass.constructor.apply(this, arguments);
}
/////////////////////////////////////////////////////////////////////////////
//
// STATIC PROPERTIES
//
/////////////////////////////////////////////////////////////////////////////
Y.mix(DataTableDataSource, {
/*
* The namespace for the plugin. This will be the property on the host which
* references the plugin instance.
*
* @property NS
* @type String
* @static
* @final
* @value "datasource"
*/
NS: "datasource",
/*
* Class name.
*
* @property NAME
* @type String
* @static
* @final
* @value "dataTableDataSource"
*/
NAME: "dataTableDataSource",
/////////////////////////////////////////////////////////////////////////////
//
// ATTRIBUTES
//
/////////////////////////////////////////////////////////////////////////////
ATTRS: {
/*
* @attribute datasource
* @description Pointer to DataSource instance.
* @type {DataSource}
*/
datasource: {
setter: "_setDataSource"
},
/*
* @attribute initialRequest
* @description Request sent to DataSource immediately upon initialization.
* @type Object
*/
initialRequest: {
setter: "_setInitialRequest"
}
}
});
/////////////////////////////////////////////////////////////////////////////
//
// PROTOTYPE
//
/////////////////////////////////////////////////////////////////////////////
Y.extend(DataTableDataSource, Y.Plugin.Base, {
/////////////////////////////////////////////////////////////////////////////
//
// ATTRIBUTE HELPERS
//
/////////////////////////////////////////////////////////////////////////////
/*
* @method _setDataSource
* @description Creates new DataSource instance if one is not provided.
* @param ds {Object | Y.DataSource}
* @return {DataSource}
* @private
*/
_setDataSource: function(ds) {
return ds || new Y.DataSource.Local(ds);
},
/*
* @method _setInitialRequest
* @description Sends request to DataSource.
* @param request {Object} DataSource request.
* @private
*/
_setInitialRequest: function(request) {
},
/////////////////////////////////////////////////////////////////////////////
//
// METHODS
//
/////////////////////////////////////////////////////////////////////////////
/*
* Initializer.
*
* @method initializer
* @param config {Object} Config object.
* @private
*/
initializer: function(config) {
if(!Y.Lang.isUndefined(config.initialRequest)) {
this.load({request:config.initialRequest});
}
},
////////////////////////////////////////////////////////////////////////////
//
// DATA
//
////////////////////////////////////////////////////////////////////////////
/*
* Load data by calling DataSource's sendRequest() method under the hood.
*
* @method load
* @param config {object} Optional configuration parameters:
*
* <dl>
* <dt>request</dt><dd>Pass in a new request, or initialRequest is used.</dd>
* <dt>callback</dt><dd>Pass in DataSource callback object, or the following default is used:
* <dl>
* <dt>success</dt><dd>datatable.onDataReturnInitializeTable</dd>
* <dt>failure</dt><dd>datatable.onDataReturnInitializeTable</dd>
* <dt>scope</dt><dd>datatable</dd>
* <dt>argument</dt><dd>datatable.getState()</dd>
* </dl>
* </dd>
* <dt>datasource</dt><dd>Pass in a new DataSource instance to override the current DataSource for this transaction.</dd>
* </dl>
*/
load: function(config) {
config = config || {};
config.request = config.request || this.get("initialRequest");
config.callback = config.callback || {
success: Y.bind(this.onDataReturnInitializeTable, this),
failure: Y.bind(this.onDataReturnInitializeTable, this),
argument: this.get("host").get("state") //TODO
};
var ds = (config.datasource || this.get("datasource"));
if(ds) {
ds.sendRequest(config);
}
},
/*
* Callback function passed to DataSource's sendRequest() method populates
* an entire DataTable with new data, clearing previous data, if any.
*
* @method onDataReturnInitializeTable
* @param e {Event.Facade} DataSource Event Facade object.
*/
onDataReturnInitializeTable : function(e) {
var records = (e.response && e.response.results) || [];
this.get("host").get("recordset").set("records", records);
}
});
Y.namespace("Plugin").DataTableDataSource = DataTableDataSource;
}, '@VERSION@' ,{requires:['datatable-base-deprecated','plugin','datasource-local']});
| RNELord/cdnjs | ajax/libs/yui/3.9.1/datatable-datasource-deprecated/datatable-datasource-deprecated.js | JavaScript | mit | 6,047 |
YUI.add('datatable-sort-deprecated', function(Y) {
// API Doc comments disabled to avoid deprecated class leakage into
// non-deprecated class API docs. See the 3.4.1 datatable API doc files in the
// download at http://yui.zenfs.com/releases/yui3/yui_3.4.1.zip for reference.
/**
Plugs DataTable with sorting functionality.
DEPRECATED. As of YUI 3.5.0, DataTable has been rebuilt. This module
is designed to work with `datatable-base-deprecated` (effectively the 3.4.1
version of DataTable) and will be removed from the library in a future version.
See http://yuilibrary.com/yui/docs/migration.html for help upgrading to the
latest version.
For complete API docs for the classes in this and other deprecated
DataTable-related modules, refer to the static API doc files in the 3.4.1
download at http://yui.zenfs.com/releases/yui3/yui_3.4.1.zip
@module datatable-deprecated
@submodule datatable-sort-deprecated
@deprecated
**/
/*
* Adds column sorting to DataTable.
* @class DataTableSort
* @extends Plugin.Base
*/
var YgetClassName = Y.ClassNameManager.getClassName,
DATATABLE = "datatable",
COLUMN = "column",
ASC = "asc",
DESC = "desc",
//TODO: Don't use hrefs - use tab/arrow/enter
TEMPLATE = '<a class="{link_class}" title="{link_title}" href="{link_href}">{value}</a>';
function DataTableSort() {
DataTableSort.superclass.constructor.apply(this, arguments);
}
/////////////////////////////////////////////////////////////////////////////
//
// STATIC PROPERTIES
//
/////////////////////////////////////////////////////////////////////////////
Y.mix(DataTableSort, {
/*
* The namespace for the plugin. This will be the property on the host which
* references the plugin instance.
*
* @property NS
* @type String
* @static
* @final
* @value "sort"
*/
NS: "sort",
/*
* Class name.
*
* @property NAME
* @type String
* @static
* @final
* @value "dataTableSort"
*/
NAME: "dataTableSort",
/////////////////////////////////////////////////////////////////////////////
//
// ATTRIBUTES
//
/////////////////////////////////////////////////////////////////////////////
ATTRS: {
/*
* @attribute trigger
* @description Defines the trigger that causes a column to be sorted:
* {event, selector}, where "event" is an event type and "selector" is
* is a node query selector.
* @type Object
* @default {event:"click", selector:"th"}
* @writeOnce "initOnly"
*/
trigger: {
value: {event:"click", selector:"th"},
writeOnce: "initOnly"
},
/*
* @attribute lastSortedBy
* @description Describes last known sort state: {key,dir}, where
* "key" is column key and "dir" is either "asc" or "desc".
* @type Object
*/
lastSortedBy: {
setter: "_setLastSortedBy",
lazyAdd: false
},
/*
* @attribute template
* @description Tokenized markup template for TH sort element.
* @type String
* @default '<a class="{link_class}" title="{link_title}" href="{link_href}">{value}</a>'
*/
template: {
value: TEMPLATE
},
/*
* Strings used in the UI elements.
*
* The strings used are defaulted from the datatable-sort language pack
* for the language identified in the YUI "lang" configuration (which
* defaults to "en").
*
* Configurable strings are "sortBy" and "reverseSortBy", which are
* assigned to the sort link's title attribute.
*
* @attribute strings
* @type {Object}
*/
strings: {
valueFn: function () { return Y.Intl.get('datatable-sort-deprecated'); }
}
}
});
/////////////////////////////////////////////////////////////////////////////
//
// PROTOTYPE
//
/////////////////////////////////////////////////////////////////////////////
Y.extend(DataTableSort, Y.Plugin.Base, {
/////////////////////////////////////////////////////////////////////////////
//
// METHODS
//
/////////////////////////////////////////////////////////////////////////////
/*
* Initializer.
*
* @method initializer
* @param config {Object} Config object.
* @private
*/
initializer: function(config) {
var dt = this.get("host"),
trigger = this.get("trigger");
dt.get("recordset").plug(Y.Plugin.RecordsetSort, {dt: dt});
dt.get("recordset").sort.addTarget(dt);
// Wrap link around TH value
this.doBefore("_createTheadThNode", this._beforeCreateTheadThNode);
// Add class
this.doBefore("_attachTheadThNode", this._beforeAttachTheadThNode);
this.doBefore("_attachTbodyTdNode", this._beforeAttachTbodyTdNode);
// Attach trigger handlers
dt.delegate(trigger.event, Y.bind(this._onEventSortColumn,this), trigger.selector);
// Attach UI hooks
dt.after("recordsetSort:sort", function() {
this._uiSetRecordset(this.get("recordset"));
});
this.on("lastSortedByChange", function(e) {
this._uiSetLastSortedBy(e.prevVal, e.newVal, dt);
});
//TODO
//dt.after("recordset:mutation", function() {//reset lastSortedBy});
//TODO
//add Column sortFn ATTR
// Update UI after the fact (render-then-plug case)
if(dt.get("rendered")) {
dt._uiSetColumnset(dt.get("columnset"));
this._uiSetLastSortedBy(null, this.get("lastSortedBy"), dt);
}
},
/*
* @method _setLastSortedBy
* @description Normalizes lastSortedBy
* @param val {String | Object} {key, dir} or "key"
* @return {key, dir, notdir}
* @private
*/
_setLastSortedBy: function(val) {
if (Y.Lang.isString(val)) {
val = { key: val, dir: "desc" };
}
if (val) {
return (val.dir === "desc") ?
{ key: val.key, dir: "desc", notdir: "asc" } :
{ key: val.key, dir: "asc", notdir:"desc" };
} else {
return null;
}
},
/*
* Updates sort UI.
*
* @method _uiSetLastSortedBy
* @param val {Object} New lastSortedBy object {key,dir}.
* @param dt {Y.DataTable.Base} Host.
* @protected
*/
_uiSetLastSortedBy: function(prevVal, newVal, dt) {
var strings = this.get('strings'),
columnset = dt.get("columnset"),
prevKey = prevVal && prevVal.key,
newKey = newVal && newVal.key,
prevClass = prevVal && dt.getClassName(prevVal.dir),
newClass = newVal && dt.getClassName(newVal.dir),
prevColumn = columnset.keyHash[prevKey],
newColumn = columnset.keyHash[newKey],
tbodyNode = dt._tbodyNode,
fromTemplate = Y.Lang.sub,
th, sortArrow, sortLabel;
// Clear previous UI
if (prevColumn && prevClass) {
th = prevColumn.thNode;
sortArrow = th.one('a');
if (sortArrow) {
sortArrow.set('title', fromTemplate(strings.sortBy, {
column: prevColumn.get('label')
}));
}
th.removeClass(prevClass);
tbodyNode.all("." + YgetClassName(COLUMN, prevColumn.get("id")))
.removeClass(prevClass);
}
// Add new sort UI
if (newColumn && newClass) {
th = newColumn.thNode;
sortArrow = th.one('a');
if (sortArrow) {
sortLabel = (newVal.dir === ASC) ? "reverseSortBy" : "sortBy";
sortArrow.set('title', fromTemplate(strings[sortLabel], {
column: newColumn.get('label')
}));
}
th.addClass(newClass);
tbodyNode.all("." + YgetClassName(COLUMN, newColumn.get("id")))
.addClass(newClass);
}
},
/*
* Before header cell element is created, inserts link markup around {value}.
*
* @method _beforeCreateTheadThNode
* @param o {Object} {value, column, tr}.
* @protected
*/
_beforeCreateTheadThNode: function(o) {
var sortedBy, sortLabel;
if (o.column.get("sortable")) {
sortedBy = this.get('lastSortedBy');
sortLabel = (sortedBy && sortedBy.dir === ASC &&
sortedBy.key === o.column.get('key')) ?
"reverseSortBy" : "sortBy";
o.value = Y.Lang.sub(this.get("template"), {
link_class: o.link_class || "",
link_title: Y.Lang.sub(this.get('strings.' + sortLabel), {
column: o.column.get('label')
}),
link_href: "#",
value: o.value
});
}
},
/*
* Before header cell element is attached, sets applicable class names.
*
* @method _beforeAttachTheadThNode
* @param o {Object} {value, column, tr}.
* @protected
*/
_beforeAttachTheadThNode: function(o) {
var lastSortedBy = this.get("lastSortedBy"),
key = lastSortedBy && lastSortedBy.key,
dir = lastSortedBy && lastSortedBy.dir,
notdir = lastSortedBy && lastSortedBy.notdir;
// This Column is sortable
if(o.column.get("sortable")) {
o.th.addClass(YgetClassName(DATATABLE, "sortable"));
}
// This Column is currently sorted
if(key && (key === o.column.get("key"))) {
o.th.replaceClass(YgetClassName(DATATABLE, notdir), YgetClassName(DATATABLE, dir));
}
},
/*
* Before header cell element is attached, sets applicable class names.
*
* @method _beforeAttachTbodyTdNode
* @param o {Object} {record, column, tr, headers, classnames, value}.
* @protected
*/
_beforeAttachTbodyTdNode: function(o) {
var lastSortedBy = this.get("lastSortedBy"),
key = lastSortedBy && lastSortedBy.key,
dir = lastSortedBy && lastSortedBy.dir,
notdir = lastSortedBy && lastSortedBy.notdir;
// This Column is sortable
if(o.column.get("sortable")) {
o.td.addClass(YgetClassName(DATATABLE, "sortable"));
}
// This Column is currently sorted
if(key && (key === o.column.get("key"))) {
o.td.replaceClass(YgetClassName(DATATABLE, notdir), YgetClassName(DATATABLE, dir));
}
},
/*
* In response to the "trigger" event, sorts the underlying Recordset and
* updates the lastSortedBy attribute.
*
* @method _onEventSortColumn
* @param o {Object} {value, column, tr}.
* @protected
*/
_onEventSortColumn: function(e) {
e.halt();
//TODO: normalize e.currentTarget to TH
var table = this.get("host"),
column = table.get("columnset").idHash[e.currentTarget.get("id")],
key, field, lastSort, desc, sorter;
if (column.get("sortable")) {
key = column.get("key");
field = column.get("field");
lastSort = this.get("lastSortedBy") || {};
desc = (lastSort.key === key && lastSort.dir === ASC);
sorter = column.get("sortFn");
table.get("recordset").sort.sort(field, desc, sorter);
this.set("lastSortedBy", {
key: key,
dir: (desc) ? DESC : ASC
});
}
}
});
Y.namespace("Plugin").DataTableSort = DataTableSort;
}, '@VERSION@' ,{requires:['datatable-base-deprecated','plugin','recordset-sort'], lang:['en']});
| js-data/cdnjs | ajax/libs/yui/3.7.0/datatable-sort-deprecated/datatable-sort-deprecated.js | JavaScript | mit | 11,997 |
YUI.add('widget-position-constrain', function (Y, NAME) {
/**
* Provides constrained xy positioning support for Widgets, through an extension.
*
* It builds on top of the widget-position module, to provide constrained positioning support.
*
* @module widget-position-constrain
*/
var CONSTRAIN = "constrain",
CONSTRAIN_XYCHANGE = "constrain|xyChange",
CONSTRAIN_CHANGE = "constrainChange",
PREVENT_OVERLAP = "preventOverlap",
ALIGN = "align",
EMPTY_STR = "",
BINDUI = "bindUI",
XY = "xy",
X_COORD = "x",
Y_COORD = "y",
Node = Y.Node,
VIEWPORT_REGION = "viewportRegion",
REGION = "region",
PREVENT_OVERLAP_MAP;
/**
* A widget extension, which can be used to add constrained xy positioning support to the base Widget class,
* through the <a href="Base.html#method_build">Base.build</a> method. This extension requires that
* the WidgetPosition extension be added to the Widget (before WidgetPositionConstrain, if part of the same
* extension list passed to Base.build).
*
* @class WidgetPositionConstrain
* @param {Object} User configuration object
*/
function PositionConstrain(config) {
if (!this._posNode) {
Y.error("WidgetPosition needs to be added to the Widget, before WidgetPositionConstrain is added");
}
Y.after(this._bindUIPosConstrained, this, BINDUI);
}
/**
* Static property used to define the default attribute
* configuration introduced by WidgetPositionConstrain.
*
* @property ATTRS
* @type Object
* @static
*/
PositionConstrain.ATTRS = {
/**
* @attribute constrain
* @type boolean | Node
* @default null
* @description The node to constrain the widget's bounding box to, when setting xy. Can also be
* set to true, to constrain to the viewport.
*/
constrain : {
value: null,
setter: "_setConstrain"
},
/**
* @attribute preventOverlap
* @type boolean
* @description If set to true, and WidgetPositionAlign is also added to the Widget,
* constrained positioning will attempt to prevent the widget's bounding box from overlapping
* the element to which it has been aligned, by flipping the orientation of the alignment
* for corner based alignments
*/
preventOverlap : {
value:false
}
};
/**
* @property _PREVENT_OVERLAP
* @static
* @protected
* @type Object
* @description The set of positions for which to prevent
* overlap.
*/
PREVENT_OVERLAP_MAP = PositionConstrain._PREVENT_OVERLAP = {
x: {
"tltr": 1,
"blbr": 1,
"brbl": 1,
"trtl": 1
},
y : {
"trbr": 1,
"tlbl": 1,
"bltl": 1,
"brtr": 1
}
};
PositionConstrain.prototype = {
/**
* Calculates the constrained positions for the XY positions provided, using
* the provided node argument is passed in. If no node value is passed in, the value of
* the "constrain" attribute is used.
*
* @method getConstrainedXY
* @param {Array} xy The xy values to constrain
* @param {Node | boolean} node Optional. The node to constrain to, or true for the viewport
* @return {Array} The constrained xy values
*/
getConstrainedXY : function(xy, node) {
node = node || this.get(CONSTRAIN);
var constrainingRegion = this._getRegion((node === true) ? null : node),
nodeRegion = this._posNode.get(REGION);
return [
this._constrain(xy[0], X_COORD, nodeRegion, constrainingRegion),
this._constrain(xy[1], Y_COORD, nodeRegion, constrainingRegion)
];
},
/**
* Constrains the widget's bounding box to a node (or the viewport). If xy or node are not
* passed in, the current position and the value of "constrain" will be used respectively.
*
* The widget's position will be changed to the constrained position.
*
* @method constrain
* @param {Array} xy Optional. The xy values to constrain
* @param {Node | boolean} node Optional. The node to constrain to, or true for the viewport
*/
constrain : function(xy, node) {
var currentXY,
constrainedXY,
constraint = node || this.get(CONSTRAIN);
if (constraint) {
currentXY = xy || this.get(XY);
constrainedXY = this.getConstrainedXY(currentXY, constraint);
if (constrainedXY[0] !== currentXY[0] || constrainedXY[1] !== currentXY[1]) {
this.set(XY, constrainedXY, { constrained:true });
}
}
},
/**
* The setter implementation for the "constrain" attribute.
*
* @method _setConstrain
* @protected
* @param {Node | boolean} val The attribute value
*/
_setConstrain : function(val) {
return (val === true) ? val : Node.one(val);
},
/**
* The method which performs the actual constrain calculations for a given axis ("x" or "y") based
* on the regions provided.
*
* @method _constrain
* @protected
*
* @param {Number} val The value to constrain
* @param {String} axis The axis to use for constrainment
* @param {Region} nodeRegion The region of the node to constrain
* @param {Region} constrainingRegion The region of the node (or viewport) to constrain to
*
* @return {Number} The constrained value
*/
_constrain: function(val, axis, nodeRegion, constrainingRegion) {
if (constrainingRegion) {
if (this.get(PREVENT_OVERLAP)) {
val = this._preventOverlap(val, axis, nodeRegion, constrainingRegion);
}
var x = (axis == X_COORD),
regionSize = (x) ? constrainingRegion.width : constrainingRegion.height,
nodeSize = (x) ? nodeRegion.width : nodeRegion.height,
minConstraint = (x) ? constrainingRegion.left : constrainingRegion.top,
maxConstraint = (x) ? constrainingRegion.right - nodeSize : constrainingRegion.bottom - nodeSize;
if (val < minConstraint || val > maxConstraint) {
if (nodeSize < regionSize) {
if (val < minConstraint) {
val = minConstraint;
} else if (val > maxConstraint) {
val = maxConstraint;
}
} else {
val = minConstraint;
}
}
}
return val;
},
/**
* The method which performs the preventOverlap calculations for a given axis ("x" or "y") based
* on the value and regions provided.
*
* @method _preventOverlap
* @protected
*
* @param {Number} val The value being constrain
* @param {String} axis The axis to being constrained
* @param {Region} nodeRegion The region of the node being constrained
* @param {Region} constrainingRegion The region of the node (or viewport) we need to constrain to
*
* @return {Number} The constrained value
*/
_preventOverlap : function(val, axis, nodeRegion, constrainingRegion) {
var align = this.get(ALIGN),
x = (axis === X_COORD),
nodeSize,
alignRegion,
nearEdge,
farEdge,
spaceOnNearSide,
spaceOnFarSide;
if (align && align.points && PREVENT_OVERLAP_MAP[axis][align.points.join(EMPTY_STR)]) {
alignRegion = this._getRegion(align.node);
if (alignRegion) {
nodeSize = (x) ? nodeRegion.width : nodeRegion.height;
nearEdge = (x) ? alignRegion.left : alignRegion.top;
farEdge = (x) ? alignRegion.right : alignRegion.bottom;
spaceOnNearSide = (x) ? alignRegion.left - constrainingRegion.left : alignRegion.top - constrainingRegion.top;
spaceOnFarSide = (x) ? constrainingRegion.right - alignRegion.right : constrainingRegion.bottom - alignRegion.bottom;
}
if (val > nearEdge) {
if (spaceOnFarSide < nodeSize && spaceOnNearSide > nodeSize) {
val = nearEdge - nodeSize;
}
} else {
if (spaceOnNearSide < nodeSize && spaceOnFarSide > nodeSize) {
val = farEdge;
}
}
}
return val;
},
/**
* Binds event listeners responsible for updating the UI state in response to
* Widget constrained positioning related state changes.
* <p>
* This method is invoked after bindUI is invoked for the Widget class
* using YUI's aop infrastructure.
* </p>
*
* @method _bindUIPosConstrained
* @protected
*/
_bindUIPosConstrained : function() {
this.after(CONSTRAIN_CHANGE, this._afterConstrainChange);
this._enableConstraints(this.get(CONSTRAIN));
},
/**
* After change listener for the "constrain" attribute, responsible
* for updating the UI, in response to attribute changes.
*
* @method _afterConstrainChange
* @protected
* @param {EventFacade} e The event facade
*/
_afterConstrainChange : function(e) {
this._enableConstraints(e.newVal);
},
/**
* Updates the UI if enabling constraints, and sets up the xyChange event listeners
* to constrain whenever the widget is moved. Disabling constraints removes the listeners.
*
* @method enable or disable constraints listeners
* @private
* @param {boolean} enable Enable or disable constraints
*/
_enableConstraints : function(enable) {
if (enable) {
this.constrain();
this._cxyHandle = this._cxyHandle || this.on(CONSTRAIN_XYCHANGE, this._constrainOnXYChange);
} else if (this._cxyHandle) {
this._cxyHandle.detach();
this._cxyHandle = null;
}
},
/**
* The on change listener for the "xy" attribute. Modifies the event facade's
* newVal property with the constrained XY value.
*
* @method _constrainOnXYChange
* @protected
* @param {EventFacade} e The event facade for the attribute change
*/
_constrainOnXYChange : function(e) {
if (!e.constrained) {
e.newVal = this.getConstrainedXY(e.newVal);
}
},
/**
* Utility method to normalize region retrieval from a node instance,
* or the viewport, if no node is provided.
*
* @method _getRegion
* @private
* @param {Node} node Optional.
*/
_getRegion : function(node) {
var region;
if (!node) {
region = this._posNode.get(VIEWPORT_REGION);
} else {
node = Node.one(node);
if (node) {
region = node.get(REGION);
}
}
return region;
}
};
Y.WidgetPositionConstrain = PositionConstrain;
}, '@VERSION@', {"requires": ["widget-position"]});
| nagyist/OpenF2-cdnjs | ajax/libs/yui/3.7.3/widget-position-constrain/widget-position-constrain.js | JavaScript | mit | 11,115 |
YUI.add('widget-position-constrain', function (Y, NAME) {
/**
* Provides constrained xy positioning support for Widgets, through an extension.
*
* It builds on top of the widget-position module, to provide constrained positioning support.
*
* @module widget-position-constrain
*/
var CONSTRAIN = "constrain",
CONSTRAIN_XYCHANGE = "constrain|xyChange",
CONSTRAIN_CHANGE = "constrainChange",
PREVENT_OVERLAP = "preventOverlap",
ALIGN = "align",
EMPTY_STR = "",
BINDUI = "bindUI",
XY = "xy",
X_COORD = "x",
Y_COORD = "y",
Node = Y.Node,
VIEWPORT_REGION = "viewportRegion",
REGION = "region",
PREVENT_OVERLAP_MAP;
/**
* A widget extension, which can be used to add constrained xy positioning support to the base Widget class,
* through the <a href="Base.html#method_build">Base.build</a> method. This extension requires that
* the WidgetPosition extension be added to the Widget (before WidgetPositionConstrain, if part of the same
* extension list passed to Base.build).
*
* @class WidgetPositionConstrain
* @param {Object} User configuration object
*/
function PositionConstrain(config) {
if (!this._posNode) {
Y.error("WidgetPosition needs to be added to the Widget, before WidgetPositionConstrain is added");
}
Y.after(this._bindUIPosConstrained, this, BINDUI);
}
/**
* Static property used to define the default attribute
* configuration introduced by WidgetPositionConstrain.
*
* @property ATTRS
* @type Object
* @static
*/
PositionConstrain.ATTRS = {
/**
* @attribute constrain
* @type boolean | Node
* @default null
* @description The node to constrain the widget's bounding box to, when setting xy. Can also be
* set to true, to constrain to the viewport.
*/
constrain : {
value: null,
setter: "_setConstrain"
},
/**
* @attribute preventOverlap
* @type boolean
* @description If set to true, and WidgetPositionAlign is also added to the Widget,
* constrained positioning will attempt to prevent the widget's bounding box from overlapping
* the element to which it has been aligned, by flipping the orientation of the alignment
* for corner based alignments
*/
preventOverlap : {
value:false
}
};
/**
* @property _PREVENT_OVERLAP
* @static
* @protected
* @type Object
* @description The set of positions for which to prevent
* overlap.
*/
PREVENT_OVERLAP_MAP = PositionConstrain._PREVENT_OVERLAP = {
x: {
"tltr": 1,
"blbr": 1,
"brbl": 1,
"trtl": 1
},
y : {
"trbr": 1,
"tlbl": 1,
"bltl": 1,
"brtr": 1
}
};
PositionConstrain.prototype = {
/**
* Calculates the constrained positions for the XY positions provided, using
* the provided node argument is passed in. If no node value is passed in, the value of
* the "constrain" attribute is used.
*
* @method getConstrainedXY
* @param {Array} xy The xy values to constrain
* @param {Node | boolean} node Optional. The node to constrain to, or true for the viewport
* @return {Array} The constrained xy values
*/
getConstrainedXY : function(xy, node) {
node = node || this.get(CONSTRAIN);
var constrainingRegion = this._getRegion((node === true) ? null : node),
nodeRegion = this._posNode.get(REGION);
return [
this._constrain(xy[0], X_COORD, nodeRegion, constrainingRegion),
this._constrain(xy[1], Y_COORD, nodeRegion, constrainingRegion)
];
},
/**
* Constrains the widget's bounding box to a node (or the viewport). If xy or node are not
* passed in, the current position and the value of "constrain" will be used respectively.
*
* The widget's position will be changed to the constrained position.
*
* @method constrain
* @param {Array} xy Optional. The xy values to constrain
* @param {Node | boolean} node Optional. The node to constrain to, or true for the viewport
*/
constrain : function(xy, node) {
var currentXY,
constrainedXY,
constraint = node || this.get(CONSTRAIN);
if (constraint) {
currentXY = xy || this.get(XY);
constrainedXY = this.getConstrainedXY(currentXY, constraint);
if (constrainedXY[0] !== currentXY[0] || constrainedXY[1] !== currentXY[1]) {
this.set(XY, constrainedXY, { constrained:true });
}
}
},
/**
* The setter implementation for the "constrain" attribute.
*
* @method _setConstrain
* @protected
* @param {Node | boolean} val The attribute value
*/
_setConstrain : function(val) {
return (val === true) ? val : Node.one(val);
},
/**
* The method which performs the actual constrain calculations for a given axis ("x" or "y") based
* on the regions provided.
*
* @method _constrain
* @protected
*
* @param {Number} val The value to constrain
* @param {String} axis The axis to use for constrainment
* @param {Region} nodeRegion The region of the node to constrain
* @param {Region} constrainingRegion The region of the node (or viewport) to constrain to
*
* @return {Number} The constrained value
*/
_constrain: function(val, axis, nodeRegion, constrainingRegion) {
if (constrainingRegion) {
if (this.get(PREVENT_OVERLAP)) {
val = this._preventOverlap(val, axis, nodeRegion, constrainingRegion);
}
var x = (axis == X_COORD),
regionSize = (x) ? constrainingRegion.width : constrainingRegion.height,
nodeSize = (x) ? nodeRegion.width : nodeRegion.height,
minConstraint = (x) ? constrainingRegion.left : constrainingRegion.top,
maxConstraint = (x) ? constrainingRegion.right - nodeSize : constrainingRegion.bottom - nodeSize;
if (val < minConstraint || val > maxConstraint) {
if (nodeSize < regionSize) {
if (val < minConstraint) {
val = minConstraint;
} else if (val > maxConstraint) {
val = maxConstraint;
}
} else {
val = minConstraint;
}
}
}
return val;
},
/**
* The method which performs the preventOverlap calculations for a given axis ("x" or "y") based
* on the value and regions provided.
*
* @method _preventOverlap
* @protected
*
* @param {Number} val The value being constrain
* @param {String} axis The axis to being constrained
* @param {Region} nodeRegion The region of the node being constrained
* @param {Region} constrainingRegion The region of the node (or viewport) we need to constrain to
*
* @return {Number} The constrained value
*/
_preventOverlap : function(val, axis, nodeRegion, constrainingRegion) {
var align = this.get(ALIGN),
x = (axis === X_COORD),
nodeSize,
alignRegion,
nearEdge,
farEdge,
spaceOnNearSide,
spaceOnFarSide;
if (align && align.points && PREVENT_OVERLAP_MAP[axis][align.points.join(EMPTY_STR)]) {
alignRegion = this._getRegion(align.node);
if (alignRegion) {
nodeSize = (x) ? nodeRegion.width : nodeRegion.height;
nearEdge = (x) ? alignRegion.left : alignRegion.top;
farEdge = (x) ? alignRegion.right : alignRegion.bottom;
spaceOnNearSide = (x) ? alignRegion.left - constrainingRegion.left : alignRegion.top - constrainingRegion.top;
spaceOnFarSide = (x) ? constrainingRegion.right - alignRegion.right : constrainingRegion.bottom - alignRegion.bottom;
}
if (val > nearEdge) {
if (spaceOnFarSide < nodeSize && spaceOnNearSide > nodeSize) {
val = nearEdge - nodeSize;
}
} else {
if (spaceOnNearSide < nodeSize && spaceOnFarSide > nodeSize) {
val = farEdge;
}
}
}
return val;
},
/**
* Binds event listeners responsible for updating the UI state in response to
* Widget constrained positioning related state changes.
* <p>
* This method is invoked after bindUI is invoked for the Widget class
* using YUI's aop infrastructure.
* </p>
*
* @method _bindUIPosConstrained
* @protected
*/
_bindUIPosConstrained : function() {
this.after(CONSTRAIN_CHANGE, this._afterConstrainChange);
this._enableConstraints(this.get(CONSTRAIN));
},
/**
* After change listener for the "constrain" attribute, responsible
* for updating the UI, in response to attribute changes.
*
* @method _afterConstrainChange
* @protected
* @param {EventFacade} e The event facade
*/
_afterConstrainChange : function(e) {
this._enableConstraints(e.newVal);
},
/**
* Updates the UI if enabling constraints, and sets up the xyChange event listeners
* to constrain whenever the widget is moved. Disabling constraints removes the listeners.
*
* @method enable or disable constraints listeners
* @private
* @param {boolean} enable Enable or disable constraints
*/
_enableConstraints : function(enable) {
if (enable) {
this.constrain();
this._cxyHandle = this._cxyHandle || this.on(CONSTRAIN_XYCHANGE, this._constrainOnXYChange);
} else if (this._cxyHandle) {
this._cxyHandle.detach();
this._cxyHandle = null;
}
},
/**
* The on change listener for the "xy" attribute. Modifies the event facade's
* newVal property with the constrained XY value.
*
* @method _constrainOnXYChange
* @protected
* @param {EventFacade} e The event facade for the attribute change
*/
_constrainOnXYChange : function(e) {
if (!e.constrained) {
e.newVal = this.getConstrainedXY(e.newVal);
}
},
/**
* Utility method to normalize region retrieval from a node instance,
* or the viewport, if no node is provided.
*
* @method _getRegion
* @private
* @param {Node} node Optional.
*/
_getRegion : function(node) {
var region;
if (!node) {
region = this._posNode.get(VIEWPORT_REGION);
} else {
node = Node.one(node);
if (node) {
region = node.get(REGION);
}
}
return region;
}
};
Y.WidgetPositionConstrain = PositionConstrain;
}, '@VERSION@', {"requires": ["widget-position"]});
| chriszarate/cdnjs | ajax/libs/yui/3.10.1/widget-position-constrain/widget-position-constrain.js | JavaScript | mit | 11,115 |
YUI.add('dd-ddm', function (Y, NAME) {
/**
* Extends the dd-ddm-base Class to add support for the viewport shim to allow a draggable
* anode to drag to be dragged over an iframe or any other node that traps mousemove events.
* It is also required to have Drop Targets enabled, as the viewport shim will contain the shims for the Drop Targets.
* @module dd
* @submodule dd-ddm
* @for DDM
* @namespace DD
*/
Y.mix(Y.DD.DDM, {
/**
* The shim placed over the screen to track the mousemove event.
* @private
* @property _pg
* @type {Node}
*/
_pg: null,
/**
* Set this to true to set the shims opacity to .5 for debugging it, default: false.
* @private
* @property _debugShim
* @type {Boolean}
*/
_debugShim: false,
_activateTargets: function() { },
_deactivateTargets: function() {},
_startDrag: function() {
if (this.activeDrag && this.activeDrag.get('useShim')) {
this._shimming = true;
this._pg_activate();
this._activateTargets();
}
},
_endDrag: function() {
this._pg_deactivate();
this._deactivateTargets();
},
/**
* Deactivates the shim
* @private
* @method _pg_deactivate
*/
_pg_deactivate: function() {
this._pg.setStyle('display', 'none');
},
/**
* Activates the shim
* @private
* @method _pg_activate
*/
_pg_activate: function() {
if (!this._pg) {
this._createPG();
}
var ah = this.activeDrag.get('activeHandle'), cur = 'auto';
if (ah) {
cur = ah.getStyle('cursor');
}
if (cur === 'auto') {
cur = this.get('dragCursor');
}
this._pg_size();
this._pg.setStyles({
top: 0,
left: 0,
display: 'block',
opacity: ((this._debugShim) ? '.5' : '0'),
cursor: cur
});
},
/**
* Sizes the shim on: activatation, window:scroll, window:resize
* @private
* @method _pg_size
*/
_pg_size: function() {
if (this.activeDrag) {
var b = Y.one('body'),
h = b.get('docHeight'),
w = b.get('docWidth');
this._pg.setStyles({
height: h + 'px',
width: w + 'px'
});
}
},
/**
* Creates the shim and adds it's listeners to it.
* @private
* @method _createPG
*/
_createPG: function() {
var pg = Y.Node.create('<div></div>'),
bd = Y.one('body'), win;
pg.setStyles({
top: '0',
left: '0',
position: 'absolute',
zIndex: '9999',
overflow: 'hidden',
backgroundColor: 'red',
display: 'none',
height: '5px',
width: '5px'
});
pg.set('id', Y.stamp(pg));
pg.addClass(Y.DD.DDM.CSS_PREFIX + '-shim');
bd.prepend(pg);
this._pg = pg;
this._pg.on('mousemove', Y.throttle(Y.bind(this._move, this), this.get('throttleTime')));
this._pg.on('mouseup', Y.bind(this._end, this));
win = Y.one('win');
Y.on('window:resize', Y.bind(this._pg_size, this));
win.on('scroll', Y.bind(this._pg_size, this));
}
}, true);
}, '@VERSION@', {"requires": ["dd-ddm-base", "event-resize"]});
| jieter/cdnjs | ajax/libs/yui/3.8.0/dd-ddm/dd-ddm-debug.js | JavaScript | mit | 3,867 |
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
frappe.get_indicator = function(doc, doctype) {
if(doc.__unsaved) {
return [__("Not Saved"), "orange"];
}
if(!doctype) doctype = doc.doctype;
var _get_indicator = frappe.listview_settings[doctype]
&& frappe.listview_settings[doctype].get_indicator,
is_submittable = frappe.model.is_submittable(doctype),
workflow_fieldname = frappe.workflow.get_state_fieldname(doctype);
// workflow
if(workflow_fieldname) {
var value = doc[workflow_fieldname];
if(value) {
var colour = {
"Success": "green",
"Warning": "orange",
"Danger": "red",
"Primary": "blue",
}[locals["Workflow State"][value].style] || "darkgrey";
return [__(value), colour, workflow_fieldname + ',=,' + value];
}
}
if(is_submittable && doc.docstatus==0) {
return [__("Draft"), "red", "docstatus,=,0"];
}
if(is_submittable && doc.docstatus==2) {
return [__("Cancelled"), "red", "docstatus,=,2"];
}
if(_get_indicator) {
var indicator = _get_indicator(doc);
if(indicator) return indicator;
}
if(is_submittable && doc.docstatus==1) {
return [__("Submitted"), "blue", "docstatus,=,1"];
}
if(doc.status) {
return [__(doc.status), frappe.utils.guess_colour(doc.status)];
}
}
| gangadharkadam/saloon_frappe_install | frappe/public/js/frappe/model/indicator.js | JavaScript | mit | 1,274 |
/****************************************************************************
Copyright (C) 2010 Lam Pham
Copyright (c) 2010-2012 cocos2d-x.org
CopyRight (c) 2013-2014 Chukong Technologies Inc.
http://www.cocos2d-x.org
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.
****************************************************************************/
#include "CCActionProgressTimer.h"
#include "CCProgressTimer.h"
NS_CC_BEGIN
#define kProgressTimerCast ProgressTimer*
// implementation of ProgressTo
ProgressTo* ProgressTo::create(float duration, float percent)
{
ProgressTo *progressTo = new ProgressTo();
progressTo->initWithDuration(duration, percent);
progressTo->autorelease();
return progressTo;
}
bool ProgressTo::initWithDuration(float duration, float percent)
{
if (ActionInterval::initWithDuration(duration))
{
_to = percent;
return true;
}
return false;
}
ProgressTo* ProgressTo::clone() const
{
// no copy constructor
auto a = new ProgressTo();
a->initWithDuration(_duration, _to);
a->autorelease();
return a;
}
ProgressTo* ProgressTo::reverse() const
{
CCASSERT(false, "reverse() not supported in ProgressTo");
return nullptr;
}
void ProgressTo::startWithTarget(Node *target)
{
ActionInterval::startWithTarget(target);
_from = ((kProgressTimerCast)(target))->getPercentage();
// XXX: Is this correct ?
// Adding it to support Repeat
if (_from == 100)
{
_from = 0;
}
}
void ProgressTo::update(float time)
{
((kProgressTimerCast)(_target))->setPercentage(_from + (_to - _from) * time);
}
// implementation of ProgressFromTo
ProgressFromTo* ProgressFromTo::create(float duration, float fromPercentage, float toPercentage)
{
ProgressFromTo *progressFromTo = new ProgressFromTo();
progressFromTo->initWithDuration(duration, fromPercentage, toPercentage);
progressFromTo->autorelease();
return progressFromTo;
}
bool ProgressFromTo::initWithDuration(float duration, float fromPercentage, float toPercentage)
{
if (ActionInterval::initWithDuration(duration))
{
_to = toPercentage;
_from = fromPercentage;
return true;
}
return false;
}
ProgressFromTo* ProgressFromTo::clone() const
{
// no copy constructor
auto a = new ProgressFromTo();
a->initWithDuration(_duration, _from, _to);
a->autorelease();
return a;
}
ProgressFromTo* ProgressFromTo::reverse(void) const
{
return ProgressFromTo::create(_duration, _to, _from);
}
void ProgressFromTo::startWithTarget(Node *target)
{
ActionInterval::startWithTarget(target);
}
void ProgressFromTo::update(float time)
{
((kProgressTimerCast)(_target))->setPercentage(_from + (_to - _from) * time);
}
NS_CC_END
| K57CA-PMP/SaveTheWorld | cocos2d/cocos/2d/CCActionProgressTimer.cpp | C++ | mit | 3,733 |
(function(e,k){function h(b,a){"string"===typeof b&&(b=[b]);this.callback=a;this.numProcessed=this.numAborts=this.numErrors=this.numLoaded=0;this.numImages=b.length;this.images=[];for(var c=0,c=0;c<b.length;c++)this.preload(b[c])}var g={},d={},j={};e.fn.spritespin=function(b){if(g[b])return g[b].apply(this,Array.prototype.slice.call(arguments,1));if("object"===typeof b||!b)return g.init.apply(this,arguments);e.error("Method "+b+" does not exist on jQuery.spritespin")};h.prototype.preload=function(b){var a=
new Image;this.images.push(a);a.onload=h.prototype.onload;a.onerror=h.prototype.onerror;a.onabort=h.prototype.onabort;a.preloader=this;a.src=b};h.prototype.onProcessed=function(){this.numProcessed++;this.numProcessed===this.numImages&&this.callback(this.images,this.numLoaded)};h.prototype.onload=function(){this.preloader.numLoaded++;this.preloader.onProcessed()};h.prototype.onerror=function(){this.preloader.numErrors++;this.preloader.onProcessed()};h.prototype.onabort=function(){this.preloader.numAborts++;
this.preloader.onProcessed()};g.init=function(b){var a={width:void 0,height:void 0,offsetX:0,offsetY:0,frameStepX:void 0,frameStepY:void 0,frameStep:void 0,framesX:void 0,frames:36,frame:0,resolutionX:void 0,resolutionY:void 0,animate:!0,loop:!1,loopFrame:0,frameTime:36,reverse:!1,sense:1,slider:void 0,behavior:"drag",image:"images/spritespin.jpg",preloadHtml:" ",preloadBackground:void 0,preloadCSS:void 0,onFrame:void 0,onLoad:void 0,touchable:void 0,panorama:!1},b=b||{};e.extend(a,b);return this.each(function(){var c=
e(this),f=c.data("spritespin");if(f)e.extend(f.settings,b),f.frameTime=f.settings.frameTime,null!==b.image&&void 0!==b.image?d.reconfiger(c,f):c.spritespin("animate",f.settings.animate,f.settings.loop);else{c.attr("unselectable","on").css({overflow:"hidden"}).html("");var i;a.panorama||(i=c.find("img"),0===i.length&&(i=e("<img src=''/>"),c.append(i)),i.hide());c.data("spritespin",{target:c,settings:a,animation:null,frameTime:a.frameTime,imageElement:i,touchable:a.touchable||/iphone|ipod|ipad|android/i.test(k.navigator.userAgent)});
f=c.data("spritespin");d.reconfiger(c,f)}})};g.destroy=function(){return this.each(function(){var b=e(this);b.unbind(".spritespin");b.removeData("spritespin")})};g.update=function(b,a){return this.each(function(){var c=e(this).data("spritespin"),f=c.settings;if(void 0!==a)f.reverse=a;f.frame=void 0===b?f.frame+(f.reverse?-1:1):b;f.frame=d.wrapValue(f.frame,0,f.frames);c.target.trigger("onFrame",c)})};g.animate=function(b,a){return void 0===b?null!==e(this).data("spritespin").animation:this.each(function(){var c=
e(this),f=c.data("spritespin"),d=f.settings;if("boolean"===typeof a)d.loop=a;"toggle"===b&&(b=!d.animate);d.animate=b;if(null!==f.animation)k.clearInterval(f.animation),f.animation=null;if(d.animate)f.animation=k.setInterval(function(){try{c.spritespin("update")}catch(a){}},f.frameTime)})};g.frame=function(b){return void 0===b?e(this).data("spritespin").settings.frame:this.each(function(){e(this).spritespin("update",b)})};g.loop=function(b){return void 0===b?e(this).data("spritespin").settings.loop:
this.each(function(){var a=e(this),c=a.data("spritespin");a.spritespin("animate",c.settings.animate,b)})};d.storePoints=function(b,a){if(void 0===b.touches&&void 0!==b.originalEvent)b.touches=b.originalEvent.touches;a.oldX=a.currentX;a.oldY=a.currentY;void 0!==b.touches&&0<b.touches.length?(a.currentX=b.touches[0].clientX,a.currentY=b.touches[0].clientY):(a.currentX=b.clientX,a.currentY=b.clientY);if(void 0===a.startX||void 0===a.startY)a.startX=a.currentX,a.startY=a.currentY,a.clickframe=a.settings.frame;
if(void 0===a.oldX||void 0===a.oldY)a.oldX=a.currentX,a.oldY=a.currentY;a.dX=a.currentX-a.startX;a.dY=a.currentY-a.startY;a.ddX=a.currentX-a.oldX;a.ddY=a.currentY-a.oldY;return!1};d.resetPoints=function(b,a){a.startX=void 0;a.startY=void 0;a.currentX=void 0;a.currentY=void 0;a.oldX=void 0;a.oldY=void 0;a.dX=0;a.dY=0;a.ddX=0;a.ddY=0};d.clamp=function(b,a,c){return b>c?c:b<a?a:b};d.wrapValue=function(b,a,c){for(;b>=c;)b-=c;for(;b<a;)b+=c;return b};d.reconfiger=function(b,a){d.blankBackground(b,a);d.preloadImages(b,
a,function(){d.updateBackground(b,a);d.hookSlider(b,a);d.rebindEvents(b,a);a.settings.animate&&g.animate.apply(b,[a.settings.animate,a.settings.loop]);b.trigger("onLoad",a)})};d.blankBackground=function(b,a){var c="none";"string"===typeof a.settings.preloadBackground&&(c=["url('",a.settings.preloadBackground,"')"].join(""));b.css({width:[a.settings.width,"px"].join(""),height:[a.settings.height,"px"].join(""),"background-image":c,"background-repeat":"repeat-x","background-position":"0px 0px"});e(a.imageElement).hide()};
d.updateBackground=function(b){var a=b.data("spritespin"),c=a.settings.image,f=a.settings.offsetX,e=-a.settings.offsetY;if("string"===typeof a.settings.image)var d=a.settings.frameStepY||a.settings.height,g=a.settings.framesX||a.settings.frames,h=a.settings.frame/g|0,f=f-a.settings.frame%g*(a.settings.frameStepX||a.settings.width),e=e-h*d;else c=a.settings.image[a.settings.frame];d={};if(a.imageElement){d={position:"relative",top:e,left:f};if(a.settings.resolutionX&&a.settings.resolutionY)d.width=
a.settings.resolutionX,d.height=a.settings.resolutionY;a.imageElement.attr("src",c).css(d).show();b.css({position:"relative",top:0,left:0,width:a.settings.width,height:a.settings.height})}else d={width:[a.settings.width,"px"].join(""),height:[a.settings.height,"px"].join(""),"background-image":["url('",c,"')"].join(""),"background-repeat":"repeat-x","background-position":[f,"px ",e,"px"].join("")},a.settings.resolutionX&&a.settings.resolutionY&&(d["-webkit-background-size"]=[a.settings.resolutionX,
"px ",a.settings.resolutionY,"px"].join("")),b.css(d)};d.hookSlider=function(b,a){void 0!==a.settings.slider&&a.settings.slider.slider({value:a.settings.frame,min:0,max:a.settings.frames-1,step:1,slide:function(a,d){g.animate.apply(b,[!1]);g.frame.apply(b,[d.value])}})};d.rebindEvents=function(b,a){b.unbind(".spritespin");var c=a.settings.behavior;"string"===typeof a.settings.behavior&&(c=j[a.settings.behavior]);var f=function(a){a.cancelable&&a.preventDefault();return!1};b.bind("mousedown.spritespin",
c.mousedown);b.bind("mousemove.spritespin",c.mousemove);b.bind("mouseup.spritespin",c.mouseup);b.bind("mouseenter.spritespin",c.mouseenter);b.bind("mouseover.spritespin",c.mouseover);b.bind("mouseleave.spritespin",c.mouseleave);b.bind("dblclick.spritespin",c.dblclick);b.bind("onFrame.spritespin",c.onFrame);a.touchable&&(b.bind("touchstart.spritespin",c.mousedown),b.bind("touchmove.spritespin",c.mousemove),b.bind("touchend.spritespin",c.mouseup),b.bind("touchcancel.spritespin",c.mouseleave),b.bind("click.spritespin",
f),b.bind("gesturestart.spritespin",f),b.bind("gesturechange.spritespin",f),b.bind("gestureend.spritespin",f));b.bind("mousedown.spritespin selectstart.spritespin",f);b.bind("onFrame.spritespin",function(a,b){d.updateBackground(b.target,b);b.settings.frame===b.settings.loopFrame&&!b.settings.loop&&g.animate.apply(b.target,[!1]);b.settings.slider&&b.settings.slider.slider("value",b.settings.frame)});"function"===typeof a.settings.onFrame&&b.bind("onFrame.spritespin",a.settings.onFrame);"function"===
typeof a.settings.onLoad&&b.bind("onLoad.spritespin",a.settings.onLoad)};d.preloadImages=function(b,a,c){var d=e('<div class="preload"/>');0===b.find(".preload").length&&b.append(d);d.css(e.extend({width:a.settings.width,height:a.settings.height},a.settings.preloadCSS||{})).hide().html(a.settings.preloadHtml).fadeIn(250,function(){new h(a.settings.image,function(){b.find(".preload").fadeOut(250,function(){e(this).detach()});c.apply(b,[b,a])})})};j.none={mousedown:function(){return!1},mousemove:function(){return!1},
mouseup:function(){return!1},mouseenter:function(){return!1},mouseover:function(){return!1},mouseleave:function(){return!1},dblclick:function(){return!1},onFrame:function(){return!1}};j.spin={mousedown:function(b){var a=e(this).data("spritespin");d.storePoints(b,a);a.onDrag=!0;return!1},mousemove:function(b){var a=e(this),c=a.data("spritespin");if(c.onDrag&&(d.storePoints(b,c),b=c.dX/c.settings.width,b=b*c.settings.frames*c.settings.sense,b=Math.round(c.clickframe+b),g.update.apply(a,[b]),g.animate.apply(a,
[!1]),0!==c.ddX))b=c.ddX/c.settings.width,b=b*c.settings.frames*c.settings.sense,c.frameTime=c.settings.frameTime/b,c.settings.reverse=0>c.ddX;return!1},mouseup:function(){var b=e(this),a=b.data("spritespin");if(a.onDrag)a.onDrag=!1,b.spritespin("animate",!0);return!1},mouseenter:function(){return!1},mouseover:function(){return!1},mouseleave:function(){var b=e(this),a=b.data("spritespin");if(a.onDrag)a.onDrag=!1,b.spritespin("animate",b.spritespin("animate"));return!1},dblclick:function(){e(this).spritespin("animate",
"toggle");return!1},onFrame:function(b,a){0!==a.ddX?(a.frameTime+=1,e(this).spritespin("animate",!1),62>a.frameTime&&e(this).spritespin("animate",!0)):e(this).spritespin("animate",!1);return!1}};j.drag={mousedown:function(b){var a=e(this).data("spritespin");d.storePoints(b,a);a.onDrag=!0;return!1},mousemove:function(b){var a=e(this),c=a.data("spritespin");c.onDrag&&(d.storePoints(b,c),b=Math.round(c.clickframe+c.dX/c.settings.width*c.settings.frames*c.settings.sense),g.update.apply(a,[b]),g.animate.apply(a,
[!1]));return!1},mouseup:function(b){var a=e(this).data("spritespin");d.resetPoints(b,a);return a.onDrag=!1},mouseenter:function(){return!1},mouseover:function(){return!1},mouseleave:function(b){var a=e(this).data("spritespin");d.resetPoints(b,a);return a.onDrag=!1},dblclick:function(){var b=e(this);b.data("spritespin");b.spritespin("animate","toggle");return!1},onFrame:function(){return!1}}})(jQuery,window); | AMoo-Miki/cdnjs | ajax/libs/spritespin/1.0.1/jquery.spritespin.min.js | JavaScript | mit | 9,691 |
!function(t,e){"function"==typeof define&&define.amd?define("simditor",["jquery","simple-module","simple-hotkeys","simple-uploader"],function(i,r,n,o){return t.Simditor=e(i,r,n,o)}):"object"==typeof exports?module.exports=e(require("jquery"),require("simple-module"),require("simple-hotkeys"),require("simple-uploader")):t.Simditor=e(jQuery,SimpleModule,simple.hotkeys,simple.uploader)}(this,function(t,e,i,r){var n,o,s,a,l,u,d,h,p,c,f,g,m,v,y,b,_,w,x,T,k,C,E,A,B,R,N,S,M,O,I,H,D=function(t,e){function i(){this.constructor=t}for(var r in e)K.call(e,r)&&(t[r]=e[r]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},K={}.hasOwnProperty,z=[].indexOf||function(t){for(var e=0,i=this.length;e<i;e++)if(e in this&&this[e]===t)return e;return-1},W=[].slice;return E=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return D(i,e),i.pluginName="Selection",i.prototype._init=function(){return this.editor=this._module,this.sel=document.getSelection()},i.prototype.clear=function(){var t;try{return this.sel.removeAllRanges()}catch(e){t=e}},i.prototype.getRange=function(){return this.editor.inputManager.focused&&this.sel.rangeCount?this.sel.getRangeAt(0):null},i.prototype.selectRange=function(t){return this.clear(),this.sel.addRange(t),this.editor.inputManager.focused||!this.editor.util.browser.firefox&&!this.editor.util.browser.msie||this.editor.body.focus(),t},i.prototype.rangeAtEndOf=function(e,i){var r,n,o;if(null==i&&(i=this.getRange()),null!=i&&i.collapsed)return e=t(e)[0],r=i.endContainer,n=this.editor.util.getNodeLength(r),!!(i.endOffset===n-1&&t(r).contents().last().is("br")||i.endOffset===n)&&(e===r||!!t.contains(e,r)&&(o=!0,t(r).parentsUntil(e).addBack().each(function(e){return function(e,i){var r,n;if(n=t(i).parent().contents().filter(function(){return!(this!==i&&3===this.nodeType&&!this.nodeValue)}),r=n.last(),!(r.get(0)===i||r.is("br")&&r.prev().get(0)===i))return o=!1,!1}}(this)),o))},i.prototype.rangeAtStartOf=function(e,i){var r,n;if(null==i&&(i=this.getRange()),null!=i&&i.collapsed)return e=t(e)[0],n=i.startContainer,0===i.startOffset&&(e===n||!!t.contains(e,n)&&(r=!0,t(n).parentsUntil(e).addBack().each(function(e){return function(e,i){var n;if(n=t(i).parent().contents().filter(function(){return!(this!==i&&3===this.nodeType&&!this.nodeValue)}),n.first().get(0)!==i)return r=!1}}(this)),r))},i.prototype.insertNode=function(e,i){if(null==i&&(i=this.getRange()),null!=i)return e=t(e)[0],i.insertNode(e),this.setRangeAfter(e,i)},i.prototype.setRangeAfter=function(e,i){if(null==i&&(i=this.getRange()),null!=i)return e=t(e)[0],i.setEndAfter(e),i.collapse(!1),this.selectRange(i)},i.prototype.setRangeBefore=function(e,i){if(null==i&&(i=this.getRange()),null!=i)return e=t(e)[0],i.setEndBefore(e),i.collapse(!1),this.selectRange(i)},i.prototype.setRangeAtStartOf=function(e,i){return null==i&&(i=this.getRange()),e=t(e).get(0),i.setEnd(e,0),i.collapse(!1),this.selectRange(i)},i.prototype.setRangeAtEndOf=function(e,i){var r,n,o,s,a,l;return null==i&&(i=this.getRange()),n=t(e),e=n.get(0),n.is("pre")?(o=n.contents(),o.length>0?(s=o.last(),a=s.text(),"\n"===a.charAt(a.length-1)?i.setEnd(s[0],this.editor.util.getNodeLength(s[0])-1):i.setEnd(s[0],this.editor.util.getNodeLength(s[0]))):i.setEnd(e,0)):(l=this.editor.util.getNodeLength(e),3!==e.nodeType&&l>0&&(r=t(e).contents().last(),r.is("br")?l-=1:3!==r[0].nodeType&&this.editor.util.isEmptyNode(r)&&(r.append(this.editor.util.phBr),e=r[0],l=0)),i.setEnd(e,l)),i.collapse(!1),this.selectRange(i)},i.prototype.deleteRangeContents=function(t){var e,i;return null==t&&(t=this.getRange()),i=t.cloneRange(),e=t.cloneRange(),i.collapse(!0),e.collapse(!1),!t.collapsed&&this.rangeAtStartOf(this.editor.body,i)&&this.rangeAtEndOf(this.editor.body,e)?(this.editor.body.empty(),t.setStart(this.editor.body[0],0),t.collapse(!0),this.selectRange(t)):t.deleteContents(),t},i.prototype.breakBlockEl=function(e,i){var r;return null==i&&(i=this.getRange()),r=t(e),i.collapsed?(i.setStartBefore(r.get(0)),i.collapsed?r:r.before(i.extractContents())):r},i.prototype.save=function(e){var i,r,n;if(null==e&&(e=this.getRange()),!this._selectionSaved)return r=e.cloneRange(),r.collapse(!1),n=t("<span/>").addClass("simditor-caret-start"),i=t("<span/>").addClass("simditor-caret-end"),r.insertNode(i[0]),e.insertNode(n[0]),this.clear(),this._selectionSaved=!0},i.prototype.restore=function(){var t,e,i,r,n,o,s;return!!this._selectionSaved&&(n=this.editor.body.find(".simditor-caret-start"),t=this.editor.body.find(".simditor-caret-end"),n.length&&t.length?(o=n.parent(),s=o.contents().index(n),e=t.parent(),i=e.contents().index(t),o[0]===e[0]&&(i-=1),r=document.createRange(),r.setStart(o.get(0),s),r.setEnd(e.get(0),i),n.remove(),t.remove(),this.selectRange(r)):(n.remove(),t.remove()),this._selectionSaved=!1,r)},i}(e),h=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return D(i,e),i.pluginName="Formatter",i.prototype.opts={allowedTags:null,allowedAttributes:null},i.prototype._init=function(){return this.editor=this._module,this._allowedTags=this.opts.allowedTags||["br","a","img","b","strong","i","u","font","p","ul","ol","li","blockquote","pre","code","h1","h2","h3","h4","hr"],this._allowedAttributes=this.opts.allowedAttributes||{img:["src","alt","width","height","data-image-src","data-image-size","data-image-name","data-non-image"],a:["href","target"],font:["color"],pre:["data-lang"],code:["class"],p:["data-indent","data-align"],h1:["data-indent"],h2:["data-indent"],h3:["data-indent"],h4:["data-indent"]},this.editor.body.on("click","a",function(t){return function(t){return!1}}(this))},i.prototype.decorate=function(t){return null==t&&(t=this.editor.body),this.editor.trigger("decorate",[t])},i.prototype.undecorate=function(e){return null==e&&(e=this.editor.body.clone()),this.editor.trigger("undecorate",[e]),t.trim(e.html())},i.prototype.autolink=function(e){var i,r,n,o,s,a,l,u,d,h,p;for(null==e&&(e=this.editor.body),a=[],r=function(i){return i.contents().each(function(i,n){var o,s;if(o=t(n),!o.is("a")&&!o.closest("a, pre",e).length)return o.contents().length?r(o):(s=o.text())&&/https?:\/\/|www\./gi.test(s)?a.push(o):void 0})},r(e),u=/(https?:\/\/|www\.)[\w\-\.\?&=\/#%:,@\!\+]+/gi,n=0,s=a.length;n<s;n++){for(i=a[n],h=i.text(),d=[],l=null,o=0;null!==(l=u.exec(h));)d.push(document.createTextNode(h.substring(o,l.index))),o=u.lastIndex,p=/^(http(s)?:\/\/|\/)/.test(l[0])?l[0]:"http://"+l[0],d.push(t('<a href="'+p+'" rel="nofollow"></a>').text(l[0])[0]);d.push(document.createTextNode(h.substring(o))),i.replaceWith(t(d))}return e},i.prototype.format=function(e){var i,r,n,o,s,a,l,u,d,h;if(null==e&&(e=this.editor.body),e.is(":empty"))return e.append("<p>"+this.editor.util.phBr+"</p>"),e;for(d=e.contents(),n=0,s=d.length;n<s;n++)l=d[n],this.cleanNode(l,!0);for(h=e.contents(),o=0,a=h.length;o<a;o++)u=h[o],i=t(u),i.is("br")?("undefined"!=typeof r&&null!==r&&(r=null),i.remove()):this.editor.util.isBlockNode(u)?i.is("li")?r&&r.is("ul, ol")?r.append(u):(r=t("<ul/>").insertBefore(u),r.append(u)):r=null:(r&&!r.is("ul, ol")||(r=t("<p/>").insertBefore(u)),r.append(u));return e},i.prototype.cleanNode=function(e,i){var r,n,o,s,a,l,u,d,h,p,c,f,g,m,v,y,b;if(n=t(e),n.length>0){if(3===n[0].nodeType)return y=n.text().replace(/(\r\n|\n|\r)/gm,""),void(y?(b=document.createTextNode(y),n.replaceWith(b)):n.remove());if(u=n.contents(),d=n.is('[class^="simditor-"]'),n.is(this._allowedTags.join(","))||d){if(n.is("a")&&(r=n.find("img")).length>0&&(n.replaceWith(r),n=r,u=null),n.is("img")&&n.hasClass("uploading")&&n.remove(),!d)for(a=this._allowedAttributes[n[0].tagName.toLowerCase()],m=t.makeArray(n[0].attributes),h=0,c=m.length;h<c;h++)l=m[h],null!=a&&(v=l.name,z.call(a,v)>=0)||n.removeAttr(l.name)}else 1!==n[0].nodeType||n.is(":empty")?(n.remove(),u=null):n.is("div, article, dl, header, footer, tr")?(n.append("<br/>"),u.first().unwrap()):n.is("table")?(o=t("<p/>"),n.find("tr").each(function(e){return function(e,i){return o.append(t(i).text()+"<br/>")}}(this)),n.replaceWith(o),u=null):n.is("thead, tfoot")?(n.remove(),u=null):n.is("th")?(s=t("<td/>").append(n.contents()),n.replaceWith(s)):u.first().unwrap();if(i&&null!=u&&!n.is("pre"))for(p=0,f=u.length;p<f;p++)g=u[p],this.cleanNode(g,!0);return null}},i.prototype.clearHtml=function(e,i){var r,n,o;return null==i&&(i=!0),r=t("<div/>").append(e),n=r.contents(),o="",n.each(function(e){return function(r,s){var a,l;return 3===s.nodeType?o+=s.nodeValue:1===s.nodeType&&(a=t(s),l=a.contents(),l.length>0&&(o+=e.clearHtml(l)),i&&r<n.length-1&&a.is("br, p, div, li, tr, pre, address, artticle, aside, dl, figcaption, footer, h1, h2, h3, h4, header"))?o+="\n":void 0}}(this)),o},i.prototype.beautify=function(e){var i;return i=function(t){return!!(t.is("p")&&!t.text()&&t.children(":not(br)").length<1)},e.each(function(e){return function(e,r){var n;return n=t(r),n.is(':not(img, br, col, td, hr, [class^="simditor-"]):empty')&&n.remove(),i(n)&&n.remove(),n.find(':not(img, br, col, td, hr, [class^="simditor-"]):empty').remove()}}(this))},i}(e),v=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return D(r,e),r.pluginName="InputManager",r.prototype.opts={pasteImage:!1},r.prototype._modifierKeys=[16,17,18,91,93,224],r.prototype._arrowKeys=[37,38,39,40],r.prototype._init=function(){var e;if(this.editor=this._module,this.throttledTrigger=this.editor.util.throttle(function(t){return function(){var e;return e=1<=arguments.length?W.call(arguments,0):[],setTimeout(function(){var i;return(i=t.editor).trigger.apply(i,e)},10)}}(this),300),this.opts.pasteImage&&"string"!=typeof this.opts.pasteImage&&(this.opts.pasteImage="inline"),this._keystrokeHandlers={},this.hotkeys=i({el:this.editor.body}),this._pasteArea=t("<div/>").css({width:"1px",height:"1px",overflow:"hidden",position:"fixed",right:"0",bottom:"100px"}).attr({tabIndex:"-1",contentEditable:!0}).addClass("simditor-paste-area").appendTo(this.editor.el),t(document).on("selectionchange.simditor"+this.editor.id,function(t){return function(e){if(t.focused)return t._selectionTimer&&(clearTimeout(t._selectionTimer),t._selectionTimer=null),t._selectionTimer=setTimeout(function(){return t.editor.trigger("selectionchanged")},20)}}(this)),this.editor.on("valuechanged",function(e){return function(){if(!e.editor.util.closestBlockEl()&&e.focused&&(e.editor.selection.save(),e.editor.formatter.format(),e.editor.selection.restore()),e.editor.body.find("hr, pre, .simditor-table").each(function(i,r){var n,o;if(n=t(r),(n.parent().is("blockquote")||n.parent()[0]===e.editor.body[0])&&(o=!1,0===n.next().length&&(t("<p/>").append(e.editor.util.phBr).insertAfter(n),o=!0),0===n.prev().length&&(t("<p/>").append(e.editor.util.phBr).insertBefore(n),o=!0),o))return setTimeout(function(){return e.editor.trigger("valuechanged")},10)}),e.editor.body.find("pre:empty").append(e.editor.util.phBr),!e.editor.util.support.onselectionchange&&e.focused)return e.editor.trigger("selectionchanged")}}(this)),this.editor.on("selectionchanged",function(t){return function(e){return t.editor.undoManager.update()}}(this)),this.editor.body.on("keydown",t.proxy(this._onKeyDown,this)).on("keypress",t.proxy(this._onKeyPress,this)).on("keyup",t.proxy(this._onKeyUp,this)).on("mouseup",t.proxy(this._onMouseUp,this)).on("focus",t.proxy(this._onFocus,this)).on("blur",t.proxy(this._onBlur,this)).on("paste",t.proxy(this._onPaste,this)).on("drop",t.proxy(this._onDrop,this)).on("input",t.proxy(this._onInput,this)),this.editor.util.browser.firefox&&(this.addShortcut("cmd+left",function(t){return function(e){return e.preventDefault(),t.editor.selection.sel.modify("move","backward","lineboundary"),!1}}(this)),this.addShortcut("cmd+right",function(t){return function(e){return e.preventDefault(),t.editor.selection.sel.modify("move","forward","lineboundary"),!1}}(this)),this.addShortcut(this.editor.util.os.mac?"cmd+a":"ctrl+a",function(t){return function(e){var i,r,n,o;if(i=t.editor.body.children(),i.length>0)return r=i.first().get(0),n=i.last().get(0),o=document.createRange(),o.setStart(r,0),o.setEnd(n,t.editor.util.getNodeLength(n)),t.editor.selection.selectRange(o),!1}}(this))),e=this.editor.util.os.mac?"cmd+enter":"ctrl+enter",this.addShortcut(e,function(t){return function(e){return t.editor.el.closest("form").find("button:submit").click(),!1}}(this)),this.editor.textarea.attr("autofocus"))return setTimeout(function(t){return function(){return t.editor.focus()}}(this),0)},r.prototype._onFocus=function(t){return this.editor.el.addClass("focus").removeClass("error"),this.focused=!0,this.lastCaretPosition=null,setTimeout(function(t){return function(){return t.editor.triggerHandler("focus"),t.editor.trigger("selectionchanged")}}(this),0)},r.prototype._onBlur=function(t){var e;return this.editor.el.removeClass("focus"),this.editor.sync(),this.focused=!1,this.lastCaretPosition=null!=(e=this.editor.undoManager.currentState())?e.caret:void 0,this.editor.triggerHandler("blur")},r.prototype._onMouseUp=function(t){if(!this.editor.util.support.onselectionchange)return setTimeout(function(t){return function(){return t.editor.trigger("selectionchanged")}}(this),0)},r.prototype._onKeyDown=function(e){var i,r,n,o;if(this.editor.triggerHandler(e)===!1)return!1;if(!this.hotkeys.respondTo(e)){if(e.which in this._keystrokeHandlers){if(o="function"==typeof(i=this._keystrokeHandlers[e.which])["*"]?i["*"](e):void 0)return this.editor.trigger("valuechanged"),!1;if(this.editor.util.traverseUp(function(i){return function(r){var n,s;if(r.nodeType===document.ELEMENT_NODE)return n=null!=(s=i._keystrokeHandlers[e.which])?s[r.tagName.toLowerCase()]:void 0,o="function"==typeof n?n(e,t(r)):void 0,o!==!0&&o!==!1&&void 0}}(this)),o)return this.editor.trigger("valuechanged"),!1}if(r=e.which,!(z.call(this._modifierKeys,r)>=0||(n=e.which,z.call(this._arrowKeys,n)>=0)||this.editor.util.metaKey(e)&&86===e.which))return this.editor.util.support.oninput||this.throttledTrigger("valuechanged",["typing"]),null}},r.prototype._onKeyPress=function(t){if(this.editor.triggerHandler(t)===!1)return!1},r.prototype._onKeyUp=function(e){var i,r;return this.editor.triggerHandler(e)!==!1&&(!this.editor.util.support.onselectionchange&&(r=e.which,z.call(this._arrowKeys,r)>=0)?void this.editor.trigger("selectionchanged"):void(8!==e.which&&46!==e.which||!this.editor.util.isEmptyNode(this.editor.body)||(this.editor.body.empty(),i=t("<p/>").append(this.editor.util.phBr).appendTo(this.editor.body),this.editor.selection.setRangeAtStartOf(i))))},r.prototype._onPaste=function(e){var i,r,n,o,s,a,l,u,d;if(this.editor.triggerHandler(e)===!1)return!1;if(l=this.editor.selection.deleteRangeContents(),l.collapsed||l.collapse(!0),i=this.editor.util.closestBlockEl(),r=i.is("pre, table"),e.originalEvent.clipboardData&&e.originalEvent.clipboardData.items&&e.originalEvent.clipboardData.items.length>0&&(s=e.originalEvent.clipboardData.items[0],/^image\//.test(s.type)&&!r)){if(n=s.getAsFile(),null==n||!this.opts.pasteImage)return;return n.name||(n.name="Clipboard Image.png"),d={},d[this.opts.pasteImage]=!0,null!=(u=this.editor.uploader)&&u.upload(n,d),!1}return a=function(e){return function(n){var o,s,a,u,h,p,c,f,g,m,v,y,b,_,w,x,T,k,C,E,A;if(e.editor.triggerHandler("pasting",[n])!==!1&&n){if(r)if(i.is("table")){for(w=n.split("\n"),f=w.pop(),h=0,g=w.length;h<g;h++)_=w[h],e.editor.selection.insertNode(document.createTextNode(_)),e.editor.selection.insertNode(t("<br/>"));e.editor.selection.insertNode(document.createTextNode(f))}else for(n=t("<div/>").text(n),C=n.contents(),p=0,m=C.length;p<m;p++)T=C[p],e.editor.selection.insertNode(t(T)[0],l);else if(i.is(e.editor.body))for(c=0,v=n.length;c<v;c++)T=n[c],e.editor.selection.insertNode(T,l);else{if(n.length<1)return;if(1===n.length)if(n.is("p")){if(a=n.contents(),1===a.length&&a.is("img")){if(o=a,/^data:image/.test(o.attr("src"))){if(!e.opts.pasteImage)return;return s=e.editor.util.dataURLtoBlob(o.attr("src")),s.name="Clipboard Image.png",d={},d[e.opts.pasteImage]=!0,void(null!=(E=e.editor.uploader)&&E.upload(s,d))}if(o.is('img[src^="webkit-fake-url://"]'))return}for(x=0,y=a.length;x<y;x++)T=a[x],e.editor.selection.insertNode(T,l)}else if(i.is("p")&&e.editor.util.isEmptyNode(i))i.replaceWith(n),e.editor.selection.setRangeAtEndOf(n,l);else if(n.is("ul, ol"))if(1===n.find("li").length)for(n=t("<div/>").text(n.text()),A=n.contents(),k=0,b=A.length;k<b;k++)T=A[k],e.editor.selection.insertNode(t(T)[0],l);else i.is("li")?(i.parent().after(n),e.editor.selection.setRangeAtEndOf(n,l)):(i.after(n),e.editor.selection.setRangeAtEndOf(n,l));else i.after(n),e.editor.selection.setRangeAtEndOf(n,l);else i.is("li")&&(i=i.parent()),e.editor.selection.rangeAtStartOf(i,l)?u="before":e.editor.selection.rangeAtEndOf(i,l)?u="after":(e.editor.selection.breakBlockEl(i,l),u="before"),i[u](n),e.editor.selection.setRangeAtEndOf(n.last(),l)}return e.editor.trigger("valuechanged")}}}(this),r?(e.preventDefault(),o=this.editor.util.browser.msie?window.clipboardData.getData("Text"):e.originalEvent.clipboardData.getData("text/plain"),a(o)):(this.editor.selection.save(l),this._pasteArea.focus(),this.editor.util.browser.msie&&10===this.editor.util.browser.version&&(e.preventDefault(),this._pasteArea.html(window.clipboardData.getData("Text"))),setTimeout(function(e){return function(){return e._pasteArea.is(":empty")?o=null:(o=t("<div/>").append(e._pasteArea.contents()),o.find("table colgroup").remove(),e.editor.formatter.format(o),e.editor.formatter.decorate(o),e.editor.formatter.beautify(o.children()),o=o.contents()),e._pasteArea.empty(),l=e.editor.selection.restore(),a(o)}}(this),10))},r.prototype._onDrop=function(t){return this.editor.triggerHandler(t)!==!1&&setTimeout(function(t){return function(){return t.editor.trigger("valuechanged")}}(this),0)},r.prototype._onInput=function(t){return this.throttledTrigger("valuechanged",["oninput"])},r.prototype.addKeystrokeHandler=function(t,e,i){return this._keystrokeHandlers[t]||(this._keystrokeHandlers[t]={}),this._keystrokeHandlers[t][e]=i},r.prototype.addShortcut=function(e,i){return this.hotkeys.add(e,t.proxy(i,this))},r}(e),b=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return D(i,e),i.pluginName="Keystroke",i.prototype._init=function(){var e;return this.editor=this._module,this.editor.util.browser.safari&&this.editor.inputManager.addKeystrokeHandler("13","*",function(e){return function(i){var r,n;if(i.shiftKey&&(r=e.editor.util.closestBlockEl(),!r.is("pre")))return n=t("<br/>"),e.editor.selection.rangeAtEndOf(r)?(e.editor.selection.insertNode(n),e.editor.selection.insertNode(t("<br/>")),e.editor.selection.setRangeBefore(n)):e.editor.selection.insertNode(n),!0}}(this)),(this.editor.util.browser.webkit||this.editor.util.browser.msie)&&(e=function(e){return function(i,r){var n;if(e.editor.selection.rangeAtEndOf(r))return n=t("<p/>").append(e.editor.util.phBr).insertAfter(r),e.editor.selection.setRangeAtStartOf(n),!0}}(this),this.editor.inputManager.addKeystrokeHandler("13","h1",e),this.editor.inputManager.addKeystrokeHandler("13","h2",e),this.editor.inputManager.addKeystrokeHandler("13","h3",e),this.editor.inputManager.addKeystrokeHandler("13","h4",e),this.editor.inputManager.addKeystrokeHandler("13","h5",e),this.editor.inputManager.addKeystrokeHandler("13","h6",e)),this.editor.inputManager.addKeystrokeHandler("8","*",function(t){return function(e){var i,r,n;return n=t.editor.util.furthestBlockEl(),r=n.prev(),r.is("hr")&&t.editor.selection.rangeAtStartOf(n)?(t.editor.selection.save(),r.remove(),t.editor.selection.restore(),!0):(i=t.editor.util.closestBlockEl(),t.editor.util.browser.webkit&&t.editor.selection.rangeAtStartOf(i)?(t.editor.selection.save(),t.editor.formatter.cleanNode(i,!0),t.editor.selection.restore(),null):void 0)}}(this)),this.editor.inputManager.addKeystrokeHandler("13","li",function(e){return function(i,r){var n,o,s,a;if(n=r.clone(),n.find("ul, ol").remove(),e.editor.util.isEmptyNode(n)&&r.is(e.editor.util.closestBlockEl())){if(o=r.parent(),r.next("li").length>0){if(!e.editor.util.isEmptyNode(r))return;o.parent("li").length>0?(s=t("<li/>").append(e.editor.util.phBr).insertAfter(o.parent("li")),a=t("<"+o[0].tagName+"/>").append(r.nextAll("li")),s.append(a)):(s=t("<p/>").append(e.editor.util.phBr).insertAfter(o),a=t("<"+o[0].tagName+"/>").append(r.nextAll("li")),s.after(a))}else o.parent("li").length>0?(s=t("<li/>").insertAfter(o.parent("li")),r.contents().length>0?s.append(r.contents()):s.append(e.editor.util.phBr)):(s=t("<p/>").append(e.editor.util.phBr).insertAfter(o),r.children("ul, ol").length>0&&s.after(r.children("ul, ol")));return r.prev("li").length?r.remove():o.remove(),e.editor.selection.setRangeAtStartOf(s),!0}}}(this)),this.editor.inputManager.addKeystrokeHandler("13","pre",function(e){return function(i,r){var n,o,s;return i.preventDefault(),i.shiftKey?(n=t("<p/>").append(e.editor.util.phBr).insertAfter(r),e.editor.selection.setRangeAtStartOf(n),!0):(s=e.editor.selection.getRange(),o=null,s.deleteContents(),!e.editor.util.browser.msie&&e.editor.selection.rangeAtEndOf(r)?(o=document.createTextNode("\n\n"),s.insertNode(o),s.setEnd(o,1)):(o=document.createTextNode("\n"),s.insertNode(o),s.setStartAfter(o)),s.collapse(!1),e.editor.selection.selectRange(s),!0)}}(this)),this.editor.inputManager.addKeystrokeHandler("13","blockquote",function(t){return function(e,i){var r,n;if(r=t.editor.util.closestBlockEl(),r.is("p")&&!r.next().length&&t.editor.util.isEmptyNode(r))return i.after(r),n=document.createRange(),t.editor.selection.setRangeAtStartOf(r,n),!0}}(this)),this.editor.inputManager.addKeystrokeHandler("8","li",function(e){return function(i,r){var n,o,s,a,l,u,d,h;return o=r.children("ul, ol"),l=r.prev("li"),o.length>0&&l.length>0&&(h="",u=null,r.contents().each(function(e,i){if(1===i.nodeType&&/UL|OL/.test(i.nodeName))return!1;if(1!==i.nodeType||!/BR/.test(i.nodeName))return 3===i.nodeType&&i.nodeValue?h+=i.nodeValue:1===i.nodeType&&(h+=t(i).text()),u=t(i)}),u&&1===h.length&&e.editor.util.browser.firefox&&!u.next("br").length?(n=t(e.editor.util.phBr).insertAfter(u),u.remove(),e.editor.selection.setRangeBefore(n),!0):!(h.length>0)&&(d=document.createRange(),a=l.children("ul, ol"),a.length>0?(s=t("<li/>").append(e.editor.util.phBr).appendTo(a),a.append(o.children("li")),r.remove(),e.editor.selection.setRangeAtEndOf(s,d)):(e.editor.selection.setRangeAtEndOf(l,d),l.append(o),r.remove(),e.editor.selection.selectRange(d)),!0))}}(this)),this.editor.inputManager.addKeystrokeHandler("8","pre",function(e){return function(i,r){var n,o,s;if(e.editor.selection.rangeAtStartOf(r))return o=r.html().replace("\n","<br/>"),n=t("<p/>").append(o||e.editor.util.phBr).insertAfter(r),r.remove(),s=document.createRange(),e.editor.selection.setRangeAtStartOf(n,s),!0}}(this)),this.editor.inputManager.addKeystrokeHandler("8","blockquote",function(t){return function(e,i){var r,n;if(t.editor.selection.rangeAtStartOf(i))return r=i.children().first().unwrap(),n=document.createRange(),t.editor.selection.setRangeAtStartOf(r,n),!0}}(this))},i}(e),O=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return D(i,e),i.pluginName="UndoManager",i.prototype._index=-1,i.prototype._capacity=50,i.prototype._timer=null,i.prototype._init=function(){var t,e;return this.editor=this._module,this._stack=[],this.editor.util.os.mac?(e="cmd+z",t="shift+cmd+z"):this.editor.util.os.win?(e="ctrl+z",t="ctrl+y"):(e="ctrl+z",t="shift+ctrl+z"),this.editor.inputManager.addShortcut(e,function(t){return function(e){return e.preventDefault(),t.undo(),!1}}(this)),this.editor.inputManager.addShortcut(t,function(t){return function(e){return e.preventDefault(),t.redo(),!1}}(this)),this.editor.on("valuechanged",function(t){return function(e,i){if("undo"!==i&&"redo"!==i)return t._timer&&(clearTimeout(t._timer),t._timer=null),t._timer=setTimeout(function(){return t._pushUndoState(),t._timer=null},200)}}(this))},i.prototype._pushUndoState=function(){var t,e;if(this.editor.triggerHandler("pushundostate")!==!1&&(t=this.currentState(),e=this.editor.body.html(),!t||t.html!==e))return this._index+=1,this._stack.length=this._index,this._stack.push({html:e,caret:this.caretPosition()}),this._stack.length>this._capacity?(this._stack.shift(),this._index-=1):void 0},i.prototype.currentState=function(){return this._stack.length&&this._index>-1?this._stack[this._index]:null},i.prototype.undo=function(){var t;if(!(this._index<1||this._stack.length<2))return this.editor.hidePopover(),this._index-=1,t=this._stack[this._index],this.editor.body.html(t.html),this.caretPosition(t.caret),this.editor.body.find(".selected").removeClass("selected"),this.editor.sync(),this.editor.trigger("valuechanged",["undo"])},i.prototype.redo=function(){var t;if(!(this._index<0||this._stack.length<this._index+2))return this.editor.hidePopover(),this._index+=1,t=this._stack[this._index],this.editor.body.html(t.html),this.caretPosition(t.caret),this.editor.body.find(".selected").removeClass("selected"),this.editor.sync(),this.editor.trigger("valuechanged",["redo"])},i.prototype.update=function(){var t,e;if(!this._timer&&(t=this.currentState()))return e=this.editor.body.html(),t.html=e,t.caret=this.caretPosition()},i.prototype._getNodeOffset=function(e,i){var r,n,o;return r=i?t(e):t(e).parent(),o=0,n=!1,r.contents().each(function(t){return function(t,r){return i!==t&&e!==r&&(3===r.nodeType?n||(o+=1,n=!0):(o+=1,n=!1),null)}}(this)),o},i.prototype._getNodePosition=function(t,e){var i,r;if(3===t.nodeType)for(r=t.previousSibling;r&&3===r.nodeType;)t=r,e+=this.editor.util.getNodeLength(r),r=r.previousSibling;else e=this._getNodeOffset(t,e);return i=[],i.unshift(e),this.editor.util.traverseUp(function(t){return function(e){return i.unshift(t._getNodeOffset(e))}}(this),t),i},i.prototype._getNodeByPosition=function(e){var i,r,n,o,s,a,l,u;for(a=this.editor.body[0],u=e.slice(0,e.length-1),n=o=0,s=u.length;o<s;n=++o){if(l=u[n],r=a.childNodes,l>r.length-1){if(n!==e.length-2||!t(a).is("pre")){a=null;break}i=document.createTextNode(""),a.appendChild(i),r=a.childNodes}a=r[l]}return a},i.prototype.caretPosition=function(t){var e,i,r,n,o;if(t){if(this.editor.inputManager.focused||this.editor.body.focus(),!t.start)return void this.editor.body.blur();if(n=this._getNodeByPosition(t.start),o=t.start[t.start.length-1],t.collapsed?(e=n,i=o):(e=this._getNodeByPosition(t.end),i=t.start[t.start.length-1]),!n||!e)throw new Error("simditor: invalid caret state");return r=document.createRange(),r.setStart(n,o),r.setEnd(e,i),this.editor.selection.selectRange(r)}return r=this.editor.selection.getRange(),this.editor.inputManager.focused&&null!=r?(t={start:[],end:null,collapsed:!0},t.start=this._getNodePosition(r.startContainer,r.startOffset),r.collapsed||(t.end=this._getNodePosition(r.endContainer,r.endOffset),t.collapsed=!1),t):{}},i}(e),H=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return D(i,e),i.pluginName="Util",i.prototype._init=function(){if(this.editor=this._module,this.browser.msie&&this.browser.version<11)return this.phBr=""},i.prototype.phBr="<br/>",i.prototype.os=function(){var t;return t={},/Mac/.test(navigator.appVersion)?t.mac=!0:/Linux/.test(navigator.appVersion)?t.linux=!0:/Win/.test(navigator.appVersion)?t.win=!0:/X11/.test(navigator.appVersion)&&(t.unix=!0),/Mobi/.test(navigator.appVersion)&&(t.mobile=!0),t}(),i.prototype.browser=function(){var t,e,i,r,n,o,s,a,l;return l=navigator.userAgent,i=/(msie|trident)/i.test(l),t=/chrome|crios/i.test(l),a=/safari/i.test(l)&&!t,e=/firefox/i.test(l),i?{msie:!0,version:1*(null!=(r=l.match(/(msie |rv:)(\d+(\.\d+)?)/i))?r[2]:void 0)}:t?{webkit:!0,chrome:!0,version:1*(null!=(n=l.match(/(?:chrome|crios)\/(\d+(\.\d+)?)/i))?n[1]:void 0)}:a?{webkit:!0,safari:!0,version:1*(null!=(o=l.match(/version\/(\d+(\.\d+)?)/i))?o[1]:void 0)}:e?{mozilla:!0,firefox:!0,version:1*(null!=(s=l.match(/firefox\/(\d+(\.\d+)?)/i))?s[1]:void 0)}:{}}(),i.prototype.support=function(){return{onselectionchange:function(){var t,e;if(e=document.onselectionchange,void 0!==e)try{return document.onselectionchange=0,null===document.onselectionchange}catch(e){t=e}finally{document.onselectionchange=e}return!1}(),oninput:function(){return!/(msie|trident)/i.test(navigator.userAgent)}()}}(),i.prototype.reflow=function(e){return null==e&&(e=document),t(e)[0].offsetHeight},i.prototype.metaKey=function(t){var e;return e=/Mac/.test(navigator.userAgent),e?t.metaKey:t.ctrlKey},i.prototype.isEmptyNode=function(e){var i;return i=t(e),i.is(":empty")||!i.text()&&!i.find(":not(br, span, div)").length},i.prototype.blockNodes=["div","p","ul","ol","li","blockquote","hr","pre","h1","h2","h3","h4","table"],i.prototype.isBlockNode=function(e){return e=t(e)[0],!(!e||3===e.nodeType)&&new RegExp("^("+this.blockNodes.join("|")+")$").test(e.nodeName.toLowerCase())},i.prototype.closestBlockEl=function(e){var i,r,n;return null==e&&(n=this.editor.selection.getRange(),e=null!=n?n.commonAncestorContainer:void 0),i=t(e),i.length?(r=i.parentsUntil(this.editor.body).addBack(),r=r.filter(function(t){return function(e){return t.isBlockNode(r.eq(e))}}(this)),r.length?r.last():null):null},i.prototype.furthestNode=function(e,i){var r,n,o;return null==e&&(o=this.editor.selection.getRange(),e=null!=o?o.commonAncestorContainer:void 0),r=t(e),r.length?(n=r.parentsUntil(this.editor.body).addBack(),n=n.filter(function(e){return function(e){var r;return r=n.eq(e),t.isFunction(i)?i(r):r.is(i)}}(this)),n.length?n.first():null):null},i.prototype.furthestBlockEl=function(e){return this.furthestNode(e,t.proxy(this.isBlockNode,this))},i.prototype.getNodeLength=function(t){switch(t.nodeType){case 7:case 10:return 0;case 3:case 8:return t.length;default:return t.childNodes.length}},i.prototype.traverseUp=function(e,i){var r,n,o,s,a,l,u;if(null==i&&(a=this.editor.selection.getRange(),i=null!=a?a.commonAncestorContainer:void 0),null==i||!t.contains(this.editor.body[0],i))return!1;for(s=t(i).parentsUntil(this.editor.body).get(),s.unshift(i),u=[],r=0,n=s.length;r<n&&(o=s[r],l=e(o),l!==!1);r++)u.push(void 0);return u},i.prototype.dataURLtoBlob=function(t){var e,i,r,n,o,s,a,l,u,d,h;if(s=window.Blob&&function(){var t;try{return Boolean(new Blob)}catch(e){return t=e,!1}}(),o=s&&window.Uint8Array&&function(){var t;try{return 100===new Blob([new Uint8Array(100)]).size}catch(e){return t=e,!1}}(),e=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,!((s||e)&&window.atob&&window.ArrayBuffer&&window.Uint8Array))return!1;for(n=t.split(",")[0].indexOf("base64")>=0?atob(t.split(",")[1]):decodeURIComponent(t.split(",")[1]),i=new ArrayBuffer(n.length),l=new Uint8Array(i),a=u=0,h=n.length;0<=h?u<=h:u>=h;a=0<=h?++u:--u)l[a]=n.charCodeAt(a);return d=t.split(",")[0].split(":")[1].split(";")[0],s?new Blob([o?l:i],{type:d}):(r=new e,r.append(i),r.getBlob(d))},i.prototype.throttle=function(t,e){var i,r,n;return i=null,r=0,n=function(){if(i)return clearTimeout(i),i=null},function(){var o,s,a,l;return s=Date.now(),r||(r=s),a=e-(s-r),l=null,0<a&&a<e?(r=s,n(),o=arguments,i=setTimeout(function(){return r=0,i=null,l=t.apply(null,o)},e)):(n(),r!==s&&(r=0),l=t.apply(null,arguments)),l}},i.prototype.formatHTML=function(e){var i,r,n,o,s,a,l,u,d;for(a=/<(\/?)(.+?)(\/?)>/g,u="",o=0,n=null,r=" ",l=function(t,e){return new Array(e+1).join(t)};null!==(s=a.exec(e));)s.isBlockNode=t.inArray(s[2],this.blockNodes)>-1,s.isStartTag="/"!==s[1]&&"/"!==s[3],s.isEndTag="/"===s[1]||"/"===s[3],i=n?n.index+n[0].length:0,(d=e.substring(i,s.index)).length>0&&t.trim(d)&&(u+=d),s.isBlockNode&&s.isEndTag&&!s.isStartTag&&(o-=1),s.isBlockNode&&s.isStartTag&&(n&&n.isBlockNode&&n.isEndTag||(u+="\n"),u+=l(r,o)),u+=s[0],s.isBlockNode&&s.isEndTag&&(u+="\n"),s.isBlockNode&&s.isStartTag&&(o+=1),n=s;return t.trim(u)},i}(e),S=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return D(i,e),i.pluginName="Toolbar",i.prototype.opts={toolbar:!0,toolbarFloat:!0,toolbarHidden:!1,toolbarFloatOffset:0},i.prototype._tpl={wrapper:'<div class="simditor-toolbar"><ul></ul></div>',
separator:'<li><span class="separator"></span></li>'},i.prototype._init=function(){var e;if(this.editor=this._module,this.opts.toolbar)return t.isArray(this.opts.toolbar)||(this.opts.toolbar=["bold","italic","underline","strikethrough","|","ol","ul","blockquote","code","|","link","image","|","indent","outdent"]),this._render(),this.list.on("click",function(t){return function(t){return!1}}(this)),this.wrapper.on("mousedown",function(t){return function(e){return t.list.find(".menu-on").removeClass(".menu-on")}}(this)),t(document).on("mousedown.simditor"+this.editor.id,function(t){return function(e){return t.list.find(".menu-on").removeClass(".menu-on")}}(this)),!this.opts.toolbarHidden&&this.opts.toolbarFloat&&(this.wrapper.css("top",this.opts.toolbarFloatOffset),e=0,t(window).on("resize.simditor-"+this.editor.id,function(t){return function(i){return t.wrapper.css("position","static"),t.wrapper.width("auto"),t.editor.util.reflow(t.wrapper),t.wrapper.width(t.wrapper.outerWidth()),t.wrapper.css("left",t.wrapper.offset().left),t.wrapper.css("position",""),e=t.wrapper.outerHeight(),t.editor.placeholderEl.css("top",e)}}(this)).resize(),t(window).on("scroll.simditor-"+this.editor.id,function(i){return function(r){var n,o,s;if(s=i.editor.wrapper.offset().top,n=s+i.editor.wrapper.outerHeight()-80,o=t(document).scrollTop()+i.opts.toolbarFloatOffset,o<=s||o>=n){if(i.editor.wrapper.removeClass("toolbar-floating").css("padding-top",""),i.editor.util.os.mobile)return i.wrapper.css("top",i.opts.toolbarFloatOffset)}else if(i.editor.wrapper.addClass("toolbar-floating").css("padding-top",e),i.editor.util.os.mobile)return i.wrapper.css("top",o-s+i.opts.toolbarFloatOffset)}}(this))),this.editor.on("selectionchanged",function(t){return function(){return t.toolbarStatus()}}(this)),this.editor.on("destroy",function(t){return function(){return t.buttons.length=0}}(this)),t(document).on("mousedown.simditor-"+this.editor.id,function(t){return function(e){return t.list.find("li.menu-on").removeClass("menu-on")}}(this))},i.prototype._render=function(){var e,i,r,n;for(this.buttons=[],this.wrapper=t(this._tpl.wrapper).prependTo(this.editor.wrapper),this.list=this.wrapper.find("ul"),n=this.opts.toolbar,e=0,i=n.length;e<i;e++)if(r=n[e],"|"!==r){if(!this.constructor.buttons[r])throw new Error('simditor: invalid toolbar button "'+r+'"');this.buttons.push(new this.constructor.buttons[r]({editor:this.editor}))}else t(this._tpl.separator).appendTo(this.list);if(this.opts.toolbarHidden)return this.wrapper.hide()},i.prototype.toolbarStatus=function(e){var i;if(this.editor.inputManager.focused)return i=this.buttons.slice(0),this.editor.util.traverseUp(function(r){return function(r){var n,o,s,a,l,u,d;for(d=[],o=s=0,l=i.length;s<l;o=++s)n=i[o],null!=e&&n.name!==e||n.status&&n.status(t(r))!==!0||d.push(n);for(a=0,u=d.length;a<u;a++)n=d[a],o=t.inArray(n,i),i.splice(o,1);if(0===i.length)return!1}}(this))},i.prototype.findButton=function(t){var e;return e=this.list.find(".toolbar-item-"+t).data("button"),null!=e?e:null},i.addButton=function(t){return this.buttons[t.prototype.name]=t},i.buttons={},i}(e),m=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return D(i,e),i.pluginName="Indentation",i.prototype.opts={tabIndent:!0},i.prototype._init=function(){return this.editor=this._module,this.editor.inputManager.addKeystrokeHandler("9","*",function(t){return function(e){var i;if(i=t.editor.toolbar.findButton("code"),t.opts.tabIndent||i&&i.active)return t.indent(e.shiftKey)}}(this))},i.prototype.indent=function(t){var e,i,r,n,o;if(n=this.editor.selection.getRange())return r=this.editor.util.closestBlockEl(n.startContainer),i=this.editor.util.closestBlockEl(n.endContainer),r.is("li")&&i.is("li")&&r.parent().is(i.parent())||(r=this.editor.util.furthestBlockEl(r),i=this.editor.util.furthestBlockEl(i)),e=r.is(i)?r:r.nextUntil(i).add(r).add(i),o=!1,e.each(function(e){return function(i,r){return o=t?e.outdentBlock(r):e.indentBlock(r)}}(this)),o},i.prototype.indentBlock=function(e){var i,r,n,o,s,a,l,u,d,h,p;if(i=t(e),i.length){if(i.is("pre")){if(h=this.editor.selection.getRange(),a=t(h.commonAncestorContainer),!a.is(i)&&!a.closest("pre").is(i))return;this.indentText(h)}else if(i.is("li")){if(s=i.prev("li"),s.length<1)return;this.editor.selection.save(),p=i.parent()[0].tagName,r=s.children("ul, ol"),r.length>0?r.append(i):t("<"+p+"/>").append(i).appendTo(s),this.editor.selection.restore()}else if(i.is("p, h1, h2, h3, h4"))d=i.attr("data-indent")||0,d=Math.min(1*d+1,10),i.attr("data-indent",d);else if(i.is("table")||i.is(".simditor-table")){if(h=this.editor.selection.getRange(),l=t(h.commonAncestorContainer).closest("td, th"),n=l.next("td, th"),n.length>0||(u=l.parent("tr"),o=u.next("tr"),o.length<1&&u.parent().is("thead")&&(o=u.parent("thead").next("tbody").find("tr:first")),n=o.find("td:first, th:first")),!(l.length>0&&n.length>0))return!1;this.editor.selection.setRangeAtEndOf(n)}return!0}},i.prototype.indentText=function(t){var e,i;return e=t.toString().replace(/^(?=.+)/gm," "),i=document.createTextNode(e||" "),t.deleteContents(),t.insertNode(i),e?(t.selectNode(i),this.editor.selection.selectRange(t)):this.editor.selection.setRangeAfter(i)},i.prototype.outdentBlock=function(e){var i,r,n,o,s,a,l,u,d,h,p,c;if(i=t(e),i&&i.length>0){if(i.is("pre")){if(p=this.editor.selection.getRange(),o=t(p.commonAncestorContainer),!o.is(i)&&!o.closest("pre").is(i))return;this.outdentText(p)}else if(i.is("li")){if(r=i.parent(),n=r.parent("li"),n.length<1)return d=this.editor.toolbar.findButton(r[0].tagName.toLowerCase()),void(null!=d&&d.command());this.editor.selection.save(),i.next("li").length>0&&t("<"+r[0].tagName+"/>").append(i.nextAll("li")).appendTo(i),i.insertAfter(n),r.children("li").length<1&&r.remove(),this.editor.selection.restore()}else if(i.is("p, h1, h2, h3, h4"))h=null!=(c=i.attr("data-indent"))?c:0,h=1*h-1,h<0&&(h=0),i.attr("data-indent",h);else if(i.is("table")||i.is(".simditor-table")){if(p=this.editor.selection.getRange(),l=t(p.commonAncestorContainer).closest("td, th"),s=l.prev("td, th"),s.length>0||(u=l.parent("tr"),a=u.prev("tr"),a.length<1&&u.parent().is("tbody")&&(a=u.parent("tbody").prev("thead").find("tr:first")),s=a.find("td:last, th:last")),!(l.length>0&&s.length>0))return;this.editor.selection.setRangeAtEndOf(s)}return!0}},i.prototype.outdentText=function(t){},i}(e),A=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return D(i,e),i.connect(H),i.connect(v),i.connect(O),i.connect(b),i.connect(h),i.connect(E),i.connect(S),i.connect(m),i.count=0,i.prototype.opts={textarea:null,placeholder:"",defaultImage:"images/image.png",params:{},upload:!1},i.prototype._init=function(){var e,n,o,s;if(this.textarea=t(this.opts.textarea),this.opts.placeholder=this.opts.placeholder||this.textarea.attr("placeholder"),!this.textarea.length)throw new Error("simditor: param textarea is required.");if(n=this.textarea.data("simditor"),null!=n&&n.destroy(),this.id=++i.count,this._render(),this.opts.upload&&r&&(s="object"==typeof this.opts.upload?this.opts.upload:{},this.uploader=r(s)),o=this.textarea.closest("form"),o.length&&(o.on("submit.simditor-"+this.id,function(t){return function(){return t.sync()}}(this)),o.on("reset.simditor-"+this.id,function(t){return function(){return t.setValue("")}}(this))),this.on("initialized",function(t){return function(){return t.opts.placeholder&&t.on("valuechanged",function(){return t._placeholder()}),t.setValue(t.textarea.val().trim()||"")}}(this)),this.util.browser.mozilla){this.util.reflow();try{return document.execCommand("enableObjectResizing",!1,!1),document.execCommand("enableInlineTableEditing",!1,!1)}catch(t){e=t}}},i.prototype._tpl='<div class="simditor">\n <div class="simditor-wrapper">\n <div class="simditor-placeholder"></div>\n <div class="simditor-body" contenteditable="true">\n </div>\n </div>\n</div>',i.prototype._render=function(){var e,i,r,n;if(this.el=t(this._tpl).insertBefore(this.textarea),this.wrapper=this.el.find(".simditor-wrapper"),this.body=this.wrapper.find(".simditor-body"),this.placeholderEl=this.wrapper.find(".simditor-placeholder").append(this.opts.placeholder),this.el.data("simditor",this),this.wrapper.append(this.textarea),this.textarea.data("simditor",this).blur(),this.body.attr("tabindex",this.textarea.attr("tabindex")),this.util.os.mac?this.el.addClass("simditor-mac"):this.util.os.linux&&this.el.addClass("simditor-linux"),this.util.os.mobile&&this.el.addClass("simditor-mobile"),this.opts.params){i=this.opts.params,r=[];for(e in i)n=i[e],r.push(t("<input/>",{type:"hidden",name:e,value:n}).insertAfter(this.textarea));return r}},i.prototype._placeholder=function(){var t,e;return t=this.body.children(),0===t.length||1===t.length&&this.util.isEmptyNode(t)&&(null!=(e=t.data("indent"))?e:0)<1?this.placeholderEl.show():this.placeholderEl.hide()},i.prototype.setValue=function(t){return this.hidePopover(),this.textarea.val(t),this.body.html(t),this.formatter.format(),this.formatter.decorate(),this.util.reflow(this.body),this.inputManager.lastCaretPosition=null,this.trigger("valuechanged")},i.prototype.getValue=function(){return this.sync()},i.prototype.sync=function(){var e,i,r,n,o,s;for(i=this.body.clone(),this.formatter.undecorate(i),this.formatter.format(i),this.formatter.autolink(i),e=i.children(),o=e.last("p"),n=e.first("p");o.is("p")&&this.util.isEmptyNode(o);)r=o,o=o.prev("p"),r.remove();for(;n.is("p")&&this.util.isEmptyNode(n);)r=n,n=o.next("p"),r.remove();return i.find("img.uploading").remove(),s=t.trim(i.html()),this.textarea.val(s),s},i.prototype.focus=function(){var e,i;return this.body.is(":visible")&&this.body.is("[contenteditable]")?this.inputManager.lastCaretPosition?this.undoManager.caretPosition(this.inputManager.lastCaretPosition):(e=this.body.find("p").last(),e.length>0||(e=t("<p/>").append(this.util.phBr).appendTo(this.body)),i=document.createRange(),this.selection.setRangeAtEndOf(e,i),this.body.focus()):void this.el.find("textarea:visible").focus()},i.prototype.blur=function(){return this.body.is(":visible")&&this.body.is("[contenteditable]")?this.body.blur():this.body.find("textarea:visible").blur()},i.prototype.hidePopover=function(){return this.el.find(".simditor-popover").each(function(e){return function(e,i){if(i=t(i).data("popover"),i.active)return i.hide()}}(this))},i.prototype.destroy=function(){return this.triggerHandler("destroy"),this.textarea.closest("form").off(".simditor .simditor-"+this.id),this.selection.clear(),this.inputManager.focused=!1,this.textarea.insertBefore(this.el).hide().val("").removeData("simditor"),this.el.remove(),t(document).off(".simditor-"+this.id),t(window).off(".simditor-"+this.id),this.off()},i}(e),A.i18n={"zh-CN":{blockquote:"引用",bold:"加粗文字",code:"插入代码",color:"文字颜色",hr:"分隔线",image:"插入图片",externalImage:"外链图片",uploadImage:"上传图片",uploadFailed:"上传失败了",uploadError:"上传出错了",imageUrl:"图片地址",imageSize:"图片尺寸",imageAlt:"图片描述",restoreImageSize:"还原图片尺寸",uploading:"正在上传",indent:"向右缩进",outdent:"向左缩进",italic:"斜体文字",link:"插入链接",text:"文本",linkText:"链接文字",linkUrl:"地址",removeLink:"移除链接",ol:"有序列表",ul:"无序列表",strikethrough:"删除线文字",table:"表格",deleteRow:"删除行",insertRowAbove:"在上面插入行",insertRowBelow:"在下面插入行",deleteColumn:"删除列",insertColumnLeft:"在左边插入列",insertColumnRight:"在右边插入列",deleteTable:"删除表格",title:"标题",normalText:"普通文本",underline:"下划线文字",alignment:"水平对齐",alignCenter:"居中",alignLeft:"居左",alignRight:"居右",selectLanguage:"选择程序语言"}},a=function(e){function i(t){this.editor=t.editor,this.title=this._t(this.name),i.__super__.constructor.call(this,t)}return D(i,e),i.prototype._tpl={item:'<li><a tabindex="-1" unselectable="on" class="toolbar-item" href="javascript:;"><span></span></a></li>',menuWrapper:'<div class="toolbar-menu"></div>',menuItem:'<li><a tabindex="-1" unselectable="on" class="menu-item" href="javascript:;"><span></span></a></li>',separator:'<li><span class="separator"></span></li>'},i.prototype.name="",i.prototype.icon="",i.prototype.title="",i.prototype.text="",i.prototype.htmlTag="",i.prototype.disableTag="",i.prototype.menu=!1,i.prototype.active=!1,i.prototype.disabled=!1,i.prototype.needFocus=!0,i.prototype.shortcut=null,i.prototype._init=function(){var e,i,r,n,o;for(this.render(),this.el.on("mousedown",function(t){return function(e){var i,r;return e.preventDefault(),!(t.el.hasClass("disabled")||t.needFocus&&!t.editor.inputManager.focused)&&(t.menu?(t.wrapper.toggleClass("menu-on").siblings("li").removeClass("menu-on"),t.wrapper.is(".menu-on")&&(i=t.menuWrapper.offset().left+t.menuWrapper.outerWidth()+5-t.editor.wrapper.offset().left-t.editor.wrapper.outerWidth(),i>0&&t.menuWrapper.css({left:"auto",right:0}),t.trigger("menuexpand")),!1):(r=t.el.data("param"),t.command(r),!1))}}(this)),this.wrapper.on("click","a.menu-item",function(e){return function(i){var r,n;return i.preventDefault(),r=t(i.currentTarget),e.wrapper.removeClass("menu-on"),!(r.hasClass("disabled")||e.needFocus&&!e.editor.inputManager.focused)&&(e.editor.toolbar.wrapper.removeClass("menu-on"),n=r.data("param"),e.command(n),!1)}}(this)),this.wrapper.on("mousedown","a.menu-item",function(t){return function(t){return!1}}(this)),this.editor.on("blur",function(t){return function(){if(t.editor.body.is(":visible")&&t.editor.body.is("[contenteditable]"))return t.setActive(!1),t.setDisabled(!1)}}(this)),null!=this.shortcut&&this.editor.inputManager.addShortcut(this.shortcut,function(t){return function(e){return t.el.mousedown(),!1}}(this)),r=this.htmlTag.split(","),n=[],e=0,i=r.length;e<i;e++)o=r[e],o=t.trim(o),o&&t.inArray(o,this.editor.formatter._allowedTags)<0?n.push(this.editor.formatter._allowedTags.push(o)):n.push(void 0);return n},i.prototype.iconClassOf=function(t){return t?"simditor-icon simditor-icon-"+t:""},i.prototype.setIcon=function(t){return this.el.find("span").removeClass().addClass(this.iconClassOf(t)).text(this.text)},i.prototype.render=function(){if(this.wrapper=t(this._tpl.item).appendTo(this.editor.toolbar.list),this.el=this.wrapper.find("a.toolbar-item"),this.el.attr("title",this.title).addClass("toolbar-item-"+this.name).data("button",this),this.setIcon(this.icon),this.menu)return this.menuWrapper=t(this._tpl.menuWrapper).appendTo(this.wrapper),this.menuWrapper.addClass("toolbar-menu-"+this.name),this.renderMenu()},i.prototype.renderMenu=function(){var e,i,r,n,o,s,a,l;if(t.isArray(this.menu)){for(this.menuEl=t("<ul/>").appendTo(this.menuWrapper),s=this.menu,l=[],r=0,n=s.length;r<n;r++)o=s[r],"|"!==o?(i=t(this._tpl.menuItem).appendTo(this.menuEl),e=i.find("a.menu-item").attr({title:null!=(a=o.title)?a:o.text,"data-param":o.param}).addClass("menu-item-"+o.name),o.icon?l.push(e.find("span").addClass(this.iconClassOf(o.icon))):l.push(e.find("span").text(o.text))):t(this._tpl.separator).appendTo(this.menuEl);return l}},i.prototype.setActive=function(t){if(t!==this.active)return this.active=t,this.el.toggleClass("active",this.active),this.editor.toolbar.trigger("buttonstatus",[this])},i.prototype.setDisabled=function(t){if(t!==this.disabled)return this.disabled=t,this.el.toggleClass("disabled",this.disabled),this.editor.toolbar.trigger("buttonstatus",[this])},i.prototype.status=function(t){return null!=t&&this.setDisabled(t.is(this.disableTag)),!!this.disabled||(null!=t&&this.setActive(t.is(this.htmlTag)),this.active)},i.prototype.command=function(t){},i.prototype._t=function(){var t,e,r;return t=1<=arguments.length?W.call(arguments,0):[],r=i.__super__._t.apply(this,t),r||(r=(e=this.editor)._t.apply(e,t)),r},i}(e),A.Button=a,C=function(e){function i(t){this.button=t.button,this.editor=t.button.editor,i.__super__.constructor.call(this,t)}return D(i,e),i.prototype.offset={top:4,left:0},i.prototype.target=null,i.prototype.active=!1,i.prototype._init=function(){return this.el=t('<div class="simditor-popover"></div>').appendTo(this.editor.el).data("popover",this),this.render(),this.el.on("mouseenter",function(t){return function(e){return t.el.addClass("hover")}}(this)),this.el.on("mouseleave",function(t){return function(e){return t.el.removeClass("hover")}}(this))},i.prototype.render=function(){},i.prototype.show=function(e,i){if(null==i&&(i="bottom"),null!=e)return this.el.siblings(".simditor-popover").each(function(e){return function(e,i){if(i=t(i).data("popover"),i.active)return i.hide()}}(this)),this.target=e.addClass("selected"),this.active?(this.refresh(i),this.trigger("popovershow")):(this.active=!0,this.el.css({left:-9999}).show(),setTimeout(function(t){return function(){return t.refresh(i),t.trigger("popovershow")}}(this),0))},i.prototype.hide=function(){if(this.active)return this.target&&this.target.removeClass("selected"),this.target=null,this.active=!1,this.el.hide(),this.trigger("popoverhide")},i.prototype.refresh=function(t){var e,i,r,n,o;if(null==t&&(t="bottom"),this.active)return e=this.editor.el.offset(),n=this.target.offset(),r=this.target.outerHeight(),"bottom"===t?o=n.top-e.top+r:"top"===t&&(o=n.top-e.top-this.el.height()),i=Math.min(n.left-e.left,this.editor.wrapper.width()-this.el.outerWidth()-10),this.el.css({top:o+this.offset.top,left:i+this.offset.left})},i.prototype.destroy=function(){return this.target=null,this.active=!1,this.editor.off(".linkpopover"),this.el.remove()},i.prototype._t=function(){var t,e,r;return t=1<=arguments.length?W.call(arguments,0):[],r=i.__super__._t.apply(this,t),r||(r=(e=this.button)._t.apply(e,t)),r},i}(e),A.Popover=C,N=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return D(i,e),i.prototype.name="title",i.prototype.htmlTag="h1, h2, h3, h4",i.prototype.disableTag="pre, table",i.prototype._init=function(){return this.menu=[{name:"normal",text:this._t("normalText"),param:"p"},"|",{name:"h1",text:this._t("title")+" 1",param:"h1"},{name:"h2",text:this._t("title")+" 2",param:"h2"},{name:"h3",text:this._t("title")+" 3",param:"h3"},{name:"h4",text:this._t("title")+" 4",param:"h4"},{name:"h5",text:this._t("title")+" 5",param:"h5"}],i.__super__._init.call(this)},i.prototype.setActive=function(t,e){if(i.__super__.setActive.call(this,t),this.el.removeClass("active-p active-h1 active-h2 active-h3"),t)return this.el.addClass("active active-"+e)},i.prototype.status=function(t){var e,i;return null!=t&&this.setDisabled(t.is(this.disableTag)),!!this.disabled||(null!=t&&(e=null!=(i=t[0].tagName)?i.toLowerCase():void 0,this.setActive(t.is(this.htmlTag),e)),this.active)},i.prototype.command=function(e){var i,r,n,o,s,a,l,u,d,h,p;for(u=this.editor.selection.getRange(),p=u.startContainer,o=u.endContainer,n=this.editor.util.closestBlockEl(p),r=this.editor.util.closestBlockEl(o),this.editor.selection.save(),u.setStartBefore(n[0]),u.setEndAfter(r[0]),i=t(u.extractContents()),h=[],i.children().each(function(t){return function(i,r){var n,o,s,a,l;for(o=t._convertEl(r,e),l=[],s=0,a=o.length;s<a;s++)n=o[s],l.push(h.push(n));return l}}(this)),d=h.reverse(),s=0,a=d.length;s<a;s++)l=d[s],u.insertNode(l[0]);return this.editor.selection.restore(),this.editor.trigger("valuechanged")},i.prototype._convertEl=function(e,i){var r,n,o;return n=t(e),o=[],n.is(i)?o.push(n):(r=t("<"+i+"/>").append(n.contents()),o.push(r)),o},i}(a),A.Toolbar.addButton(N),s=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return D(i,e),i.prototype.name="bold",i.prototype.icon="bold",i.prototype.htmlTag="b, strong",i.prototype.disableTag="pre",i.prototype.shortcut="cmd+b",i.prototype._init=function(){return this.editor.util.os.mac?this.title=this.title+" ( Cmd + b )":(this.title=this.title+" ( Ctrl + b )",this.shortcut="ctrl+b"),i.__super__._init.call(this)},i.prototype.status=function(t){var e;return null!=t&&this.setDisabled(t.is(this.disableTag)),!!this.disabled||(e=document.queryCommandState("bold")===!0,this.setActive(e),e)},i.prototype.command=function(){return document.execCommand("bold"),this.editor.util.support.oninput||this.editor.trigger("valuechanged"),t(document).trigger("selectionchange")},i}(a),A.Toolbar.addButton(s),y=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return D(i,e),i.prototype.name="italic",i.prototype.icon="italic",i.prototype.htmlTag="i",i.prototype.disableTag="pre",i.prototype.shortcut="cmd+i",i.prototype._init=function(){return this.editor.util.os.mac?this.title=this.title+" ( Cmd + i )":(this.title=this.title+" ( Ctrl + i )",this.shortcut="ctrl+i"),i.__super__._init.call(this)},i.prototype.status=function(t){var e;return null!=t&&this.setDisabled(t.is(this.disableTag)),this.disabled?this.disabled:(e=document.queryCommandState("italic")===!0,this.setActive(e),e)},i.prototype.command=function(){return document.execCommand("italic"),this.editor.util.support.oninput||this.editor.trigger("valuechanged"),t(document).trigger("selectionchange")},i}(a),A.Toolbar.addButton(y),M=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return D(i,e),i.prototype.name="underline",i.prototype.icon="underline",i.prototype.htmlTag="u",i.prototype.disableTag="pre",i.prototype.shortcut="cmd+u",i.prototype.render=function(){return this.editor.util.os.mac?this.title=this.title+" ( Cmd + u )":(this.title=this.title+" ( Ctrl + u )",this.shortcut="ctrl+u"),i.__super__.render.call(this)},i.prototype.status=function(t){var e;return null!=t&&this.setDisabled(t.is(this.disableTag)),this.disabled?this.disabled:(e=document.queryCommandState("underline")===!0,this.setActive(e),e)},i.prototype.command=function(){return document.execCommand("underline"),this.editor.util.support.oninput||this.editor.trigger("valuechanged"),t(document).trigger("selectionchange")},i}(a),A.Toolbar.addButton(M),d=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return D(i,e),i.prototype.name="color",i.prototype.icon="tint",i.prototype.disableTag="pre",i.prototype.menu=!0,i.prototype.render=function(){var t;return t=1<=arguments.length?W.call(arguments,0):[],i.__super__.render.apply(this,t)},i.prototype.renderMenu=function(){return t('<ul class="color-list">\n <li><a href="javascript:;" class="font-color font-color-1" data-color=""></a></li>\n <li><a href="javascript:;" class="font-color font-color-2" data-color=""></a></li>\n <li><a href="javascript:;" class="font-color font-color-3" data-color=""></a></li>\n <li><a href="javascript:;" class="font-color font-color-4" data-color=""></a></li>\n <li><a href="javascript:;" class="font-color font-color-5" data-color=""></a></li>\n <li><a href="javascript:;" class="font-color font-color-6" data-color=""></a></li>\n <li><a href="javascript:;" class="font-color font-color-7" data-color=""></a></li>\n <li><a href="javascript:;" class="font-color font-color-default" data-color=""></a></li>\n</ul>').appendTo(this.menuWrapper),this.menuWrapper.on("mousedown",".color-list",function(t){return!1}),this.menuWrapper.on("click",".font-color",function(e){return function(i){var r,n,o,s;if(e.wrapper.removeClass("menu-on"),r=t(i.currentTarget),r.hasClass("font-color-default")){if(n=e.editor.body.find("p, li"),!(n.length>0))return;s=window.getComputedStyle(n[0],null).getPropertyValue("color"),o=e._convertRgbToHex(s)}else s=window.getComputedStyle(r[0],null).getPropertyValue("background-color"),o=e._convertRgbToHex(s);if(o)return document.execCommand("foreColor",!1,o),e.editor.util.support.oninput?void 0:e.editor.trigger("valuechanged")}}(this))},i.prototype._convertRgbToHex=function(t){var e,i,r;return i=/rgb\((\d+),\s?(\d+),\s?(\d+)\)/g,(e=i.exec(t))?(r=function(t,e,i){var r;return r=function(t){var e;return e=t.toString(16),1===e.length?"0"+e:e},"#"+r(t)+r(e)+r(i)})(1*e[1],1*e[2],1*e[3]):""},i}(a),A.Toolbar.addButton(d),x=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return D(i,e),i.prototype.type="",i.prototype.disableTag="pre, table",i.prototype.status=function(t){var e;return null!=t&&this.setDisabled(t.is(this.disableTag)),!!this.disabled||(null==t?this.active:(e="ul"===this.type?"ol":"ul",t.is(e)?(this.setActive(!1),!0):(this.setActive(t.is(this.htmlTag)),this.active)))},i.prototype.command=function(e){var i,r,n,o,s,a,l,u,d,h,p,c,f,g,m,v,y;for(f=this.editor.selection.getRange(),y=f.startContainer,u=f.endContainer,a=this.editor.util.closestBlockEl(y),r=this.editor.util.closestBlockEl(u),this.editor.selection.save(),f.setStartBefore(a[0]),f.setEndAfter(r[0]),a.is("li")&&r.is("li")&&(o=this.editor.util.furthestNode(a,"ul, ol"),n=this.editor.util.furthestNode(r,"ul, ol"),o.is(n)?(d=function(t){var e;for(e=1;!t.parent().is(o);)e+=1,t=t.parent();return e},v=d(a),l=d(r),s=v>l?r.parent():a.parent(),f.setStartBefore(s[0]),f.setEndAfter(s[0])):(f.setStartBefore(o[0]),f.setEndAfter(n[0]))),i=t(f.extractContents()),m=[],i.children().each(function(t){return function(e,i){var r,n,o,s,a;for(n=t._convertEl(i),a=[],o=0,s=n.length;o<s;o++)r=n[o],m.length&&m[m.length-1].is(t.type)&&r.is(t.type)?a.push(m[m.length-1].append(r.children())):a.push(m.push(r));return a}}(this)),g=m.reverse(),h=0,p=g.length;h<p;h++)c=g[h],f.insertNode(c[0]);return this.editor.selection.restore(),this.editor.trigger("valuechanged")},i.prototype._convertEl=function(e){var i,r,n,o,s,a,l,u,d;if(i=t(e),d=[],r="ul"===this.type?"ol":"ul",i.is(this.type))i.children("li").each(function(e){return function(i,r){var n,o,s;if(o=t(r),n=o.children("ul, ol").remove(),s=t("<p/>").append(t(r).html()||e.editor.util.phBr),d.push(s),n.length>0)return d.push(n)}}(this));else if(i.is(r))n=t("<"+this.type+"/>").append(i.html()),d.push(n);else if(i.is("blockquote")){for(u=i.children().get(),a=0,l=u.length;a<l;a++)o=u[a],s=this._convertEl(o);t.merge(d,s)}else i.is("table")||(n=t("<"+this.type+"><li></li></"+this.type+">"),n.find("li").append(i.html()||this.editor.util.phBr),d.push(n));return d},i}(a),T=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return D(e,t),e.prototype.type="ol",e.prototype.name="ol",e.prototype.icon="list-ol",e.prototype.htmlTag="ol",e.prototype.shortcut="cmd+/",e.prototype._init=function(){return this.editor.util.os.mac?this.title=this.title+" ( Cmd + / )":(this.title=this.title+" ( ctrl + / )",this.shortcut="ctrl+/"),e.__super__._init.call(this)},e}(x),I=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return D(e,t),e.prototype.type="ul",e.prototype.name="ul",e.prototype.icon="list-ul",e.prototype.htmlTag="ul",e.prototype.shortcut="cmd+.",e.prototype._init=function(){return this.editor.util.os.mac?this.title=this.title+" ( Cmd + . )":(this.title=this.title+" ( Ctrl + . )",this.shortcut="ctrl+."),e.__super__._init.call(this)},e}(x),A.Toolbar.addButton(T),A.Toolbar.addButton(I),o=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return D(i,e),i.prototype.name="blockquote",i.prototype.icon="quote-left",i.prototype.htmlTag="blockquote",i.prototype.disableTag="pre, table",i.prototype.command=function(){var e,i,r,n,o,s,a,l,u,d,h;for(l=this.editor.selection.getRange(),h=l.startContainer,n=l.endContainer,r=this.editor.util.furthestBlockEl(h),i=this.editor.util.furthestBlockEl(n),this.editor.selection.save(),l.setStartBefore(r[0]),l.setEndAfter(i[0]),e=t(l.extractContents()),d=[],e.children().each(function(t){return function(e,i){var r,n,o,s,a;for(n=t._convertEl(i),a=[],o=0,s=n.length;o<s;o++)r=n[o],d.length&&d[d.length-1].is(t.htmlTag)&&r.is(t.htmlTag)?a.push(d[d.length-1].append(r.children())):a.push(d.push(r));return a}}(this)),u=d.reverse(),o=0,s=u.length;o<s;o++)a=u[o],l.insertNode(a[0]);return this.editor.selection.restore(),this.editor.trigger("valuechanged")},i.prototype._convertEl=function(e){var i,r,n;return i=t(e),n=[],i.is(this.htmlTag)?i.children().each(function(e){return function(e,i){return n.push(t(i))}}(this)):(r=t("<"+this.htmlTag+"/>").append(i),n.push(r)),n},i}(a),A.Toolbar.addButton(o),l=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return D(i,e),i.prototype.name="code",i.prototype.icon="code",i.prototype.htmlTag="pre",i.prototype.disableTag="li, table",i.prototype._init=function(){return i.__super__._init.call(this),this.editor.on("decorate",function(e){return function(i,r){return r.find("pre").each(function(i,r){return e.decorate(t(r))})}}(this)),this.editor.on("undecorate",function(e){return function(i,r){return r.find("pre").each(function(i,r){return e.undecorate(t(r))})}}(this))},i.prototype.render=function(){var t;return t=1<=arguments.length?W.call(arguments,0):[],i.__super__.render.apply(this,t),this.popover=new u({button:this})},i.prototype.status=function(t){var e;return e=i.__super__.status.call(this,t),this.active?this.popover.show(t):this.editor.util.isBlockNode(t)&&this.popover.hide(),e},i.prototype.decorate=function(t){var e,i,r;if(e=t.find("> code"),e.length>0&&(i=null!=(r=e.attr("class").match(/lang-(\S+)/))?r[1]:void 0,e.contents().unwrap(),i))return t.attr("data-lang",i)},i.prototype.undecorate=function(e){var i,r;return r=e.attr("data-lang"),i=t("<code/>"),r&&r!==-1&&i.addClass("lang-"+r),e.wrapInner(i).removeAttr("data-lang")},i.prototype.command=function(){var e,i,r,n,o,s,a,l,u,d,h;for(l=this.editor.selection.getRange(),h=l.startContainer,n=l.endContainer,r=this.editor.util.closestBlockEl(h),i=this.editor.util.closestBlockEl(n),l.setStartBefore(r[0]),l.setEndAfter(i[0]),e=t(l.extractContents()),d=[],e.children().each(function(t){return function(e,i){var r,n,o,s,a;for(n=t._convertEl(i),a=[],o=0,s=n.length;o<s;o++)r=n[o],d.length&&d[d.length-1].is(t.htmlTag)&&r.is(t.htmlTag)?a.push(d[d.length-1].append(r.contents())):a.push(d.push(r));return a}}(this)),u=d.reverse(),o=0,s=u.length;o<s;o++)a=u[o],l.insertNode(a[0]);return this.editor.selection.setRangeAtEndOf(d[0]),this.editor.trigger("valuechanged")},i.prototype._convertEl=function(e){var i,r,n,o;return i=t(e),o=[],i.is(this.htmlTag)?(r=t("<p/>").append(i.html().replace("\n","<br/>")),o.push(r)):(n=!i.text()&&1===i.children().length&&i.children().is("br")?"\n":this.editor.formatter.clearHtml(i),r=t("<"+this.htmlTag+"/>").text(n),o.push(r)),o},i}(a),u=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return D(e,t),e.prototype.render=function(){return this._tpl='<div class="code-settings">\n <div class="settings-field">\n <select class="select-lang">\n <option value="-1">'+this._t("selectLanguage")+'</option>\n <option value="bash">Bash</option>\n <option value="c++">C++</option>\n <option value="cs">C#</option>\n <option value="css">CSS</option>\n <option value="erlang">Erlang</option>\n <option value="less">Less</option>\n <option value="scss">Sass</option>\n <option value="diff">Diff</option>\n <option value="coffeeScript">CoffeeScript</option>\n <option value="html">Html,XML</option>\n <option value="json">JSON</option>\n <option value="java">Java</option>\n <option value="js">JavaScript</option>\n <option value="markdown">Markdown</option>\n <option value="oc">Objective C</option>\n <option value="php">PHP</option>\n <option value="perl">Perl</option>\n <option value="python">Python</option>\n <option value="ruby">Ruby</option>\n <option value="sql">SQL</option>\n </select>\n </div>\n</div>',this.el.addClass("code-popover").append(this._tpl),this.selectEl=this.el.find(".select-lang"),this.selectEl.on("change",function(t){return function(e){var i;if(t.lang=t.selectEl.val(),i=t.target.hasClass("selected"),t.target.removeClass().removeAttr("data-lang"),t.lang!==-1&&t.target.attr("data-lang",t.lang),i)return t.target.addClass("selected")}}(this)),this.editor.on("valuechanged",function(t){return function(e){if(t.active)return t.refresh()}}(this))},e.prototype.show=function(){var t;return t=1<=arguments.length?W.call(arguments,0):[],e.__super__.show.apply(this,t),this.lang=this.target.attr("data-lang"),null!=this.lang?this.selectEl.val(this.lang):this.selectEl.val(-1)},e}(C),A.Toolbar.addButton(l),_=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return D(i,e),i.prototype.name="link",i.prototype.icon="link",
i.prototype.htmlTag="a",i.prototype.disableTag="pre",i.prototype.render=function(){var t;return t=1<=arguments.length?W.call(arguments,0):[],i.__super__.render.apply(this,t),this.popover=new w({button:this})},i.prototype.status=function(t){var e;return null!=t&&this.setDisabled(t.is(this.disableTag)),!!this.disabled||(null==t?this.active:(e=!0,!t.is(this.htmlTag)||t.is('[class^="simditor-"]')?(this.setActive(!1),e=!1):this.editor.selection.rangeAtEndOf(t)?(this.setActive(!0),e=!1):this.setActive(!0),e?this.popover.show(t):this.editor.util.isBlockNode(t)&&this.popover.hide(),this.active))},i.prototype.command=function(){var e,i,r,n,o,s,a,l,u,d;return l=this.editor.selection.getRange(),this.active?(r=t(l.commonAncestorContainer).closest("a"),d=document.createTextNode(r.text()),r.replaceWith(d),l.selectNode(d)):(u=l.startContainer,s=l.endContainer,o=this.editor.util.closestBlockEl(u),i=this.editor.util.closestBlockEl(s),e=t(l.extractContents()),a=this.editor.formatter.clearHtml(e.contents(),!1),r=t("<a/>",{href:"http://www.example.com",target:"_blank",text:a||this._t("linkText")}),o[0]===i[0]?l.insertNode(r[0]):(n=t("<p/>").append(r),l.insertNode(n[0])),l.selectNodeContents(r[0]),this.popover.one("popovershow",function(t){return function(){return a?(t.popover.urlEl.focus(),t.popover.urlEl[0].select()):(t.popover.textEl.focus(),t.popover.textEl[0].select())}}(this))),this.editor.selection.selectRange(l),this.editor.trigger("valuechanged")},i}(a),w=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return D(i,e),i.prototype.render=function(){var e;return e='<div class="link-settings">\n <div class="settings-field">\n <label>'+this._t("text")+'</label>\n <input class="link-text" type="text"/>\n <a class="btn-unlink" href="javascript:;" title="'+this._t("removeLink")+'" tabindex="-1"><span class="simditor-icon simditor-icon-unlink"></span></a>\n </div>\n <div class="settings-field">\n <label>'+this._t("linkUrl")+'</label>\n <input class="link-url" type="text"/>\n </div>\n</div>',this.el.addClass("link-popover").append(e),this.textEl=this.el.find(".link-text"),this.urlEl=this.el.find(".link-url"),this.unlinkEl=this.el.find(".btn-unlink"),this.textEl.on("keyup",function(t){return function(e){if(13!==e.which)return t.target.text(t.textEl.val())}}(this)),this.urlEl.on("keyup",function(t){return function(e){var i;if(13!==e.which)return i=t.urlEl.val(),!/https?:\/\/|^\//gi.test(i)&&i&&(i="http://"+i),t.target.attr("href",i)}}(this)),t([this.urlEl[0],this.textEl[0]]).on("keydown",function(e){return function(i){if(13===i.which||27===i.which||!i.shiftKey&&9===i.which&&t(i.target).hasClass("link-url"))return i.preventDefault(),setTimeout(function(){var t;return t=document.createRange(),e.editor.selection.setRangeAfter(e.target,t),e.hide(),e.editor.trigger("valuechanged")},0)}}(this)),this.unlinkEl.on("click",function(t){return function(e){var i,r;return r=document.createTextNode(t.target.text()),t.target.replaceWith(r),t.hide(),i=document.createRange(),t.editor.selection.setRangeAfter(r,i),t.editor.trigger("valuechanged")}}(this))},i.prototype.show=function(){var t;return t=1<=arguments.length?W.call(arguments,0):[],i.__super__.show.apply(this,t),this.textEl.val(this.target.text()),this.urlEl.val(this.target.attr("href"))},i}(C),A.Toolbar.addButton(_),c=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return D(i,e),i.prototype.name="image",i.prototype.icon="picture-o",i.prototype.htmlTag="img",i.prototype.disableTag="pre, table",i.prototype.defaultImage="",i.prototype.needFocus=!1,i.prototype._init=function(){var e,r,n,o;if(this.editor.opts.imageButton)if(Array.isArray(this.editor.opts.imageButton))for(this.menu=[],o=this.editor.opts.imageButton,r=0,n=o.length;r<n;r++)e=o[r],this.menu.push({name:e+"-image",text:this._t(e+"Image")});else this.menu=!1;else null!=this.editor.uploader?this.menu=[{name:"upload-image",text:this._t("uploadImage")},{name:"external-image",text:this._t("externalImage")}]:this.menu=!1;return this.defaultImage=this.editor.opts.defaultImage,this.editor.body.on("click","img:not([data-non-image])",function(e){return function(i){var r,n;return r=t(i.currentTarget),n=document.createRange(),n.selectNode(r[0]),e.editor.selection.selectRange(n),e.editor.util.support.onselectionchange||e.editor.trigger("selectionchanged"),!1}}(this)),this.editor.body.on("mouseup","img:not([data-non-image])",function(t){return function(t){return!1}}(this)),this.editor.on("selectionchanged.image",function(e){return function(){var i,r,n;if(n=e.editor.selection.getRange(),null!=n)return i=t(n.cloneContents()).contents(),1===i.length&&i.is("img:not([data-non-image])")?(r=t(n.startContainer).contents().eq(n.startOffset),e.popover.show(r)):e.popover.hide()}}(this)),this.editor.on("valuechanged.image",function(e){return function(){var i;if(i=e.editor.wrapper.find(".simditor-image-loading"),i.length>0)return i.each(function(i,r){var n,o,s;if(o=t(r),n=o.data("img"),!(n&&n.parent().length>0)&&(o.remove(),n&&(s=n.data("file"),s&&(e.editor.uploader.cancel(s),e.editor.body.find("img.uploading").length<1))))return e.editor.uploader.trigger("uploadready",[s])})}}(this)),i.__super__._init.call(this)},i.prototype.render=function(){var t;if(t=1<=arguments.length?W.call(arguments,0):[],i.__super__.render.apply(this,t),this.popover=new f({button:this}),"upload"===this.editor.opts.imageButton)return this._initUploader(this.el)},i.prototype.renderMenu=function(){return i.__super__.renderMenu.call(this),this._initUploader()},i.prototype._initUploader=function(e){var i,r;return null==e&&(e=this.menuEl.find(".menu-item-upload-image")),null==this.editor.uploader?void this.el.find(".btn-upload").remove():(i=null,r=function(r){return function(){return i&&i.remove(),i=t('<input type="file" title="'+r._t("uploadImage")+'" accept="image/*">').appendTo(e)}}(this),r(),e.on("click mousedown","input[type=file]",function(t){return function(t){return t.stopPropagation()}}(this)),e.on("change","input[type=file]",function(t){return function(e){return t.editor.inputManager.focused?(t.editor.uploader.upload(i,{inline:!0}),r()):(t.editor.one("focus",function(e){return t.editor.uploader.upload(i,{inline:!0}),r()}),t.editor.focus()),t.wrapper.removeClass("menu-on")}}(this)),this.editor.uploader.on("beforeupload",function(e){return function(i,r){var n;if(r.inline)return r.img?n=t(r.img):(n=e.createImage(r.name),r.img=n),n.addClass("uploading"),n.data("file",r),e.editor.uploader.readImageFile(r.obj,function(t){var i;if(n.hasClass("uploading"))return i=t?t.src:e.defaultImage,e.loadImage(n,i,function(){if(e.popover.active)return e.popover.refresh(),e.popover.srcEl.val(e._t("uploading")).prop("disabled",!0)})})}}(this)),this.editor.uploader.on("uploadprogress",t.proxy(this.editor.util.throttle(function(t,e,i,r){var n,o,s;if(e.inline&&(o=e.img.data("mask")))return n=o.data("img"),n.hasClass("uploading")&&n.parent().length>0?(s=i/r,s=(100*s).toFixed(0),s>99&&(s=99),o.find(".progress").height(100-s+"%")):void o.remove()},500),this)),this.editor.uploader.on("uploadsuccess",function(e){return function(i,r,n){var o,s,a;if(r.inline&&(o=r.img,o.hasClass("uploading")&&o.parent().length>0)){if(o.removeData("file"),o.removeClass("uploading").removeClass("loading"),s=o.data("mask"),s&&s.remove(),o.removeData("mask"),"object"!=typeof n)try{n=t.parseJSON(n)}catch(t){i=t,n={success:!1}}return n.success===!1?(a=n.msg||e._t("uploadFailed"),alert(a),o.attr("src",e.defaultImage)):o.attr("src",n.file_path),e.popover.active&&(e.popover.srcEl.prop("disabled",!1),e.popover.srcEl.val(n.file_path)),e.editor.trigger("valuechanged"),e.editor.body.find("img.uploading").length<1?e.editor.uploader.trigger("uploadready",[r,n]):void 0}}}(this)),this.editor.uploader.on("uploaderror",function(e){return function(i,r,n){var o,s,a,l;if(r.inline&&"abort"!==n.statusText){if(n.responseText){try{l=t.parseJSON(n.responseText),a=l.msg}catch(t){i=t,a=e._t("uploadError")}alert(a)}if(o=r.img,o.hasClass("uploading")&&o.parent().length>0)return o.removeData("file"),o.removeClass("uploading").removeClass("loading"),s=o.data("mask"),s&&s.remove(),o.removeData("mask"),o.attr("src",e.defaultImage),e.popover.active&&(e.popover.srcEl.prop("disabled",!1),e.popover.srcEl.val(e.defaultImage)),e.editor.trigger("valuechanged"),e.editor.body.find("img.uploading").length<1?e.editor.uploader.trigger("uploadready",[r,l]):void 0}}}(this)))},i.prototype.status=function(t){if(null!=t&&this.setDisabled(t.is(this.disableTag)),this.disabled)return!0},i.prototype.loadImage=function(e,i,r){var n,o,s;return s=function(t){return function(){var i,r;return i=e.offset(),r=t.editor.wrapper.offset(),n.css({top:i.top-r.top,left:i.left-r.left,width:e.width(),height:e.height()}).show()}}(this),e.addClass("loading"),n=e.data("mask"),n||(n=t('<div class="simditor-image-loading"><div class="progress"></div></div>').hide().appendTo(this.editor.wrapper),s(),e.data("mask",n),n.data("img",e)),o=new Image,o.onload=function(t){return function(){var a,l;if(e.hasClass("loading")||e.hasClass("uploading"))return l=o.width,a=o.height,e.attr({src:i,"data-image-size":l+","+a}).removeClass("loading"),e.hasClass("uploading")?(t.editor.util.reflow(t.editor.body),s()):(n.remove(),e.removeData("mask")),r(o)}}(this),o.onerror=function(t){return function(){return r(!1),n.remove(),e.removeData("mask").removeClass("loading")}}(this),o.src=i},i.prototype.createImage=function(e){var i,r,n,o;return null==e&&(e="Image"),this.editor.inputManager.focused||this.editor.focus(),o=this.editor.selection.getRange(),o.deleteContents(),i=this.editor.util.closestBlockEl(),i.is("p")&&!this.editor.util.isEmptyNode(i)&&(i=t("<p/>").append(this.editor.util.phBr).insertAfter(i),this.editor.selection.setRangeAtStartOf(i,o)),r=t("<img/>").attr("alt",e),o.insertNode(r[0]),n=i.next("p"),n.length>0||(n=t("<p/>").append(this.editor.util.phBr).insertAfter(i)),this.editor.selection.setRangeAtStartOf(n),r},i.prototype.command=function(t){var e;return e=this.createImage(),this.loadImage(e,t||this.defaultImage,function(t){return function(){return t.editor.trigger("valuechanged"),t.editor.util.reflow(e),e.click(),t.popover.one("popovershow",function(){return t.popover.srcEl.focus(),t.popover.srcEl[0].select()})}}(this))},i}(a),f=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return D(i,e),i.prototype.offset={top:6,left:-4},i.prototype.render=function(){var e;return e='<div class="link-settings">\n <div class="settings-field">\n <label>'+this._t("imageUrl")+'</label>\n <input class="image-src" type="text" tabindex="1" />\n <a class="btn-upload" href="javascript:;" title="'+this._t("uploadImage")+'" tabindex="-1">\n <span class="simditor-icon simditor-icon-upload"></span>\n </a>\n </div>\n <div class=\'settings-field\'>\n <label>'+this._t("imageAlt")+'</label>\n <input class="image-alt" id="image-alt" type="text" tabindex="1" />\n </div>\n <div class="settings-field">\n <label>'+this._t("imageSize")+'</label>\n <input class="image-size" id="image-width" type="text" tabindex="2" />\n <span class="times">×</span>\n <input class="image-size" id="image-height" type="text" tabindex="3" />\n <a class="btn-restore" href="javascript:;" title="'+this._t("restoreImageSize")+'" tabindex="-1">\n <span class="simditor-icon simditor-icon-undo"></span>\n </a>\n </div>\n</div>',this.el.addClass("image-popover").append(e),this.srcEl=this.el.find(".image-src"),this.widthEl=this.el.find("#image-width"),this.heightEl=this.el.find("#image-height"),this.altEl=this.el.find("#image-alt"),this.srcEl.on("keydown",function(t){return function(e){if(13===e.which&&!t.target.hasClass("uploading"))return e.preventDefault(),t.button.editor.body.focus(),t.button.editor.selection.setRangeAfter(t.target),t.hide()}}(this)),this.srcEl.on("blur",function(t){return function(e){return t._loadImage(t.srcEl.val())}}(this)),this.el.find(".image-size").on("blur",function(e){return function(i){return e._resizeImg(t(i.currentTarget)),e.el.data("popover").refresh()}}(this)),this.el.find(".image-size").on("keyup",function(e){return function(i){var r;if(r=t(i.currentTarget),13!==i.which&&27!==i.which&&9!==i.which)return e._resizeImg(r,!0)}}(this)),this.el.find(".image-size").on("keydown",function(e){return function(i){var r;return r=t(i.currentTarget),13===i.which||27===i.which?(i.preventDefault(),13===i.which?e._resizeImg(r):e._restoreImg(),e.button.editor.body.focus(),e.button.editor.selection.setRangeAfter(e.target),e.hide()):9===i.which?e.el.data("popover").refresh():void 0}}(this)),this.altEl.on("keydown",function(t){return function(e){if(13===e.which)return e.preventDefault(),t.button.editor.body.focus(),t.button.editor.selection.setRangeAfter(t.target),t.hide()}}(this)),this.altEl.on("keyup",function(t){return function(e){if(13!==e.which&&27!==e.which&&9!==e.which)return t.alt=t.altEl.val(),t.target.attr("alt",t.alt)}}(this)),this.el.find(".btn-restore").on("click",function(t){return function(e){return t._restoreImg(),t.el.data("popover").refresh()}}(this)),this.editor.on("valuechanged",function(t){return function(e){if(t.active)return t.refresh()}}(this)),this._initUploader()},i.prototype._initUploader=function(){var e,i;return e=this.el.find(".btn-upload"),null==this.editor.uploader?void e.remove():(i=function(i){return function(){return i.input&&i.input.remove(),i.input=t('<input type="file" title="'+i._t("uploadImage")+'" accept="image/*">').appendTo(e)}}(this),i(),this.el.on("click mousedown","input[type=file]",function(t){return function(t){return t.stopPropagation()}}(this)),this.el.on("change","input[type=file]",function(t){return function(e){return t.editor.uploader.upload(t.input,{inline:!0,img:t.target}),i()}}(this)))},i.prototype._resizeImg=function(e,i){var r,n,o;if(null==i&&(i=!1),n=1*e.val(),t.isNumeric(n)||n<0)return e.is(this.widthEl)?(r=this.height*n/this.width,this.heightEl.val(r)):(o=this.width*n/this.height,this.widthEl.val(o)),i||this.target.attr({width:o||n,height:r||n}),this.editor.trigger("valuechanged")},i.prototype._restoreImg=function(){var t,e;return e=(null!=(t=this.target.data("image-size"))?t.split(","):void 0)||[this.width,this.height],this.target.attr({width:1*e[0],height:1*e[1]}),this.widthEl.val(e[0]),this.heightEl.val(e[1]),this.editor.trigger("valuechanged")},i.prototype._loadImage=function(t,e){return/^data:image/.test(t)&&!this.editor.uploader?void(e&&e(!1)):this.button.loadImage(this.target,t,function(i){return function(r){var n;if(r)return i.active&&(i.width=r.width,i.height=r.height,i.widthEl.val(i.width),i.heightEl.val(i.height),i.target.removeAttr("width").removeAttr("height")),/^data:image/.test(t)?(n=i.editor.util.dataURLtoBlob(t),n.name="Base64 Image.png",i.editor.uploader.upload(n,{inline:!0,img:i.target})):i.editor.trigger("valuechanged"),e?e(r):void 0}}(this))},i.prototype.show=function(){var t,e;return e=1<=arguments.length?W.call(arguments,0):[],i.__super__.show.apply(this,e),t=this.target,this.width=t.width(),this.height=t.height(),this.alt=t.attr("alt"),t.hasClass("uploading")?this.srcEl.val(this._t("uploading")).prop("disabled",!0):(this.srcEl.val(t.attr("src")).prop("disabled",!1),this.widthEl.val(this.width),this.heightEl.val(this.height),this.altEl.val(this.alt))},i}(C),A.Toolbar.addButton(c),g=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return D(e,t),e.prototype.name="indent",e.prototype.icon="indent",e.prototype._init=function(){return this.title=this._t(this.name)+" (Tab)",e.__super__._init.call(this)},e.prototype.status=function(t){return!0},e.prototype.command=function(){return this.editor.indentation.indent()},e}(a),A.Toolbar.addButton(g),k=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return D(e,t),e.prototype.name="outdent",e.prototype.icon="outdent",e.prototype._init=function(){return this.title=this._t(this.name)+" (Shift + Tab)",e.__super__._init.call(this)},e.prototype.status=function(t){return!0},e.prototype.command=function(){return this.editor.indentation.indent(!0)},e}(a),A.Toolbar.addButton(k),p=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return D(i,e),i.prototype.name="hr",i.prototype.icon="minus",i.prototype.htmlTag="hr",i.prototype.status=function(t){return!0},i.prototype.command=function(){var e,i,r,n;return n=this.editor.util.furthestBlockEl(),r=n.next(),r.length>0?this.editor.selection.save():i=t("<p/>").append(this.editor.util.phBr),e=t("<hr/>").insertAfter(n),i?(i.insertAfter(e),this.editor.selection.setRangeAtStartOf(i)):this.editor.selection.restore(),this.editor.trigger("valuechanged")},i}(a),A.Toolbar.addButton(p),R=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return D(i,e),i.prototype.name="table",i.prototype.icon="table",i.prototype.htmlTag="table",i.prototype.disableTag="pre, li, blockquote",i.prototype.menu=!0,i.prototype._init=function(){return i.__super__._init.call(this),t.merge(this.editor.formatter._allowedTags,["thead","th","tbody","tr","td","colgroup","col"]),t.extend(this.editor.formatter._allowedAttributes,{td:["rowspan","colspan"],col:["width"]}),this._initShortcuts(),this.editor.on("decorate",function(e){return function(i,r){return r.find("table").each(function(i,r){return e.decorate(t(r))})}}(this)),this.editor.on("undecorate",function(e){return function(i,r){return r.find("table").each(function(i,r){return e.undecorate(t(r))})}}(this)),this.editor.on("selectionchanged.table",function(e){return function(i){var r,n;if(e.editor.body.find(".simditor-table td, .simditor-table th").removeClass("active"),n=e.editor.selection.getRange(),null!=n)return r=t(n.commonAncestorContainer),n.collapsed&&r.is(".simditor-table")&&(r=e.editor.selection.rangeAtStartOf(r)?r.find("th:first"):r.find("td:last"),e.editor.selection.setRangeAtEndOf(r)),r.closest("td, th",e.editor.body).addClass("active")}}(this)),this.editor.on("blur.table",function(t){return function(e){return t.editor.body.find(".simditor-table td, .simditor-table th").removeClass("active")}}(this)),this.editor.inputManager.addKeystrokeHandler("38","td",function(t){return function(e,i){return t._tdNav(i,"up"),!0}}(this)),this.editor.inputManager.addKeystrokeHandler("38","th",function(t){return function(e,i){return t._tdNav(i,"up"),!0}}(this)),this.editor.inputManager.addKeystrokeHandler("40","td",function(t){return function(e,i){return t._tdNav(i,"down"),!0}}(this)),this.editor.inputManager.addKeystrokeHandler("40","th",function(t){return function(e,i){return t._tdNav(i,"down"),!0}}(this))},i.prototype._tdNav=function(t,e){var i,r,n,o,s,a,l;return null==e&&(e="up"),n="up"===e?"prev":"next",l="up"===e?["tbody","thead"]:["thead","tbody"],a=l[0],o=l[1],r=t.parent("tr"),i=this["_"+n+"Row"](r),!(i.length>0)||(s=r.find("td, th").index(t),this.editor.selection.setRangeAtEndOf(i.find("td, th").eq(s)))},i.prototype._nextRow=function(t){var e;return e=t.next("tr"),e.length<1&&t.parent("thead").length>0&&(e=t.parent("thead").next("tbody").find("tr:first")),e},i.prototype._prevRow=function(t){var e;return e=t.prev("tr"),e.length<1&&t.parent("tbody").length>0&&(e=t.parent("tbody").prev("thead").find("tr")),e},i.prototype.initResize=function(e){var i,r,n;return n=e.parent(".simditor-table"),i=e.find("colgroup"),i.length<1&&(i=t("<colgroup/>").prependTo(e),e.find("thead tr th").each(function(e){return function(e,r){var n;return n=t("<col/>").appendTo(i)}}(this)),this.refreshTableWidth(e)),r=t('<div class="simditor-resize-handle" contenteditable="false"></div>').appendTo(n),n.on("mousemove","td, th",function(e){return function(e){var o,s,a,l,u,d;if(!n.hasClass("resizing"))return s=t(e.currentTarget),d=e.pageX-t(e.currentTarget).offset().left,d<5&&s.prev().length>0&&(s=s.prev()),s.next("td, th").length<1?void r.hide():(null!=(l=r.data("td"))?l.is(s):void 0)?void r.show():(a=s.parent().find("td, th").index(s),o=i.find("col").eq(a),(null!=(u=r.data("col"))?u.is(o):void 0)?void r.show():r.css("left",s.position().left+s.outerWidth()-5).data("td",s).data("col",o).show())}}(this)),n.on("mouseleave",function(t){return function(t){return r.hide()}}(this)),n.on("mousedown",".simditor-resize-handle",function(e){return function(e){var i,r,o,s,a,l,u,d,h,p,c;return i=t(e.currentTarget),o=i.data("td"),r=i.data("col"),a=o.next("td, th"),s=r.next("col"),p=e.pageX,d=1*o.outerWidth(),h=1*a.outerWidth(),u=parseFloat(i.css("left")),c=o.closest("table").width(),l=50,t(document).on("mousemove.simditor-resize-table",function(t){var e,n,o;return e=t.pageX-p,n=d+e,o=h-e,n<l?(n=l,e=l-d,o=h-e):o<l&&(o=l,e=h-l,n=d+e),r.attr("width",n/c*100+"%"),s.attr("width",o/c*100+"%"),i.css("left",u+e)}),t(document).one("mouseup.simditor-resize-table",function(e){return t(document).off(".simditor-resize-table"),n.removeClass("resizing")}),n.addClass("resizing"),!1}}(this))},i.prototype._initShortcuts=function(){return this.editor.inputManager.addShortcut("ctrl+alt+up",function(t){return function(e){return t.editMenu.find(".menu-item[data-param=insertRowAbove]").click(),!1}}(this)),this.editor.inputManager.addShortcut("ctrl+alt+down",function(t){return function(e){return t.editMenu.find(".menu-item[data-param=insertRowBelow]").click(),!1}}(this)),this.editor.inputManager.addShortcut("ctrl+alt+left",function(t){return function(e){return t.editMenu.find(".menu-item[data-param=insertColLeft]").click(),!1}}(this)),this.editor.inputManager.addShortcut("ctrl+alt+right",function(t){return function(e){return t.editMenu.find(".menu-item[data-param=insertColRight]").click(),!1}}(this))},i.prototype.decorate=function(t){return t.parent(".simditor-table").length>0&&this.undecorate(t),t.wrap('<div class="simditor-table"></div>'),this.initResize(t),t.parent()},i.prototype.undecorate=function(t){if(t.parent(".simditor-table").length>0)return t.parent().replaceWith(t)},i.prototype.renderMenu=function(){var e;return t('<div class="menu-create-table">\n</div>\n<div class="menu-edit-table">\n <ul>\n <li><a tabindex="-1" unselectable="on" class="menu-item" href="javascript:;" data-param="deleteRow"><span>'+this._t("deleteRow")+'</span></a></li>\n <li><a tabindex="-1" unselectable="on" class="menu-item" href="javascript:;" data-param="insertRowAbove"><span>'+this._t("insertRowAbove")+' ( Ctrl + Alt + ↑ )</span></a></li>\n <li><a tabindex="-1" unselectable="on" class="menu-item" href="javascript:;" data-param="insertRowBelow"><span>'+this._t("insertRowBelow")+' ( Ctrl + Alt + ↓ )</span></a></li>\n <li><span class="separator"></span></li>\n <li><a tabindex="-1" unselectable="on" class="menu-item" href="javascript:;" data-param="deleteCol"><span>'+this._t("deleteColumn")+'</span></a></li>\n <li><a tabindex="-1" unselectable="on" class="menu-item" href="javascript:;" data-param="insertColLeft"><span>'+this._t("insertColumnLeft")+' ( Ctrl + Alt + ← )</span></a></li>\n <li><a tabindex="-1" unselectable="on" class="menu-item" href="javascript:;" data-param="insertColRight"><span>'+this._t("insertColumnRight")+' ( Ctrl + Alt + → )</span></a></li>\n <li><span class="separator"></span></li>\n <li><a tabindex="-1" unselectable="on" class="menu-item" href="javascript:;" data-param="deleteTable"><span>'+this._t("deleteTable")+"</span></a></li>\n </ul>\n</div>").appendTo(this.menuWrapper),this.createMenu=this.menuWrapper.find(".menu-create-table"),this.editMenu=this.menuWrapper.find(".menu-edit-table"),e=this.createTable(6,6).appendTo(this.createMenu),this.createMenu.on("mouseenter","td, th",function(i){return function(r){var n,o,s,a;return i.createMenu.find("td, th").removeClass("selected"),n=t(r.currentTarget),o=n.parent(),a=o.find("td, th").index(n)+1,s=o.prevAll("tr").addBack(),o.parent().is("tbody")&&(s=s.add(e.find("thead tr"))),s.find("td:lt("+a+"), th:lt("+a+")").addClass("selected")}}(this)),this.createMenu.on("mouseleave",function(e){return function(e){return t(e.currentTarget).find("td, th").removeClass("selected")}}(this)),this.createMenu.on("mousedown","td, th",function(i){return function(r){var n,o,s,a,l;if(i.wrapper.removeClass("menu-on"),i.editor.inputManager.focused)return o=t(r.currentTarget),s=o.parent(),a=s.find("td").index(o)+1,l=s.prevAll("tr").length+1,s.parent().is("tbody")&&(l+=1),e=i.createTable(l,a,!0),n=i.editor.util.closestBlockEl(),i.editor.util.isEmptyNode(n)?n.replaceWith(e):n.after(e),i.decorate(e),i.editor.selection.setRangeAtStartOf(e.find("th:first")),i.editor.trigger("valuechanged"),!1}}(this))},i.prototype.createTable=function(e,i,r){var n,o,s,a,l,u,d,h,p,c,f;for(n=t("<table/>"),a=t("<thead/>").appendTo(n),o=t("<tbody/>").appendTo(n),p=d=0,c=e;0<=c?d<c:d>c;p=0<=c?++d:--d)for(l=t("<tr/>"),l.appendTo(0===p?a:o),u=h=0,f=i;0<=f?h<f:h>f;u=0<=f?++h:--h)s=t(0===p?"<th/>":"<td/>").appendTo(l),r&&s.append(this.editor.util.phBr);return n},i.prototype.refreshTableWidth=function(e){var i,r;return r=e.width(),i=e.find("col"),e.find("thead tr th").each(function(e){return function(e,n){var o;return o=i.eq(e),o.attr("width",t(n).outerWidth()/r*100+"%")}}(this))},i.prototype.setActive=function(t){return i.__super__.setActive.call(this,t),t?(this.createMenu.hide(),this.editMenu.show()):(this.createMenu.show(),this.editMenu.hide())},i.prototype._changeCellTag=function(e,i){return e.find("td, th").each(function(e){return function(e,r){var n;return n=t(r),n.replaceWith("<"+i+">"+n.html()+"</"+i+">")}}(this))},i.prototype.deleteRow=function(t){var e,i,r;return i=t.parent("tr"),i.closest("table").find("tr").length<1?this.deleteTable(t):(e=this._nextRow(i),e.length>0||(e=this._prevRow(i)),r=i.find("td, th").index(t),i.parent().is("thead")&&(e.appendTo(i.parent()),this._changeCellTag(e,"th")),i.remove(),this.editor.selection.setRangeAtEndOf(e.find("td, th").eq(r)))},i.prototype.insertRow=function(e,i){var r,n,o,s,a,l,u,d,h;for(null==i&&(i="after"),o=e.parent("tr"),n=o.closest("table"),a=0,n.find("tr").each(function(e){return function(e,i){return a=Math.max(a,t(i).find("td").length)}}(this)),u=o.find("td, th").index(e),r=t("<tr/>"),s="td","after"===i&&o.parent().is("thead")?o.parent().next("tbody").prepend(r):"before"===i&&o.parent().is("thead")?(o.before(r),o.parent().next("tbody").prepend(o),this._changeCellTag(o,"td"),s="th"):o[i](r),l=d=1,h=a;1<=h?d<=h:d>=h;l=1<=h?++d:--d)t("<"+s+"/>").append(this.editor.util.phBr).appendTo(r);return this.editor.selection.setRangeAtStartOf(r.find("td, th").eq(u))},i.prototype.deleteCol=function(e){var i,r,n,o;return n=e.parent("tr"),n.closest("table").find("tr").length<1&&e.siblings("td, th").length<1?this.deleteTable(e):(o=n.find("td, th").index(e),i=e.next("td, th"),i.length>0||(i=n.prev("td, th")),r=n.closest("table"),r.find("col").eq(o).remove(),r.find("tr").each(function(e){return function(e,i){return t(i).find("td, th").eq(o).remove()}}(this)),this.refreshTableWidth(r),this.editor.selection.setRangeAtEndOf(i))},i.prototype.insertCol=function(e,i){var r,n,o,s,a,l,u,d;return null==i&&(i="after"),a=e.parent("tr"),l=a.find("td, th").index(e),s=e.closest("table"),r=s.find("col").eq(l),s.find("tr").each(function(e){return function(r,n){var o,s;return s=t(n).parent().is("thead")?"th":"td",o=t("<"+s+"/>").append(e.editor.util.phBr),t(n).find("td, th").eq(l)[i](o)}}(this)),n=t("<col/>"),r[i](n),u=s.width(),d=Math.max(parseFloat(r.attr("width"))/2,50/u*100),r.attr("width",d+"%"),n.attr("width",d+"%"),this.refreshTableWidth(s),o="after"===i?e.next("td, th"):e.prev("td, th"),this.editor.selection.setRangeAtStartOf(o)},i.prototype.deleteTable=function(t){var e,i;if(i=t.closest(".simditor-table"),e=i.next("p"),i.remove(),e.length>0)return this.editor.selection.setRangeAtStartOf(e)},i.prototype.command=function(e){var i,r;if(r=this.editor.selection.getRange(),i=t(r.commonAncestorContainer).closest("td, th"),i.length>0){if("deleteRow"===e)this.deleteRow(i);else if("insertRowAbove"===e)this.insertRow(i,"before");else if("insertRowBelow"===e)this.insertRow(i);else if("deleteCol"===e)this.deleteCol(i);else if("insertColLeft"===e)this.insertCol(i,"before");else if("insertColRight"===e)this.insertCol(i);else{if("deleteTable"!==e)return;this.deleteTable(i)}return this.editor.trigger("valuechanged")}},i}(a),A.Toolbar.addButton(R),B=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return D(i,e),i.prototype.name="strikethrough",i.prototype.icon="strikethrough",i.prototype.htmlTag="strike",i.prototype.disableTag="pre",i.prototype.status=function(t){var e;return null!=t&&this.setDisabled(t.is(this.disableTag)),!!this.disabled||(e=document.queryCommandState("strikethrough")===!0,this.setActive(e),e)},i.prototype.command=function(){return document.execCommand("strikethrough"),this.editor.util.support.oninput||this.editor.trigger("valuechanged"),t(document).trigger("selectionchange")},i}(a),A.Toolbar.addButton(B),n=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return D(i,e),i.prototype.name="alignment",i.prototype.icon="align-left",i.prototype.htmlTag="p, h1, h2, h3, h4",i.prototype._init=function(){return this.menu=[{name:"left",text:this._t("alignLeft"),icon:"align-left",param:"left"},{name:"center",text:this._t("alignCenter"),icon:"align-center",param:"center"},{name:"right",text:this._t("alignRight"),icon:"align-right",param:"right"}],i.__super__._init.call(this)},i.prototype.setActive=function(t,e){return null==e&&(e="left"),"left"===e?i.__super__.setActive.call(this,!1):i.__super__.setActive.call(this,t),this.el.removeClass("align-left align-center align-right"),t&&this.el.addClass("align-"+e),this.setIcon("align-"+e),this.menuEl.find(".menu-item").show().end().find(".menu-item-"+e).hide()},i.prototype.status=function(t){if(null==t)return!0;if(this.editor.util.isBlockNode(t))return this.setDisabled(!t.is(this.htmlTag)),this.disabled?(this.setActive(!1),!0):(this.setActive(!0,t.data("align")),this.active)},i.prototype.command=function(e){var i,r,n,o,s,a,l,u,d,h;if(["left","center","right"].indexOf(e)<0)throw"invalid "+e;for(u=this.editor.selection.getRange(),h=u.startContainer,s=u.endContainer,n=this.editor.util.closestBlockEl(h),r=this.editor.util.closestBlockEl(s),this.editor.selection.save(),i=n.is(r)?n:n.nextUntil(r).addBack().add(r),d=i.filter(this.htmlTag),a=0,l=d.length;a<l;a++)o=d[a],t(o).attr("data-align",e).data("align",e);return this.editor.selection.restore(),this.editor.trigger("valuechanged")},i}(a),A.Toolbar.addButton(n),A});
//# sourceMappingURL=simditor.min.js.map | sashberd/cdnjs | ajax/libs/simditor/2.1.12/lib/simditor.min.js | JavaScript | mit | 94,883 |
/**
* vue-router v2.0.0-rc.2
* (c) 2016 Evan You
* @license MIT
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.VueRouter = factory());
}(this, function () { 'use strict';
var View = {
name: 'router-view',
functional: true,
props: {
name: {
type: String,
default: 'default'
}
},
render: function render (h, ref) {
var props = ref.props;
var children = ref.children;
var parent = ref.parent;
var data = ref.data;
data.routerView = true
var route = parent.$route
var cache = parent._routerViewCache || (parent._routerViewCache = {})
var depth = 0
var inactive = false
while (parent) {
if (parent.$vnode && parent.$vnode.data.routerView) {
depth++
}
if (parent._inactive) {
inactive = true
}
parent = parent.$parent
}
data.routerViewDepth = depth
var matched = route.matched[depth]
if (!matched) {
return h()
}
var component = inactive
? cache[props.name]
: (cache[props.name] = matched.components[props.name])
var vnode = h(component, data, children)
if (!inactive) {
matched.instances[props.name] = vnode
}
return vnode
}
}
/* */
function resolvePath (
relative ,
base ,
append
) {
if (relative.charAt(0) === '/') {
return relative
}
if (relative.charAt(0) === '?' || relative.charAt(0) === '#') {
return base + relative
}
var stack = base.split('/')
// remove trailing segment if:
// - not appending
// - appending to trailing slash (last segment is empty)
if (!append || !stack[stack.length - 1]) {
stack.pop()
}
// resolve relative path
var segments = relative.replace(/^\//, '').split('/')
for (var i = 0; i < segments.length; i++) {
var segment = segments[i]
if (segment === '.') {
continue
} else if (segment === '..') {
stack.pop()
} else {
stack.push(segment)
}
}
// ensure leading slash
if (stack[0] !== '') {
stack.unshift('')
}
return stack.join('/')
}
function parsePath (path )
{
var hash = ''
var query = ''
var hashIndex = path.indexOf('#')
if (hashIndex >= 0) {
hash = path.slice(hashIndex)
path = path.slice(0, hashIndex)
}
var queryIndex = path.indexOf('?')
if (queryIndex >= 0) {
query = path.slice(queryIndex + 1)
path = path.slice(0, queryIndex)
}
return {
path: path,
query: query,
hash: hash
}
}
function cleanPath (path ) {
return path.replace(/\/\//g, '/')
}
/* */
function isSameRoute (a , b ) {
if (!b) {
return false
} else if (a.path && b.path) {
return (
a.path === b.path &&
a.hash === b.hash &&
isObjectEqual(a.query, b.query)
)
} else if (a.name && b.name) {
return (
a.name === b.name &&
a.hash === b.hash &&
isObjectEqual(a.query, b.query) &&
isObjectEqual(a.params, b.params)
)
} else {
return false
}
}
function isObjectEqual (a, b) {
if ( a === void 0 ) a = {};
if ( b === void 0 ) b = {};
var aKeys = Object.keys(a)
var bKeys = Object.keys(b)
if (aKeys.length !== bKeys.length) {
return false
}
return aKeys.every(function (key) { return String(a[key]) === String(b[key]); })
}
function isIncludedRoute (current , target ) {
return (
current.path.indexOf(target.path) === 0 &&
(!target.hash || current.hash === target.hash) &&
queryIncludes(current.query, target.query)
)
}
function queryIncludes (current , target ) {
for (var key in target) {
if (!(key in current)) {
return false
}
}
return true
}
/* */
function assert (condition , message ) {
if (!condition) {
throw new Error(("[vue-router] " + message))
}
}
function warn (condition , message ) {
if (!condition) {
typeof console !== 'undefined' && console.warn(("[vue-router] " + message))
}
}
var encode = encodeURIComponent
var decode = decodeURIComponent
function resolveQuery (
query ,
extraQuery
) {
if ( extraQuery === void 0 ) extraQuery = {};
if (query) {
var parsedQuery
try {
parsedQuery = parseQuery(query)
} catch (e) {
warn(false, e.message)
parsedQuery = {}
}
for (var key in extraQuery) {
parsedQuery[key] = extraQuery[key]
}
return parsedQuery
} else {
return extraQuery
}
}
function parseQuery (query ) {
var res = Object.create(null)
query = query.trim().replace(/^(\?|#|&)/, '')
if (!query) {
return res
}
query.split('&').forEach(function (param) {
var parts = param.replace(/\+/g, ' ').split('=')
var key = decode(parts.shift())
var val = parts.length > 0
? decode(parts.join('='))
: null
if (res[key] === undefined) {
res[key] = val
} else if (Array.isArray(res[key])) {
res[key].push(val)
} else {
res[key] = [res[key], val]
}
})
return res
}
function stringifyQuery (obj ) {
var res = obj ? Object.keys(obj).sort().map(function (key) {
var val = obj[key]
if (val === undefined) {
return ''
}
if (val === null) {
return encode(key)
}
if (Array.isArray(val)) {
var result = []
val.slice().forEach(function (val2) {
if (val2 === undefined) {
return
}
if (val2 === null) {
result.push(encode(key))
} else {
result.push(encode(key) + '=' + encode(val2))
}
})
return result.join('&')
}
return encode(key) + '=' + encode(val)
}).filter(function (x) { return x.length > 0; }).join('&') : null
return res ? ("?" + res) : ''
}
function normalizeLocation (
raw ,
current ,
append
) {
var next = typeof raw === 'string' ? { path: raw } : raw
if (next.name || next._normalized) {
return next
}
var parsedPath = parsePath(next.path || '')
var basePath = (current && current.path) || '/'
var path = parsedPath.path
? resolvePath(parsedPath.path, basePath, append)
: (current && current.path) || '/'
var query = resolveQuery(parsedPath.query, next.query)
var hash = next.hash || parsedPath.hash
if (hash && hash.charAt(0) !== '#') {
hash = "#" + hash
}
return {
_normalized: true,
path: path,
query: query,
hash: hash
}
}
var Link = {
name: 'router-link',
props: {
to: {
type: [String, Object],
required: true
},
tag: {
type: String,
default: 'a'
},
exact: Boolean,
append: Boolean,
replace: Boolean,
activeClass: String
},
render: function render (h) {
var this$1 = this;
var router = this.$router
var current = this.$route
var to = normalizeLocation(this.to, current, this.append)
var resolved = router.match(to)
var fullPath = resolved.redirectedFrom || resolved.fullPath
var base = router.history.base
var href = base ? cleanPath(base + fullPath) : fullPath
var classes = {}
var activeClass = this.activeClass || router.options.linkActiveClass || 'router-link-active'
classes[activeClass] = this.exact
? isSameRoute(current, resolved)
: isIncludedRoute(current, resolved)
var data = {
class: classes,
on: {
click: function (e) {
e.preventDefault()
if (this$1.replace) {
router.replace(to)
} else {
router.push(to)
}
}
}
}
if (this.tag === 'a') {
data.attrs = { href: href }
} else {
// find the first <a> child and apply href
var a = findAnchor(this.$slots.default)
if (a) {
var aData = a.data || (a.data = {})
var aAttrs = aData.attrs || (aData.attrs = {})
aAttrs.href = href
}
}
return h(this.tag, data, this.$slots.default)
}
}
function findAnchor (children) {
if (children) {
var child
for (var i = 0; i < children.length; i++) {
child = children[i]
if (child.tag === 'a') {
return child
}
if (child.children && (child = findAnchor(child.children))) {
return child
}
}
}
}
function install (Vue) {
if (install.installed) return
install.installed = true
Object.defineProperty(Vue.prototype, '$router', {
get: function get () { return this.$root._router }
})
Object.defineProperty(Vue.prototype, '$route', {
get: function get$1 () { return this.$root._route }
})
Vue.mixin({
beforeCreate: function beforeCreate () {
if (this.$options.router) {
this._router = this.$options.router
this._router.init(this)
Vue.util.defineReactive(this, '_route', this._router.history.current)
}
}
})
Vue.component('router-view', View)
Vue.component('router-link', Link)
}
function interopDefault(ex) {
return ex && typeof ex === 'object' && 'default' in ex ? ex['default'] : ex;
}
function createCommonjsModule(fn, module) {
return module = { exports: {} }, fn(module, module.exports), module.exports;
}
var index$1 = createCommonjsModule(function (module) {
module.exports = Array.isArray || function (arr) {
return Object.prototype.toString.call(arr) == '[object Array]';
};
});
var index$2 = interopDefault(index$1);
var require$$0 = Object.freeze({
default: index$2
});
var index = createCommonjsModule(function (module) {
var isarray = interopDefault(require$$0)
/**
* Expose `pathToRegexp`.
*/
module.exports = pathToRegexp
module.exports.parse = parse
module.exports.compile = compile
module.exports.tokensToFunction = tokensToFunction
module.exports.tokensToRegExp = tokensToRegExp
/**
* The main path matching regexp utility.
*
* @type {RegExp}
*/
var PATH_REGEXP = new RegExp([
// Match escaped characters that would otherwise appear in future matches.
// This allows the user to escape special characters that won't transform.
'(\\\\.)',
// Match Express-style parameters and un-named parameters with a prefix
// and optional suffixes. Matches appear as:
//
// "/:test(\\d+)?" => ["/", "test", "\d+", undefined, "?", undefined]
// "/route(\\d+)" => [undefined, undefined, undefined, "\d+", undefined, undefined]
// "/*" => ["/", undefined, undefined, undefined, undefined, "*"]
'([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))'
].join('|'), 'g')
/**
* Parse a string for the raw tokens.
*
* @param {string} str
* @return {!Array}
*/
function parse (str) {
var tokens = []
var key = 0
var index = 0
var path = ''
var res
while ((res = PATH_REGEXP.exec(str)) != null) {
var m = res[0]
var escaped = res[1]
var offset = res.index
path += str.slice(index, offset)
index = offset + m.length
// Ignore already escaped sequences.
if (escaped) {
path += escaped[1]
continue
}
var next = str[index]
var prefix = res[2]
var name = res[3]
var capture = res[4]
var group = res[5]
var modifier = res[6]
var asterisk = res[7]
// Push the current path onto the tokens.
if (path) {
tokens.push(path)
path = ''
}
var partial = prefix != null && next != null && next !== prefix
var repeat = modifier === '+' || modifier === '*'
var optional = modifier === '?' || modifier === '*'
var delimiter = res[2] || '/'
var pattern = capture || group || (asterisk ? '.*' : '[^' + delimiter + ']+?')
tokens.push({
name: name || key++,
prefix: prefix || '',
delimiter: delimiter,
optional: optional,
repeat: repeat,
partial: partial,
asterisk: !!asterisk,
pattern: escapeGroup(pattern)
})
}
// Match any characters still remaining.
if (index < str.length) {
path += str.substr(index)
}
// If the path exists, push it onto the end.
if (path) {
tokens.push(path)
}
return tokens
}
/**
* Compile a string to a template function for the path.
*
* @param {string} str
* @return {!function(Object=, Object=)}
*/
function compile (str) {
return tokensToFunction(parse(str))
}
/**
* Prettier encoding of URI path segments.
*
* @param {string}
* @return {string}
*/
function encodeURIComponentPretty (str) {
return encodeURI(str).replace(/[\/?#]/g, function (c) {
return '%' + c.charCodeAt(0).toString(16).toUpperCase()
})
}
/**
* Encode the asterisk parameter. Similar to `pretty`, but allows slashes.
*
* @param {string}
* @return {string}
*/
function encodeAsterisk (str) {
return encodeURI(str).replace(/[?#]/g, function (c) {
return '%' + c.charCodeAt(0).toString(16).toUpperCase()
})
}
/**
* Expose a method for transforming tokens into the path function.
*/
function tokensToFunction (tokens) {
// Compile all the tokens into regexps.
var matches = new Array(tokens.length)
// Compile all the patterns before compilation.
for (var i = 0; i < tokens.length; i++) {
if (typeof tokens[i] === 'object') {
matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')
}
}
return function (obj, opts) {
var path = ''
var data = obj || {}
var options = opts || {}
var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent
for (var i = 0; i < tokens.length; i++) {
var token = tokens[i]
if (typeof token === 'string') {
path += token
continue
}
var value = data[token.name]
var segment
if (value == null) {
if (token.optional) {
// Prepend partial segment prefixes.
if (token.partial) {
path += token.prefix
}
continue
} else {
throw new TypeError('Expected "' + token.name + '" to be defined')
}
}
if (isarray(value)) {
if (!token.repeat) {
throw new TypeError('Expected "' + token.name + '" to not repeat, but received `' + JSON.stringify(value) + '`')
}
if (value.length === 0) {
if (token.optional) {
continue
} else {
throw new TypeError('Expected "' + token.name + '" to not be empty')
}
}
for (var j = 0; j < value.length; j++) {
segment = encode(value[j])
if (!matches[i].test(segment)) {
throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '", but received `' + JSON.stringify(segment) + '`')
}
path += (j === 0 ? token.prefix : token.delimiter) + segment
}
continue
}
segment = token.asterisk ? encodeAsterisk(value) : encode(value)
if (!matches[i].test(segment)) {
throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but received "' + segment + '"')
}
path += token.prefix + segment
}
return path
}
}
/**
* Escape a regular expression string.
*
* @param {string} str
* @return {string}
*/
function escapeString (str) {
return str.replace(/([.+*?=^!:${}()[\]|\/\\])/g, '\\$1')
}
/**
* Escape the capturing group by escaping special characters and meaning.
*
* @param {string} group
* @return {string}
*/
function escapeGroup (group) {
return group.replace(/([=!:$\/()])/g, '\\$1')
}
/**
* Attach the keys as a property of the regexp.
*
* @param {!RegExp} re
* @param {Array} keys
* @return {!RegExp}
*/
function attachKeys (re, keys) {
re.keys = keys
return re
}
/**
* Get the flags for a regexp from the options.
*
* @param {Object} options
* @return {string}
*/
function flags (options) {
return options.sensitive ? '' : 'i'
}
/**
* Pull out keys from a regexp.
*
* @param {!RegExp} path
* @param {!Array} keys
* @return {!RegExp}
*/
function regexpToRegexp (path, keys) {
// Use a negative lookahead to match only capturing groups.
var groups = path.source.match(/\((?!\?)/g)
if (groups) {
for (var i = 0; i < groups.length; i++) {
keys.push({
name: i,
prefix: null,
delimiter: null,
optional: false,
repeat: false,
partial: false,
asterisk: false,
pattern: null
})
}
}
return attachKeys(path, keys)
}
/**
* Transform an array into a regexp.
*
* @param {!Array} path
* @param {Array} keys
* @param {!Object} options
* @return {!RegExp}
*/
function arrayToRegexp (path, keys, options) {
var parts = []
for (var i = 0; i < path.length; i++) {
parts.push(pathToRegexp(path[i], keys, options).source)
}
var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options))
return attachKeys(regexp, keys)
}
/**
* Create a path regexp from string input.
*
* @param {string} path
* @param {!Array} keys
* @param {!Object} options
* @return {!RegExp}
*/
function stringToRegexp (path, keys, options) {
var tokens = parse(path)
var re = tokensToRegExp(tokens, options)
// Attach keys back to the regexp.
for (var i = 0; i < tokens.length; i++) {
if (typeof tokens[i] !== 'string') {
keys.push(tokens[i])
}
}
return attachKeys(re, keys)
}
/**
* Expose a function for taking tokens and returning a RegExp.
*
* @param {!Array} tokens
* @param {Object=} options
* @return {!RegExp}
*/
function tokensToRegExp (tokens, options) {
options = options || {}
var strict = options.strict
var end = options.end !== false
var route = ''
var lastToken = tokens[tokens.length - 1]
var endsWithSlash = typeof lastToken === 'string' && /\/$/.test(lastToken)
// Iterate over the tokens and create our regexp string.
for (var i = 0; i < tokens.length; i++) {
var token = tokens[i]
if (typeof token === 'string') {
route += escapeString(token)
} else {
var prefix = escapeString(token.prefix)
var capture = '(?:' + token.pattern + ')'
if (token.repeat) {
capture += '(?:' + prefix + capture + ')*'
}
if (token.optional) {
if (!token.partial) {
capture = '(?:' + prefix + '(' + capture + '))?'
} else {
capture = prefix + '(' + capture + ')?'
}
} else {
capture = prefix + '(' + capture + ')'
}
route += capture
}
}
// In non-strict mode we allow a slash at the end of match. If the path to
// match already ends with a slash, we remove it for consistency. The slash
// is valid at the end of a path match, not in the middle. This is important
// in non-ending mode, where "/test/" shouldn't match "/test//route".
if (!strict) {
route = (endsWithSlash ? route.slice(0, -2) : route) + '(?:\\/(?=$))?'
}
if (end) {
route += '$'
} else {
// In non-ending mode, we need the capturing groups to match as much as
// possible by using a positive lookahead to the end or next path segment.
route += strict && endsWithSlash ? '' : '(?=\\/|$)'
}
return new RegExp('^' + route, flags(options))
}
/**
* Normalize the given path string, returning a regular expression.
*
* An empty array can be passed in for the keys, which will hold the
* placeholder key descriptions. For example, using `/user/:id`, `keys` will
* contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.
*
* @param {(string|RegExp|Array)} path
* @param {(Array|Object)=} keys
* @param {Object=} options
* @return {!RegExp}
*/
function pathToRegexp (path, keys, options) {
keys = keys || []
if (!isarray(keys)) {
options = /** @type {!Object} */ (keys)
keys = []
} else if (!options) {
options = {}
}
if (path instanceof RegExp) {
return regexpToRegexp(path, /** @type {!Array} */ (keys))
}
if (isarray(path)) {
return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)
}
return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)
}
});
var Regexp = interopDefault(index);
function createRouteMap (routes )
{
var pathMap = Object.create(null)
var nameMap = Object.create(null)
routes.forEach(function (route) {
addRouteRecord(pathMap, nameMap, route)
})
return {
pathMap: pathMap,
nameMap: nameMap
}
}
function addRouteRecord (
pathMap ,
nameMap ,
route ,
parent ,
matchAs
) {
var path = route.path;
var name = route.name;
assert(path != null, "\"path\" is required in a route configuration.")
var record = {
path: normalizePath(path, parent),
components: route.components || { default: route.component },
instances: {},
name: name,
parent: parent,
matchAs: matchAs,
redirect: route.redirect,
beforeEnter: route.beforeEnter,
meta: route.meta || {}
}
if (route.children) {
route.children.forEach(function (child) {
addRouteRecord(pathMap, nameMap, child, record)
})
}
if (route.alias) {
if (Array.isArray(route.alias)) {
route.alias.forEach(function (alias) {
addRouteRecord(pathMap, nameMap, { path: alias }, parent, record.path)
})
} else {
addRouteRecord(pathMap, nameMap, { path: route.alias }, parent, record.path)
}
}
pathMap[record.path] = record
if (name) nameMap[name] = record
}
function normalizePath (path , parent ) {
path = path.replace(/\/$/, '')
if (path[0] === '/') return path
if (parent == null) return path
return cleanPath(((parent.path) + "/" + path))
}
var regexpCache
= Object.create(null)
var regexpCompileCache
= Object.create(null)
function createMatcher (routes ) {
var ref = createRouteMap(routes);
var pathMap = ref.pathMap;
var nameMap = ref.nameMap;
function match (
raw ,
currentRoute ,
redirectedFrom
) {
var location = normalizeLocation(raw, currentRoute)
var name = location.name;
if (name) {
var record = nameMap[name]
if (record) {
location.path = fillParams(record.path, location.params, ("named route \"" + name + "\""))
return _createRoute(record, location, redirectedFrom)
}
} else if (location.path) {
location.params = {}
for (var path in pathMap) {
if (matchRoute(path, location.params, location.path)) {
return _createRoute(pathMap[path], location, redirectedFrom)
}
}
}
// no match
return _createRoute(null, location)
}
function redirect (
record ,
location
) {
var query = location.query;
var hash = location.hash;
var params = location.params;
var redirect = record.redirect;
var name = redirect && typeof redirect === 'object' && redirect.name
if (name) {
// resolved named direct
var targetRecord = nameMap[name]
assert(targetRecord, ("redirect failed: named route \"" + name + "\" not found."))
return match({
_normalized: true,
name: name,
query: query,
hash: hash,
params: params
}, undefined, location)
} else if (typeof redirect === 'string') {
// 1. resolve relative redirect
var rawPath = resolveRecordPath(redirect, record)
// 2. resolve params
var path = fillParams(rawPath, params, ("redirect route with path \"" + rawPath + "\""))
// 3. rematch with existing query and hash
return match({
_normalized: true,
path: path,
query: query,
hash: hash
}, undefined, location)
} else {
warn(false, ("invalid redirect option: " + (JSON.stringify(redirect))))
return _createRoute(null, location)
}
}
function alias (
record ,
location ,
matchAs
) {
var aliasedPath = fillParams(matchAs, location.params, ("aliased route with path \"" + matchAs + "\""))
var aliasedMatch = match({
_normalized: true,
path: aliasedPath
})
if (aliasedMatch) {
var matched = aliasedMatch.matched
var aliasedRecord = matched[matched.length - 1]
location.params = aliasedMatch.params
return _createRoute(aliasedRecord, location)
}
return _createRoute(null, location)
}
function _createRoute (
record ,
location ,
redirectedFrom
) {
if (record && record.redirect) {
return redirect(record, redirectedFrom || location)
}
if (record && record.matchAs) {
return alias(record, location, record.matchAs)
}
return createRoute(record, location, redirectedFrom)
}
return match
}
function createRoute (
record ,
location ,
redirectedFrom
) {
var route = {
name: location.name || (record && record.name),
path: location.path || '/',
hash: location.hash || '',
query: location.query || {},
params: location.params || {},
fullPath: getFullPath(location),
matched: record ? formatMatch(record) : []
}
if (redirectedFrom) {
route.redirectedFrom = getFullPath(redirectedFrom)
}
return Object.freeze(route)
}
function matchRoute (
path ,
params ,
pathname
) {
var keys, regexp
var hit = regexpCache[path]
if (hit) {
keys = hit.keys
regexp = hit.regexp
} else {
keys = []
regexp = Regexp(path, keys)
regexpCache[path] = { keys: keys, regexp: regexp }
}
var m = pathname.match(regexp)
if (!m) {
return false
} else if (!params) {
return true
}
for (var i = 1, len = m.length; i < len; ++i) {
var key = keys[i - 1]
var val = typeof m[i] === 'string' ? decodeURIComponent(m[i]) : m[i]
if (key) params[key.name] = val
}
return true
}
function fillParams (
path ,
params ,
routeMsg
) {
try {
var filler =
regexpCompileCache[path] ||
(regexpCompileCache[path] = Regexp.compile(path))
return filler(params || {}, { pretty: true })
} catch (e) {
assert(false, ("missing param for " + routeMsg + ": " + (e.message)))
return ''
}
}
function formatMatch (record ) {
var res = []
while (record) {
res.unshift(record)
record = record.parent
}
return res
}
function resolveRecordPath (path , record ) {
return resolvePath(path, record.parent ? record.parent.path : '/', true)
}
function getFullPath (ref) {
var path = ref.path;
var query = ref.query; if ( query === void 0 ) query = {};
var hash = ref.hash; if ( hash === void 0 ) hash = '';
return (path || '/') + stringifyQuery(query) + hash
}
/* */
var inBrowser = typeof window !== 'undefined'
var supportsHistory = inBrowser && (function () {
var ua = window.navigator.userAgent
if (
(ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) &&
ua.indexOf('Mobile Safari') !== -1 &&
ua.indexOf('Chrome') === -1 &&
ua.indexOf('Windows Phone') === -1
) {
return false
}
return window.history && 'pushState' in window.history
})()
/* */
function runQueue (queue , fn , cb ) {
var step = function (index) {
if (index >= queue.length) {
cb()
} else {
fn(queue[index], function () {
step(index + 1)
})
}
}
step(0)
}
var History = function History (router , base ) {
this.router = router
this.base = normalizeBase(base)
// start with a route object that stands for "nowhere"
this.current = createRoute(null, {
path: '__vue_router_init__'
})
this.pending = null
};
History.prototype.listen = function listen (cb ) {
this.cb = cb
};
History.prototype.transitionTo = function transitionTo (location , cb ) {
var this$1 = this;
var route = this.router.match(location, this.current)
this.confirmTransition(route, function () {
this$1.updateRoute(route)
cb && cb(route)
})
};
History.prototype.confirmTransition = function confirmTransition (route , cb ) {
var this$1 = this;
if (isSameRoute(route, this.current)) {
return
}
var ref = resolveQueue(this.current.matched, route.matched);
var deactivated = ref.deactivated;
var activated = ref.activated;
var queue = [].concat(
// deactivate guards
extractLeaveGuards(deactivated),
// global before hooks
this.router.beforeHooks,
// activate guards
activated.map(function (m) { return m.beforeEnter; }),
// async components
resolveAsyncComponents(activated)
).filter(function (_) { return _; })
this.pending = route
var redirect = function (location) { return this$1.push(location); }
runQueue(
queue,
function (hook, next) { hook(route, redirect, next) },
function () {
if (isSameRoute(route, this$1.pending)) {
this$1.pending = null
cb(route)
}
}
)
};
History.prototype.updateRoute = function updateRoute (route ) {
this.current = route
this.cb && this.cb(route)
this.router.afterHooks.forEach(function (hook) {
hook && hook(route)
})
};
function normalizeBase (base ) {
if (!base) {
if (inBrowser) {
// respect <base> tag
var baseEl = document.querySelector('base')
base = baseEl ? baseEl.getAttribute('href') : '/'
} else {
base = '/'
}
}
// make sure there's the starting slash
if (base.charAt(0) !== '/') {
base = '/' + base
}
// remove trailing slash
return base.replace(/\/$/, '')
}
function resolveQueue (
current ,
next
)
{
var i
var max = Math.max(current.length, next.length)
for (i = 0; i < max; i++) {
if (current[i] !== next[i]) {
break
}
}
return {
activated: next.slice(i),
deactivated: current.slice(i)
}
}
function extractLeaveGuards (matched ) {
return flatMapComponents(matched, function (def, instance) {
var guard = def && def.beforeRouteLeave
if (guard) {
return function routeGuard () {
return guard.apply(instance, arguments)
}
}
}).reverse()
}
function resolveAsyncComponents (matched ) {
return flatMapComponents(matched, function (def, _, match, key) {
// if it's a function and doesn't have Vue options attached,
// assume it's an async component resolve function.
// we are not using Vue's default async resolving mechanism because
// we want to halt the navigation until the incoming component has been
// resolved.
if (typeof def === 'function' && !def.options) {
return function (route, redirect, next) { return def(function (resolvedDef) {
match.components[key] = resolvedDef
next()
}); }
}
})
}
function flatMapComponents (
matched ,
fn
) {
return Array.prototype.concat.apply([], matched.map(function (m) {
return Object.keys(m.components).map(function (key) { return fn(
m.components[key],
m.instances[key] && m.instances[key].child,
m, key
); })
}))
}
/* */
function saveScrollPosition (key ) {
if (!key) return
window.sessionStorage.setItem(key, JSON.stringify({
x: window.pageXOffset,
y: window.pageYOffset
}))
}
function getScrollPosition (key ) {
if (!key) return
return JSON.parse(window.sessionStorage.getItem(key))
}
function getElementPosition (el ) {
var docRect = document.documentElement.getBoundingClientRect()
var elRect = el.getBoundingClientRect()
return {
x: elRect.left - docRect.left,
y: elRect.top - docRect.top
}
}
function isValidPosition (obj ) {
return isNumber(obj.x) || isNumber(obj.y)
}
function normalizePosition (obj ) {
return {
x: isNumber(obj.x) ? obj.x : window.pageXOffset,
y: isNumber(obj.y) ? obj.y : window.pageYOffset
}
}
function isNumber (v ) {
return typeof v === 'number'
}
var genKey = function () { return String(Date.now()); }
var _key = genKey()
var HTML5History = (function (History) {
function HTML5History (router , base ) {
var this$1 = this;
History.call(this, router, base)
var initialLocation = getLocation(this.base)
this.transitionTo(initialLocation, function (route) {
// possible redirect on start
var url = cleanPath(this$1.base + this$1.current.fullPath)
if (initialLocation !== url) {
replaceState(url)
}
})
var expectScroll = router.options.scrollBehavior
window.addEventListener('popstate', function (e) {
_key = e.state && e.state.key
var current = this$1.current
this$1.transitionTo(getLocation(this$1.base), function (next) {
if (expectScroll) {
this$1.handleScroll(next, current, true)
}
})
})
if (expectScroll) {
window.addEventListener('scroll', function () {
saveScrollPosition(_key)
})
}
}
if ( History ) HTML5History.__proto__ = History;
HTML5History.prototype = Object.create( History && History.prototype );
HTML5History.prototype.constructor = HTML5History;
HTML5History.prototype.go = function go (n ) {
window.history.go(n)
};
HTML5History.prototype.push = function push (location ) {
var this$1 = this;
var current = this.current
History.prototype.transitionTo.call(this, location, function (route) {
pushState(cleanPath(this$1.base + route.fullPath))
this$1.handleScroll(route, current, false)
})
};
HTML5History.prototype.replace = function replace (location ) {
var this$1 = this;
var current = this.current
History.prototype.transitionTo.call(this, location, function (route) {
replaceState(cleanPath(this$1.base + route.fullPath))
this$1.handleScroll(route, current, false)
})
};
HTML5History.prototype.handleScroll = function handleScroll (to , from , isPop ) {
var router = this.router
if (!router.app) {
return
}
var behavior = router.options.scrollBehavior
if (!behavior) {
return
}
assert(typeof behavior === 'function', "scrollBehavior must be a function")
// wait until re-render finishes before scrolling
router.app.$nextTick(function () {
var position = getScrollPosition(_key)
var shouldScroll = behavior(to, from, isPop ? position : null)
if (!shouldScroll) {
return
}
var isObject = typeof shouldScroll === 'object'
if (isObject && shouldScroll.selector) {
var el = document.querySelector(shouldScroll.selector)
if (el) {
position = getElementPosition(el)
} else if (isValidPosition(shouldScroll)) {
position = normalizePosition(shouldScroll)
}
} else if (isObject && isValidPosition(shouldScroll)) {
position = normalizePosition(shouldScroll)
}
if (position) {
window.scrollTo(position.x, position.y)
}
})
};
return HTML5History;
}(History));
function getLocation (base ) {
var path = window.location.pathname
if (base && path.indexOf(base) === 0) {
path = path.slice(base.length)
}
return (path || '/') + window.location.search + window.location.hash
}
function pushState (url , replace ) {
// try...catch the pushState call to get around Safari
// DOM Exception 18 where it limits to 100 pushState calls
var history = window.history
try {
if (replace) {
history.replaceState({ key: _key }, '', url)
} else {
_key = genKey()
history.pushState({ key: _key }, '', url)
}
saveScrollPosition(_key)
} catch (e) {
window.location[replace ? 'assign' : 'replace'](url)
}
}
function replaceState (url ) {
pushState(url, true)
}
var HashHistory = (function (History) {
function HashHistory (router , base , fallback ) {
var this$1 = this;
History.call(this, router, base)
// check history fallback deeplinking
if (fallback && this.checkFallback()) {
return
}
ensureSlash()
this.transitionTo(getHash(), function (route) {
// possible redirect on start
if (getHash() !== route.fullPath) {
replaceHash(route.fullPath)
}
})
window.addEventListener('hashchange', function () {
this$1.onHashChange()
})
}
if ( History ) HashHistory.__proto__ = History;
HashHistory.prototype = Object.create( History && History.prototype );
HashHistory.prototype.constructor = HashHistory;
HashHistory.prototype.checkFallback = function checkFallback () {
var location = getLocation(this.base)
if (!/^\/#/.test(location)) {
window.location.replace(
cleanPath(this.base + '/#' + location)
)
return true
}
};
HashHistory.prototype.onHashChange = function onHashChange () {
if (!ensureSlash()) {
return
}
this.transitionTo(getHash(), function (route) {
replaceHash(route.fullPath)
})
};
HashHistory.prototype.push = function push (location ) {
History.prototype.transitionTo.call(this, location, function (route) {
pushHash(route.fullPath)
})
};
HashHistory.prototype.replace = function replace (location ) {
History.prototype.transitionTo.call(this, location, function (route) {
replaceHash(route.fullPath)
})
};
HashHistory.prototype.go = function go (n ) {
window.history.go(n)
};
return HashHistory;
}(History));
function ensureSlash () {
var path = getHash()
if (path.charAt(0) === '/') {
return true
}
replaceHash('/' + path)
return false
}
function getHash () {
// We can't use window.location.hash here because it's not
// consistent across browsers - Firefox will pre-decode it!
var href = window.location.href
var index = href.indexOf('#')
return index === -1 ? '' : href.slice(index + 1)
}
function pushHash (path) {
window.location.hash = path
}
function replaceHash (path) {
var i = window.location.href.indexOf('#')
window.location.replace(
window.location.href.slice(0, i >= 0 ? i : 0) + '#' + path
)
}
var AbstractHistory = (function (History) {
function AbstractHistory (router ) {
History.call(this, router)
this.stack = []
this.index = 0
}
if ( History ) AbstractHistory.__proto__ = History;
AbstractHistory.prototype = Object.create( History && History.prototype );
AbstractHistory.prototype.constructor = AbstractHistory;
AbstractHistory.prototype.push = function push (location ) {
var this$1 = this;
History.prototype.transitionTo.call(this, location, function (route) {
this$1.stack = this$1.stack.slice(0, this$1.index + 1).concat(route)
this$1.index++
})
};
AbstractHistory.prototype.replace = function replace (location ) {
var this$1 = this;
History.prototype.transitionTo.call(this, location, function (route) {
this$1.stack = this$1.stack.slice(0, this$1.index).concat(route)
})
};
AbstractHistory.prototype.go = function go (n ) {
var this$1 = this;
var targetIndex = this.index + n
if (!this.stack) debugger
if (targetIndex < 0 || targetIndex >= this.stack.length) {
return
}
var location = this.stack[targetIndex]
this.confirmTransition(location, function () {
this$1.index = targetIndex
this$1.updateRoute(location)
})
};
return AbstractHistory;
}(History));
var VueRouter = function VueRouter (options) {
if ( options === void 0 ) options = {};
this.app = null
this.options = options
this.beforeHooks = []
this.afterHooks = []
this.match = createMatcher(options.routes || [])
var mode = options.mode || 'hash'
this.fallback = mode === 'history' && !supportsHistory
if (this.fallback) {
mode = 'hash'
}
if (!inBrowser) {
mode = 'abstract'
}
this.mode = mode
};
var prototypeAccessors = { currentRoute: {} };
prototypeAccessors.currentRoute.get = function () {
return this.history && this.history.current
};
VueRouter.prototype.init = function init (app /* Vue component instance */) {
var this$1 = this;
assert(
install.installed,
"not installed. Make sure to call `Vue.use(VueRouter)` " +
"before creating root instance."
)
var ref = this;
var mode = ref.mode;
var options = ref.options;
var fallback = ref.fallback;
switch (mode) {
case 'history':
this.history = new HTML5History(this, options.base)
break
case 'hash':
this.history = new HashHistory(this, options.base, fallback)
break
case 'abstract':
this.history = new AbstractHistory(this)
break
default:
assert(false, ("invalid mode: " + mode))
}
this.app = app
this.history.listen(function (route) {
this$1.app._route = route
})
};
VueRouter.prototype.beforeEach = function beforeEach (fn ) {
this.beforeHooks.push(fn)
};
VueRouter.prototype.afterEach = function afterEach (fn ) {
this.afterHooks.push(fn)
};
VueRouter.prototype.push = function push (location ) {
this.history.push(location)
};
VueRouter.prototype.replace = function replace (location ) {
this.history.replace(location)
};
VueRouter.prototype.go = function go (n ) {
this.history.go(n)
};
VueRouter.prototype.back = function back () {
this.go(-1)
};
VueRouter.prototype.forward = function forward () {
this.go(1)
};
VueRouter.prototype.getMatchedComponents = function getMatchedComponents () {
if (!this.currentRoute) {
return []
}
return [].concat.apply([], this.currentRoute.matched.map(function (m) {
return Object.keys(m.components).map(function (key) {
return m.components[key]
})
}))
};
Object.defineProperties( VueRouter.prototype, prototypeAccessors );
VueRouter.install = install
if (inBrowser && window.Vue) {
window.Vue.use(VueRouter)
}
return VueRouter;
})); | sashberd/cdnjs | ajax/libs/vue-router/2.0.0-rc.2/vue-router.js | JavaScript | mit | 44,651 |
<?php
/**
* This file is part of the Propel package.
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @license MIT License
*/
require_once dirname(__FILE__) . '/PropelPlatformInterface.php';
require_once dirname(__FILE__) . '/../model/Column.php';
require_once dirname(__FILE__) . '/../model/Table.php';
require_once dirname(__FILE__) . '/../model/Domain.php';
require_once dirname(__FILE__) . '/../model/PropelTypes.php';
/**
* Default implementation for the Platform interface.
*
* @author Martin Poeschl <mpoeschl@marmot.at> (Torque)
* @version $Revision$
* @package propel.generator.platform
*/
class DefaultPlatform implements PropelPlatformInterface
{
/**
* Mapping from Propel types to Domain objects.
*
* @var array
*/
protected $schemaDomainMap;
/**
* @var PDO Database connection.
*/
protected $con;
/**
* @var boolean whether the identifier quoting is enabled
*/
protected $isIdentifierQuotingEnabled = true;
/**
* Default constructor.
*
* @param PDO $con Optional database connection to use in this platform.
*/
public function __construct(PDO $con = null)
{
if ($con) {
$this->setConnection($con);
}
$this->initialize();
}
/**
* Set the database connection to use for this Platform class.
*
* @param PDO $con Database connection to use in this platform.
*/
public function setConnection(PDO $con = null)
{
$this->con = $con;
}
/**
* Returns the database connection to use for this Platform class.
*
* @return PDO The database connection or NULL if none has been set.
*/
public function getConnection()
{
return $this->con;
}
/**
* Sets the GeneratorConfig to use in the parsing.
*
* @param GeneratorConfigInterface $config
*/
public function setGeneratorConfig(GeneratorConfigInterface $config)
{
// do nothing by default
}
/**
* Gets a specific propel (renamed) property from the build.
*
* @param string $name
*
* @return mixed
*/
protected function getBuildProperty($name)
{
if ($this->generatorConfig !== null) {
return $this->generatorConfig->getBuildProperty($name);
}
return null;
}
/**
* Initialize the type -> Domain mapping.
*/
protected function initialize()
{
$this->schemaDomainMap = array();
foreach (PropelTypes::getPropelTypes() as $type) {
$this->schemaDomainMap[$type] = new Domain($type);
}
// BU_* no longer needed, so map these to the DATE/TIMESTAMP domains
$this->schemaDomainMap[PropelTypes::BU_DATE] = new Domain(PropelTypes::DATE);
$this->schemaDomainMap[PropelTypes::BU_TIMESTAMP] = new Domain(PropelTypes::TIMESTAMP);
// Boolean is a bit special, since typically it must be mapped to INT type.
$this->schemaDomainMap[PropelTypes::BOOLEAN] = new Domain(PropelTypes::BOOLEAN, "INTEGER");
}
/**
* Adds a mapping entry for specified Domain.
*
* @param Domain $domain
*/
protected function setSchemaDomainMapping(Domain $domain)
{
$this->schemaDomainMap[$domain->getType()] = $domain;
}
/**
* Returns the short name of the database type that this platform represents.
* For example MysqlPlatform->getDatabaseType() returns 'mysql'.
*
* @return string
*/
public function getDatabaseType()
{
$clazz = get_class($this);
$pos = strpos($clazz, 'Platform');
return strtolower(substr($clazz, 0, $pos));
}
/**
* Returns the max column length supported by the db.
*
* @return int The max column length
*/
public function getMaxColumnNameLength()
{
return 64;
}
/**
* Returns the native IdMethod (sequence|identity)
*
* @return string The native IdMethod (PropelPlatformInterface:IDENTITY, PropelPlatformInterface::SEQUENCE).
*/
public function getNativeIdMethod()
{
return PropelPlatformInterface::IDENTITY;
}
public function isNativeIdMethodAutoIncrement()
{
return $this->getNativeIdMethod() == PropelPlatformInterface::IDENTITY;
}
/**
* Returns the db specific domain for a propelType.
*
* @param string $propelType the Propel type name.
*
* @return Domain The db specific domain.
* @throws EngineException
*/
public function getDomainForType($propelType)
{
if (!isset($this->schemaDomainMap[$propelType])) {
throw new EngineException("Cannot map unknown Propel type " . var_export($propelType, true) . " to native database type.");
}
return $this->schemaDomainMap[$propelType];
}
/**
* @return string The RDBMS-specific SQL fragment for <code>NULL</code>
* or <code>NOT NULL</code>.
*/
public function getNullString($notNull)
{
return ($notNull ? "NOT NULL" : "");
}
/**
* @return The RDBMS-specific SQL fragment for autoincrement.
*/
public function getAutoIncrement()
{
return "IDENTITY";
}
/**
* Gets the name to use for creating a sequence for a table.
*
* This will create a new name or use one specified in an id-method-parameter
* tag, if specified.
*
* @param Table $table
*
* @return string Sequence name for this table.
*/
public function getSequenceName(Table $table)
{
static $longNamesMap = array();
$result = null;
if ($table->getIdMethod() == IDMethod::NATIVE) {
$idMethodParams = $table->getIdMethodParameters();
$maxIdentifierLength = $this->getMaxColumnNameLength();
if (empty($idMethodParams)) {
if (strlen($table->getName() . "_SEQ") > $maxIdentifierLength) {
if (!isset($longNamesMap[$table->getName()])) {
$longNamesMap[$table->getName()] = strval(count($longNamesMap) + 1);
}
$result = substr($table->getName(), 0, $maxIdentifierLength - strlen("_SEQ_" . $longNamesMap[$table->getName()])) . "_SEQ_" . $longNamesMap[$table->getName()];
} else {
$result = substr($table->getName(), 0, $maxIdentifierLength - 4) . "_SEQ";
}
} else {
$result = substr($idMethodParams[0]->getValue(), 0, $maxIdentifierLength);
}
}
return $result;
}
/**
* Builds the DDL SQL to add the tables of a database
* together with index and foreign keys
*
* @return string
*/
public function getAddTablesDDL(Database $database)
{
$ret = $this->getBeginDDL();
foreach ($database->getTablesForSql() as $table) {
$ret .= $this->getCommentBlockDDL($table->getName());
$ret .= $this->getDropTableDDL($table);
$ret .= $this->getAddTableDDL($table);
$ret .= $this->getAddIndicesDDL($table);
$ret .= $this->getAddForeignKeysDDL($table);
}
$ret .= $this->getEndDDL();
return $ret;
}
/**
* Gets the requests to execute at the beginning of a DDL file
*
* @return string
*/
public function getBeginDDL()
{
}
/**
* Gets the requests to execute at the end of a DDL file
*
* @return string
*/
public function getEndDDL()
{
}
/**
* Builds the DDL SQL to drop a table
*
* @return string
*/
public function getDropTableDDL(Table $table)
{
return "
DROP TABLE " . $this->quoteIdentifier($table->getName()) . ";
";
}
/**
* Builds the DDL SQL to add a table
* without index and foreign keys
*
* @return string
*/
public function getAddTableDDL(Table $table)
{
$tableDescription = $table->hasDescription() ? $this->getCommentLineDDL($table->getDescription()) : '';
$lines = array();
foreach ($table->getColumns() as $column) {
$lines[] = $this->getColumnDDL($column);
}
if ($table->hasPrimaryKey()) {
$lines[] = $this->getPrimaryKeyDDL($table);
}
foreach ($table->getUnices() as $unique) {
$lines[] = $this->getUniqueDDL($unique);
}
$sep = ",
";
$pattern = "
%sCREATE TABLE %s
(
%s
);
";
return sprintf($pattern, $tableDescription, $this->quoteIdentifier($table->getName()), implode($sep, $lines));
}
/**
* Builds the DDL SQL for a Column object.
*
* @return string
*/
public function getColumnDDL(Column $col)
{
$domain = $col->getDomain();
$ddl = array($this->quoteIdentifier($col->getName()));
$sqlType = $domain->getSqlType();
if ($this->hasSize($sqlType) && $col->isDefaultSqlType($this)) {
$ddl[] = $sqlType . $domain->printSize();
} else {
$ddl[] = $sqlType;
}
if ($default = $this->getColumnDefaultValueDDL($col)) {
$ddl[] = $default;
}
if ($notNull = $this->getNullString($col->isNotNull())) {
$ddl[] = $notNull;
}
if ($autoIncrement = $col->getAutoIncrementString()) {
$ddl[] = $autoIncrement;
}
return implode(' ', $ddl);
}
/**
* Returns the SQL for the default value of a Column object
*
* @return string
*/
public function getColumnDefaultValueDDL(Column $col)
{
$default = '';
$defaultValue = $col->getDefaultValue();
if ($defaultValue !== null) {
$default .= 'DEFAULT ';
if ($defaultValue->isExpression()) {
$default .= $defaultValue->getValue();
} else {
if ($col->isTextType()) {
$default .= $this->quote($defaultValue->getValue());
} elseif ($col->getType() == PropelTypes::BOOLEAN || $col->getType() == PropelTypes::BOOLEAN_EMU) {
$default .= $this->getBooleanString($defaultValue->getValue());
} elseif ($col->getType() == PropelTypes::ENUM) {
$default .= array_search($defaultValue->getValue(), $col->getValueSet());
} elseif ($col->isPhpArrayType()) {
$value = $this->getPhpArrayString($defaultValue->getValue());
if (null === $value) {
$default = '';
} else {
$default .= $value;
}
} else {
$default .= $defaultValue->getValue();
}
}
}
return $default;
}
/**
* Creates a delimiter-delimited string list of column names, quoted using quoteIdentifier().
*
* @example
* <code>
* echo $platform->getColumnListDDL(array('foo', 'bar');
* // '"foo","bar"'
* </code>
*
* @param array Column[] or string[]
* @param string $delim The delimiter to use in separating the column names.
*
* @return string
*/
public function getColumnListDDL($columns, $delimiter = ',')
{
$list = array();
foreach ($columns as $column) {
if ($column instanceof Column) {
$column = $column->getName();
}
$list[] = $this->quoteIdentifier($column);
}
return implode($delimiter, $list);
}
/**
* Returns the name of a table primary key
*
* @return string
*/
public function getPrimaryKeyName(Table $table)
{
$tableName = $table->getCommonName();
return $tableName . '_PK';
}
/**
* Returns the SQL for the primary key of a Table object
*
* @return string
*/
public function getPrimaryKeyDDL(Table $table)
{
if ($table->hasPrimaryKey()) {
return 'PRIMARY KEY (' . $this->getColumnListDDL($table->getPrimaryKey()) . ')';
}
}
/**
* Builds the DDL SQL to drop the primary key of a table.
*
* @param Table $table
*
* @return string
*/
public function getDropPrimaryKeyDDL(Table $table)
{
$pattern = "
ALTER TABLE %s DROP CONSTRAINT %s;
";
return sprintf($pattern,
$this->quoteIdentifier($table->getName()),
$this->quoteIdentifier($this->getPrimaryKeyName($table))
);
}
/**
* Builds the DDL SQL to add the primary key of a table.
*
* @param Table $table
*
* @return string
*/
public function getAddPrimaryKeyDDL(Table $table)
{
$pattern = "
ALTER TABLE %s ADD %s;
";
return sprintf($pattern,
$this->quoteIdentifier($table->getName()),
$this->getPrimaryKeyDDL($table)
);
}
/**
* Builds the DDL SQL to add the indices of a table.
*
* @param Table $table
*
* @return string
*/
public function getAddIndicesDDL(Table $table)
{
$ret = '';
foreach ($table->getIndices() as $fk) {
$ret .= $this->getAddIndexDDL($fk);
}
return $ret;
}
/**
* Builds the DDL SQL to add an Index.
*
* @param Index $index
*
* @return string
*/
public function getAddIndexDDL(Index $index)
{
$pattern = "
CREATE %sINDEX %s ON %s (%s);
";
return sprintf($pattern,
$index->getIsUnique() ? 'UNIQUE ' : '',
$this->quoteIdentifier($index->getName()),
$this->quoteIdentifier($index->getTable()->getName()),
$this->getColumnListDDL($index->getColumns())
);
}
/**
* Builds the DDL SQL to drop an Index.
*
* @param Index $index
*
* @return string
*/
public function getDropIndexDDL(Index $index)
{
$pattern = "
DROP INDEX %s;
";
return sprintf($pattern, $this->quoteIdentifier($index->getName()));
}
/**
* Builds the DDL SQL for an Index object.
*
* @param Index $index
*
* @return string
*/
public function getIndexDDL(Index $index)
{
return sprintf('%sINDEX %s (%s)', $index->getIsUnique() ? 'UNIQUE ' : '', $this->quoteIdentifier($index->getName()), $this->getColumnListDDL($index->getColumns()));
}
/**
* Builds the DDL SQL for a Unique constraint object.
*
* @param Unique $unique
*
* @return string
*/
public function getUniqueDDL(Unique $unique)
{
return sprintf('UNIQUE (%s)', $this->getColumnListDDL($unique->getColumns()));
}
/**
* Builds the DDL SQL to add the foreign keys of a table.
*
* @param Table $table
*
* @return string
*/
public function getAddForeignKeysDDL(Table $table)
{
$ret = '';
foreach ($table->getForeignKeys() as $fk) {
$ret .= $this->getAddForeignKeyDDL($fk);
}
return $ret;
}
/**
* Builds the DDL SQL to add a foreign key.
*
* @param ForeignKey $fk
*
* @return string
*/
public function getAddForeignKeyDDL(ForeignKey $fk)
{
if ($fk->isSkipSql()) {
return;
}
$pattern = "
ALTER TABLE %s ADD %s;
";
return sprintf($pattern,
$this->quoteIdentifier($fk->getTable()->getName()),
$this->getForeignKeyDDL($fk)
);
}
/**
* Builds the DDL SQL to drop a foreign key.
*
* @param ForeignKey $fk
*
* @return string
*/
public function getDropForeignKeyDDL(ForeignKey $fk)
{
if ($fk->isSkipSql()) {
return;
}
$pattern = "
ALTER TABLE %s DROP CONSTRAINT %s;
";
return sprintf($pattern,
$this->quoteIdentifier($fk->getTable()->getName()),
$this->quoteIdentifier($fk->getName())
);
}
/**
* Builds the DDL SQL for a ForeignKey object.
*
* @return string
*/
public function getForeignKeyDDL(ForeignKey $fk)
{
if ($fk->isSkipSql()) {
return;
}
$pattern = "CONSTRAINT %s
FOREIGN KEY (%s)
REFERENCES %s (%s)";
$script = sprintf($pattern,
$this->quoteIdentifier($fk->getName()),
$this->getColumnListDDL($fk->getLocalColumns()),
$this->quoteIdentifier($fk->getForeignTableName()),
$this->getColumnListDDL($fk->getForeignColumns())
);
if ($fk->hasOnUpdate()) {
$script .= "
ON UPDATE " . $fk->getOnUpdate();
}
if ($fk->hasOnDelete()) {
$script .= "
ON DELETE " . $fk->getOnDelete();
}
return $script;
}
public function getCommentLineDDL($comment)
{
$pattern = "-- %s
";
return sprintf($pattern, $comment);
}
public function getCommentBlockDDL($comment)
{
$pattern = "
-----------------------------------------------------------------------
-- %s
-----------------------------------------------------------------------
";
return sprintf($pattern, $comment);
}
/**
* Builds the DDL SQL to modify a database
* based on a PropelDatabaseDiff instance
*
* @return string
*/
public function getModifyDatabaseDDL(PropelDatabaseDiff $databaseDiff)
{
$ret = $this->getBeginDDL();
foreach ($databaseDiff->getRemovedTables() as $table) {
$ret .= $this->getDropTableDDL($table);
}
foreach ($databaseDiff->getRenamedTables() as $fromTableName => $toTableName) {
$ret .= $this->getRenameTableDDL($fromTableName, $toTableName);
}
foreach ($databaseDiff->getAddedTables() as $table) {
$ret .= $this->getAddTableDDL($table);
$ret .= $this->getAddIndicesDDL($table);
}
foreach ($databaseDiff->getModifiedTables() as $tableDiff) {
$ret .= $this->getModifyTableDDL($tableDiff);
}
foreach ($databaseDiff->getAddedTables() as $table) {
$ret .= $this->getAddForeignKeysDDL($table);
}
$ret .= $this->getEndDDL();
return $ret;
}
/**
* Builds the DDL SQL to rename a table
*
* @return string
*/
public function getRenameTableDDL($fromTableName, $toTableName)
{
$pattern = "
ALTER TABLE %s RENAME TO %s;
";
return sprintf($pattern,
$this->quoteIdentifier($fromTableName),
$this->quoteIdentifier($toTableName)
);
}
/**
* Builds the DDL SQL to alter a table
* based on a PropelTableDiff instance
*
* @return string
*/
public function getModifyTableDDL(PropelTableDiff $tableDiff)
{
$ret = '';
// drop indices, foreign keys
if ($tableDiff->hasModifiedPk()) {
$ret .= $this->getDropPrimaryKeyDDL($tableDiff->getFromTable());
}
foreach ($tableDiff->getRemovedFks() as $fk) {
$ret .= $this->getDropForeignKeyDDL($fk);
}
foreach ($tableDiff->getModifiedFks() as $fkName => $fkModification) {
list($fromFk, $toFk) = $fkModification;
$ret .= $this->getDropForeignKeyDDL($fromFk);
}
foreach ($tableDiff->getRemovedIndices() as $index) {
$ret .= $this->getDropIndexDDL($index);
}
foreach ($tableDiff->getModifiedIndices() as $indexName => $indexModification) {
list($fromIndex, $toIndex) = $indexModification;
$ret .= $this->getDropIndexDDL($fromIndex);
}
// alter table structure
foreach ($tableDiff->getRenamedColumns() as $columnRenaming) {
$ret .= $this->getRenameColumnDDL($columnRenaming[0], $columnRenaming[1]);
}
if ($modifiedColumns = $tableDiff->getModifiedColumns()) {
$ret .= $this->getModifyColumnsDDL($modifiedColumns);
}
if ($addedColumns = $tableDiff->getAddedColumns()) {
$ret .= $this->getAddColumnsDDL($addedColumns);
}
foreach ($tableDiff->getRemovedColumns() as $column) {
$ret .= $this->getRemoveColumnDDL($column);
}
// add new indices and foreign keys
if ($tableDiff->hasModifiedPk()) {
$ret .= $this->getAddPrimaryKeyDDL($tableDiff->getToTable());
}
foreach ($tableDiff->getModifiedIndices() as $indexName => $indexModification) {
list($fromIndex, $toIndex) = $indexModification;
$ret .= $this->getAddIndexDDL($toIndex);
}
foreach ($tableDiff->getAddedIndices() as $index) {
$ret .= $this->getAddIndexDDL($index);
}
foreach ($tableDiff->getModifiedFks() as $fkName => $fkModification) {
list($fromFk, $toFk) = $fkModification;
$ret .= $this->getAddForeignKeyDDL($toFk);
}
foreach ($tableDiff->getAddedFks() as $fk) {
$ret .= $this->getAddForeignKeyDDL($fk);
}
return $ret;
}
/**
* Builds the DDL SQL to alter a table
* based on a PropelTableDiff instance
*
* @return string
*/
public function getModifyTableColumnsDDL(PropelTableDiff $tableDiff)
{
$ret = '';
foreach ($tableDiff->getRemovedColumns() as $column) {
$ret .= $this->getRemoveColumnDDL($column);
}
foreach ($tableDiff->getRenamedColumns() as $columnRenaming) {
$ret .= $this->getRenameColumnDDL($columnRenaming[0], $columnRenaming[1]);
}
if ($modifiedColumns = $tableDiff->getModifiedColumns()) {
$ret .= $this->getModifyColumnsDDL($modifiedColumns);
}
if ($addedColumns = $tableDiff->getAddedColumns()) {
$ret .= $this->getAddColumnsDDL($addedColumns);
}
return $ret;
}
/**
* Builds the DDL SQL to alter a table's primary key
* based on a PropelTableDiff instance
*
* @return string
*/
public function getModifyTablePrimaryKeyDDL(PropelTableDiff $tableDiff)
{
$ret = '';
if ($tableDiff->hasModifiedPk()) {
$ret .= $this->getDropPrimaryKeyDDL($tableDiff->getFromTable());
$ret .= $this->getAddPrimaryKeyDDL($tableDiff->getToTable());
}
return $ret;
}
/**
* Builds the DDL SQL to alter a table's indices
* based on a PropelTableDiff instance
*
* @return string
*/
public function getModifyTableIndicesDDL(PropelTableDiff $tableDiff)
{
$ret = '';
foreach ($tableDiff->getRemovedIndices() as $index) {
$ret .= $this->getDropIndexDDL($index);
}
foreach ($tableDiff->getAddedIndices() as $index) {
$ret .= $this->getAddIndexDDL($index);
}
foreach ($tableDiff->getModifiedIndices() as $indexName => $indexModification) {
list($fromIndex, $toIndex) = $indexModification;
$ret .= $this->getDropIndexDDL($fromIndex);
$ret .= $this->getAddIndexDDL($toIndex);
}
return $ret;
}
/**
* Builds the DDL SQL to alter a table's foreign keys
* based on a PropelTableDiff instance
*
* @return string
*/
public function getModifyTableForeignKeysDDL(PropelTableDiff $tableDiff)
{
$ret = '';
foreach ($tableDiff->getRemovedFks() as $fk) {
$ret .= $this->getDropForeignKeyDDL($fk);
}
foreach ($tableDiff->getAddedFks() as $fk) {
$ret .= $this->getAddForeignKeyDDL($fk);
}
foreach ($tableDiff->getModifiedFks() as $fkName => $fkModification) {
list($fromFk, $toFk) = $fkModification;
$ret .= $this->getDropForeignKeyDDL($fromFk);
$ret .= $this->getAddForeignKeyDDL($toFk);
}
return $ret;
}
/**
* Builds the DDL SQL to remove a column
*
* @return string
*/
public function getRemoveColumnDDL(Column $column)
{
$pattern = "
ALTER TABLE %s DROP COLUMN %s;
";
return sprintf($pattern,
$this->quoteIdentifier($column->getTable()->getName()),
$this->quoteIdentifier($column->getName())
);
}
/**
* Builds the DDL SQL to rename a column
*
* @return string
*/
public function getRenameColumnDDL($fromColumn, $toColumn)
{
$pattern = "
ALTER TABLE %s RENAME COLUMN %s TO %s;
";
return sprintf($pattern,
$this->quoteIdentifier($fromColumn->getTable()->getName()),
$this->quoteIdentifier($fromColumn->getName()),
$this->quoteIdentifier($toColumn->getName())
);
}
/**
* Builds the DDL SQL to modify a column
*
* @return string
*/
public function getModifyColumnDDL(PropelColumnDiff $columnDiff)
{
$toColumn = $columnDiff->getToColumn();
$pattern = "
ALTER TABLE %s MODIFY %s;
";
return sprintf($pattern,
$this->quoteIdentifier($toColumn->getTable()->getName()),
$this->getColumnDDL($toColumn)
);
}
/**
* Builds the DDL SQL to modify a list of columns
*
* @return string
*/
public function getModifyColumnsDDL($columnDiffs)
{
$lines = array();
$tableName = null;
foreach ($columnDiffs as $columnDiff) {
$toColumn = $columnDiff->getToColumn();
if (null === $tableName) {
$tableName = $toColumn->getTable()->getName();
}
$lines[] = $this->getColumnDDL($toColumn);
}
$sep = ",
";
$pattern = "
ALTER TABLE %s MODIFY
(
%s
);
";
return sprintf($pattern,
$this->quoteIdentifier($tableName),
implode($sep, $lines)
);
}
/**
* Builds the DDL SQL to remove a column
*
* @return string
*/
public function getAddColumnDDL(Column $column)
{
$pattern = "
ALTER TABLE %s ADD %s;
";
return sprintf($pattern,
$this->quoteIdentifier($column->getTable()->getName()),
$this->getColumnDDL($column)
);
}
/**
* Builds the DDL SQL to remove a list of columns
*
* @return string
*/
public function getAddColumnsDDL($columns)
{
$lines = array();
$tableName = null;
foreach ($columns as $column) {
if (null === $tableName) {
$tableName = $column->getTable()->getName();
}
$lines[] = $this->getColumnDDL($column);
}
$sep = ",
";
$pattern = "
ALTER TABLE %s ADD
(
%s
);
";
return sprintf($pattern, $this->quoteIdentifier($tableName), implode($sep, $lines));
}
/**
* Returns if the RDBMS-specific SQL type has a size attribute.
*
* @param string $sqlType the SQL type
*
* @return boolean True if the type has a size attribute
*/
public function hasSize($sqlType)
{
return true;
}
/**
* Returns if the RDBMS-specific SQL type has a scale attribute.
*
* @param string $sqlType the SQL type
*
* @return boolean True if the type has a scale attribute
*/
public function hasScale($sqlType)
{
return true;
}
/**
* Quote and escape needed characters in the string for underlying RDBMS.
*
* @param string $text
*
* @return string
*/
public function quote($text)
{
if ($con = $this->getConnection()) {
return $con->quote($text);
} else {
return "'" . $this->disconnectedEscapeText($text) . "'";
}
}
/**
* Method to escape text when no connection has been set.
*
* The subclasses can implement this using string replacement functions
* or native DB methods.
*
* @param string $text Text that needs to be escaped.
*
* @return string
*/
protected function disconnectedEscapeText($text)
{
return str_replace("'", "''", $text);
}
/**
* Quotes identifiers used in database SQL.
*
* @param string $text
*
* @return string Quoted identifier.
*/
public function quoteIdentifier($text)
{
return $this->isIdentifierQuotingEnabled ? '"' . strtr($text, array('.' => '"."')) . '"' : $text;
}
public function setIdentifierQuoting($enabled = true)
{
$this->isIdentifierQuotingEnabled = $enabled;
}
public function getIdentifierQuoting()
{
return $this->isIdentifierQuotingEnabled;
}
/**
* Whether RDBMS supports native ON DELETE triggers (e.g. ON DELETE CASCADE).
*
* @return boolean
*/
public function supportsNativeDeleteTrigger()
{
return false;
}
/**
* Whether RDBMS supports INSERT null values in autoincremented primary keys
*
* @return boolean
*/
public function supportsInsertNullPk()
{
return true;
}
/**
* Whether the underlying PDO driver for this platform returns BLOB columns as streams (instead of strings).
*
* @return boolean
*/
public function hasStreamBlobImpl()
{
return false;
}
/**
* @see Platform::supportsSchemas()
*/
public function supportsSchemas()
{
return false;
}
/**
* @see Platform::supportsMigrations()
*/
public function supportsMigrations()
{
return true;
}
public function supportsVarcharWithoutSize()
{
return false;
}
/**
* Returns the boolean value for the RDBMS.
*
* This value should match the boolean value that is set
* when using Propel's PreparedStatement::setBoolean().
*
* This function is used to set default column values when building
* SQL.
*
* @param mixed $tf A boolean or string representation of boolean ('y', 'true').
*
* @return mixed
*/
public function getBooleanString($b)
{
$b = ($b === true || strtolower($b) === 'true' || $b === 1 || $b === '1' || strtolower($b) === 'y' || strtolower($b) === 'yes');
return ($b ? '1' : '0');
}
public function getPhpArrayString($stringValue)
{
$stringValue = trim($stringValue);
if (empty($stringValue)) {
return null;
}
$values = array();
foreach (explode(',', $stringValue) as $v) {
$values[] = trim($v);
}
$value = implode($values, ' | ');
if (empty($value) || ' | ' === $value) {
return null;
}
return $this->quote(sprintf('||%s||', $value));
}
/**
* Gets the preferred timestamp formatter for setting date/time values.
*
* @return string
*/
public function getTimestampFormatter()
{
return 'Y-m-d H:i:s';
}
/**
* Gets the preferred time formatter for setting date/time values.
*
* @return string
*/
public function getTimeFormatter()
{
return 'H:i:s';
}
/**
* Gets the preferred date formatter for setting date/time values.
*
* @return string
*/
public function getDateFormatter()
{
return 'Y-m-d';
}
/**
* Get the PHP snippet for binding a value to a column.
* Warning: duplicates logic from DBAdapter::bindValue().
* Any code modification here must be ported there.
*/
public function getColumnBindingPHP($column, $identifier, $columnValueAccessor, $tab = " ")
{
$script = '';
$hasValuePreparation = false;
if ($column->isTemporalType()) {
// nothing special, the internal value was already properly formatted by the setter
} elseif ($column->isLobType()) {
// we always need to make sure that the stream is rewound, otherwise nothing will
// get written to database.
$script .= "
if (is_resource($columnValueAccessor)) {
rewind($columnValueAccessor);
}";
}
$script .= sprintf(
"
\$stmt->bindValue(%s, %s, %s);",
$identifier,
$columnValueAccessor ,
PropelTypes::getPdoTypeString($column->getType())
);
return preg_replace('/^(.+)/m', $tab . '$1', $script);
}
/**
* Get the PHP snippet for getting a Pk from the database.
* Warning: duplicates logic from DBAdapter::getId().
* Any code modification here must be ported there.
*
* Typical output:
* <code>
* $this->id = $con->lastInsertId();
* </code>
*/
public function getIdentifierPhp($columnValueMutator, $connectionVariableName = '$con', $sequenceName = '', $tab = " ")
{
return sprintf(
"
%s%s = %s->lastInsertId(%s);",
$tab,
$columnValueMutator,
$connectionVariableName,
$sequenceName ? ("'" . $sequenceName . "'") : ''
);
}
public function getDefaultFKOnDeleteBehavior()
{
return ForeignKey::NONE;
}
public function getDefaultFKOnUpdateBehavior()
{
return ForeignKey::NONE;
}
}
| travis-south/symfony2 | vendor/propel/propel1/generator/lib/platform/DefaultPlatform.php | PHP | mit | 33,869 |
var fabric=fabric||{version:"1.6.4"};"undefined"!=typeof exports&&(exports.fabric=fabric),"undefined"!=typeof document&&"undefined"!=typeof window?(fabric.document=document,fabric.window=window,window.fabric=fabric):(fabric.document=require("jsdom").jsdom("<!DOCTYPE html><html><head></head><body></body></html>"),fabric.document.createWindow?fabric.window=fabric.document.createWindow():fabric.window=fabric.document.parentWindow),fabric.isTouchSupported="ontouchstart"in fabric.document.documentElement,fabric.isLikelyNode="undefined"!=typeof Buffer&&"undefined"==typeof window,fabric.SHARED_ATTRIBUTES=["display","transform","fill","fill-opacity","fill-rule","opacity","stroke","stroke-dasharray","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","id"],fabric.DPI=96,fabric.reNum="(?:[-+]?(?:\\d+|\\d*\\.\\d+)(?:e[-+]?\\d+)?)",fabric.fontPaths={},fabric.charWidthsCache={},fabric.devicePixelRatio=fabric.window.devicePixelRatio||fabric.window.webkitDevicePixelRatio||fabric.window.mozDevicePixelRatio||1,function(){function t(t,e){if(this.__eventListeners[t]){var i=this.__eventListeners[t];e?i[i.indexOf(e)]=!1:fabric.util.array.fill(i,!1)}}function e(t,e){if(this.__eventListeners||(this.__eventListeners={}),1===arguments.length)for(var i in t)this.on(i,t[i]);else this.__eventListeners[t]||(this.__eventListeners[t]=[]),this.__eventListeners[t].push(e);return this}function i(e,i){if(this.__eventListeners){if(0===arguments.length)for(e in this.__eventListeners)t.call(this,e);else if(1===arguments.length&&"object"==typeof arguments[0])for(var r in e)t.call(this,r,e[r]);else t.call(this,e,i);return this}}function r(t,e){if(this.__eventListeners){var i=this.__eventListeners[t];if(i){for(var r=0,n=i.length;r<n;r++)i[r]&&i[r].call(this,e||{});return this.__eventListeners[t]=i.filter(function(t){return t!==!1}),this}}}fabric.Observable={observe:e,stopObserving:i,fire:r,on:e,off:i,trigger:r}}(),fabric.Collection={_objects:[],add:function(){if(this._objects.push.apply(this._objects,arguments),this._onObjectAdded)for(var t=0,e=arguments.length;t<e;t++)this._onObjectAdded(arguments[t]);return this.renderOnAddRemove&&this.renderAll(),this},insertAt:function(t,e,i){var r=this.getObjects();return i?r[e]=t:r.splice(e,0,t),this._onObjectAdded&&this._onObjectAdded(t),this.renderOnAddRemove&&this.renderAll(),this},remove:function(){for(var t,e=this.getObjects(),i=!1,r=0,n=arguments.length;r<n;r++)t=e.indexOf(arguments[r]),t!==-1&&(i=!0,e.splice(t,1),this._onObjectRemoved&&this._onObjectRemoved(arguments[r]));return this.renderOnAddRemove&&i&&this.renderAll(),this},forEachObject:function(t,e){for(var i=this.getObjects(),r=0,n=i.length;r<n;r++)t.call(e,i[r],r,i);return this},getObjects:function(t){return"undefined"==typeof t?this._objects:this._objects.filter(function(e){return e.type===t})},item:function(t){return this.getObjects()[t]},isEmpty:function(){return 0===this.getObjects().length},size:function(){return this.getObjects().length},contains:function(t){return this.getObjects().indexOf(t)>-1},complexity:function(){return this.getObjects().reduce(function(t,e){return t+=e.complexity?e.complexity():0},0)}},function(t){var e=Math.sqrt,i=Math.atan2,r=Math.pow,n=Math.abs,s=Math.PI/180;fabric.util={removeFromArray:function(t,e){var i=t.indexOf(e);return i!==-1&&t.splice(i,1),t},getRandomInt:function(t,e){return Math.floor(Math.random()*(e-t+1))+t},degreesToRadians:function(t){return t*s},radiansToDegrees:function(t){return t/s},rotatePoint:function(t,e,i){t.subtractEquals(e);var r=fabric.util.rotateVector(t,i);return new fabric.Point(r.x,r.y).addEquals(e)},rotateVector:function(t,e){var i=Math.sin(e),r=Math.cos(e),n=t.x*r-t.y*i,s=t.x*i+t.y*r;return{x:n,y:s}},transformPoint:function(t,e,i){return i?new fabric.Point(e[0]*t.x+e[2]*t.y,e[1]*t.x+e[3]*t.y):new fabric.Point(e[0]*t.x+e[2]*t.y+e[4],e[1]*t.x+e[3]*t.y+e[5])},makeBoundingBoxFromPoints:function(t){var e=[t[0].x,t[1].x,t[2].x,t[3].x],i=fabric.util.array.min(e),r=fabric.util.array.max(e),n=Math.abs(i-r),s=[t[0].y,t[1].y,t[2].y,t[3].y],o=fabric.util.array.min(s),a=fabric.util.array.max(s),h=Math.abs(o-a);return{left:i,top:o,width:n,height:h}},invertTransform:function(t){var e=1/(t[0]*t[3]-t[1]*t[2]),i=[e*t[3],-e*t[1],-e*t[2],e*t[0]],r=fabric.util.transformPoint({x:t[4],y:t[5]},i,!0);return i[4]=-r.x,i[5]=-r.y,i},toFixed:function(t,e){return parseFloat(Number(t).toFixed(e))},parseUnit:function(t,e){var i=/\D{0,2}$/.exec(t),r=parseFloat(t);switch(e||(e=fabric.Text.DEFAULT_SVG_FONT_SIZE),i[0]){case"mm":return r*fabric.DPI/25.4;case"cm":return r*fabric.DPI/2.54;case"in":return r*fabric.DPI;case"pt":return r*fabric.DPI/72;case"pc":return r*fabric.DPI/72*12;case"em":return r*e;default:return r}},falseFunction:function(){return!1},getKlass:function(t,e){return t=fabric.util.string.camelize(t.charAt(0).toUpperCase()+t.slice(1)),fabric.util.resolveNamespace(e)[t]},resolveNamespace:function(e){if(!e)return fabric;for(var i=e.split("."),r=i.length,n=t||fabric.window,s=0;s<r;++s)n=n[i[s]];return n},loadImage:function(t,e,i,r){if(!t)return void(e&&e.call(i,t));var n=fabric.util.createImage();n.onload=function(){e&&e.call(i,n),n=n.onload=n.onerror=null},n.onerror=function(){fabric.log("Error loading "+n.src),e&&e.call(i,null,!0),n=n.onload=n.onerror=null},0!==t.indexOf("data")&&r&&(n.crossOrigin=r),n.src=t},enlivenObjects:function(t,e,i,r){function n(){++o===a&&e&&e(s)}t=t||[];var s=[],o=0,a=t.length;return a?void t.forEach(function(t,e){if(!t||!t.type)return void n();var o=fabric.util.getKlass(t.type,i);o.async?o.fromObject(t,function(i,o){o||(s[e]=i,r&&r(t,s[e])),n()}):(s[e]=o.fromObject(t),r&&r(t,s[e]),n())}):void(e&&e(s))},groupSVGElements:function(t,e,i){var r;return r=new fabric.PathGroup(t,e),"undefined"!=typeof i&&r.setSourcePath(i),r},populateWithProperties:function(t,e,i){if(i&&"[object Array]"===Object.prototype.toString.call(i))for(var r=0,n=i.length;r<n;r++)i[r]in t&&(e[i[r]]=t[i[r]])},drawDashedLine:function(t,r,n,s,o,a){var h=s-r,c=o-n,l=e(h*h+c*c),u=i(c,h),f=a.length,d=0,g=!0;for(t.save(),t.translate(r,n),t.moveTo(0,0),t.rotate(u),r=0;l>r;)r+=a[d++%f],r>l&&(r=l),t[g?"lineTo":"moveTo"](r,0),g=!g;t.restore()},createCanvasElement:function(t){return t||(t=fabric.document.createElement("canvas")),t.getContext||"undefined"==typeof G_vmlCanvasManager||G_vmlCanvasManager.initElement(t),t},createImage:function(){return fabric.isLikelyNode?new(require("canvas").Image):fabric.document.createElement("img")},createAccessors:function(t){for(var e=t.prototype,i=e.stateProperties.length;i--;){var r=e.stateProperties[i],n=r.charAt(0).toUpperCase()+r.slice(1),s="set"+n,o="get"+n;e[o]||(e[o]=function(t){return new Function('return this.get("'+t+'")')}(r)),e[s]||(e[s]=function(t){return new Function("value",'return this.set("'+t+'", value)')}(r))}},clipContext:function(t,e){e.save(),e.beginPath(),t.clipTo(e),e.clip()},multiplyTransformMatrices:function(t,e,i){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],i?0:t[0]*e[4]+t[2]*e[5]+t[4],i?0:t[1]*e[4]+t[3]*e[5]+t[5]]},qrDecompose:function(t){var n=i(t[1],t[0]),o=r(t[0],2)+r(t[1],2),a=e(o),h=(t[0]*t[3]-t[2]*t[1])/a,c=i(t[0]*t[2]+t[1]*t[3],o);return{angle:n/s,scaleX:a,scaleY:h,skewX:c/s,skewY:0,translateX:t[4],translateY:t[5]}},customTransformMatrix:function(t,e,i){var r=[1,0,n(Math.tan(i*s)),1],o=[n(t),0,0,n(e)];return fabric.util.multiplyTransformMatrices(o,r,!0)},resetObjectTransform:function(t){t.scaleX=1,t.scaleY=1,t.skewX=0,t.skewY=0,t.flipX=!1,t.flipY=!1,t.setAngle(0)},getFunctionBody:function(t){return(String(t).match(/function[^{]*\{([\s\S]*)\}/)||{})[1]},isTransparent:function(t,e,i,r){r>0&&(e>r?e-=r:e=0,i>r?i-=r:i=0);for(var n=!0,s=t.getImageData(e,i,2*r||1,2*r||1),o=3,a=s.data.length;o<a;o+=4){var h=s.data[o];if(n=h<=0,n===!1)break}return s=null,n},parsePreserveAspectRatioAttribute:function(t){var e,i="meet",r="Mid",n="Mid",s=t.split(" ");return s&&s.length&&(i=s.pop(),"meet"!==i&&"slice"!==i?(e=i,i="meet"):s.length&&(e=s.pop())),r="none"!==e?e.slice(1,4):"none",n="none"!==e?e.slice(5,8):"none",{meetOrSlice:i,alignX:r,alignY:n}},clearFabricFontCache:function(t){t?fabric.charWidthsCache[t]&&delete fabric.charWidthsCache[t]:fabric.charWidthsCache={}}}}("undefined"!=typeof exports?exports:this),function(){function t(t,r,s,o,h,c,l){var u=a.call(arguments);if(n[u])return n[u];var f=Math.PI,d=l*f/180,g=Math.sin(d),p=Math.cos(d),v=0,b=0;s=Math.abs(s),o=Math.abs(o);var m=-p*t*.5-g*r*.5,y=-p*r*.5+g*t*.5,_=s*s,x=o*o,S=y*y,C=m*m,w=_*x-_*S-x*C,O=0;if(w<0){var T=Math.sqrt(1-w/(_*x));s*=T,o*=T}else O=(h===c?-1:1)*Math.sqrt(w/(_*S+x*C));var k=O*s*y/o,j=-O*o*m/s,A=p*k-g*j+.5*t,M=g*k+p*j+.5*r,P=i(1,0,(m-k)/s,(y-j)/o),I=i((m-k)/s,(y-j)/o,(-m-k)/s,(-y-j)/o);0===c&&I>0?I-=2*f:1===c&&I<0&&(I+=2*f);for(var L=Math.ceil(Math.abs(I/f*2)),E=[],D=I/L,R=8/3*Math.sin(D/4)*Math.sin(D/4)/Math.sin(D/2),F=P+D,B=0;B<L;B++)E[B]=e(P,F,p,g,s,o,A,M,R,v,b),v=E[B][4],b=E[B][5],P=F,F+=D;return n[u]=E,E}function e(t,e,i,r,n,o,h,c,l,u,f){var d=a.call(arguments);if(s[d])return s[d];var g=Math.cos(t),p=Math.sin(t),v=Math.cos(e),b=Math.sin(e),m=i*n*v-r*o*b+h,y=r*n*v+i*o*b+c,_=u+l*(-i*n*p-r*o*g),x=f+l*(-r*n*p+i*o*g),S=m+l*(i*n*b+r*o*v),C=y+l*(r*n*b-i*o*v);return s[d]=[_,x,S,C,m,y],s[d]}function i(t,e,i,r){var n=Math.atan2(e,t),s=Math.atan2(r,i);return s>=n?s-n:2*Math.PI-(n-s)}function r(t,e,i,r,n,s,h,c){var l=a.call(arguments);if(o[l])return o[l];var u,f,d,g,p,v,b,m,y=Math.sqrt,_=Math.min,x=Math.max,S=Math.abs,C=[],w=[[],[]];f=6*t-12*i+6*n,u=-3*t+9*i-9*n+3*h,d=3*i-3*t;for(var O=0;O<2;++O)if(O>0&&(f=6*e-12*r+6*s,u=-3*e+9*r-9*s+3*c,d=3*r-3*e),S(u)<1e-12){if(S(f)<1e-12)continue;g=-d/f,0<g&&g<1&&C.push(g)}else b=f*f-4*d*u,b<0||(m=y(b),p=(-f+m)/(2*u),0<p&&p<1&&C.push(p),v=(-f-m)/(2*u),0<v&&v<1&&C.push(v));for(var T,k,j,A=C.length,M=A;A--;)g=C[A],j=1-g,T=j*j*j*t+3*j*j*g*i+3*j*g*g*n+g*g*g*h,w[0][A]=T,k=j*j*j*e+3*j*j*g*r+3*j*g*g*s+g*g*g*c,w[1][A]=k;w[0][M]=t,w[1][M]=e,w[0][M+1]=h,w[1][M+1]=c;var P=[{x:_.apply(null,w[0]),y:_.apply(null,w[1])},{x:x.apply(null,w[0]),y:x.apply(null,w[1])}];return o[l]=P,P}var n={},s={},o={},a=Array.prototype.join;fabric.util.drawArc=function(e,i,r,n){for(var s=n[0],o=n[1],a=n[2],h=n[3],c=n[4],l=n[5],u=n[6],f=[[],[],[],[]],d=t(l-i,u-r,s,o,h,c,a),g=0,p=d.length;g<p;g++)f[g][0]=d[g][0]+i,f[g][1]=d[g][1]+r,f[g][2]=d[g][2]+i,f[g][3]=d[g][3]+r,f[g][4]=d[g][4]+i,f[g][5]=d[g][5]+r,e.bezierCurveTo.apply(e,f[g])},fabric.util.getBoundsOfArc=function(e,i,n,s,o,a,h,c,l){for(var u=0,f=0,d=[],g=[],p=t(c-e,l-i,n,s,a,h,o),v=[[],[]],b=0,m=p.length;b<m;b++)d=r(u,f,p[b][0],p[b][1],p[b][2],p[b][3],p[b][4],p[b][5]),v[0].x=d[0].x+e,v[0].y=d[0].y+i,v[1].x=d[1].x+e,v[1].y=d[1].y+i,g.push(v[0]),g.push(v[1]),u=p[b][4],f=p[b][5];return g},fabric.util.getBoundsOfCurve=r}(),function(){function t(t,e){for(var i=s.call(arguments,2),r=[],n=0,o=t.length;n<o;n++)r[n]=i.length?t[n][e].apply(t[n],i):t[n][e].call(t[n]);return r}function e(t,e){return n(t,e,function(t,e){return t>=e})}function i(t,e){return n(t,e,function(t,e){return t<e})}function r(t,e){for(var i=t.length;i--;)t[i]=e;return t}function n(t,e,i){if(t&&0!==t.length){var r=t.length-1,n=e?t[r][e]:t[r];if(e)for(;r--;)i(t[r][e],n)&&(n=t[r][e]);else for(;r--;)i(t[r],n)&&(n=t[r]);return n}}var s=Array.prototype.slice;Array.prototype.indexOf||(Array.prototype.indexOf=function(t){if(void 0===this||null===this)throw new TypeError;var e=Object(this),i=e.length>>>0;if(0===i)return-1;var r=0;if(arguments.length>0&&(r=Number(arguments[1]),r!==r?r=0:0!==r&&r!==Number.POSITIVE_INFINITY&&r!==Number.NEGATIVE_INFINITY&&(r=(r>0||-1)*Math.floor(Math.abs(r)))),r>=i)return-1;for(var n=r>=0?r:Math.max(i-Math.abs(r),0);n<i;n++)if(n in e&&e[n]===t)return n;return-1}),Array.prototype.forEach||(Array.prototype.forEach=function(t,e){for(var i=0,r=this.length>>>0;i<r;i++)i in this&&t.call(e,this[i],i,this)}),Array.prototype.map||(Array.prototype.map=function(t,e){for(var i=[],r=0,n=this.length>>>0;r<n;r++)r in this&&(i[r]=t.call(e,this[r],r,this));return i}),Array.prototype.every||(Array.prototype.every=function(t,e){for(var i=0,r=this.length>>>0;i<r;i++)if(i in this&&!t.call(e,this[i],i,this))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(t,e){for(var i=0,r=this.length>>>0;i<r;i++)if(i in this&&t.call(e,this[i],i,this))return!0;return!1}),Array.prototype.filter||(Array.prototype.filter=function(t,e){for(var i,r=[],n=0,s=this.length>>>0;n<s;n++)n in this&&(i=this[n],t.call(e,i,n,this)&&r.push(i));return r}),Array.prototype.reduce||(Array.prototype.reduce=function(t){var e,i=this.length>>>0,r=0;if(arguments.length>1)e=arguments[1];else for(;;){if(r in this){e=this[r++];break}if(++r>=i)throw new TypeError}for(;r<i;r++)r in this&&(e=t.call(null,e,this[r],r,this));return e}),fabric.util.array={fill:r,invoke:t,min:i,max:e}}(),function(){function t(t,e){for(var i in e)t[i]=e[i];return t}function e(e){return t({},e)}fabric.util.object={extend:t,clone:e}}(),function(){function t(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})}function e(t,e){return t.charAt(0).toUpperCase()+(e?t.slice(1):t.slice(1).toLowerCase())}function i(t){return t.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\xA0]+/,"").replace(/[\s\xA0]+$/,"")}),fabric.util.string={camelize:t,capitalize:e,escapeXml:i}}(),function(){var t=Array.prototype.slice,e=Function.prototype.apply,i=function(){};Function.prototype.bind||(Function.prototype.bind=function(r){var n,s=this,o=t.call(arguments,1);return n=o.length?function(){return e.call(s,this instanceof i?this:r,o.concat(t.call(arguments)))}:function(){return e.call(s,this instanceof i?this:r,arguments)},i.prototype=this.prototype,n.prototype=new i,n})}(),function(){function t(){}function e(t){var e=this.constructor.superclass.prototype[t];return arguments.length>1?e.apply(this,r.call(arguments,1)):e.call(this)}function i(){function i(){this.initialize.apply(this,arguments)}var s=null,a=r.call(arguments,0);"function"==typeof a[0]&&(s=a.shift()),i.superclass=s,i.subclasses=[],s&&(t.prototype=s.prototype,i.prototype=new t,s.subclasses.push(i));for(var h=0,c=a.length;h<c;h++)o(i,a[h],s);return i.prototype.initialize||(i.prototype.initialize=n),i.prototype.constructor=i,i.prototype.callSuper=e,i}var r=Array.prototype.slice,n=function(){},s=function(){for(var t in{toString:1})if("toString"===t)return!1;return!0}(),o=function(t,e,i){for(var r in e)r in t.prototype&&"function"==typeof t.prototype[r]&&(e[r]+"").indexOf("callSuper")>-1?t.prototype[r]=function(t){return function(){var r=this.constructor.superclass;this.constructor.superclass=i;var n=e[t].apply(this,arguments);if(this.constructor.superclass=r,"initialize"!==t)return n}}(r):t.prototype[r]=e[r],s&&(e.toString!==Object.prototype.toString&&(t.prototype.toString=e.toString),e.valueOf!==Object.prototype.valueOf&&(t.prototype.valueOf=e.valueOf))};fabric.util.createClass=i}(),function(){function t(t){var e,i,r=Array.prototype.slice.call(arguments,1),n=r.length;for(i=0;i<n;i++)if(e=typeof t[r[i]],!/^(?:function|object|unknown)$/.test(e))return!1;return!0}function e(t,e){return{handler:e,wrappedHandler:i(t,e)}}function i(t,e){return function(i){e.call(o(t),i||fabric.window.event)}}function r(t,e){return function(i){if(p[t]&&p[t][e])for(var r=p[t][e],n=0,s=r.length;n<s;n++)r[n].call(this,i||fabric.window.event)}}function n(t){t||(t=fabric.window.event);var e=t.target||(typeof t.srcElement!==h?t.srcElement:null),i=fabric.util.getScrollLeftTop(e);return{x:v(t)+i.left,y:b(t)+i.top}}function s(t,e,i){var r="touchend"===t.type?"changedTouches":"touches";return t[r]&&t[r][0]?t[r][0][e]-(t[r][0][e]-t[r][0][i])||t[i]:t[i]}var o,a,h="unknown",c=function(){var t=0;return function(e){return e.__uniqueID||(e.__uniqueID="uniqueID__"+t++)}}();!function(){var t={};o=function(e){return t[e]},a=function(e,i){t[e]=i}}();var l,u,f=t(fabric.document.documentElement,"addEventListener","removeEventListener")&&t(fabric.window,"addEventListener","removeEventListener"),d=t(fabric.document.documentElement,"attachEvent","detachEvent")&&t(fabric.window,"attachEvent","detachEvent"),g={},p={};f?(l=function(t,e,i){t.addEventListener(e,i,!1)},u=function(t,e,i){t.removeEventListener(e,i,!1)}):d?(l=function(t,i,r){var n=c(t);a(n,t),g[n]||(g[n]={}),g[n][i]||(g[n][i]=[]);var s=e(n,r);g[n][i].push(s),t.attachEvent("on"+i,s.wrappedHandler)},u=function(t,e,i){var r,n=c(t);if(g[n]&&g[n][e])for(var s=0,o=g[n][e].length;s<o;s++)r=g[n][e][s],r&&r.handler===i&&(t.detachEvent("on"+e,r.wrappedHandler),g[n][e][s]=null)}):(l=function(t,e,i){var n=c(t);if(p[n]||(p[n]={}),!p[n][e]){p[n][e]=[];var s=t["on"+e];s&&p[n][e].push(s),t["on"+e]=r(n,e)}p[n][e].push(i)},u=function(t,e,i){var r=c(t);if(p[r]&&p[r][e])for(var n=p[r][e],s=0,o=n.length;s<o;s++)n[s]===i&&n.splice(s,1)}),fabric.util.addListener=l,fabric.util.removeListener=u;var v=function(t){return typeof t.clientX!==h?t.clientX:0},b=function(t){return typeof t.clientY!==h?t.clientY:0};fabric.isTouchSupported&&(v=function(t){return s(t,"pageX","clientX")},b=function(t){return s(t,"pageY","clientY")}),fabric.util.getPointer=n,fabric.util.object.extend(fabric.util,fabric.Observable)}(),function(){function t(t,e){var i=t.style;if(!i)return t;if("string"==typeof e)return t.style.cssText+=";"+e,e.indexOf("opacity")>-1?s(t,e.match(/opacity:\s*(\d?\.?\d*)/)[1]):t;for(var r in e)if("opacity"===r)s(t,e[r]);else{var n="float"===r||"cssFloat"===r?"undefined"==typeof i.styleFloat?"cssFloat":"styleFloat":r;i[n]=e[r]}return t}var e=fabric.document.createElement("div"),i="string"==typeof e.style.opacity,r="string"==typeof e.style.filter,n=/alpha\s*\(\s*opacity\s*=\s*([^\)]+)\)/,s=function(t){return t};i?s=function(t,e){return t.style.opacity=e,t}:r&&(s=function(t,e){var i=t.style;return t.currentStyle&&!t.currentStyle.hasLayout&&(i.zoom=1),n.test(i.filter)?(e=e>=.9999?"":"alpha(opacity="+100*e+")",i.filter=i.filter.replace(n,e)):i.filter+=" alpha(opacity="+100*e+")",t}),fabric.util.setStyle=t}(),function(){function t(t){return"string"==typeof t?fabric.document.getElementById(t):t}function e(t,e){var i=fabric.document.createElement(t);for(var r in e)"class"===r?i.className=e[r]:"for"===r?i.htmlFor=e[r]:i.setAttribute(r,e[r]);return i}function i(t,e){t&&(" "+t.className+" ").indexOf(" "+e+" ")===-1&&(t.className+=(t.className?" ":"")+e)}function r(t,i,r){return"string"==typeof i&&(i=e(i,r)),t.parentNode&&t.parentNode.replaceChild(i,t),i.appendChild(t),i}function n(t){for(var e=0,i=0,r=fabric.document.documentElement,n=fabric.document.body||{scrollLeft:0,scrollTop:0};t&&(t.parentNode||t.host)&&(t=t.parentNode||t.host,t===fabric.document?(e=n.scrollLeft||r.scrollLeft||0,i=n.scrollTop||r.scrollTop||0):(e+=t.scrollLeft||0,i+=t.scrollTop||0),1!==t.nodeType||"fixed"!==fabric.util.getElementStyle(t,"position")););return{left:e,top:i}}function s(t){var e,i,r=t&&t.ownerDocument,s={left:0,top:0},o={left:0,top:0},a={borderLeftWidth:"left",borderTopWidth:"top",paddingLeft:"left",paddingTop:"top"};if(!r)return o;for(var h in a)o[a[h]]+=parseInt(c(t,h),10)||0;return e=r.documentElement,"undefined"!=typeof t.getBoundingClientRect&&(s=t.getBoundingClientRect()),i=n(t),{left:s.left+i.left-(e.clientLeft||0)+o.left,top:s.top+i.top-(e.clientTop||0)+o.top}}var o,a=Array.prototype.slice,h=function(t){return a.call(t,0)};try{o=h(fabric.document.childNodes)instanceof Array}catch(t){}o||(h=function(t){for(var e=new Array(t.length),i=t.length;i--;)e[i]=t[i];return e});var c;c=fabric.document.defaultView&&fabric.document.defaultView.getComputedStyle?function(t,e){var i=fabric.document.defaultView.getComputedStyle(t,null);return i?i[e]:void 0}:function(t,e){var i=t.style[e];return!i&&t.currentStyle&&(i=t.currentStyle[e]),i},function(){function t(t){return"undefined"!=typeof t.onselectstart&&(t.onselectstart=fabric.util.falseFunction),r?t.style[r]="none":"string"==typeof t.unselectable&&(t.unselectable="on"),t}function e(t){return"undefined"!=typeof t.onselectstart&&(t.onselectstart=null),r?t.style[r]="":"string"==typeof t.unselectable&&(t.unselectable=""),t}var i=fabric.document.documentElement.style,r="userSelect"in i?"userSelect":"MozUserSelect"in i?"MozUserSelect":"WebkitUserSelect"in i?"WebkitUserSelect":"KhtmlUserSelect"in i?"KhtmlUserSelect":"";fabric.util.makeElementUnselectable=t,fabric.util.makeElementSelectable=e}(),function(){function t(t,e){var i=fabric.document.getElementsByTagName("head")[0],r=fabric.document.createElement("script"),n=!0;r.onload=r.onreadystatechange=function(t){if(n){if("string"==typeof this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState)return;n=!1,e(t||fabric.window.event),r=r.onload=r.onreadystatechange=null}},r.src=t,i.appendChild(r)}fabric.util.getScript=t}(),fabric.util.getById=t,fabric.util.toArray=h,fabric.util.makeElement=e,fabric.util.addClass=i,fabric.util.wrapElement=r,fabric.util.getScrollLeftTop=n,fabric.util.getElementOffset=s,fabric.util.getElementStyle=c}(),function(){function t(t,e){return t+(/\?/.test(t)?"&":"?")+e}function e(){}function i(i,n){n||(n={});var s=n.method?n.method.toUpperCase():"GET",o=n.onComplete||function(){},a=r(),h=n.body||n.parameters;return a.onreadystatechange=function(){4===a.readyState&&(o(a),a.onreadystatechange=e)},"GET"===s&&(h=null,"string"==typeof n.parameters&&(i=t(i,n.parameters))),a.open(s,i,!0),"POST"!==s&&"PUT"!==s||a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.send(h),a}var r=function(){for(var t=[function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml2.XMLHTTP.3.0")},function(){return new XMLHttpRequest}],e=t.length;e--;)try{var i=t[e]();if(i)return t[e]}catch(t){}}();fabric.util.request=i}(),fabric.log=function(){},fabric.warn=function(){},"undefined"!=typeof console&&["log","warn"].forEach(function(t){"undefined"!=typeof console[t]&&"function"==typeof console[t].apply&&(fabric[t]=function(){return console[t].apply(console,arguments)})}),function(){function t(t){e(function(i){t||(t={});var r,n=i||+new Date,s=t.duration||500,o=n+s,a=t.onChange||function(){},h=t.abort||function(){return!1},c=t.easing||function(t,e,i,r){return-i*Math.cos(t/r*(Math.PI/2))+i+e},l="startValue"in t?t.startValue:0,u="endValue"in t?t.endValue:100,f=t.byValue||u-l;t.onStart&&t.onStart(),function i(u){r=u||+new Date;var d=r>o?s:r-n;return h()?void(t.onComplete&&t.onComplete()):(a(c(d,l,f,s)),r>o?void(t.onComplete&&t.onComplete()):void e(i))}(n)})}function e(){return i.apply(fabric.window,arguments)}var i=fabric.window.requestAnimationFrame||fabric.window.webkitRequestAnimationFrame||fabric.window.mozRequestAnimationFrame||fabric.window.oRequestAnimationFrame||fabric.window.msRequestAnimationFrame||function(t){fabric.window.setTimeout(t,1e3/60)};fabric.util.animate=t,fabric.util.requestAnimFrame=e}(),function(){function t(t,e,i,r){return t<Math.abs(e)?(t=e,r=i/4):r=0===e&&0===t?i/(2*Math.PI)*Math.asin(1):i/(2*Math.PI)*Math.asin(e/t),{a:t,c:e,p:i,s:r}}function e(t,e,i){return t.a*Math.pow(2,10*(e-=1))*Math.sin((e*i-t.s)*(2*Math.PI)/t.p)}function i(t,e,i,r){return i*((t=t/r-1)*t*t+1)+e}function r(t,e,i,r){return t/=r/2,t<1?i/2*t*t*t+e:i/2*((t-=2)*t*t+2)+e}function n(t,e,i,r){return i*(t/=r)*t*t*t+e}function s(t,e,i,r){return-i*((t=t/r-1)*t*t*t-1)+e}function o(t,e,i,r){return t/=r/2,t<1?i/2*t*t*t*t+e:-i/2*((t-=2)*t*t*t-2)+e}function a(t,e,i,r){return i*(t/=r)*t*t*t*t+e}function h(t,e,i,r){return i*((t=t/r-1)*t*t*t*t+1)+e}function c(t,e,i,r){return t/=r/2,t<1?i/2*t*t*t*t*t+e:i/2*((t-=2)*t*t*t*t+2)+e}function l(t,e,i,r){return-i*Math.cos(t/r*(Math.PI/2))+i+e}function u(t,e,i,r){return i*Math.sin(t/r*(Math.PI/2))+e}function f(t,e,i,r){return-i/2*(Math.cos(Math.PI*t/r)-1)+e}function d(t,e,i,r){return 0===t?e:i*Math.pow(2,10*(t/r-1))+e}function g(t,e,i,r){return t===r?e+i:i*(-Math.pow(2,-10*t/r)+1)+e}function p(t,e,i,r){return 0===t?e:t===r?e+i:(t/=r/2,t<1?i/2*Math.pow(2,10*(t-1))+e:i/2*(-Math.pow(2,-10*--t)+2)+e)}function v(t,e,i,r){return-i*(Math.sqrt(1-(t/=r)*t)-1)+e}function b(t,e,i,r){return i*Math.sqrt(1-(t=t/r-1)*t)+e}function m(t,e,i,r){return t/=r/2,t<1?-i/2*(Math.sqrt(1-t*t)-1)+e:i/2*(Math.sqrt(1-(t-=2)*t)+1)+e}function y(i,r,n,s){var o=1.70158,a=0,h=n;if(0===i)return r;if(i/=s,1===i)return r+n;a||(a=.3*s);var c=t(h,n,a,o);return-e(c,i,s)+r}function _(e,i,r,n){var s=1.70158,o=0,a=r;if(0===e)return i;if(e/=n,1===e)return i+r;o||(o=.3*n);var h=t(a,r,o,s);return h.a*Math.pow(2,-10*e)*Math.sin((e*n-h.s)*(2*Math.PI)/h.p)+h.c+i}function x(i,r,n,s){var o=1.70158,a=0,h=n;if(0===i)return r;if(i/=s/2,2===i)return r+n;a||(a=s*(.3*1.5));var c=t(h,n,a,o);return i<1?-.5*e(c,i,s)+r:c.a*Math.pow(2,-10*(i-=1))*Math.sin((i*s-c.s)*(2*Math.PI)/c.p)*.5+c.c+r}function S(t,e,i,r,n){return void 0===n&&(n=1.70158),i*(t/=r)*t*((n+1)*t-n)+e}function C(t,e,i,r,n){return void 0===n&&(n=1.70158),i*((t=t/r-1)*t*((n+1)*t+n)+1)+e}function w(t,e,i,r,n){return void 0===n&&(n=1.70158),t/=r/2,t<1?i/2*(t*t*(((n*=1.525)+1)*t-n))+e:i/2*((t-=2)*t*(((n*=1.525)+1)*t+n)+2)+e}function O(t,e,i,r){return i-T(r-t,0,i,r)+e}function T(t,e,i,r){return(t/=r)<1/2.75?i*(7.5625*t*t)+e:t<2/2.75?i*(7.5625*(t-=1.5/2.75)*t+.75)+e:t<2.5/2.75?i*(7.5625*(t-=2.25/2.75)*t+.9375)+e:i*(7.5625*(t-=2.625/2.75)*t+.984375)+e}function k(t,e,i,r){return t<r/2?.5*O(2*t,0,i,r)+e:.5*T(2*t-r,0,i,r)+.5*i+e}fabric.util.ease={easeInQuad:function(t,e,i,r){return i*(t/=r)*t+e},easeOutQuad:function(t,e,i,r){return-i*(t/=r)*(t-2)+e},easeInOutQuad:function(t,e,i,r){return t/=r/2,t<1?i/2*t*t+e:-i/2*(--t*(t-2)-1)+e},easeInCubic:function(t,e,i,r){return i*(t/=r)*t*t+e},easeOutCubic:i,easeInOutCubic:r,easeInQuart:n,easeOutQuart:s,easeInOutQuart:o,easeInQuint:a,easeOutQuint:h,easeInOutQuint:c,easeInSine:l,easeOutSine:u,easeInOutSine:f,easeInExpo:d,easeOutExpo:g,easeInOutExpo:p,easeInCirc:v,easeOutCirc:b,easeInOutCirc:m,easeInElastic:y,easeOutElastic:_,easeInOutElastic:x,easeInBack:S,easeOutBack:C,easeInOutBack:w,easeInBounce:O,easeOutBounce:T,easeInOutBounce:k}}(),function(t){"use strict";function e(t){return t in k?k[t]:t}function i(t,e,i,r){var n,s="[object Array]"===Object.prototype.toString.call(e);return"fill"!==t&&"stroke"!==t||"none"!==e?"strokeDashArray"===t?e=e.replace(/,/g," ").split(/\s+/).map(function(t){return parseFloat(t)}):"transformMatrix"===t?e=i&&i.transformMatrix?S(i.transformMatrix,v.parseTransformAttribute(e)):v.parseTransformAttribute(e):"visible"===t?(e="none"!==e&&"hidden"!==e,i&&i.visible===!1&&(e=!1)):"originX"===t?e="start"===e?"left":"end"===e?"right":"center":n=s?e.map(x):x(e,r):e="",!s&&isNaN(n)?e:n}function r(t){for(var e in j)if("undefined"!=typeof t[j[e]]&&""!==t[e]){if("undefined"==typeof t[e]){if(!v.Object.prototype[e])continue;t[e]=v.Object.prototype[e]}if(0!==t[e].indexOf("url(")){var i=new v.Color(t[e]);t[e]=i.setAlpha(_(i.getAlpha()*t[j[e]],2)).toRgba()}}return t}function n(t,e){for(var i,r,n=[],s=0;s<e.length;s++)i=e[s],r=t.getElementsByTagName(i),n=n.concat(Array.prototype.slice.call(r));return n}function s(t,r){var n,s;t.replace(/;\s*$/,"").split(";").forEach(function(t){var o=t.split(":");n=e(o[0].trim().toLowerCase()),s=i(n,o[1].trim()),r[n]=s})}function o(t,r){var n,s;for(var o in t)"undefined"!=typeof t[o]&&(n=e(o.toLowerCase()),s=i(n,t[o]),r[n]=s)}function a(t,e){var i={};for(var r in v.cssRules[e])if(h(t,r.split(" ")))for(var n in v.cssRules[e][r])i[n]=v.cssRules[e][r][n];return i}function h(t,e){var i,r=!0;return i=l(t,e.pop()),i&&e.length&&(r=c(t,e)),i&&r&&0===e.length}function c(t,e){for(var i,r=!0;t.parentNode&&1===t.parentNode.nodeType&&e.length;)r&&(i=e.pop()),t=t.parentNode,r=l(t,i);return 0===e.length}function l(t,e){var i,r=t.nodeName,n=t.getAttribute("class"),s=t.getAttribute("id");if(i=new RegExp("^"+r,"i"),e=e.replace(i,""),s&&e.length&&(i=new RegExp("#"+s+"(?![a-zA-Z\\-]+)","i"),e=e.replace(i,"")),n&&e.length){n=n.split(" ");for(var o=n.length;o--;)i=new RegExp("\\."+n[o]+"(?![a-zA-Z\\-]+)","i"),e=e.replace(i,"")}return 0===e.length}function u(t,e){var i;if(t.getElementById&&(i=t.getElementById(e)),i)return i;var r,n,s=t.getElementsByTagName("*");for(n=0;n<s.length;n++)if(r=s[n],e===r.getAttribute("id"))return r}function f(t){for(var e=n(t,["use","svg:use"]),i=0;e.length&&i<e.length;){var r,s,o,a,h,c=e[i],l=c.getAttribute("xlink:href").substr(1),f=c.getAttribute("x")||0,g=c.getAttribute("y")||0,p=u(t,l).cloneNode(!0),v=(p.getAttribute("transform")||"")+" translate("+f+", "+g+")",b=e.length;if(d(p),/^svg$/i.test(p.nodeName)){var m=p.ownerDocument.createElement("g");for(o=0,a=p.attributes,h=a.length;o<h;o++)s=a.item(o),m.setAttribute(s.nodeName,s.nodeValue);for(;null!=p.firstChild;)m.appendChild(p.firstChild);p=m}for(o=0,a=c.attributes,h=a.length;o<h;o++)s=a.item(o),"x"!==s.nodeName&&"y"!==s.nodeName&&"xlink:href"!==s.nodeName&&("transform"===s.nodeName?v=s.nodeValue+" "+v:p.setAttribute(s.nodeName,s.nodeValue));p.setAttribute("transform",v),p.setAttribute("instantiated_by_use","1"),p.removeAttribute("id"),r=c.parentNode,r.replaceChild(p,c),e.length===b&&i++}}function d(t){var e,i,r,n,s=t.getAttribute("viewBox"),o=1,a=1,h=0,c=0,l=t.getAttribute("width"),u=t.getAttribute("height"),f=t.getAttribute("x")||0,d=t.getAttribute("y")||0,g=t.getAttribute("preserveAspectRatio")||"",p=!s||!w.test(t.nodeName)||!(s=s.match(A)),b=!l||!u||"100%"===l||"100%"===u,m=p&&b,y={},_="";if(y.width=0,y.height=0,y.toBeParsed=m,m)return y;if(p)return y.width=x(l),y.height=x(u),y;if(h=-parseFloat(s[1]),c=-parseFloat(s[2]),e=parseFloat(s[3]),i=parseFloat(s[4]),b?(y.width=e,y.height=i):(y.width=x(l),y.height=x(u),o=y.width/e,a=y.height/i),g=v.util.parsePreserveAspectRatioAttribute(g),"none"!==g.alignX&&(a=o=o>a?a:o),1===o&&1===a&&0===h&&0===c&&0===f&&0===d)return y;if((f||d)&&(_=" translate("+x(f)+" "+x(d)+") "),r=_+" matrix("+o+" 0 0 "+a+" "+h*o+" "+c*a+") ","svg"===t.nodeName){for(n=t.ownerDocument.createElement("g");null!=t.firstChild;)n.appendChild(t.firstChild);t.appendChild(n)}else n=t,r=n.getAttribute("transform")+r;return n.setAttribute("transform",r),y}function g(t){var e=t.objects,i=t.options;return e=e.map(function(t){return v[m(t.type)].fromObject(t)}),{objects:e,options:i}}function p(t,e,i){e[i]&&e[i].toSVG&&t.push('\t<pattern x="0" y="0" id="',i,'Pattern" ','width="',e[i].source.width,'" height="',e[i].source.height,'" patternUnits="userSpaceOnUse">\n','\t\t<image x="0" y="0" ','width="',e[i].source.width,'" height="',e[i].source.height,'" xlink:href="',e[i].source.src,'"></image>\n\t</pattern>\n')}var v=t.fabric||(t.fabric={}),b=v.util.object.extend,m=v.util.string.capitalize,y=v.util.object.clone,_=v.util.toFixed,x=v.util.parseUnit,S=v.util.multiplyTransformMatrices,C=/^(path|circle|polygon|polyline|ellipse|rect|line|image|text)$/i,w=/^(symbol|image|marker|pattern|view|svg)$/i,O=/^(?:pattern|defs|symbol|metadata)$/i,T=/^(symbol|g|a|svg)$/i,k={cx:"left",x:"left",r:"radius",cy:"top",y:"top",display:"visible",visibility:"visible",transform:"transformMatrix","fill-opacity":"fillOpacity","fill-rule":"fillRule","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","stroke-dasharray":"strokeDashArray","stroke-linecap":"strokeLineCap","stroke-linejoin":"strokeLineJoin","stroke-miterlimit":"strokeMiterLimit","stroke-opacity":"strokeOpacity","stroke-width":"strokeWidth","text-decoration":"textDecoration","text-anchor":"originX"},j={stroke:"strokeOpacity",fill:"fillOpacity"};v.cssRules={},v.gradientDefs={},v.parseTransformAttribute=function(){function t(t,e){var i=e[0],r=3===e.length?e[1]:0,n=3===e.length?e[2]:0;t[0]=Math.cos(i),t[1]=Math.sin(i),t[2]=-Math.sin(i),t[3]=Math.cos(i),t[4]=r-(t[0]*r+t[2]*n),t[5]=n-(t[1]*r+t[3]*n)}function e(t,e){var i=e[0],r=2===e.length?e[1]:e[0];t[0]=i,t[3]=r}function i(t,e){t[2]=Math.tan(v.util.degreesToRadians(e[0]))}function r(t,e){t[1]=Math.tan(v.util.degreesToRadians(e[0]))}function n(t,e){t[4]=e[0],2===e.length&&(t[5]=e[1])}var s=[1,0,0,1,0,0],o=v.reNum,a="(?:\\s+,?\\s*|,\\s*)",h="(?:(skewX)\\s*\\(\\s*("+o+")\\s*\\))",c="(?:(skewY)\\s*\\(\\s*("+o+")\\s*\\))",l="(?:(rotate)\\s*\\(\\s*("+o+")(?:"+a+"("+o+")"+a+"("+o+"))?\\s*\\))",u="(?:(scale)\\s*\\(\\s*("+o+")(?:"+a+"("+o+"))?\\s*\\))",f="(?:(translate)\\s*\\(\\s*("+o+")(?:"+a+"("+o+"))?\\s*\\))",d="(?:(matrix)\\s*\\(\\s*("+o+")"+a+"("+o+")"+a+"("+o+")"+a+"("+o+")"+a+"("+o+")"+a+"("+o+")\\s*\\))",g="(?:"+d+"|"+f+"|"+u+"|"+l+"|"+h+"|"+c+")",p="(?:"+g+"(?:"+a+"*"+g+")*)",b="^\\s*(?:"+p+"?)\\s*$",m=new RegExp(b),y=new RegExp(g,"g");
return function(o){var a=s.concat(),h=[];if(!o||o&&!m.test(o))return a;o.replace(y,function(o){var c=new RegExp(g).exec(o).filter(function(t){return""!==t&&null!=t}),l=c[1],u=c.slice(2).map(parseFloat);switch(l){case"translate":n(a,u);break;case"rotate":u[0]=v.util.degreesToRadians(u[0]),t(a,u);break;case"scale":e(a,u);break;case"skewX":i(a,u);break;case"skewY":r(a,u);break;case"matrix":a=u}h.push(a.concat()),a=s.concat()});for(var c=h[0];h.length>1;)h.shift(),c=v.util.multiplyTransformMatrices(c,h[0]);return c}}();var A=new RegExp("^\\s*("+v.reNum+"+)\\s*,?\\s*("+v.reNum+"+)\\s*,?\\s*("+v.reNum+"+)\\s*,?\\s*("+v.reNum+"+)\\s*$");v.parseSVGDocument=function(){function t(t,e){for(;t&&(t=t.parentNode);)if(t.nodeName&&e.test(t.nodeName.replace("svg:",""))&&!t.getAttribute("instantiated_by_use"))return!0;return!1}return function(e,i,r){if(e){f(e);var n=new Date,s=v.Object.__uid++,o=d(e),a=v.util.toArray(e.getElementsByTagName("*"));if(o.svgUid=s,0===a.length&&v.isLikelyNode){a=e.selectNodes('//*[name(.)!="svg"]');for(var h=[],c=0,l=a.length;c<l;c++)h[c]=a[c];a=h}var u=a.filter(function(e){return d(e),C.test(e.nodeName.replace("svg:",""))&&!t(e,O)});if(!u||u&&!u.length)return void(i&&i([],{}));v.gradientDefs[s]=v.getGradientDefs(e),v.cssRules[s]=v.getCSSRules(e),v.parseElements(u,function(t){v.documentParsingTime=new Date-n,i&&i(t,o)},y(o),r)}}}();var M={has:function(t,e){e(!1)},get:function(){},set:function(){}},P=new RegExp("(normal|italic)?\\s*(normal|small-caps)?\\s*(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900)?\\s*("+v.reNum+"(?:px|cm|mm|em|pt|pc|in)*)(?:\\/(normal|"+v.reNum+"))?\\s+(.*)");b(v,{parseFontDeclaration:function(t,e){var i=t.match(P);if(i){var r=i[1],n=i[3],s=i[4],o=i[5],a=i[6];r&&(e.fontStyle=r),n&&(e.fontWeight=isNaN(parseFloat(n))?n:parseFloat(n)),s&&(e.fontSize=x(s)),a&&(e.fontFamily=a),o&&(e.lineHeight="normal"===o?1:o)}},getGradientDefs:function(t){var e,i,r,s=["linearGradient","radialGradient","svg:linearGradient","svg:radialGradient"],o=n(t,s),a=0,h={},c={};for(a=o.length;a--;)e=o[a],r=e.getAttribute("xlink:href"),i=e.getAttribute("id"),r&&(c[i]=r.substr(1)),h[i]=e;for(i in c){var l=h[c[i]].cloneNode(!0);for(e=h[i];l.firstChild;)e.appendChild(l.firstChild)}return h},parseAttributes:function(t,n,s){if(t){var o,h,c={};"undefined"==typeof s&&(s=t.getAttribute("svgUid")),t.parentNode&&T.test(t.parentNode.nodeName)&&(c=v.parseAttributes(t.parentNode,n,s)),h=c&&c.fontSize||t.getAttribute("font-size")||v.Text.DEFAULT_SVG_FONT_SIZE;var l=n.reduce(function(r,n){return o=t.getAttribute(n),o&&(n=e(n),o=i(n,o,c,h),r[n]=o),r},{});return l=b(l,b(a(t,s),v.parseStyleAttribute(t))),l.font&&v.parseFontDeclaration(l.font,l),r(b(c,l))}},parseElements:function(t,e,i,r){new v.ElementsParser(t,e,i,r).parse()},parseStyleAttribute:function(t){var e={},i=t.getAttribute("style");return i?("string"==typeof i?s(i,e):o(i,e),e):e},parsePointsAttribute:function(t){if(!t)return null;t=t.replace(/,/g," ").trim(),t=t.split(/\s+/);var e,i,r=[];for(e=0,i=t.length;e<i;e+=2)r.push({x:parseFloat(t[e]),y:parseFloat(t[e+1])});return r},getCSSRules:function(t){for(var r,n=t.getElementsByTagName("style"),s={},o=0,a=n.length;o<a;o++){var h=n[o].textContent||n[o].text;h=h.replace(/\/\*[\s\S]*?\*\//g,""),""!==h.trim()&&(r=h.match(/[^{]*\{[\s\S]*?\}/g),r=r.map(function(t){return t.trim()}),r.forEach(function(t){for(var r=t.match(/([\s\S]*?)\s*\{([^}]*)\}/),n={},o=r[2].trim(),a=o.replace(/;$/,"").split(/\s*;\s*/),h=0,c=a.length;h<c;h++){var l=a[h].split(/\s*:\s*/),u=e(l[0]),f=i(u,l[1],l[0]);n[u]=f}t=r[1],t.split(",").forEach(function(t){t=t.replace(/^svg/i,"").trim(),""!==t&&(s[t]?v.util.object.extend(s[t],n):s[t]=v.util.object.clone(n))})}))}return s},loadSVGFromURL:function(t,e,i){function r(r){var n=r.responseXML;n&&!n.documentElement&&v.window.ActiveXObject&&r.responseText&&(n=new ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(r.responseText.replace(/<!DOCTYPE[\s\S]*?(\[[\s\S]*\])*?>/i,""))),n&&n.documentElement||e&&e(null),v.parseSVGDocument(n.documentElement,function(i,r){M.set(t,{objects:v.util.array.invoke(i,"toObject"),options:r}),e&&e(i,r)},i)}t=t.replace(/^\n\s*/,"").trim(),M.has(t,function(i){i?M.get(t,function(t){var i=g(t);e(i.objects,i.options)}):new v.util.request(t,{method:"get",onComplete:r})})},loadSVGFromString:function(t,e,i){t=t.trim();var r;if("undefined"!=typeof DOMParser){var n=new DOMParser;n&&n.parseFromString&&(r=n.parseFromString(t,"text/xml"))}else v.window.ActiveXObject&&(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(t.replace(/<!DOCTYPE[\s\S]*?(\[[\s\S]*\])*?>/i,"")));v.parseSVGDocument(r.documentElement,function(t,i){e(t,i)},i)},createSVGFontFacesMarkup:function(t){for(var e,i,r,n,s,o,a,h="",c={},l=v.fontPaths,u=0,f=t.length;u<f;u++)if(e=t[u],i=e.fontFamily,e.type.indexOf("text")!==-1&&!c[i]&&l[i]&&(c[i]=!0,e.styles)){r=e.styles;for(s in r){n=r[s];for(a in n)o=n[a],i=o.fontFamily,!c[i]&&l[i]&&(c[i]=!0)}}for(var d in c)h+=["\t\t@font-face {\n","\t\t\tfont-family: '",d,"';\n","\t\t\tsrc: url('",l[d],"');\n","\t\t}\n"].join("");return h&&(h=['\t<style type="text/css">',"<![CDATA[\n",h,"]]>","</style>\n"].join("")),h},createSVGRefElementsMarkup:function(t){var e=[];return p(e,t,"backgroundColor"),p(e,t,"overlayColor"),e.join("")}})}("undefined"!=typeof exports?exports:this),fabric.ElementsParser=function(t,e,i,r){this.elements=t,this.callback=e,this.options=i,this.reviver=r,this.svgUid=i&&i.svgUid||0},fabric.ElementsParser.prototype.parse=function(){this.instances=new Array(this.elements.length),this.numElements=this.elements.length,this.createObjects()},fabric.ElementsParser.prototype.createObjects=function(){for(var t=0,e=this.elements.length;t<e;t++)this.elements[t].setAttribute("svgUid",this.svgUid),function(t,e){setTimeout(function(){t.createObject(t.elements[e],e)},0)}(this,t)},fabric.ElementsParser.prototype.createObject=function(t,e){var i=fabric[fabric.util.string.capitalize(t.tagName.replace("svg:",""))];if(i&&i.fromElement)try{this._createObject(i,t,e)}catch(t){fabric.log(t)}else this.checkIfDone()},fabric.ElementsParser.prototype._createObject=function(t,e,i){if(t.async)t.fromElement(e,this.createCallback(i,e),this.options);else{var r=t.fromElement(e,this.options);this.resolveGradient(r,"fill"),this.resolveGradient(r,"stroke"),this.reviver&&this.reviver(e,r),this.instances[i]=r,this.checkIfDone()}},fabric.ElementsParser.prototype.createCallback=function(t,e){var i=this;return function(r){i.resolveGradient(r,"fill"),i.resolveGradient(r,"stroke"),i.reviver&&i.reviver(e,r),i.instances[t]=r,i.checkIfDone()}},fabric.ElementsParser.prototype.resolveGradient=function(t,e){var i=t.get(e);if(/^url\(/.test(i)){var r=i.slice(5,i.length-1);fabric.gradientDefs[this.svgUid][r]&&t.set(e,fabric.Gradient.fromElement(fabric.gradientDefs[this.svgUid][r],t))}},fabric.ElementsParser.prototype.checkIfDone=function(){0===--this.numElements&&(this.instances=this.instances.filter(function(t){return null!=t}),this.callback(this.instances))},function(t){"use strict";function e(t,e){this.x=t,this.y=e}var i=t.fabric||(t.fabric={});return i.Point?void i.warn("fabric.Point is already defined"):(i.Point=e,void(e.prototype={type:"point",constructor:e,add:function(t){return new e(this.x+t.x,this.y+t.y)},addEquals:function(t){return this.x+=t.x,this.y+=t.y,this},scalarAdd:function(t){return new e(this.x+t,this.y+t)},scalarAddEquals:function(t){return this.x+=t,this.y+=t,this},subtract:function(t){return new e(this.x-t.x,this.y-t.y)},subtractEquals:function(t){return this.x-=t.x,this.y-=t.y,this},scalarSubtract:function(t){return new e(this.x-t,this.y-t)},scalarSubtractEquals:function(t){return this.x-=t,this.y-=t,this},multiply:function(t){return new e(this.x*t,this.y*t)},multiplyEquals:function(t){return this.x*=t,this.y*=t,this},divide:function(t){return new e(this.x/t,this.y/t)},divideEquals:function(t){return this.x/=t,this.y/=t,this},eq:function(t){return this.x===t.x&&this.y===t.y},lt:function(t){return this.x<t.x&&this.y<t.y},lte:function(t){return this.x<=t.x&&this.y<=t.y},gt:function(t){return this.x>t.x&&this.y>t.y},gte:function(t){return this.x>=t.x&&this.y>=t.y},lerp:function(t,i){return"undefined"==typeof i&&(i=.5),i=Math.max(Math.min(1,i),0),new e(this.x+(t.x-this.x)*i,this.y+(t.y-this.y)*i)},distanceFrom:function(t){var e=this.x-t.x,i=this.y-t.y;return Math.sqrt(e*e+i*i)},midPointFrom:function(t){return this.lerp(t)},min:function(t){return new e(Math.min(this.x,t.x),Math.min(this.y,t.y))},max:function(t){return new e(Math.max(this.x,t.x),Math.max(this.y,t.y))},toString:function(){return this.x+","+this.y},setXY:function(t,e){return this.x=t,this.y=e,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setFromPoint:function(t){return this.x=t.x,this.y=t.y,this},swap:function(t){var e=this.x,i=this.y;this.x=t.x,this.y=t.y,t.x=e,t.y=i},clone:function(){return new e(this.x,this.y)}}))}("undefined"!=typeof exports?exports:this),function(t){"use strict";function e(t){this.status=t,this.points=[]}var i=t.fabric||(t.fabric={});return i.Intersection?void i.warn("fabric.Intersection is already defined"):(i.Intersection=e,i.Intersection.prototype={constructor:e,appendPoint:function(t){return this.points.push(t),this},appendPoints:function(t){return this.points=this.points.concat(t),this}},i.Intersection.intersectLineLine=function(t,r,n,s){var o,a=(s.x-n.x)*(t.y-n.y)-(s.y-n.y)*(t.x-n.x),h=(r.x-t.x)*(t.y-n.y)-(r.y-t.y)*(t.x-n.x),c=(s.y-n.y)*(r.x-t.x)-(s.x-n.x)*(r.y-t.y);if(0!==c){var l=a/c,u=h/c;0<=l&&l<=1&&0<=u&&u<=1?(o=new e("Intersection"),o.appendPoint(new i.Point(t.x+l*(r.x-t.x),t.y+l*(r.y-t.y)))):o=new e}else o=new e(0===a||0===h?"Coincident":"Parallel");return o},i.Intersection.intersectLinePolygon=function(t,i,r){for(var n,s,o,a=new e,h=r.length,c=0;c<h;c++)n=r[c],s=r[(c+1)%h],o=e.intersectLineLine(t,i,n,s),a.appendPoints(o.points);return a.points.length>0&&(a.status="Intersection"),a},i.Intersection.intersectPolygonPolygon=function(t,i){for(var r=new e,n=t.length,s=0;s<n;s++){var o=t[s],a=t[(s+1)%n],h=e.intersectLinePolygon(o,a,i);r.appendPoints(h.points)}return r.points.length>0&&(r.status="Intersection"),r},void(i.Intersection.intersectPolygonRectangle=function(t,r,n){var s=r.min(n),o=r.max(n),a=new i.Point(o.x,s.y),h=new i.Point(s.x,o.y),c=e.intersectLinePolygon(s,a,t),l=e.intersectLinePolygon(a,o,t),u=e.intersectLinePolygon(o,h,t),f=e.intersectLinePolygon(h,s,t),d=new e;return d.appendPoints(c.points),d.appendPoints(l.points),d.appendPoints(u.points),d.appendPoints(f.points),d.points.length>0&&(d.status="Intersection"),d}))}("undefined"!=typeof exports?exports:this),function(t){"use strict";function e(t){t?this._tryParsingColor(t):this.setSource([0,0,0,1])}function i(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}var r=t.fabric||(t.fabric={});return r.Color?void r.warn("fabric.Color is already defined."):(r.Color=e,r.Color.prototype={_tryParsingColor:function(t){var i;t in e.colorNameMap&&(t=e.colorNameMap[t]),"transparent"===t&&(i=[255,255,255,0]),i||(i=e.sourceFromHex(t)),i||(i=e.sourceFromRgb(t)),i||(i=e.sourceFromHsl(t)),i||(i=[0,0,0,1]),i&&this.setSource(i)},_rgbToHsl:function(t,e,i){t/=255,e/=255,i/=255;var n,s,o,a=r.util.array.max([t,e,i]),h=r.util.array.min([t,e,i]);if(o=(a+h)/2,a===h)n=s=0;else{var c=a-h;switch(s=o>.5?c/(2-a-h):c/(a+h),a){case t:n=(e-i)/c+(e<i?6:0);break;case e:n=(i-t)/c+2;break;case i:n=(t-e)/c+4}n/=6}return[Math.round(360*n),Math.round(100*s),Math.round(100*o)]},getSource:function(){return this._source},setSource:function(t){this._source=t},toRgb:function(){var t=this.getSource();return"rgb("+t[0]+","+t[1]+","+t[2]+")"},toRgba:function(){var t=this.getSource();return"rgba("+t[0]+","+t[1]+","+t[2]+","+t[3]+")"},toHsl:function(){var t=this.getSource(),e=this._rgbToHsl(t[0],t[1],t[2]);return"hsl("+e[0]+","+e[1]+"%,"+e[2]+"%)"},toHsla:function(){var t=this.getSource(),e=this._rgbToHsl(t[0],t[1],t[2]);return"hsla("+e[0]+","+e[1]+"%,"+e[2]+"%,"+t[3]+")"},toHex:function(){var t,e,i,r=this.getSource();return t=r[0].toString(16),t=1===t.length?"0"+t:t,e=r[1].toString(16),e=1===e.length?"0"+e:e,i=r[2].toString(16),i=1===i.length?"0"+i:i,t.toUpperCase()+e.toUpperCase()+i.toUpperCase()},getAlpha:function(){return this.getSource()[3]},setAlpha:function(t){var e=this.getSource();return e[3]=t,this.setSource(e),this},toGrayscale:function(){var t=this.getSource(),e=parseInt((.3*t[0]+.59*t[1]+.11*t[2]).toFixed(0),10),i=t[3];return this.setSource([e,e,e,i]),this},toBlackWhite:function(t){var e=this.getSource(),i=(.3*e[0]+.59*e[1]+.11*e[2]).toFixed(0),r=e[3];return t=t||127,i=Number(i)<Number(t)?0:255,this.setSource([i,i,i,r]),this},overlayWith:function(t){t instanceof e||(t=new e(t));for(var i=[],r=this.getAlpha(),n=.5,s=this.getSource(),o=t.getSource(),a=0;a<3;a++)i.push(Math.round(s[a]*(1-n)+o[a]*n));return i[3]=r,this.setSource(i),this}},r.Color.reRGBa=/^rgba?\(\s*(\d{1,3}(?:\.\d+)?\%?)\s*,\s*(\d{1,3}(?:\.\d+)?\%?)\s*,\s*(\d{1,3}(?:\.\d+)?\%?)\s*(?:\s*,\s*(\d+(?:\.\d+)?)\s*)?\)$/,r.Color.reHSLa=/^hsla?\(\s*(\d{1,3})\s*,\s*(\d{1,3}\%)\s*,\s*(\d{1,3}\%)\s*(?:\s*,\s*(\d+(?:\.\d+)?)\s*)?\)$/,r.Color.reHex=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,r.Color.colorNameMap={aqua:"#00FFFF",black:"#000000",blue:"#0000FF",fuchsia:"#FF00FF",gray:"#808080",grey:"#808080",green:"#008000",lime:"#00FF00",maroon:"#800000",navy:"#000080",olive:"#808000",orange:"#FFA500",purple:"#800080",red:"#FF0000",silver:"#C0C0C0",teal:"#008080",white:"#FFFFFF",yellow:"#FFFF00"},r.Color.fromRgb=function(t){return e.fromSource(e.sourceFromRgb(t))},r.Color.sourceFromRgb=function(t){var i=t.match(e.reRGBa);if(i){var r=parseInt(i[1],10)/(/%$/.test(i[1])?100:1)*(/%$/.test(i[1])?255:1),n=parseInt(i[2],10)/(/%$/.test(i[2])?100:1)*(/%$/.test(i[2])?255:1),s=parseInt(i[3],10)/(/%$/.test(i[3])?100:1)*(/%$/.test(i[3])?255:1);return[parseInt(r,10),parseInt(n,10),parseInt(s,10),i[4]?parseFloat(i[4]):1]}},r.Color.fromRgba=e.fromRgb,r.Color.fromHsl=function(t){return e.fromSource(e.sourceFromHsl(t))},r.Color.sourceFromHsl=function(t){var r=t.match(e.reHSLa);if(r){var n,s,o,a=(parseFloat(r[1])%360+360)%360/360,h=parseFloat(r[2])/(/%$/.test(r[2])?100:1),c=parseFloat(r[3])/(/%$/.test(r[3])?100:1);if(0===h)n=s=o=c;else{var l=c<=.5?c*(h+1):c+h-c*h,u=2*c-l;n=i(u,l,a+1/3),s=i(u,l,a),o=i(u,l,a-1/3)}return[Math.round(255*n),Math.round(255*s),Math.round(255*o),r[4]?parseFloat(r[4]):1]}},r.Color.fromHsla=e.fromHsl,r.Color.fromHex=function(t){return e.fromSource(e.sourceFromHex(t))},r.Color.sourceFromHex=function(t){if(t.match(e.reHex)){var i=t.slice(t.indexOf("#")+1),r=3===i.length||4===i.length,n=8===i.length||4===i.length,s=r?i.charAt(0)+i.charAt(0):i.substring(0,2),o=r?i.charAt(1)+i.charAt(1):i.substring(2,4),a=r?i.charAt(2)+i.charAt(2):i.substring(4,6),h=n?r?i.charAt(3)+i.charAt(3):i.substring(6,8):"FF";return[parseInt(s,16),parseInt(o,16),parseInt(a,16),parseFloat((parseInt(h,16)/255).toFixed(2))]}},void(r.Color.fromSource=function(t){var i=new e;return i.setSource(t),i}))}("undefined"!=typeof exports?exports:this),function(){function t(t){var e,i,r,n=t.getAttribute("style"),s=t.getAttribute("offset")||0;if(s=parseFloat(s)/(/%$/.test(s)?100:1),s=s<0?0:s>1?1:s,n){var o=n.split(/\s*;\s*/);""===o[o.length-1]&&o.pop();for(var a=o.length;a--;){var h=o[a].split(/\s*:\s*/),c=h[0].trim(),l=h[1].trim();"stop-color"===c?e=l:"stop-opacity"===c&&(r=l)}}return e||(e=t.getAttribute("stop-color")||"rgb(0,0,0)"),r||(r=t.getAttribute("stop-opacity")),e=new fabric.Color(e),i=e.getAlpha(),r=isNaN(parseFloat(r))?1:parseFloat(r),r*=i,{offset:s,color:e.toRgb(),opacity:r}}function e(t){return{x1:t.getAttribute("x1")||0,y1:t.getAttribute("y1")||0,x2:t.getAttribute("x2")||"100%",y2:t.getAttribute("y2")||0}}function i(t){return{x1:t.getAttribute("fx")||t.getAttribute("cx")||"50%",y1:t.getAttribute("fy")||t.getAttribute("cy")||"50%",r1:0,x2:t.getAttribute("cx")||"50%",y2:t.getAttribute("cy")||"50%",r2:t.getAttribute("r")||"50%"}}function r(t,e,i){var r,n=0,s=1,o="";for(var a in e)"Infinity"===e[a]?e[a]=1:"-Infinity"===e[a]&&(e[a]=0),r=parseFloat(e[a],10),s="string"==typeof e[a]&&/^\d+%$/.test(e[a])?.01:1,"x1"===a||"x2"===a||"r2"===a?(s*="objectBoundingBox"===i?t.width:1,n="objectBoundingBox"===i?t.left||0:0):"y1"!==a&&"y2"!==a||(s*="objectBoundingBox"===i?t.height:1,n="objectBoundingBox"===i?t.top||0:0),e[a]=r*s+n;if("ellipse"===t.type&&null!==e.r2&&"objectBoundingBox"===i&&t.rx!==t.ry){var h=t.ry/t.rx;o=" scale(1, "+h+")",e.y1&&(e.y1/=h),e.y2&&(e.y2/=h)}return o}fabric.Gradient=fabric.util.createClass({offsetX:0,offsetY:0,initialize:function(t){t||(t={});var e={};this.id=fabric.Object.__uid++,this.type=t.type||"linear",e={x1:t.coords.x1||0,y1:t.coords.y1||0,x2:t.coords.x2||0,y2:t.coords.y2||0},"radial"===this.type&&(e.r1=t.coords.r1||0,e.r2=t.coords.r2||0),this.coords=e,this.colorStops=t.colorStops.slice(),t.gradientTransform&&(this.gradientTransform=t.gradientTransform),this.offsetX=t.offsetX||this.offsetX,this.offsetY=t.offsetY||this.offsetY},addColorStop:function(t){for(var e in t){var i=new fabric.Color(t[e]);this.colorStops.push({offset:e,color:i.toRgb(),opacity:i.getAlpha()})}return this},toObject:function(){return{type:this.type,coords:this.coords,colorStops:this.colorStops,offsetX:this.offsetX,offsetY:this.offsetY,gradientTransform:this.gradientTransform?this.gradientTransform.concat():this.gradientTransform}},toSVG:function(t){var e,i,r=fabric.util.object.clone(this.coords);if(this.colorStops.sort(function(t,e){return t.offset-e.offset}),!t.group||"path-group"!==t.group.type)for(var n in r)"x1"===n||"x2"===n||"r2"===n?r[n]+=this.offsetX-t.width/2:"y1"!==n&&"y2"!==n||(r[n]+=this.offsetY-t.height/2);i='id="SVGID_'+this.id+'" gradientUnits="userSpaceOnUse"',this.gradientTransform&&(i+=' gradientTransform="matrix('+this.gradientTransform.join(" ")+')" '),"linear"===this.type?e=["<linearGradient ",i,' x1="',r.x1,'" y1="',r.y1,'" x2="',r.x2,'" y2="',r.y2,'">\n']:"radial"===this.type&&(e=["<radialGradient ",i,' cx="',r.x2,'" cy="',r.y2,'" r="',r.r2,'" fx="',r.x1,'" fy="',r.y1,'">\n']);for(var s=0;s<this.colorStops.length;s++)e.push("<stop ",'offset="',100*this.colorStops[s].offset+"%",'" style="stop-color:',this.colorStops[s].color,null!=this.colorStops[s].opacity?";stop-opacity: "+this.colorStops[s].opacity:";",'"/>\n');return e.push("linear"===this.type?"</linearGradient>\n":"</radialGradient>\n"),e.join("")},toLive:function(t,e){var i,r,n=fabric.util.object.clone(this.coords);if(this.type){if(e.group&&"path-group"===e.group.type)for(r in n)"x1"===r||"x2"===r?n[r]+=-this.offsetX+e.width/2:"y1"!==r&&"y2"!==r||(n[r]+=-this.offsetY+e.height/2);"linear"===this.type?i=t.createLinearGradient(n.x1,n.y1,n.x2,n.y2):"radial"===this.type&&(i=t.createRadialGradient(n.x1,n.y1,n.r1,n.x2,n.y2,n.r2));for(var s=0,o=this.colorStops.length;s<o;s++){var a=this.colorStops[s].color,h=this.colorStops[s].opacity,c=this.colorStops[s].offset;"undefined"!=typeof h&&(a=new fabric.Color(a).setAlpha(h).toRgba()),i.addColorStop(parseFloat(c),a)}return i}}}),fabric.util.object.extend(fabric.Gradient,{fromElement:function(n,s){var o,a,h,c=n.getElementsByTagName("stop"),l=n.getAttribute("gradientUnits")||"objectBoundingBox",u=n.getAttribute("gradientTransform"),f=[];o="linearGradient"===n.nodeName||"LINEARGRADIENT"===n.nodeName?"linear":"radial","linear"===o?a=e(n):"radial"===o&&(a=i(n));for(var d=c.length;d--;)f.push(t(c[d]));h=r(s,a,l);var g=new fabric.Gradient({type:o,coords:a,colorStops:f,offsetX:-s.left,offsetY:-s.top});return(u||""!==h)&&(g.gradientTransform=fabric.parseTransformAttribute((u||"")+h)),g},forObject:function(t,e){return e||(e={}),r(t,e.coords,"userSpaceOnUse"),new fabric.Gradient(e)}})}(),fabric.Pattern=fabric.util.createClass({repeat:"repeat",offsetX:0,offsetY:0,initialize:function(t){if(t||(t={}),this.id=fabric.Object.__uid++,t.source)if("string"==typeof t.source)if("undefined"!=typeof fabric.util.getFunctionBody(t.source))this.source=new Function(fabric.util.getFunctionBody(t.source));else{var e=this;this.source=fabric.util.createImage(),fabric.util.loadImage(t.source,function(t){e.source=t})}else this.source=t.source;t.repeat&&(this.repeat=t.repeat),t.offsetX&&(this.offsetX=t.offsetX),t.offsetY&&(this.offsetY=t.offsetY)},toObject:function(){var t;return"function"==typeof this.source?t=String(this.source):"string"==typeof this.source.src?t=this.source.src:"object"==typeof this.source&&this.source.toDataURL&&(t=this.source.toDataURL()),{source:t,repeat:this.repeat,offsetX:this.offsetX,offsetY:this.offsetY}},toSVG:function(t){var e="function"==typeof this.source?this.source():this.source,i=e.width/t.getWidth(),r=e.height/t.getHeight(),n=this.offsetX/t.getWidth(),s=this.offsetY/t.getHeight(),o="";return"repeat-x"!==this.repeat&&"no-repeat"!==this.repeat||(r=1),"repeat-y"!==this.repeat&&"no-repeat"!==this.repeat||(i=1),e.src?o=e.src:e.toDataURL&&(o=e.toDataURL()),'<pattern id="SVGID_'+this.id+'" x="'+n+'" y="'+s+'" width="'+i+'" height="'+r+'">\n<image x="0" y="0" width="'+e.width+'" height="'+e.height+'" xlink:href="'+o+'"></image>\n</pattern>\n'},toLive:function(t){var e="function"==typeof this.source?this.source():this.source;if(!e)return"";if("undefined"!=typeof e.src){if(!e.complete)return"";if(0===e.naturalWidth||0===e.naturalHeight)return""}return t.createPattern(e,this.repeat)}}),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.toFixed;return e.Shadow?void e.warn("fabric.Shadow is already defined."):(e.Shadow=e.util.createClass({color:"rgb(0,0,0)",blur:0,offsetX:0,offsetY:0,affectStroke:!1,includeDefaultValues:!0,initialize:function(t){"string"==typeof t&&(t=this._parseShadow(t));for(var i in t)this[i]=t[i];this.id=e.Object.__uid++},_parseShadow:function(t){var i=t.trim(),r=e.Shadow.reOffsetsAndBlur.exec(i)||[],n=i.replace(e.Shadow.reOffsetsAndBlur,"")||"rgb(0,0,0)";return{color:n.trim(),offsetX:parseInt(r[1],10)||0,offsetY:parseInt(r[2],10)||0,blur:parseInt(r[3],10)||0}},toString:function(){return[this.offsetX,this.offsetY,this.blur,this.color].join("px ")},toSVG:function(t){var r=40,n=40,s=e.Object.NUM_FRACTION_DIGITS,o=e.util.rotateVector({x:this.offsetX,y:this.offsetY},e.util.degreesToRadians(-t.angle)),a=20;return t.width&&t.height&&(r=100*i((Math.abs(o.x)+this.blur)/t.width,s)+a,n=100*i((Math.abs(o.y)+this.blur)/t.height,s)+a),t.flipX&&(o.x*=-1),t.flipY&&(o.y*=-1),'<filter id="SVGID_'+this.id+'" y="-'+n+'%" height="'+(100+2*n)+'%" x="-'+r+'%" width="'+(100+2*r)+'%" >\n\t<feGaussianBlur in="SourceAlpha" stdDeviation="'+i(this.blur?this.blur/2:0,s)+'"></feGaussianBlur>\n\t<feOffset dx="'+i(o.x,s)+'" dy="'+i(o.y,s)+'" result="oBlur" ></feOffset>\n\t<feFlood flood-color="'+this.color+'"/>\n\t<feComposite in2="oBlur" operator="in" />\n\t<feMerge>\n\t\t<feMergeNode></feMergeNode>\n\t\t<feMergeNode in="SourceGraphic"></feMergeNode>\n\t</feMerge>\n</filter>\n'},toObject:function(){if(this.includeDefaultValues)return{color:this.color,blur:this.blur,offsetX:this.offsetX,offsetY:this.offsetY,affectStroke:this.affectStroke};var t={},i=e.Shadow.prototype;return["color","blur","offsetX","offsetY","affectStroke"].forEach(function(e){this[e]!==i[e]&&(t[e]=this[e])},this),t}}),void(e.Shadow.reOffsetsAndBlur=/(?:\s|^)(-?\d+(?:px)?(?:\s?|$))?(-?\d+(?:px)?(?:\s?|$))?(\d+(?:px)?)?(?:\s?|$)(?:$|\s)/))}("undefined"!=typeof exports?exports:this),function(){"use strict";if(fabric.StaticCanvas)return void fabric.warn("fabric.StaticCanvas is already defined.");var t=fabric.util.object.extend,e=fabric.util.getElementOffset,i=fabric.util.removeFromArray,r=fabric.util.toFixed,n=new Error("Could not initialize `canvas` element");fabric.StaticCanvas=fabric.util.createClass({initialize:function(t,e){e||(e={}),this._initStatic(t,e)},backgroundColor:"",backgroundImage:null,overlayColor:"",overlayImage:null,includeDefaultValues:!0,stateful:!0,renderOnAddRemove:!0,clipTo:null,controlsAboveOverlay:!1,allowTouchScrolling:!1,imageSmoothingEnabled:!0,viewportTransform:[1,0,0,1,0,0],backgroundVpt:!0,overlayVpt:!0,onBeforeScaleRotate:function(){},enableRetinaScaling:!0,_initStatic:function(t,e){var i=fabric.StaticCanvas.prototype.renderAll.bind(this);this._objects=[],this._createLowerCanvas(t),this._initOptions(e),this._setImageSmoothing(),this.interactive||this._initRetinaScaling(),e.overlayImage&&this.setOverlayImage(e.overlayImage,i),e.backgroundImage&&this.setBackgroundImage(e.backgroundImage,i),e.backgroundColor&&this.setBackgroundColor(e.backgroundColor,i),e.overlayColor&&this.setOverlayColor(e.overlayColor,i),this.calcOffset()},_isRetinaScaling:function(){return 1!==fabric.devicePixelRatio&&this.enableRetinaScaling},getRetinaScaling:function(){return this._isRetinaScaling()?fabric.devicePixelRatio:1},_initRetinaScaling:function(){this._isRetinaScaling()&&(this.lowerCanvasEl.setAttribute("width",this.width*fabric.devicePixelRatio),this.lowerCanvasEl.setAttribute("height",this.height*fabric.devicePixelRatio),this.contextContainer.scale(fabric.devicePixelRatio,fabric.devicePixelRatio))},calcOffset:function(){return this._offset=e(this.lowerCanvasEl),this},setOverlayImage:function(t,e,i){return this.__setBgOverlayImage("overlayImage",t,e,i)},setBackgroundImage:function(t,e,i){return this.__setBgOverlayImage("backgroundImage",t,e,i)},setOverlayColor:function(t,e){return this.__setBgOverlayColor("overlayColor",t,e)},setBackgroundColor:function(t,e){return this.__setBgOverlayColor("backgroundColor",t,e)},_setImageSmoothing:function(){var t=this.getContext();t.imageSmoothingEnabled=t.imageSmoothingEnabled||t.webkitImageSmoothingEnabled||t.mozImageSmoothingEnabled||t.msImageSmoothingEnabled||t.oImageSmoothingEnabled,t.imageSmoothingEnabled=this.imageSmoothingEnabled},__setBgOverlayImage:function(t,e,i,r){return"string"==typeof e?fabric.util.loadImage(e,function(e){e&&(this[t]=new fabric.Image(e,r)),i&&i(e)},this,r&&r.crossOrigin):(r&&e.setOptions(r),this[t]=e,i&&i(e)),this},__setBgOverlayColor:function(t,e,i){if(e&&e.source){var r=this;fabric.util.loadImage(e.source,function(n){r[t]=new fabric.Pattern({source:n,repeat:e.repeat,offsetX:e.offsetX,offsetY:e.offsetY}),i&&i()})}else this[t]=e,i&&i();return this},_createCanvasElement:function(){var t=fabric.document.createElement("canvas");if(t.style||(t.style={}),!t)throw n;return this._initCanvasElement(t),t},_initCanvasElement:function(t){if(fabric.util.createCanvasElement(t),"undefined"==typeof t.getContext)throw n},_initOptions:function(t){for(var e in t)this[e]=t[e];this.width=this.width||parseInt(this.lowerCanvasEl.width,10)||0,this.height=this.height||parseInt(this.lowerCanvasEl.height,10)||0,this.lowerCanvasEl.style&&(this.lowerCanvasEl.width=this.width,this.lowerCanvasEl.height=this.height,this.lowerCanvasEl.style.width=this.width+"px",this.lowerCanvasEl.style.height=this.height+"px",this.viewportTransform=this.viewportTransform.slice())},_createLowerCanvas:function(t){this.lowerCanvasEl=fabric.util.getById(t)||this._createCanvasElement(),this._initCanvasElement(this.lowerCanvasEl),fabric.util.addClass(this.lowerCanvasEl,"lower-canvas"),this.interactive&&this._applyCanvasStyle(this.lowerCanvasEl),this.contextContainer=this.lowerCanvasEl.getContext("2d")},getWidth:function(){return this.width},getHeight:function(){return this.height},setWidth:function(t,e){return this.setDimensions({width:t},e)},setHeight:function(t,e){return this.setDimensions({height:t},e)},setDimensions:function(t,e){var i;e=e||{};for(var r in t)i=t[r],e.cssOnly||(this._setBackstoreDimension(r,t[r]),i+="px"),e.backstoreOnly||this._setCssDimension(r,i);return this._initRetinaScaling(),this._setImageSmoothing(),this.calcOffset(),e.cssOnly||this.renderAll(),this},_setBackstoreDimension:function(t,e){return this.lowerCanvasEl[t]=e,this.upperCanvasEl&&(this.upperCanvasEl[t]=e),this.cacheCanvasEl&&(this.cacheCanvasEl[t]=e),this[t]=e,this},_setCssDimension:function(t,e){return this.lowerCanvasEl.style[t]=e,this.upperCanvasEl&&(this.upperCanvasEl.style[t]=e),this.wrapperEl&&(this.wrapperEl.style[t]=e),this},getZoom:function(){return Math.sqrt(this.viewportTransform[0]*this.viewportTransform[3])},setViewportTransform:function(t){var e=this.getActiveGroup();this.viewportTransform=t;for(var i=0,r=this._objects.length;i<r;i++)this._objects[i].setCoords();return e&&e.setCoords(),this.renderAll(),this},zoomToPoint:function(t,e){var i=t,r=this.viewportTransform.slice(0);t=fabric.util.transformPoint(t,fabric.util.invertTransform(this.viewportTransform)),r[0]=e,r[3]=e;var n=fabric.util.transformPoint(t,r);return r[4]+=i.x-n.x,r[5]+=i.y-n.y,this.setViewportTransform(r)},setZoom:function(t){return this.zoomToPoint(new fabric.Point(0,0),t),this},absolutePan:function(t){var e=this.viewportTransform.slice(0);return e[4]=-t.x,e[5]=-t.y,this.setViewportTransform(e)},relativePan:function(t){return this.absolutePan(new fabric.Point(-t.x-this.viewportTransform[4],-t.y-this.viewportTransform[5]))},getElement:function(){return this.lowerCanvasEl},getActiveObject:function(){return null},getActiveGroup:function(){return null},_onObjectAdded:function(t){this.stateful&&t.setupState(),t._set("canvas",this),t.setCoords(),this.fire("object:added",{target:t}),t.fire("added")},_onObjectRemoved:function(t){this.fire("object:removed",{target:t}),t.fire("removed")},clearContext:function(t){return t.clearRect(0,0,this.width,this.height),this},getContext:function(){return this.contextContainer},clear:function(){return this._objects.length=0,this.clearContext(this.contextContainer),this.fire("canvas:cleared"),this.renderAll(),this},renderAll:function(){var t=this.contextContainer;return this.renderCanvas(t,this._objects),this},renderCanvas:function(t,e){this.clearContext(t),this.fire("before:render"),this.clipTo&&fabric.util.clipContext(this,t),this._renderBackground(t),t.save(),t.transform.apply(t,this.viewportTransform),this._renderObjects(t,e),t.restore(),!this.controlsAboveOverlay&&this.interactive&&this.drawControls(t),this.clipTo&&t.restore(),this._renderOverlay(t),this.controlsAboveOverlay&&this.interactive&&this.drawControls(t),this.fire("after:render")},drawControls:function(){},_renderObjects:function(t,e){for(var i=0,r=e.length;i<r;++i)e[i]&&e[i].render(t)},_renderBackgroundOrOverlay:function(t,e){var i=this[e+"Color"];i&&(t.fillStyle=i.toLive?i.toLive(t):i,t.fillRect(i.offsetX||0,i.offsetY||0,this.width,this.height)),i=this[e+"Image"],i&&(this[e+"Vpt"]&&(t.save(),t.transform.apply(t,this.viewportTransform)),i.render(t),this[e+"Vpt"]&&t.restore())},_renderBackground:function(t){this._renderBackgroundOrOverlay(t,"background")},_renderOverlay:function(t){this._renderBackgroundOrOverlay(t,"overlay")},getCenter:function(){return{top:this.getHeight()/2,left:this.getWidth()/2}},centerObjectH:function(t){return this._centerObject(t,new fabric.Point(this.getCenter().left,t.getCenterPoint().y))},centerObjectV:function(t){return this._centerObject(t,new fabric.Point(t.getCenterPoint().x,this.getCenter().top))},centerObject:function(t){var e=this.getCenter();return this._centerObject(t,new fabric.Point(e.left,e.top))},viewportCenterObject:function(t){var e=this.getVpCenter();return this._centerObject(t,e)},viewportCenterObjectH:function(t){var e=this.getVpCenter();return this._centerObject(t,new fabric.Point(e.x,t.getCenterPoint().y)),this},viewportCenterObjectV:function(t){var e=this.getVpCenter();return this._centerObject(t,new fabric.Point(t.getCenterPoint().x,e.y))},getVpCenter:function(){var t=this.getCenter(),e=fabric.util.invertTransform(this.viewportTransform);return fabric.util.transformPoint({x:t.left,y:t.top},e)},_centerObject:function(t,e){return t.setPositionByOrigin(e,"center","center"),this.renderAll(),this},toDatalessJSON:function(t){return this.toDatalessObject(t)},toObject:function(t){return this._toObjectMethod("toObject",t)},toDatalessObject:function(t){return this._toObjectMethod("toDatalessObject",t)},_toObjectMethod:function(e,i){var r={objects:this._toObjects(e,i)};return t(r,this.__serializeBgOverlay()),fabric.util.populateWithProperties(this,r,i),
r},_toObjects:function(t,e){return this.getObjects().filter(function(t){return!t.excludeFromExport}).map(function(i){return this._toObject(i,t,e)},this)},_toObject:function(t,e,i){var r;this.includeDefaultValues||(r=t.includeDefaultValues,t.includeDefaultValues=!1);var n=this._realizeGroupTransformOnObject(t),s=t[e](i);return this.includeDefaultValues||(t.includeDefaultValues=r),this._unwindGroupTransformOnObject(t,n),s},_realizeGroupTransformOnObject:function(t){var e=["angle","flipX","flipY","height","left","scaleX","scaleY","top","width"];if(t.group&&t.group===this.getActiveGroup()){var i={};return e.forEach(function(e){i[e]=t[e]}),this.getActiveGroup().realizeTransform(t),i}return null},_unwindGroupTransformOnObject:function(t,e){e&&t.set(e)},__serializeBgOverlay:function(){var t={background:this.backgroundColor&&this.backgroundColor.toObject?this.backgroundColor.toObject():this.backgroundColor};return this.overlayColor&&(t.overlay=this.overlayColor.toObject?this.overlayColor.toObject():this.overlayColor),this.backgroundImage&&(t.backgroundImage=this.backgroundImage.toObject()),this.overlayImage&&(t.overlayImage=this.overlayImage.toObject()),t},svgViewportTransformation:!0,toSVG:function(t,e){t||(t={});var i=[];return this._setSVGPreamble(i,t),this._setSVGHeader(i,t),this._setSVGBgOverlayColor(i,"backgroundColor"),this._setSVGBgOverlayImage(i,"backgroundImage",e),this._setSVGObjects(i,e),this._setSVGBgOverlayColor(i,"overlayColor"),this._setSVGBgOverlayImage(i,"overlayImage",e),i.push("</svg>"),i.join("")},_setSVGPreamble:function(t,e){e.suppressPreamble||t.push('<?xml version="1.0" encoding="',e.encoding||"UTF-8",'" standalone="no" ?>\n','<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" ','"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')},_setSVGHeader:function(t,e){var i,n=e.width||this.width,s=e.height||this.height,o='viewBox="0 0 '+this.width+" "+this.height+'" ',a=fabric.Object.NUM_FRACTION_DIGITS;e.viewBox?o='viewBox="'+e.viewBox.x+" "+e.viewBox.y+" "+e.viewBox.width+" "+e.viewBox.height+'" ':this.svgViewportTransformation&&(i=this.viewportTransform,o='viewBox="'+r(-i[4]/i[0],a)+" "+r(-i[5]/i[3],a)+" "+r(this.width/i[0],a)+" "+r(this.height/i[3],a)+'" '),t.push("<svg ",'xmlns="http://www.w3.org/2000/svg" ','xmlns:xlink="http://www.w3.org/1999/xlink" ','version="1.1" ','width="',n,'" ','height="',s,'" ',this.backgroundColor&&!this.backgroundColor.toLive?'style="background-color: '+this.backgroundColor+'" ':null,o,'xml:space="preserve">\n',"<desc>Created with Fabric.js ",fabric.version,"</desc>\n","<defs>",fabric.createSVGFontFacesMarkup(this.getObjects()),fabric.createSVGRefElementsMarkup(this),"</defs>\n")},_setSVGObjects:function(t,e){for(var i,r,n=0,s=this.getObjects(),o=s.length;n<o;n++)i=s[n],i.excludeFromExport||(r=this._realizeGroupTransformOnObject(i),t.push(i.toSVG(e)),this._unwindGroupTransformOnObject(i,r))},_setSVGBgOverlayImage:function(t,e,i){this[e]&&this[e].toSVG&&t.push(this[e].toSVG(i))},_setSVGBgOverlayColor:function(t,e){this[e]&&this[e].source?t.push('<rect x="',this[e].offsetX,'" y="',this[e].offsetY,'" ','width="',"repeat-y"===this[e].repeat||"no-repeat"===this[e].repeat?this[e].source.width:this.width,'" height="',"repeat-x"===this[e].repeat||"no-repeat"===this[e].repeat?this[e].source.height:this.height,'" fill="url(#'+e+'Pattern)"',"></rect>\n"):this[e]&&"overlayColor"===e&&t.push('<rect x="0" y="0" ','width="',this.width,'" height="',this.height,'" fill="',this[e],'"',"></rect>\n")},sendToBack:function(t){if(!t)return this;var e,r,n,s=this.getActiveGroup?this.getActiveGroup():null;if(t===s)for(n=s._objects,e=n.length;e--;)r=n[e],i(this._objects,r),this._objects.unshift(r);else i(this._objects,t),this._objects.unshift(t);return this.renderAll&&this.renderAll()},bringToFront:function(t){if(!t)return this;var e,r,n,s=this.getActiveGroup?this.getActiveGroup():null;if(t===s)for(n=s._objects,e=0;e<n.length;e++)r=n[e],i(this._objects,r),this._objects.push(r);else i(this._objects,t),this._objects.push(t);return this.renderAll&&this.renderAll()},sendBackwards:function(t,e){if(!t)return this;var r,n,s,o,a,h=this.getActiveGroup?this.getActiveGroup():null;if(t===h)for(a=h._objects,r=0;r<a.length;r++)n=a[r],s=this._objects.indexOf(n),0!==s&&(o=s-1,i(this._objects,n),this._objects.splice(o,0,n));else s=this._objects.indexOf(t),0!==s&&(o=this._findNewLowerIndex(t,s,e),i(this._objects,t),this._objects.splice(o,0,t));return this.renderAll&&this.renderAll(),this},_findNewLowerIndex:function(t,e,i){var r;if(i){r=e;for(var n=e-1;n>=0;--n){var s=t.intersectsWithObject(this._objects[n])||t.isContainedWithinObject(this._objects[n])||this._objects[n].isContainedWithinObject(t);if(s){r=n;break}}}else r=e-1;return r},bringForward:function(t,e){if(!t)return this;var r,n,s,o,a,h=this.getActiveGroup?this.getActiveGroup():null;if(t===h)for(a=h._objects,r=a.length;r--;)n=a[r],s=this._objects.indexOf(n),s!==this._objects.length-1&&(o=s+1,i(this._objects,n),this._objects.splice(o,0,n));else s=this._objects.indexOf(t),s!==this._objects.length-1&&(o=this._findNewUpperIndex(t,s,e),i(this._objects,t),this._objects.splice(o,0,t));return this.renderAll&&this.renderAll(),this},_findNewUpperIndex:function(t,e,i){var r;if(i){r=e;for(var n=e+1;n<this._objects.length;++n){var s=t.intersectsWithObject(this._objects[n])||t.isContainedWithinObject(this._objects[n])||this._objects[n].isContainedWithinObject(t);if(s){r=n;break}}}else r=e+1;return r},moveTo:function(t,e){return i(this._objects,t),this._objects.splice(e,0,t),this.renderAll&&this.renderAll()},dispose:function(){return this.clear(),this},toString:function(){return"#<fabric.Canvas ("+this.complexity()+"): { objects: "+this.getObjects().length+" }>"}}),t(fabric.StaticCanvas.prototype,fabric.Observable),t(fabric.StaticCanvas.prototype,fabric.Collection),t(fabric.StaticCanvas.prototype,fabric.DataURLExporter),t(fabric.StaticCanvas,{EMPTY_JSON:'{"objects": [], "background": "white"}',supports:function(t){var e=fabric.util.createCanvasElement();if(!e||!e.getContext)return null;var i=e.getContext("2d");if(!i)return null;switch(t){case"getImageData":return"undefined"!=typeof i.getImageData;case"setLineDash":return"undefined"!=typeof i.setLineDash;case"toDataURL":return"undefined"!=typeof e.toDataURL;case"toDataURLWithQuality":try{return e.toDataURL("image/jpeg",0),!0}catch(t){}return!1;default:return null}}}),fabric.StaticCanvas.prototype.toJSON=fabric.StaticCanvas.prototype.toObject}(),fabric.BaseBrush=fabric.util.createClass({color:"rgb(0, 0, 0)",width:1,shadow:null,strokeLineCap:"round",strokeLineJoin:"round",strokeDashArray:null,setShadow:function(t){return this.shadow=new fabric.Shadow(t),this},_setBrushStyles:function(){var t=this.canvas.contextTop;t.strokeStyle=this.color,t.lineWidth=this.width,t.lineCap=this.strokeLineCap,t.lineJoin=this.strokeLineJoin,this.strokeDashArray&&fabric.StaticCanvas.supports("setLineDash")&&t.setLineDash(this.strokeDashArray)},_setShadow:function(){if(this.shadow){var t=this.canvas.contextTop;t.shadowColor=this.shadow.color,t.shadowBlur=this.shadow.blur,t.shadowOffsetX=this.shadow.offsetX,t.shadowOffsetY=this.shadow.offsetY}},_resetShadow:function(){var t=this.canvas.contextTop;t.shadowColor="",t.shadowBlur=t.shadowOffsetX=t.shadowOffsetY=0}}),function(){fabric.PencilBrush=fabric.util.createClass(fabric.BaseBrush,{initialize:function(t){this.canvas=t,this._points=[]},onMouseDown:function(t){this._prepareForDrawing(t),this._captureDrawingPath(t),this._render()},onMouseMove:function(t){this._captureDrawingPath(t),this.canvas.clearContext(this.canvas.contextTop),this._render()},onMouseUp:function(){this._finalizeAndAddPath()},_prepareForDrawing:function(t){var e=new fabric.Point(t.x,t.y);this._reset(),this._addPoint(e),this.canvas.contextTop.moveTo(e.x,e.y)},_addPoint:function(t){this._points.push(t)},_reset:function(){this._points.length=0,this._setBrushStyles(),this._setShadow()},_captureDrawingPath:function(t){var e=new fabric.Point(t.x,t.y);this._addPoint(e)},_render:function(){var t=this.canvas.contextTop,e=this.canvas.viewportTransform,i=this._points[0],r=this._points[1];t.save(),t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t.beginPath(),2===this._points.length&&i.x===r.x&&i.y===r.y&&(i.x-=.5,r.x+=.5),t.moveTo(i.x,i.y);for(var n=1,s=this._points.length;n<s;n++){var o=i.midPointFrom(r);t.quadraticCurveTo(i.x,i.y,o.x,o.y),i=this._points[n],r=this._points[n+1]}t.lineTo(i.x,i.y),t.stroke(),t.restore()},convertPointsToSVGPath:function(t){var e=[],i=new fabric.Point(t[0].x,t[0].y),r=new fabric.Point(t[1].x,t[1].y);e.push("M ",t[0].x," ",t[0].y," ");for(var n=1,s=t.length;n<s;n++){var o=i.midPointFrom(r);e.push("Q ",i.x," ",i.y," ",o.x," ",o.y," "),i=new fabric.Point(t[n].x,t[n].y),n+1<t.length&&(r=new fabric.Point(t[n+1].x,t[n+1].y))}return e.push("L ",i.x," ",i.y," "),e},createPath:function(t){var e=new fabric.Path(t,{fill:null,stroke:this.color,strokeWidth:this.width,strokeLineCap:this.strokeLineCap,strokeLineJoin:this.strokeLineJoin,strokeDashArray:this.strokeDashArray,originX:"center",originY:"center"});return this.shadow&&(this.shadow.affectStroke=!0,e.setShadow(this.shadow)),e},_finalizeAndAddPath:function(){var t=this.canvas.contextTop;t.closePath();var e=this.convertPointsToSVGPath(this._points).join("");if("M 0 0 Q 0 0 0 0 L 0 0"===e)return void this.canvas.renderAll();var i=this.createPath(e);this.canvas.add(i),i.setCoords(),this.canvas.clearContext(this.canvas.contextTop),this._resetShadow(),this.canvas.renderAll(),this.canvas.fire("path:created",{path:i})}})}(),fabric.CircleBrush=fabric.util.createClass(fabric.BaseBrush,{width:10,initialize:function(t){this.canvas=t,this.points=[]},drawDot:function(t){var e=this.addPoint(t),i=this.canvas.contextTop,r=this.canvas.viewportTransform;i.save(),i.transform(r[0],r[1],r[2],r[3],r[4],r[5]),i.fillStyle=e.fill,i.beginPath(),i.arc(e.x,e.y,e.radius,0,2*Math.PI,!1),i.closePath(),i.fill(),i.restore()},onMouseDown:function(t){this.points.length=0,this.canvas.clearContext(this.canvas.contextTop),this._setShadow(),this.drawDot(t)},onMouseMove:function(t){this.drawDot(t)},onMouseUp:function(){var t=this.canvas.renderOnAddRemove;this.canvas.renderOnAddRemove=!1;for(var e=[],i=0,r=this.points.length;i<r;i++){var n=this.points[i],s=new fabric.Circle({radius:n.radius,left:n.x,top:n.y,originX:"center",originY:"center",fill:n.fill});this.shadow&&s.setShadow(this.shadow),e.push(s)}var o=new fabric.Group(e,{originX:"center",originY:"center"});o.canvas=this.canvas,this.canvas.add(o),this.canvas.fire("path:created",{path:o}),this.canvas.clearContext(this.canvas.contextTop),this._resetShadow(),this.canvas.renderOnAddRemove=t,this.canvas.renderAll()},addPoint:function(t){var e=new fabric.Point(t.x,t.y),i=fabric.util.getRandomInt(Math.max(0,this.width-20),this.width+20)/2,r=new fabric.Color(this.color).setAlpha(fabric.util.getRandomInt(0,100)/100).toRgba();return e.radius=i,e.fill=r,this.points.push(e),e}}),fabric.SprayBrush=fabric.util.createClass(fabric.BaseBrush,{width:10,density:20,dotWidth:1,dotWidthVariance:1,randomOpacity:!1,optimizeOverlapping:!0,initialize:function(t){this.canvas=t,this.sprayChunks=[]},onMouseDown:function(t){this.sprayChunks.length=0,this.canvas.clearContext(this.canvas.contextTop),this._setShadow(),this.addSprayChunk(t),this.render()},onMouseMove:function(t){this.addSprayChunk(t),this.render()},onMouseUp:function(){var t=this.canvas.renderOnAddRemove;this.canvas.renderOnAddRemove=!1;for(var e=[],i=0,r=this.sprayChunks.length;i<r;i++)for(var n=this.sprayChunks[i],s=0,o=n.length;s<o;s++){var a=new fabric.Rect({width:n[s].width,height:n[s].width,left:n[s].x+1,top:n[s].y+1,originX:"center",originY:"center",fill:this.color});this.shadow&&a.setShadow(this.shadow),e.push(a)}this.optimizeOverlapping&&(e=this._getOptimizedRects(e));var h=new fabric.Group(e,{originX:"center",originY:"center"});h.canvas=this.canvas,this.canvas.add(h),this.canvas.fire("path:created",{path:h}),this.canvas.clearContext(this.canvas.contextTop),this._resetShadow(),this.canvas.renderOnAddRemove=t,this.canvas.renderAll()},_getOptimizedRects:function(t){for(var e,i={},r=0,n=t.length;r<n;r++)e=t[r].left+""+t[r].top,i[e]||(i[e]=t[r]);var s=[];for(e in i)s.push(i[e]);return s},render:function(){var t=this.canvas.contextTop;t.fillStyle=this.color;var e=this.canvas.viewportTransform;t.save(),t.transform(e[0],e[1],e[2],e[3],e[4],e[5]);for(var i=0,r=this.sprayChunkPoints.length;i<r;i++){var n=this.sprayChunkPoints[i];"undefined"!=typeof n.opacity&&(t.globalAlpha=n.opacity),t.fillRect(n.x,n.y,n.width,n.width)}t.restore()},addSprayChunk:function(t){this.sprayChunkPoints=[];for(var e,i,r,n=this.width/2,s=0;s<this.density;s++){e=fabric.util.getRandomInt(t.x-n,t.x+n),i=fabric.util.getRandomInt(t.y-n,t.y+n),r=this.dotWidthVariance?fabric.util.getRandomInt(Math.max(1,this.dotWidth-this.dotWidthVariance),this.dotWidth+this.dotWidthVariance):this.dotWidth;var o=new fabric.Point(e,i);o.width=r,this.randomOpacity&&(o.opacity=fabric.util.getRandomInt(0,100)/100),this.sprayChunkPoints.push(o)}this.sprayChunks.push(this.sprayChunkPoints)}}),fabric.PatternBrush=fabric.util.createClass(fabric.PencilBrush,{getPatternSrc:function(){var t=20,e=5,i=fabric.document.createElement("canvas"),r=i.getContext("2d");return i.width=i.height=t+e,r.fillStyle=this.color,r.beginPath(),r.arc(t/2,t/2,t/2,0,2*Math.PI,!1),r.closePath(),r.fill(),i},getPatternSrcFunction:function(){return String(this.getPatternSrc).replace("this.color",'"'+this.color+'"')},getPattern:function(){return this.canvas.contextTop.createPattern(this.source||this.getPatternSrc(),"repeat")},_setBrushStyles:function(){this.callSuper("_setBrushStyles"),this.canvas.contextTop.strokeStyle=this.getPattern()},createPath:function(t){var e=this.callSuper("createPath",t),i=e._getLeftTopCoords().scalarAdd(e.strokeWidth/2);return e.stroke=new fabric.Pattern({source:this.source||this.getPatternSrcFunction(),offsetX:-i.x,offsetY:-i.y}),e}}),function(){var t=fabric.util.getPointer,e=fabric.util.degreesToRadians,i=fabric.util.radiansToDegrees,r=Math.atan2,n=Math.abs,s=.5;fabric.Canvas=fabric.util.createClass(fabric.StaticCanvas,{initialize:function(t,e){e||(e={}),this._initStatic(t,e),this._initInteractive(),this._createCacheCanvas()},uniScaleTransform:!1,uniScaleKey:"shiftKey",centeredScaling:!1,centeredRotation:!1,centeredKey:"altKey",altActionKey:"shiftKey",interactive:!0,selection:!0,selectionKey:"shiftKey",selectionColor:"rgba(100, 100, 255, 0.3)",selectionDashArray:[],selectionBorderColor:"rgba(255, 255, 255, 0.3)",selectionLineWidth:1,hoverCursor:"move",moveCursor:"move",defaultCursor:"default",freeDrawingCursor:"crosshair",rotationCursor:"crosshair",containerClass:"canvas-container",perPixelTargetFind:!1,targetFindTolerance:0,skipTargetFind:!1,isDrawingMode:!1,preserveObjectStacking:!1,_initInteractive:function(){this._currentTransform=null,this._groupSelector=null,this._initWrapperElement(),this._createUpperCanvas(),this._initEventListeners(),this._initRetinaScaling(),this.freeDrawingBrush=fabric.PencilBrush&&new fabric.PencilBrush(this),this.calcOffset()},_chooseObjectsToRender:function(){var t,e=this.getActiveGroup(),i=this.getActiveObject(),r=[],n=[];if(!e&&!i||this.preserveObjectStacking)r=this._objects;else{for(var s=0,o=this._objects.length;s<o;s++)t=this._objects[s],e&&e.contains(t)||t===i?n.push(t):r.push(t);e&&(e._set("_objects",n),r.push(e)),i&&r.push(i)}return r},renderAll:function(){!this.selection||this._groupSelector||this.isDrawingMode||this.clearContext(this.contextTop);var t=this.contextContainer;return this.renderCanvas(t,this._chooseObjectsToRender()),this},renderTop:function(){var t=this.contextTop;return this.clearContext(t),this.selection&&this._groupSelector&&this._drawSelection(t),this.fire("after:render"),this},_resetCurrentTransform:function(){var t=this._currentTransform;t.target.set({scaleX:t.original.scaleX,scaleY:t.original.scaleY,skewX:t.original.skewX,skewY:t.original.skewY,left:t.original.left,top:t.original.top}),this._shouldCenterTransform(t.target)?"rotate"===t.action?this._setOriginToCenter(t.target):("center"!==t.originX&&("right"===t.originX?t.mouseXSign=-1:t.mouseXSign=1),"center"!==t.originY&&("bottom"===t.originY?t.mouseYSign=-1:t.mouseYSign=1),t.originX="center",t.originY="center"):(t.originX=t.original.originX,t.originY=t.original.originY)},containsPoint:function(t,e,i){var r,n=!0,s=i||this.getPointer(t,n);return r=e.group&&e.group===this.getActiveGroup()?this._normalizePointer(e.group,s):{x:s.x,y:s.y},e.containsPoint(r)||e._findTargetCorner(s)},_normalizePointer:function(t,e){var i=t.calcTransformMatrix(),r=fabric.util.invertTransform(i),n=this.viewportTransform,s=this.restorePointerVpt(e),o=fabric.util.transformPoint(s,r);return fabric.util.transformPoint(o,n)},isTargetTransparent:function(t,e,i){var r=t.hasBorders,n=t.transparentCorners,s=this.contextCache,o=t.selectionBackgroundColor;t.hasBorders=t.transparentCorners=!1,t.selectionBackgroundColor="",s.save(),s.transform.apply(s,this.viewportTransform),t.render(s),s.restore(),t.active&&t._renderControls(s),t.hasBorders=r,t.transparentCorners=n,t.selectionBackgroundColor=o;var a=fabric.util.isTransparent(s,e,i,this.targetFindTolerance);return this.clearContext(s),a},_shouldClearSelection:function(t,e){var i=this.getActiveGroup(),r=this.getActiveObject();return!e||e&&i&&!i.contains(e)&&i!==e&&!t[this.selectionKey]||e&&!e.evented||e&&!e.selectable&&r&&r!==e},_shouldCenterTransform:function(t){if(t){var e,i=this._currentTransform;return"scale"===i.action||"scaleX"===i.action||"scaleY"===i.action?e=this.centeredScaling||t.centeredScaling:"rotate"===i.action&&(e=this.centeredRotation||t.centeredRotation),e?!i.altKey:i.altKey}},_getOriginFromCorner:function(t,e){var i={x:t.originX,y:t.originY};return"ml"===e||"tl"===e||"bl"===e?i.x="right":"mr"!==e&&"tr"!==e&&"br"!==e||(i.x="left"),"tl"===e||"mt"===e||"tr"===e?i.y="bottom":"bl"!==e&&"mb"!==e&&"br"!==e||(i.y="top"),i},_getActionFromCorner:function(t,e,i){if(!e)return"drag";switch(e){case"mtr":return"rotate";case"ml":case"mr":return i[this.altActionKey]?"skewY":"scaleX";case"mt":case"mb":return i[this.altActionKey]?"skewX":"scaleY";default:return"scale"}},_setupCurrentTransform:function(t,i){if(i){var r=this.getPointer(t),n=i._findTargetCorner(this.getPointer(t,!0)),s=this._getActionFromCorner(i,n,t),o=this._getOriginFromCorner(i,n);this._currentTransform={target:i,action:s,corner:n,scaleX:i.scaleX,scaleY:i.scaleY,skewX:i.skewX,skewY:i.skewY,offsetX:r.x-i.left,offsetY:r.y-i.top,originX:o.x,originY:o.y,ex:r.x,ey:r.y,lastX:r.x,lastY:r.y,left:i.left,top:i.top,theta:e(i.angle),width:i.width*i.scaleX,mouseXSign:1,mouseYSign:1,shiftKey:t.shiftKey,altKey:t[this.centeredKey]},this._currentTransform.original={left:i.left,top:i.top,scaleX:i.scaleX,scaleY:i.scaleY,skewX:i.skewX,skewY:i.skewY,originX:o.x,originY:o.y},this._resetCurrentTransform()}},_translateObject:function(t,e){var i=this._currentTransform,r=i.target,n=t-i.offsetX,s=e-i.offsetY,o=!r.get("lockMovementX")&&r.left!==n,a=!r.get("lockMovementY")&&r.top!==s;return o&&r.set("left",n),a&&r.set("top",s),o||a},_changeSkewTransformOrigin:function(t,e,i){var r="originX",n={0:"center"},s=e.target.skewX,o="left",a="right",h="mt"===e.corner||"ml"===e.corner?1:-1,c=1;t=t>0?1:-1,"y"===i&&(s=e.target.skewY,o="top",a="bottom",r="originY"),n[-1]=o,n[1]=a,e.target.flipX&&(c*=-1),e.target.flipY&&(c*=-1),0===s?(e.skewSign=-h*t*c,e[r]=n[-t]):(s=s>0?1:-1,e.skewSign=s,e[r]=n[s*h*c])},_skewObject:function(t,e,i){var r=this._currentTransform,n=r.target,s=!1,o=n.get("lockSkewingX"),a=n.get("lockSkewingY");if(o&&"x"===i||a&&"y"===i)return!1;var h,c,l=n.getCenterPoint(),u=n.toLocalPoint(new fabric.Point(t,e),"center","center")[i],f=n.toLocalPoint(new fabric.Point(r.lastX,r.lastY),"center","center")[i],d=n._getTransformedDimensions();return this._changeSkewTransformOrigin(u-f,r,i),h=n.toLocalPoint(new fabric.Point(t,e),r.originX,r.originY)[i],c=n.translateToOriginPoint(l,r.originX,r.originY),s=this._setObjectSkew(h,r,i,d),r.lastX=t,r.lastY=e,n.setPositionByOrigin(c,r.originX,r.originY),s},_setObjectSkew:function(t,e,i,r){var n,s,o,a,h,c,l,u,f,d=e.target,g=!1,p=e.skewSign;return"x"===i?(a="y",h="Y",c="X",u=0,f=d.skewY):(a="x",h="X",c="Y",u=d.skewX,f=0),o=d._getTransformedDimensions(u,f),l=2*Math.abs(t)-o[i],l<=2?n=0:(n=p*Math.atan(l/d["scale"+c]/(o[a]/d["scale"+h])),n=fabric.util.radiansToDegrees(n)),g=d["skew"+c]!==n,d.set("skew"+c,n),0!==d["skew"+h]&&(s=d._getTransformedDimensions(),n=r[a]/s[a]*d["scale"+h],d.set("scale"+h,n)),g},_scaleObject:function(t,e,i){var r=this._currentTransform,n=r.target,s=n.get("lockScalingX"),o=n.get("lockScalingY"),a=n.get("lockScalingFlip");if(s&&o)return!1;var h=n.translateToOriginPoint(n.getCenterPoint(),r.originX,r.originY),c=n.toLocalPoint(new fabric.Point(t,e),r.originX,r.originY),l=n._getTransformedDimensions(),u=!1;return this._setLocalMouse(c,r),u=this._setObjectScale(c,r,s,o,i,a,l),n.setPositionByOrigin(h,r.originX,r.originY),u},_setObjectScale:function(t,e,i,r,n,s,o){var a,h,c,l,u=e.target,f=!1,d=!1,g=!1;return c=t.x*u.scaleX/o.x,l=t.y*u.scaleY/o.y,a=u.scaleX!==c,h=u.scaleY!==l,s&&c<=0&&c<u.scaleX&&(f=!0),s&&l<=0&&l<u.scaleY&&(d=!0),"equally"!==n||i||r?n?"x"!==n||u.get("lockUniScaling")?"y"!==n||u.get("lockUniScaling")||d||r||u.set("scaleY",l)&&(g=g||h):f||i||u.set("scaleX",c)&&(g=g||a):(f||i||u.set("scaleX",c)&&(g=g||a),d||r||u.set("scaleY",l)&&(g=g||h)):f||d||(g=this._scaleObjectEqually(t,u,e,o)),e.newScaleX=c,e.newScaleY=l,f||d||this._flipObject(e,n),g},_scaleObjectEqually:function(t,e,i,r){var n,s=t.y+t.x,o=r.y*i.original.scaleY/e.scaleY+r.x*i.original.scaleX/e.scaleX;return i.newScaleX=i.original.scaleX*s/o,i.newScaleY=i.original.scaleY*s/o,n=i.newScaleX!==e.scaleX||i.newScaleY!==e.scaleY,e.set("scaleX",i.newScaleX),e.set("scaleY",i.newScaleY),n},_flipObject:function(t,e){t.newScaleX<0&&"y"!==e&&("left"===t.originX?t.originX="right":"right"===t.originX&&(t.originX="left")),t.newScaleY<0&&"x"!==e&&("top"===t.originY?t.originY="bottom":"bottom"===t.originY&&(t.originY="top"))},_setLocalMouse:function(t,e){var i=e.target;"right"===e.originX?t.x*=-1:"center"===e.originX&&(t.x*=2*e.mouseXSign,t.x<0&&(e.mouseXSign=-e.mouseXSign)),"bottom"===e.originY?t.y*=-1:"center"===e.originY&&(t.y*=2*e.mouseYSign,t.y<0&&(e.mouseYSign=-e.mouseYSign)),n(t.x)>i.padding?t.x<0?t.x+=i.padding:t.x-=i.padding:t.x=0,n(t.y)>i.padding?t.y<0?t.y+=i.padding:t.y-=i.padding:t.y=0},_rotateObject:function(t,e){var n=this._currentTransform;if(n.target.get("lockRotation"))return!1;var s=r(n.ey-n.top,n.ex-n.left),o=r(e-n.top,t-n.left),a=i(o-s+n.theta);return a<0&&(a=360+a),n.target.angle=a%360,!0},setCursor:function(t){this.upperCanvasEl.style.cursor=t},_resetObjectTransform:function(t){t.scaleX=1,t.scaleY=1,t.skewX=0,t.skewY=0,t.setAngle(0)},_drawSelection:function(t){var e=this._groupSelector,i=e.left,r=e.top,o=n(i),a=n(r);if(t.fillStyle=this.selectionColor,t.fillRect(e.ex-(i>0?0:-i),e.ey-(r>0?0:-r),o,a),t.lineWidth=this.selectionLineWidth,t.strokeStyle=this.selectionBorderColor,this.selectionDashArray.length>1){var h=e.ex+s-(i>0?0:o),c=e.ey+s-(r>0?0:a);t.beginPath(),fabric.util.drawDashedLine(t,h,c,h+o,c,this.selectionDashArray),fabric.util.drawDashedLine(t,h,c+a-1,h+o,c+a-1,this.selectionDashArray),fabric.util.drawDashedLine(t,h,c,h,c+a,this.selectionDashArray),fabric.util.drawDashedLine(t,h+o-1,c,h+o-1,c+a,this.selectionDashArray),t.closePath(),t.stroke()}else t.strokeRect(e.ex+s-(i>0?0:o),e.ey+s-(r>0?0:a),o,a)},findTarget:function(t,e){if(!this.skipTargetFind){var i=!0,r=this.getPointer(t,i),n=this.getActiveGroup(),s=this.getActiveObject();if(n&&!e&&this._checkTarget(r,n))return n;if(s&&this._checkTarget(r,s))return s;this.targets=[];var o=this._searchPossibleTargets(this._objects,r);return this._fireOverOutEvents(o,t),o}},_fireOverOutEvents:function(t,e){t?this._hoveredTarget!==t&&(this._hoveredTarget&&(this.fire("mouse:out",{target:this._hoveredTarget,e:e}),this._hoveredTarget.fire("mouseout")),this.fire("mouse:over",{target:t,e:e}),t.fire("mouseover"),this._hoveredTarget=t):this._hoveredTarget&&(this.fire("mouse:out",{target:this._hoveredTarget,e:e}),this._hoveredTarget.fire("mouseout"),this._hoveredTarget=null)},_checkTarget:function(t,e){if(e&&e.visible&&e.evented&&this.containsPoint(null,e,t)){if(!this.perPixelTargetFind&&!e.perPixelTargetFind||e.isEditing)return!0;var i=this.isTargetTransparent(e,t.x,t.y);if(!i)return!0}},_searchPossibleTargets:function(t,e){for(var i,r,n,s=t.length;s--;)if(this._checkTarget(e,t[s])){i=t[s],"group"===i.type&&i.subTargetCheck&&(r=this._normalizePointer(i,e),n=this._searchPossibleTargets(i._objects,r),n&&this.targets.push(n));break}return i},restorePointerVpt:function(t){return fabric.util.transformPoint(t,fabric.util.invertTransform(this.viewportTransform))},getPointer:function(e,i,r){r||(r=this.upperCanvasEl);var n,s=t(e),o=r.getBoundingClientRect(),a=o.width||0,h=o.height||0;return a&&h||("top"in o&&"bottom"in o&&(h=Math.abs(o.top-o.bottom)),"right"in o&&"left"in o&&(a=Math.abs(o.right-o.left))),this.calcOffset(),s.x=s.x-this._offset.left,s.y=s.y-this._offset.top,i||(s=this.restorePointerVpt(s)),n=0===a||0===h?{width:1,height:1}:{width:r.width/a,height:r.height/h},{x:s.x*n.width,y:s.y*n.height}},_createUpperCanvas:function(){var t=this.lowerCanvasEl.className.replace(/\s*lower-canvas\s*/,"");this.upperCanvasEl=this._createCanvasElement(),fabric.util.addClass(this.upperCanvasEl,"upper-canvas "+t),this.wrapperEl.appendChild(this.upperCanvasEl),this._copyCanvasStyle(this.lowerCanvasEl,this.upperCanvasEl),this._applyCanvasStyle(this.upperCanvasEl),this.contextTop=this.upperCanvasEl.getContext("2d")},_createCacheCanvas:function(){this.cacheCanvasEl=this._createCanvasElement(),this.cacheCanvasEl.setAttribute("width",this.width),this.cacheCanvasEl.setAttribute("height",this.height),this.contextCache=this.cacheCanvasEl.getContext("2d")},_initWrapperElement:function(){this.wrapperEl=fabric.util.wrapElement(this.lowerCanvasEl,"div",{class:this.containerClass}),fabric.util.setStyle(this.wrapperEl,{width:this.getWidth()+"px",height:this.getHeight()+"px",position:"relative"}),fabric.util.makeElementUnselectable(this.wrapperEl)},_applyCanvasStyle:function(t){var e=this.getWidth()||t.width,i=this.getHeight()||t.height;fabric.util.setStyle(t,{position:"absolute",width:e+"px",height:i+"px",left:0,top:0}),t.width=e,t.height=i,fabric.util.makeElementUnselectable(t)},_copyCanvasStyle:function(t,e){e.style.cssText=t.style.cssText},getSelectionContext:function(){return this.contextTop},getSelectionElement:function(){return this.upperCanvasEl},_setActiveObject:function(t){this._activeObject&&this._activeObject.set("active",!1),this._activeObject=t,t.set("active",!0)},setActiveObject:function(t,e){return this._setActiveObject(t),this.renderAll(),this.fire("object:selected",{target:t,e:e}),t.fire("selected",{e:e}),this},getActiveObject:function(){return this._activeObject},_onObjectRemoved:function(t){this.getActiveObject()===t&&(this.fire("before:selection:cleared",{target:t}),this._discardActiveObject(),this.fire("selection:cleared",{target:t}),t.fire("deselected")),this.callSuper("_onObjectRemoved",t)},_discardActiveObject:function(){this._activeObject&&this._activeObject.set("active",!1),this._activeObject=null},discardActiveObject:function(t){var e=this._activeObject;return this.fire("before:selection:cleared",{target:e,e:t}),this._discardActiveObject(),this.fire("selection:cleared",{e:t}),e&&e.fire("deselected",{e:t}),this},_setActiveGroup:function(t){this._activeGroup=t,t&&t.set("active",!0)},setActiveGroup:function(t,e){return this._setActiveGroup(t),t&&(this.fire("object:selected",{target:t,e:e}),t.fire("selected",{e:e})),this},getActiveGroup:function(){return this._activeGroup},_discardActiveGroup:function(){var t=this.getActiveGroup();t&&t.destroy(),this.setActiveGroup(null)},discardActiveGroup:function(t){var e=this.getActiveGroup();return this.fire("before:selection:cleared",{e:t,target:e}),this._discardActiveGroup(),this.fire("selection:cleared",{e:t}),this},deactivateAll:function(){for(var t=this.getObjects(),e=0,i=t.length;e<i;e++)t[e].set("active",!1);return this._discardActiveGroup(),this._discardActiveObject(),this},deactivateAllWithDispatch:function(t){var e=this.getActiveGroup(),i=this.getActiveObject();return(i||e)&&this.fire("before:selection:cleared",{target:i||e,e:t}),this.deactivateAll(),(i||e)&&(this.fire("selection:cleared",{e:t,target:i}),i&&i.fire("deselected")),this},dispose:function(){this.callSuper("dispose");var t=this.wrapperEl;return this.removeListeners(),t.removeChild(this.upperCanvasEl),t.removeChild(this.lowerCanvasEl),delete this.upperCanvasEl,t.parentNode&&t.parentNode.replaceChild(this.lowerCanvasEl,this.wrapperEl),delete this.wrapperEl,this},clear:function(){return this.discardActiveGroup(),this.discardActiveObject(),this.clearContext(this.contextTop),this.callSuper("clear")},drawControls:function(t){var e=this.getActiveGroup();e?e._renderControls(t):this._drawObjectsControls(t)},_drawObjectsControls:function(t){for(var e=0,i=this._objects.length;e<i;++e)this._objects[e]&&this._objects[e].active&&this._objects[e]._renderControls(t)}});for(var o in fabric.StaticCanvas)"prototype"!==o&&(fabric.Canvas[o]=fabric.StaticCanvas[o]);fabric.isTouchSupported&&(fabric.Canvas.prototype._setCursorFromEvent=function(){}),fabric.Element=fabric.Canvas}(),function(){var t={mt:0,tr:1,mr:2,br:3,mb:4,bl:5,ml:6,tl:7},e=fabric.util.addListener,i=fabric.util.removeListener;fabric.util.object.extend(fabric.Canvas.prototype,{cursorMap:["n-resize","ne-resize","e-resize","se-resize","s-resize","sw-resize","w-resize","nw-resize"],_initEventListeners:function(){this._bindEvents(),e(fabric.window,"resize",this._onResize),e(this.upperCanvasEl,"mousedown",this._onMouseDown),e(this.upperCanvasEl,"mousemove",this._onMouseMove),e(this.upperCanvasEl,"mouseout",this._onMouseOut),e(this.upperCanvasEl,"wheel",this._onMouseWheel),e(this.upperCanvasEl,"touchstart",this._onMouseDown),e(this.upperCanvasEl,"touchmove",this._onMouseMove),"undefined"!=typeof eventjs&&"add"in eventjs&&(eventjs.add(this.upperCanvasEl,"gesture",this._onGesture),eventjs.add(this.upperCanvasEl,"drag",this._onDrag),eventjs.add(this.upperCanvasEl,"orientation",this._onOrientationChange),eventjs.add(this.upperCanvasEl,"shake",this._onShake),eventjs.add(this.upperCanvasEl,"longpress",this._onLongPress))},_bindEvents:function(){this._onMouseDown=this._onMouseDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),this._onMouseUp=this._onMouseUp.bind(this),this._onResize=this._onResize.bind(this),this._onGesture=this._onGesture.bind(this),this._onDrag=this._onDrag.bind(this),this._onShake=this._onShake.bind(this),this._onLongPress=this._onLongPress.bind(this),this._onOrientationChange=this._onOrientationChange.bind(this),this._onMouseWheel=this._onMouseWheel.bind(this),this._onMouseOut=this._onMouseOut.bind(this)},removeListeners:function(){i(fabric.window,"resize",this._onResize),i(this.upperCanvasEl,"mousedown",this._onMouseDown),i(this.upperCanvasEl,"mousemove",this._onMouseMove),i(this.upperCanvasEl,"mouseout",this._onMouseOut),i(this.upperCanvasEl,"wheel",this._onMouseWheel),i(this.upperCanvasEl,"touchstart",this._onMouseDown),i(this.upperCanvasEl,"touchmove",this._onMouseMove),"undefined"!=typeof eventjs&&"remove"in eventjs&&(eventjs.remove(this.upperCanvasEl,"gesture",this._onGesture),eventjs.remove(this.upperCanvasEl,"drag",this._onDrag),eventjs.remove(this.upperCanvasEl,"orientation",this._onOrientationChange),eventjs.remove(this.upperCanvasEl,"shake",this._onShake),eventjs.remove(this.upperCanvasEl,"longpress",this._onLongPress))},_onGesture:function(t,e){this.__onTransformGesture&&this.__onTransformGesture(t,e)},_onDrag:function(t,e){this.__onDrag&&this.__onDrag(t,e)},_onMouseWheel:function(t){this.__onMouseWheel(t)},_onMouseOut:function(t){var e=this._hoveredTarget;this.fire("mouse:out",{target:e,e:t}),this._hoveredTarget=null,e&&e.fire("mouseout",{e:t})},_onOrientationChange:function(t,e){
this.__onOrientationChange&&this.__onOrientationChange(t,e)},_onShake:function(t,e){this.__onShake&&this.__onShake(t,e)},_onLongPress:function(t,e){this.__onLongPress&&this.__onLongPress(t,e)},_onMouseDown:function(t){this.__onMouseDown(t),e(fabric.document,"touchend",this._onMouseUp),e(fabric.document,"touchmove",this._onMouseMove),i(this.upperCanvasEl,"mousemove",this._onMouseMove),i(this.upperCanvasEl,"touchmove",this._onMouseMove),"touchstart"===t.type?i(this.upperCanvasEl,"mousedown",this._onMouseDown):(e(fabric.document,"mouseup",this._onMouseUp),e(fabric.document,"mousemove",this._onMouseMove))},_onMouseUp:function(t){if(this.__onMouseUp(t),i(fabric.document,"mouseup",this._onMouseUp),i(fabric.document,"touchend",this._onMouseUp),i(fabric.document,"mousemove",this._onMouseMove),i(fabric.document,"touchmove",this._onMouseMove),e(this.upperCanvasEl,"mousemove",this._onMouseMove),e(this.upperCanvasEl,"touchmove",this._onMouseMove),"touchend"===t.type){var r=this;setTimeout(function(){e(r.upperCanvasEl,"mousedown",r._onMouseDown)},400)}},_onMouseMove:function(t){!this.allowTouchScrolling&&t.preventDefault&&t.preventDefault(),this.__onMouseMove(t)},_onResize:function(){this.calcOffset()},_shouldRender:function(t,e){var i=this.getActiveGroup()||this.getActiveObject();return!!(t&&(t.isMoving||t!==i)||!t&&i||!t&&!i&&!this._groupSelector||e&&this._previousPointer&&this.selection&&(e.x!==this._previousPointer.x||e.y!==this._previousPointer.y))},__onMouseUp:function(t){var e,i=!0,r=this._currentTransform,n=this._groupSelector,s=!n||0===n.left&&0===n.top;if(this.isDrawingMode&&this._isCurrentlyDrawing)return void this._onMouseUpInDrawingMode(t);r&&(this._finalizeCurrentTransform(),i=!r.actionPerformed),e=i?this.findTarget(t,!0):r.target;var o=this._shouldRender(e,this.getPointer(t));e||!s?this._maybeGroupObjects(t):(this._groupSelector=null,this._currentTransform=null),e&&(e.isMoving=!1),this._handleCursorAndEvent(t,e,"up"),e&&(e.__corner=0),o&&this.renderAll()},_handleCursorAndEvent:function(t,e,i){this._setCursorFromEvent(t,e),this._handleEvent(t,i,e?e:null)},_handleEvent:function(t,e,i){var r=void 0===typeof i?this.findTarget(t):i,n=this.targets||[],s={e:t,target:r,subTargets:n};this.fire("mouse:"+e,s),r&&r.fire("mouse"+e,s);for(var o=0;o<n.length;o++)n[o].fire("mouse"+e,s)},_finalizeCurrentTransform:function(){var t=this._currentTransform,e=t.target;e._scaling&&(e._scaling=!1),e.setCoords(),this._restoreOriginXY(e),(t.actionPerformed||this.stateful&&e.hasStateChanged())&&(this.fire("object:modified",{target:e}),e.fire("modified"))},_restoreOriginXY:function(t){if(this._previousOriginX&&this._previousOriginY){var e=t.translateToOriginPoint(t.getCenterPoint(),this._previousOriginX,this._previousOriginY);t.originX=this._previousOriginX,t.originY=this._previousOriginY,t.left=e.x,t.top=e.y,this._previousOriginX=null,this._previousOriginY=null}},_onMouseDownInDrawingMode:function(t){this._isCurrentlyDrawing=!0,this.discardActiveObject(t).renderAll(),this.clipTo&&fabric.util.clipContext(this,this.contextTop);var e=this.getPointer(t);this.freeDrawingBrush.onMouseDown(e),this._handleEvent(t,"down")},_onMouseMoveInDrawingMode:function(t){if(this._isCurrentlyDrawing){var e=this.getPointer(t);this.freeDrawingBrush.onMouseMove(e)}this.setCursor(this.freeDrawingCursor),this._handleEvent(t,"move")},_onMouseUpInDrawingMode:function(t){this._isCurrentlyDrawing=!1,this.clipTo&&this.contextTop.restore(),this.freeDrawingBrush.onMouseUp(),this._handleEvent(t,"up")},__onMouseDown:function(t){var e="which"in t?1===t.which:0===t.button;if(e||fabric.isTouchSupported){if(this.isDrawingMode)return void this._onMouseDownInDrawingMode(t);if(!this._currentTransform){var i=this.findTarget(t),r=this.getPointer(t,!0);this._previousPointer=r;var n=this._shouldRender(i,r),s=this._shouldGroup(t,i);this._shouldClearSelection(t,i)?this._clearSelection(t,i,r):s&&(this._handleGrouping(t,i),i=this.getActiveGroup()),i&&(!i.selectable||!i.__corner&&s||(this._beforeTransform(t,i),this._setupCurrentTransform(t,i)),i!==this.getActiveGroup()&&i!==this.getActiveObject()&&(this.deactivateAll(),i.selectable&&this.setActiveObject(i,t))),this._handleEvent(t,"down",i?i:null),n&&this.renderAll()}}},_beforeTransform:function(t,e){this.stateful&&e.saveState(),e._findTargetCorner(this.getPointer(t))&&this.onBeforeScaleRotate(e)},_clearSelection:function(t,e,i){this.deactivateAllWithDispatch(t),e&&e.selectable?this.setActiveObject(e,t):this.selection&&(this._groupSelector={ex:i.x,ey:i.y,top:0,left:0})},_setOriginToCenter:function(t){this._previousOriginX=this._currentTransform.target.originX,this._previousOriginY=this._currentTransform.target.originY;var e=t.getCenterPoint();t.originX="center",t.originY="center",t.left=e.x,t.top=e.y,this._currentTransform.left=t.left,this._currentTransform.top=t.top},_setCenterToOrigin:function(t){var e=t.translateToOriginPoint(t.getCenterPoint(),this._previousOriginX,this._previousOriginY);t.originX=this._previousOriginX,t.originY=this._previousOriginY,t.left=e.x,t.top=e.y,this._previousOriginX=null,this._previousOriginY=null},__onMouseMove:function(t){var e,i;if(this.isDrawingMode)return void this._onMouseMoveInDrawingMode(t);if(!("undefined"!=typeof t.touches&&t.touches.length>1)){var r=this._groupSelector;r?(i=this.getPointer(t,!0),r.left=i.x-r.ex,r.top=i.y-r.ey,this.renderTop()):this._currentTransform?this._transformObject(t):(e=this.findTarget(t),this._setCursorFromEvent(t,e)),this._handleEvent(t,"move",e?e:null)}},__onMouseWheel:function(t){this.fire("mouse:wheel",{e:t})},_transformObject:function(t){var e=this.getPointer(t),i=this._currentTransform;i.reset=!1,i.target.isMoving=!0,this._beforeScaleTransform(t,i),this._performTransformAction(t,i,e),i.actionPerformed&&this.renderAll()},_performTransformAction:function(t,e,i){var r=i.x,n=i.y,s=e.target,o=e.action,a=!1;"rotate"===o?(a=this._rotateObject(r,n))&&this._fire("rotating",s,t):"scale"===o?(a=this._onScale(t,e,r,n))&&this._fire("scaling",s,t):"scaleX"===o?(a=this._scaleObject(r,n,"x"))&&this._fire("scaling",s,t):"scaleY"===o?(a=this._scaleObject(r,n,"y"))&&this._fire("scaling",s,t):"skewX"===o?(a=this._skewObject(r,n,"x"))&&this._fire("skewing",s,t):"skewY"===o?(a=this._skewObject(r,n,"y"))&&this._fire("skewing",s,t):(a=this._translateObject(r,n),a&&(this._fire("moving",s,t),this.setCursor(s.moveCursor||this.moveCursor))),e.actionPerformed=a},_fire:function(t,e,i){this.fire("object:"+t,{target:e,e:i}),e.fire(t,{e:i})},_beforeScaleTransform:function(t,e){if("scale"===e.action||"scaleX"===e.action||"scaleY"===e.action){var i=this._shouldCenterTransform(e.target);(i&&("center"!==e.originX||"center"!==e.originY)||!i&&"center"===e.originX&&"center"===e.originY)&&(this._resetCurrentTransform(),e.reset=!0)}},_onScale:function(t,e,i,r){return!t[this.uniScaleKey]&&!this.uniScaleTransform||e.target.get("lockUniScaling")?(e.reset||"scale"!==e.currentAction||this._resetCurrentTransform(),e.currentAction="scaleEqually",this._scaleObject(i,r,"equally")):(e.currentAction="scale",this._scaleObject(i,r))},_setCursorFromEvent:function(t,e){if(!e)return this.setCursor(this.defaultCursor),!1;var i=e.hoverCursor||this.hoverCursor;if(e.selectable){var r=this.getActiveGroup(),n=e._findTargetCorner&&(!r||!r.contains(e))&&e._findTargetCorner(this.getPointer(t,!0));n?this._setCornerCursor(n,e,t):this.setCursor(i)}else this.setCursor(i);return!0},_setCornerCursor:function(e,i,r){if(e in t)this.setCursor(this._getRotatedCornerCursor(e,i,r));else{if("mtr"!==e||!i.hasRotatingPoint)return this.setCursor(this.defaultCursor),!1;this.setCursor(this.rotationCursor)}},_getRotatedCornerCursor:function(e,i,r){var n=Math.round(i.getAngle()%360/45);return n<0&&(n+=8),n+=t[e],r[this.altActionKey]&&t[e]%2===0&&(n+=2),n%=8,this.cursorMap[n]}})}(),function(){var t=Math.min,e=Math.max;fabric.util.object.extend(fabric.Canvas.prototype,{_shouldGroup:function(t,e){var i=this.getActiveObject();return t[this.selectionKey]&&e&&e.selectable&&(this.getActiveGroup()||i&&i!==e)&&this.selection},_handleGrouping:function(t,e){var i=this.getActiveGroup();(e!==i||(e=this.findTarget(t,!0)))&&(i?this._updateActiveGroup(e,t):this._createActiveGroup(e,t),this._activeGroup&&this._activeGroup.saveCoords())},_updateActiveGroup:function(t,e){var i=this.getActiveGroup();if(i.contains(t)){if(i.removeWithUpdate(t),t.set("active",!1),1===i.size())return this.discardActiveGroup(e),void this.setActiveObject(i.item(0))}else i.addWithUpdate(t);this.fire("selection:created",{target:i,e:e}),i.set("active",!0)},_createActiveGroup:function(t,e){if(this._activeObject&&t!==this._activeObject){var i=this._createGroup(t);i.addWithUpdate(),this.setActiveGroup(i),this._activeObject=null,this.fire("selection:created",{target:i,e:e})}t.set("active",!0)},_createGroup:function(t){var e=this.getObjects(),i=e.indexOf(this._activeObject)<e.indexOf(t),r=i?[this._activeObject,t]:[t,this._activeObject];return this._activeObject.isEditing&&this._activeObject.exitEditing(),new fabric.Group(r,{canvas:this})},_groupSelectedObjects:function(t){var e=this._collectObjects();1===e.length?this.setActiveObject(e[0],t):e.length>1&&(e=new fabric.Group(e.reverse(),{canvas:this}),e.addWithUpdate(),this.setActiveGroup(e,t),e.saveCoords(),this.fire("selection:created",{target:e}),this.renderAll())},_collectObjects:function(){for(var i,r=[],n=this._groupSelector.ex,s=this._groupSelector.ey,o=n+this._groupSelector.left,a=s+this._groupSelector.top,h=new fabric.Point(t(n,o),t(s,a)),c=new fabric.Point(e(n,o),e(s,a)),l=n===o&&s===a,u=this._objects.length;u--&&(i=this._objects[u],!(i&&i.selectable&&i.visible&&(i.intersectsWithRect(h,c)||i.isContainedWithinRect(h,c)||i.containsPoint(h)||i.containsPoint(c))&&(i.set("active",!0),r.push(i),l))););return r},_maybeGroupObjects:function(t){this.selection&&this._groupSelector&&this._groupSelectedObjects(t);var e=this.getActiveGroup();e&&(e.setObjectsCoords().setCoords(),e.isMoving=!1,this.setCursor(this.defaultCursor)),this._groupSelector=null,this._currentTransform=null}})}(),fabric.util.object.extend(fabric.StaticCanvas.prototype,{toDataURL:function(t){t||(t={});var e=t.format||"png",i=t.quality||1,r=t.multiplier||1,n={left:t.left,top:t.top,width:t.width,height:t.height};return this._isRetinaScaling()&&(r*=fabric.devicePixelRatio),1!==r?this.__toDataURLWithMultiplier(e,i,n,r):this.__toDataURL(e,i,n)},__toDataURL:function(t,e,i){this.renderAll();var r=this.contextContainer.canvas,n=this.__getCroppedCanvas(r,i);"jpg"===t&&(t="jpeg");var s=fabric.StaticCanvas.supports("toDataURLWithQuality")?(n||r).toDataURL("image/"+t,e):(n||r).toDataURL("image/"+t);return n&&(n=null),s},__getCroppedCanvas:function(t,e){var i,r,n="left"in e||"top"in e||"width"in e||"height"in e;return n&&(i=fabric.util.createCanvasElement(),r=i.getContext("2d"),i.width=e.width||this.width,i.height=e.height||this.height,r.drawImage(t,-e.left||0,-e.top||0)),i},__toDataURLWithMultiplier:function(t,e,i,r){var n=this.getWidth(),s=this.getHeight(),o=n*r,a=s*r,h=this.getActiveObject(),c=this.getActiveGroup(),l=this.getZoom(),u=l*r/fabric.devicePixelRatio;r>1&&this.setDimensions({width:o,height:a}),this.setZoom(u),i.left&&(i.left*=r),i.top&&(i.top*=r),i.width?i.width*=r:r<1&&(i.width=o),i.height?i.height*=r:r<1&&(i.height=a),c?this._tempRemoveBordersControlsFromGroup(c):h&&this.deactivateAll&&this.deactivateAll();var f=this.__toDataURL(t,e,i);return c?this._restoreBordersControlsOnGroup(c):h&&this.setActiveObject&&this.setActiveObject(h),this.setZoom(l),this.setDimensions({width:n,height:s}),f},toDataURLWithMultiplier:function(t,e,i){return this.toDataURL({format:t,multiplier:e,quality:i})},_tempRemoveBordersControlsFromGroup:function(t){t.origHasControls=t.hasControls,t.origBorderColor=t.borderColor,t.hasControls=!0,t.borderColor="rgba(0,0,0,0)",t.forEachObject(function(t){t.origBorderColor=t.borderColor,t.borderColor="rgba(0,0,0,0)"})},_restoreBordersControlsOnGroup:function(t){t.hideControls=t.origHideControls,t.borderColor=t.origBorderColor,t.forEachObject(function(t){t.borderColor=t.origBorderColor,delete t.origBorderColor})}}),fabric.util.object.extend(fabric.StaticCanvas.prototype,{loadFromDatalessJSON:function(t,e,i){return this.loadFromJSON(t,e,i)},loadFromJSON:function(t,e,i){if(t){var r="string"==typeof t?JSON.parse(t):fabric.util.object.clone(t);this.clear();var n=this;return this._enlivenObjects(r.objects,function(){n._setBgOverlay(r,function(){delete r.objects,delete r.backgroundImage,delete r.overlayImage,delete r.background,delete r.overlay;for(var t in r)n[t]=r[t];e&&e()})},i),this}},_setBgOverlay:function(t,e){var i=this,r={backgroundColor:!1,overlayColor:!1,backgroundImage:!1,overlayImage:!1};if(!(t.backgroundImage||t.overlayImage||t.background||t.overlay))return void(e&&e());var n=function(){r.backgroundImage&&r.overlayImage&&r.backgroundColor&&r.overlayColor&&(i.renderAll(),e&&e())};this.__setBgOverlay("backgroundImage",t.backgroundImage,r,n),this.__setBgOverlay("overlayImage",t.overlayImage,r,n),this.__setBgOverlay("backgroundColor",t.background,r,n),this.__setBgOverlay("overlayColor",t.overlay,r,n),n()},__setBgOverlay:function(t,e,i,r){var n=this;return e?void("backgroundImage"===t||"overlayImage"===t?fabric.Image.fromObject(e,function(e){n[t]=e,i[t]=!0,r&&r()}):this["set"+fabric.util.string.capitalize(t,!0)](e,function(){i[t]=!0,r&&r()})):void(i[t]=!0)},_enlivenObjects:function(t,e,i){var r=this;if(!t||0===t.length)return void(e&&e());var n=this.renderOnAddRemove;this.renderOnAddRemove=!1,fabric.util.enlivenObjects(t,function(t){t.forEach(function(t,e){r.insertAt(t,e)}),r.renderOnAddRemove=n,e&&e()},null,i)},_toDataURL:function(t,e){this.clone(function(i){e(i.toDataURL(t))})},_toDataURLWithMultiplier:function(t,e,i){this.clone(function(r){i(r.toDataURLWithMultiplier(t,e))})},clone:function(t,e){var i=JSON.stringify(this.toJSON(e));this.cloneWithoutData(function(e){e.loadFromJSON(i,function(){t&&t(e)})})},cloneWithoutData:function(t){var e=fabric.document.createElement("canvas");e.width=this.getWidth(),e.height=this.getHeight();var i=new fabric.Canvas(e);i.clipTo=this.clipTo,this.backgroundImage?(i.setBackgroundImage(this.backgroundImage.src,function(){i.renderAll(),t&&t(i)}),i.backgroundImageOpacity=this.backgroundImageOpacity,i.backgroundImageStretch=this.backgroundImageStretch):t&&t(i)}}),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.extend,r=e.util.toFixed,n=e.util.string.capitalize,s=e.util.degreesToRadians,o=e.StaticCanvas.supports("setLineDash");e.Object||(e.Object=e.util.createClass({type:"object",originX:"left",originY:"top",top:0,left:0,width:0,height:0,scaleX:1,scaleY:1,flipX:!1,flipY:!1,opacity:1,angle:0,skewX:0,skewY:0,cornerSize:13,transparentCorners:!0,hoverCursor:null,moveCursor:null,padding:0,borderColor:"rgba(102,153,255,0.75)",borderDashArray:null,cornerColor:"rgba(102,153,255,0.5)",cornerStrokeColor:null,cornerStyle:"rect",cornerDashArray:null,centeredScaling:!1,centeredRotation:!0,fill:"rgb(0,0,0)",fillRule:"nonzero",globalCompositeOperation:"source-over",backgroundColor:"",selectionBackgroundColor:"",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeLineJoin:"miter",strokeMiterLimit:10,shadow:null,borderOpacityWhenMoving:.4,borderScaleFactor:1,transformMatrix:null,minScaleLimit:.01,selectable:!0,evented:!0,visible:!0,hasControls:!0,hasBorders:!0,hasRotatingPoint:!0,rotatingPointOffset:40,perPixelTargetFind:!1,includeDefaultValues:!0,clipTo:null,lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingX:!1,lockScalingY:!1,lockUniScaling:!1,lockSkewingX:!1,lockSkewingY:!1,lockScalingFlip:!1,excludeFromExport:!1,stateProperties:"top left width height scaleX scaleY flipX flipY originX originY transformMatrix stroke strokeWidth strokeDashArray strokeLineCap strokeLineJoin strokeMiterLimit angle opacity fill fillRule globalCompositeOperation shadow clipTo visible backgroundColor alignX alignY meetOrSlice skewX skewY".split(" "),initialize:function(t){t&&this.setOptions(t)},_initGradient:function(t){!t.fill||!t.fill.colorStops||t.fill instanceof e.Gradient||this.set("fill",new e.Gradient(t.fill)),!t.stroke||!t.stroke.colorStops||t.stroke instanceof e.Gradient||this.set("stroke",new e.Gradient(t.stroke))},_initPattern:function(t){!t.fill||!t.fill.source||t.fill instanceof e.Pattern||this.set("fill",new e.Pattern(t.fill)),!t.stroke||!t.stroke.source||t.stroke instanceof e.Pattern||this.set("stroke",new e.Pattern(t.stroke))},_initClipping:function(t){if(t.clipTo&&"string"==typeof t.clipTo){var i=e.util.getFunctionBody(t.clipTo);"undefined"!=typeof i&&(this.clipTo=new Function("ctx",i))}},setOptions:function(t){for(var e in t)this.set(e,t[e]);this._initGradient(t),this._initPattern(t),this._initClipping(t)},transform:function(t,e){this.group&&!this.group._transformDone&&this.group===this.canvas._activeGroup&&this.group.transform(t);var i=e?this._getLeftTopCoords():this.getCenterPoint();t.translate(i.x,i.y),t.rotate(s(this.angle)),t.scale(this.scaleX*(this.flipX?-1:1),this.scaleY*(this.flipY?-1:1)),t.transform(1,0,Math.tan(s(this.skewX)),1,0,0),t.transform(1,Math.tan(s(this.skewY)),0,1,0,0)},toObject:function(t){var i=e.Object.NUM_FRACTION_DIGITS,n={type:this.type,originX:this.originX,originY:this.originY,left:r(this.left,i),top:r(this.top,i),width:r(this.width,i),height:r(this.height,i),fill:this.fill&&this.fill.toObject?this.fill.toObject():this.fill,stroke:this.stroke&&this.stroke.toObject?this.stroke.toObject():this.stroke,strokeWidth:r(this.strokeWidth,i),strokeDashArray:this.strokeDashArray?this.strokeDashArray.concat():this.strokeDashArray,strokeLineCap:this.strokeLineCap,strokeLineJoin:this.strokeLineJoin,strokeMiterLimit:r(this.strokeMiterLimit,i),scaleX:r(this.scaleX,i),scaleY:r(this.scaleY,i),angle:r(this.getAngle(),i),flipX:this.flipX,flipY:this.flipY,opacity:r(this.opacity,i),shadow:this.shadow&&this.shadow.toObject?this.shadow.toObject():this.shadow,visible:this.visible,clipTo:this.clipTo&&String(this.clipTo),backgroundColor:this.backgroundColor,fillRule:this.fillRule,globalCompositeOperation:this.globalCompositeOperation,transformMatrix:this.transformMatrix?this.transformMatrix.concat():this.transformMatrix,skewX:r(this.skewX,i),skewY:r(this.skewY,i)};return this.includeDefaultValues||(n=this._removeDefaultValues(n)),e.util.populateWithProperties(this,n,t),n},toDatalessObject:function(t){return this.toObject(t)},_removeDefaultValues:function(t){var i=e.util.getKlass(t.type).prototype,r=i.stateProperties;return r.forEach(function(e){t[e]===i[e]&&delete t[e];var r="[object Array]"===Object.prototype.toString.call(t[e])&&"[object Array]"===Object.prototype.toString.call(i[e]);r&&0===t[e].length&&0===i[e].length&&delete t[e]}),t},toString:function(){return"#<fabric."+n(this.type)+">"},get:function(t){return this[t]},getObjectScaling:function(){var t=this.scaleX,e=this.scaleY;if(this.group){var i=this.group.getObjectScaling();t*=i.scaleX,e*=i.scaleY}return{scaleX:t,scaleY:e}},_setObject:function(t){for(var e in t)this._set(e,t[e])},set:function(t,e){return"object"==typeof t?this._setObject(t):"function"==typeof e&&"clipTo"!==t?this._set(t,e(this.get(t))):this._set(t,e),this},_set:function(t,i){var r="scaleX"===t||"scaleY"===t;return r&&(i=this._constrainScale(i)),"scaleX"===t&&i<0?(this.flipX=!this.flipX,i*=-1):"scaleY"===t&&i<0?(this.flipY=!this.flipY,i*=-1):"shadow"!==t||!i||i instanceof e.Shadow||(i=new e.Shadow(i)),this[t]=i,"width"!==t&&"height"!==t||(this.minScaleLimit=Math.min(.1,1/Math.max(this.width,this.height))),this},setOnGroup:function(){},toggle:function(t){var e=this.get(t);return"boolean"==typeof e&&this.set(t,!e),this},setSourcePath:function(t){return this.sourcePath=t,this},getViewportTransform:function(){return this.canvas&&this.canvas.viewportTransform?this.canvas.viewportTransform:[1,0,0,1,0,0]},render:function(t,i){0===this.width&&0===this.height||!this.visible||(t.save(),this._setupCompositeOperation(t),this.drawSelectionBackground(t),i||this.transform(t),this._setStrokeStyles(t),this._setFillStyles(t),this.transformMatrix&&t.transform.apply(t,this.transformMatrix),this._setOpacity(t),this._setShadow(t),this.clipTo&&e.util.clipContext(this,t),this._render(t,i),this.clipTo&&t.restore(),t.restore())},_setOpacity:function(t){this.group&&this.group._setOpacity(t),t.globalAlpha*=this.opacity},_setStrokeStyles:function(t){this.stroke&&(t.lineWidth=this.strokeWidth,t.lineCap=this.strokeLineCap,t.lineJoin=this.strokeLineJoin,t.miterLimit=this.strokeMiterLimit,t.strokeStyle=this.stroke.toLive?this.stroke.toLive(t,this):this.stroke)},_setFillStyles:function(t){this.fill&&(t.fillStyle=this.fill.toLive?this.fill.toLive(t,this):this.fill)},_setLineDash:function(t,e,i){e&&(1&e.length&&e.push.apply(e,e),o?t.setLineDash(e):i&&i(t))},_renderControls:function(t,i){if(!(!this.active||i||this.group&&this.group!==this.canvas.getActiveGroup())){var r,n=this.getViewportTransform(),o=this.calcTransformMatrix();o=e.util.multiplyTransformMatrices(n,o),r=e.util.qrDecompose(o),t.save(),t.translate(r.translateX,r.translateY),t.lineWidth=1*this.borderScaleFactor,t.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1,this.group&&this.group===this.canvas.getActiveGroup()?(t.rotate(s(r.angle)),this.drawBordersInGroup(t,r)):(t.rotate(s(this.angle)),this.drawBorders(t)),this.drawControls(t),t.restore()}},_setShadow:function(t){if(this.shadow){var i=this.canvas&&this.canvas.viewportTransform[0]||1,r=this.canvas&&this.canvas.viewportTransform[3]||1,n=this.getObjectScaling();this.canvas&&this.canvas._isRetinaScaling()&&(i*=e.devicePixelRatio,r*=e.devicePixelRatio),t.shadowColor=this.shadow.color,t.shadowBlur=this.shadow.blur*(i+r)*(n.scaleX+n.scaleY)/4,t.shadowOffsetX=this.shadow.offsetX*i*n.scaleX,t.shadowOffsetY=this.shadow.offsetY*r*n.scaleY}},_removeShadow:function(t){this.shadow&&(t.shadowColor="",t.shadowBlur=t.shadowOffsetX=t.shadowOffsetY=0)},_renderFill:function(t){if(this.fill){if(t.save(),this.fill.gradientTransform){var e=this.fill.gradientTransform;t.transform.apply(t,e)}this.fill.toLive&&t.translate(-this.width/2+this.fill.offsetX||0,-this.height/2+this.fill.offsetY||0),"evenodd"===this.fillRule?t.fill("evenodd"):t.fill(),t.restore()}},_renderStroke:function(t){if(this.stroke&&0!==this.strokeWidth){if(this.shadow&&!this.shadow.affectStroke&&this._removeShadow(t),t.save(),this._setLineDash(t,this.strokeDashArray,this._renderDashedStroke),this.stroke.gradientTransform){var e=this.stroke.gradientTransform;t.transform.apply(t,e)}this.stroke.toLive&&t.translate(-this.width/2+this.stroke.offsetX||0,-this.height/2+this.stroke.offsetY||0),t.stroke(),t.restore()}},clone:function(t,i){return this.constructor.fromObject?this.constructor.fromObject(this.toObject(i),t):new e.Object(this.toObject(i))},cloneAsImage:function(t,i){var r=this.toDataURL(i);return e.util.loadImage(r,function(i){t&&t(new e.Image(i))}),this},toDataURL:function(t){t||(t={});var i=e.util.createCanvasElement(),r=this.getBoundingRect();i.width=r.width,i.height=r.height,e.util.wrapElement(i,"div");var n=new e.StaticCanvas(i,{enableRetinaScaling:t.enableRetinaScaling});"jpg"===t.format&&(t.format="jpeg"),"jpeg"===t.format&&(n.backgroundColor="#fff");var s={active:this.get("active"),left:this.getLeft(),top:this.getTop()};this.set("active",!1),this.setPositionByOrigin(new e.Point(n.getWidth()/2,n.getHeight()/2),"center","center");var o=this.canvas;n.add(this);var a=n.toDataURL(t);return this.set(s).setCoords(),this.canvas=o,n.dispose(),n=null,a},isType:function(t){return this.type===t},complexity:function(){return 0},toJSON:function(t){return this.toObject(t)},setGradient:function(t,i){i||(i={});var r={colorStops:[]};r.type=i.type||(i.r1||i.r2?"radial":"linear"),r.coords={x1:i.x1,y1:i.y1,x2:i.x2,y2:i.y2},(i.r1||i.r2)&&(r.coords.r1=i.r1,r.coords.r2=i.r2),i.gradientTransform&&(r.gradientTransform=i.gradientTransform);for(var n in i.colorStops){var s=new e.Color(i.colorStops[n]);r.colorStops.push({offset:n,color:s.toRgb(),opacity:s.getAlpha()})}return this.set(t,e.Gradient.forObject(this,r))},setPatternFill:function(t){return this.set("fill",new e.Pattern(t))},setShadow:function(t){return this.set("shadow",t?new e.Shadow(t):null)},setColor:function(t){return this.set("fill",t),this},setAngle:function(t){var e=("center"!==this.originX||"center"!==this.originY)&&this.centeredRotation;return e&&this._setOriginToCenter(),this.set("angle",t),e&&this._resetOrigin(),this},centerH:function(){return this.canvas&&this.canvas.centerObjectH(this),this},viewportCenterH:function(){return this.canvas&&this.canvas.viewportCenterObjectH(this),this},centerV:function(){return this.canvas&&this.canvas.centerObjectV(this),this},viewportCenterV:function(){return this.canvas&&this.canvas.viewportCenterObjectV(this),this},center:function(){return this.canvas&&this.canvas.centerObject(this),this},viewportCenter:function(){return this.canvas&&this.canvas.viewportCenterObject(this),this},remove:function(){return this.canvas&&this.canvas.remove(this),this},getLocalPointer:function(t,i){i=i||this.canvas.getPointer(t);var r=new e.Point(i.x,i.y),n=this._getLeftTopCoords();return this.angle&&(r=e.util.rotatePoint(r,n,e.util.degreesToRadians(-this.angle))),{x:r.x-n.x,y:r.y-n.y}},_setupCompositeOperation:function(t){this.globalCompositeOperation&&(t.globalCompositeOperation=this.globalCompositeOperation)}}),e.util.createAccessors(e.Object),e.Object.prototype.rotate=e.Object.prototype.setAngle,i(e.Object.prototype,e.Observable),e.Object.NUM_FRACTION_DIGITS=2,e.Object.__uid=0)}("undefined"!=typeof exports?exports:this),function(){var t=fabric.util.degreesToRadians,e={left:-.5,center:0,right:.5},i={top:-.5,center:0,bottom:.5};fabric.util.object.extend(fabric.Object.prototype,{translateToGivenOrigin:function(t,r,n,s,o){var a,h,c,l=t.x,u=t.y;return"string"==typeof r?r=e[r]:r-=.5,"string"==typeof s?s=e[s]:s-=.5,a=s-r,"string"==typeof n?n=i[n]:n-=.5,"string"==typeof o?o=i[o]:o-=.5,h=o-n,(a||h)&&(c=this._getTransformedDimensions(),l=t.x+a*c.x,u=t.y+h*c.y),new fabric.Point(l,u)},translateToCenterPoint:function(e,i,r){var n=this.translateToGivenOrigin(e,i,r,"center","center");return this.angle?fabric.util.rotatePoint(n,e,t(this.angle)):n},translateToOriginPoint:function(e,i,r){var n=this.translateToGivenOrigin(e,"center","center",i,r);return this.angle?fabric.util.rotatePoint(n,e,t(this.angle)):n},getCenterPoint:function(){var t=new fabric.Point(this.left,this.top);return this.translateToCenterPoint(t,this.originX,this.originY)},getPointByOrigin:function(t,e){var i=this.getCenterPoint();return this.translateToOriginPoint(i,t,e)},toLocalPoint:function(e,i,r){var n,s,o=this.getCenterPoint();return n="undefined"!=typeof i&&"undefined"!=typeof r?this.translateToGivenOrigin(o,"center","center",i,r):new fabric.Point(this.left,this.top),s=new fabric.Point(e.x,e.y),this.angle&&(s=fabric.util.rotatePoint(s,o,-t(this.angle))),s.subtractEquals(n)},setPositionByOrigin:function(t,e,i){var r=this.translateToCenterPoint(t,e,i),n=this.translateToOriginPoint(r,this.originX,this.originY);this.set("left",n.x),this.set("top",n.y)},adjustPosition:function(i){var r,n,s=t(this.angle),o=this.getWidth(),a=Math.cos(s)*o,h=Math.sin(s)*o;r="string"==typeof this.originX?e[this.originX]:this.originX-.5,n="string"==typeof i?e[i]:i-.5,this.left+=a*(n-r),this.top+=h*(n-r),this.setCoords(),this.originX=i},_setOriginToCenter:function(){this._originalOriginX=this.originX,this._originalOriginY=this.originY;var t=this.getCenterPoint();this.originX="center",this.originY="center",this.left=t.x,this.top=t.y},_resetOrigin:function(){var t=this.translateToOriginPoint(this.getCenterPoint(),this._originalOriginX,this._originalOriginY);this.originX=this._originalOriginX,this.originY=this._originalOriginY,this.left=t.x,this.top=t.y,this._originalOriginX=null,this._originalOriginY=null},_getLeftTopCoords:function(){return this.translateToOriginPoint(this.getCenterPoint(),"left","top")}})}(),function(){function t(t){return[new fabric.Point(t.tl.x,t.tl.y),new fabric.Point(t.tr.x,t.tr.y),new fabric.Point(t.br.x,t.br.y),new fabric.Point(t.bl.x,t.bl.y)]}var e=fabric.util.degreesToRadians,i=fabric.util.multiplyTransformMatrices;fabric.util.object.extend(fabric.Object.prototype,{oCoords:null,intersectsWithRect:function(e,i){var r=t(this.oCoords),n=fabric.Intersection.intersectPolygonRectangle(r,e,i);return"Intersection"===n.status},intersectsWithObject:function(e){var i=fabric.Intersection.intersectPolygonPolygon(t(this.oCoords),t(e.oCoords));return"Intersection"===i.status},isContainedWithinObject:function(t){var e=t.getBoundingRect(),i=new fabric.Point(e.left,e.top),r=new fabric.Point(e.left+e.width,e.top+e.height);return this.isContainedWithinRect(i,r)},isContainedWithinRect:function(t,e){var i=this.getBoundingRect();return i.left>=t.x&&i.left+i.width<=e.x&&i.top>=t.y&&i.top+i.height<=e.y},containsPoint:function(t){this.oCoords||this.setCoords();var e=this._getImageLines(this.oCoords),i=this._findCrossPoints(t,e);return 0!==i&&i%2===1},_getImageLines:function(t){return{topline:{o:t.tl,d:t.tr},rightline:{o:t.tr,d:t.br},bottomline:{o:t.br,d:t.bl},leftline:{o:t.bl,d:t.tl}}},_findCrossPoints:function(t,e){var i,r,n,s,o,a,h,c=0;for(var l in e)if(h=e[l],!(h.o.y<t.y&&h.d.y<t.y||h.o.y>=t.y&&h.d.y>=t.y||(h.o.x===h.d.x&&h.o.x>=t.x?(o=h.o.x,a=t.y):(i=0,r=(h.d.y-h.o.y)/(h.d.x-h.o.x),n=t.y-i*t.x,s=h.o.y-r*h.o.x,o=-(n-s)/(i-r),a=n+i*o),o>=t.x&&(c+=1),2!==c)))break;return c},getBoundingRectWidth:function(){return this.getBoundingRect().width},getBoundingRectHeight:function(){return this.getBoundingRect().height},getBoundingRect:function(){return this.oCoords||this.setCoords(),fabric.util.makeBoundingBoxFromPoints([this.oCoords.tl,this.oCoords.tr,this.oCoords.br,this.oCoords.bl])},getWidth:function(){return this._getTransformedDimensions().x},getHeight:function(){return this._getTransformedDimensions().y},_constrainScale:function(t){return Math.abs(t)<this.minScaleLimit?t<0?-this.minScaleLimit:this.minScaleLimit:t},scale:function(t){return t=this._constrainScale(t),t<0&&(this.flipX=!this.flipX,this.flipY=!this.flipY,t*=-1),this.scaleX=t,this.scaleY=t,this.setCoords(),this},scaleToWidth:function(t){var e=this.getBoundingRect().width/this.getWidth();return this.scale(t/this.width/e)},scaleToHeight:function(t){var e=this.getBoundingRect().height/this.getHeight();return this.scale(t/this.height/e)},setCoords:function(){var t=e(this.angle),i=this.getViewportTransform(),r=this._calculateCurrentDimensions(),n=r.x,s=r.y;n<0&&(n=Math.abs(n));var o=Math.sin(t),a=Math.cos(t),h=n>0?Math.atan(s/n):0,c=n/Math.cos(h)/2,l=Math.cos(h+t)*c,u=Math.sin(h+t)*c,f=fabric.util.transformPoint(this.getCenterPoint(),i),d=new fabric.Point(f.x-l,f.y-u),g=new fabric.Point(d.x+n*a,d.y+n*o),p=new fabric.Point(d.x-s*o,d.y+s*a),v=new fabric.Point(f.x+l,f.y+u),b=new fabric.Point((d.x+p.x)/2,(d.y+p.y)/2),m=new fabric.Point((g.x+d.x)/2,(g.y+d.y)/2),y=new fabric.Point((v.x+g.x)/2,(v.y+g.y)/2),_=new fabric.Point((v.x+p.x)/2,(v.y+p.y)/2),x=new fabric.Point(m.x+o*this.rotatingPointOffset,m.y-a*this.rotatingPointOffset);return this.oCoords={tl:d,tr:g,br:v,bl:p,ml:b,mt:m,mr:y,mb:_,mtr:x},this._setCornerCoords&&this._setCornerCoords(),this},_calcRotateMatrix:function(){if(this.angle){var t=e(this.angle),i=Math.cos(t),r=Math.sin(t);return[i,r,-r,i,0,0]}return[1,0,0,1,0,0]},calcTransformMatrix:function(){var t=this.getCenterPoint(),e=[1,0,0,1,t.x,t.y],r=this._calcRotateMatrix(),n=this._calcDimensionsTransformMatrix(this.skewX,this.skewY,!0),s=this.group?this.group.calcTransformMatrix():[1,0,0,1,0,0];return s=i(s,e),s=i(s,r),s=i(s,n)},_calcDimensionsTransformMatrix:function(t,r,n){var s=[1,0,Math.tan(e(t)),1],o=[1,Math.tan(e(r)),0,1],a=this.scaleX*(n&&this.flipX?-1:1),h=this.scaleY*(n&&this.flipY?-1:1),c=[a,0,0,h],l=i(c,s,!0);return i(l,o,!0)}})}(),fabric.util.object.extend(fabric.Object.prototype,{sendToBack:function(){return this.group?fabric.StaticCanvas.prototype.sendToBack.call(this.group,this):this.canvas.sendToBack(this),this},bringToFront:function(){return this.group?fabric.StaticCanvas.prototype.bringToFront.call(this.group,this):this.canvas.bringToFront(this),
this},sendBackwards:function(t){return this.group?fabric.StaticCanvas.prototype.sendBackwards.call(this.group,this,t):this.canvas.sendBackwards(this,t),this},bringForward:function(t){return this.group?fabric.StaticCanvas.prototype.bringForward.call(this.group,this,t):this.canvas.bringForward(this,t),this},moveTo:function(t){return this.group?fabric.StaticCanvas.prototype.moveTo.call(this.group,this,t):this.canvas.moveTo(this,t),this}}),function(){function t(t,e){if(e){if(e.toLive)return t+": url(#SVGID_"+e.id+"); ";var i=new fabric.Color(e),r=t+": "+i.toRgb()+"; ",n=i.getAlpha();return 1!==n&&(r+=t+"-opacity: "+n.toString()+"; "),r}return t+": none; "}fabric.util.object.extend(fabric.Object.prototype,{getSvgStyles:function(e){var i=this.fillRule,r=this.strokeWidth?this.strokeWidth:"0",n=this.strokeDashArray?this.strokeDashArray.join(" "):"none",s=this.strokeLineCap?this.strokeLineCap:"butt",o=this.strokeLineJoin?this.strokeLineJoin:"miter",a=this.strokeMiterLimit?this.strokeMiterLimit:"4",h="undefined"!=typeof this.opacity?this.opacity:"1",c=this.visible?"":" visibility: hidden;",l=e?"":this.getSvgFilter(),u=t("fill",this.fill),f=t("stroke",this.stroke);return[f,"stroke-width: ",r,"; ","stroke-dasharray: ",n,"; ","stroke-linecap: ",s,"; ","stroke-linejoin: ",o,"; ","stroke-miterlimit: ",a,"; ",u,"fill-rule: ",i,"; ","opacity: ",h,";",l,c].join("")},getSvgFilter:function(){return this.shadow?"filter: url(#SVGID_"+this.shadow.id+");":""},getSvgId:function(){return this.id?'id="'+this.id+'" ':""},getSvgTransform:function(){if(this.group&&"path-group"===this.group.type)return"";var t=fabric.util.toFixed,e=this.getAngle(),i=this.getSkewX()%360,r=this.getSkewY()%360,n=this.getCenterPoint(),s=fabric.Object.NUM_FRACTION_DIGITS,o="path-group"===this.type?"":"translate("+t(n.x,s)+" "+t(n.y,s)+")",a=0!==e?" rotate("+t(e,s)+")":"",h=1===this.scaleX&&1===this.scaleY?"":" scale("+t(this.scaleX,s)+" "+t(this.scaleY,s)+")",c=0!==i?" skewX("+t(i,s)+")":"",l=0!==r?" skewY("+t(r,s)+")":"",u="path-group"===this.type?this.width:0,f=this.flipX?" matrix(-1 0 0 1 "+u+" 0) ":"",d="path-group"===this.type?this.height:0,g=this.flipY?" matrix(1 0 0 -1 0 "+d+")":"";return[o,a,h,f,g,c,l].join("")},getSvgTransformMatrix:function(){return this.transformMatrix?" matrix("+this.transformMatrix.join(" ")+") ":""},_createBaseSVGMarkup:function(){var t=[];return this.fill&&this.fill.toLive&&t.push(this.fill.toSVG(this,!1)),this.stroke&&this.stroke.toLive&&t.push(this.stroke.toSVG(this,!1)),this.shadow&&t.push(this.shadow.toSVG(this)),t}})}(),fabric.util.object.extend(fabric.Object.prototype,{hasStateChanged:function(){return this.stateProperties.some(function(t){return this.get(t)!==this.originalState[t]},this)},saveState:function(t){return this.stateProperties.forEach(function(t){this.originalState[t]=this.get(t)},this),t&&t.stateProperties&&t.stateProperties.forEach(function(t){this.originalState[t]=this.get(t)},this),this},setupState:function(){return this.originalState={},this.saveState(),this}}),function(){var t=fabric.util.degreesToRadians,e=function(){return"undefined"!=typeof G_vmlCanvasManager};fabric.util.object.extend(fabric.Object.prototype,{_controlsVisibility:null,_findTargetCorner:function(t){if(!this.hasControls||!this.active)return!1;var e,i,r=t.x,n=t.y;this.__corner=0;for(var s in this.oCoords)if(this.isControlVisible(s)&&("mtr"!==s||this.hasRotatingPoint)&&(!this.get("lockUniScaling")||"mt"!==s&&"mr"!==s&&"mb"!==s&&"ml"!==s)&&(i=this._getImageLines(this.oCoords[s].corner),e=this._findCrossPoints({x:r,y:n},i),0!==e&&e%2===1))return this.__corner=s,s;return!1},_setCornerCoords:function(){var e,i,r=this.oCoords,n=t(45-this.angle),s=.707106*this.cornerSize,o=s*Math.cos(n),a=s*Math.sin(n);for(var h in r)e=r[h].x,i=r[h].y,r[h].corner={tl:{x:e-a,y:i-o},tr:{x:e+o,y:i-a},bl:{x:e-o,y:i+a},br:{x:e+a,y:i+o}}},_getNonTransformedDimensions:function(){var t=this.strokeWidth,e=this.width,i=this.height,r=!0,n=!0;return"line"===this.type&&"butt"===this.strokeLineCap&&(n=e,r=i),n&&(i+=i<0?-t:t),r&&(e+=e<0?-t:t),{x:e,y:i}},_getTransformedDimensions:function(t,e){"undefined"==typeof t&&(t=this.skewX),"undefined"==typeof e&&(e=this.skewY);var i,r,n=this._getNonTransformedDimensions(),s=n.x/2,o=n.y/2,a=[{x:-s,y:-o},{x:s,y:-o},{x:-s,y:o},{x:s,y:o}],h=this._calcDimensionsTransformMatrix(t,e,!1);for(i=0;i<a.length;i++)a[i]=fabric.util.transformPoint(a[i],h);return r=fabric.util.makeBoundingBoxFromPoints(a),{x:r.width,y:r.height}},_calculateCurrentDimensions:function(){var t=this.getViewportTransform(),e=this._getTransformedDimensions(),i=e.x,r=e.y,n=fabric.util.transformPoint(new fabric.Point(i,r),t,!0);return n.scalarAdd(2*this.padding)},drawSelectionBackground:function(e){if(!this.selectionBackgroundColor||this.group||this!==this.canvas.getActiveObject())return this;e.save();var i=this.getCenterPoint(),r=this._calculateCurrentDimensions(),n=this.canvas.viewportTransform;return e.translate(i.x,i.y),e.scale(1/n[0],1/n[3]),e.rotate(t(this.angle)),e.fillStyle=this.selectionBackgroundColor,e.fillRect(-r.x/2,-r.y/2,r.x,r.y),e.restore(),this},drawBorders:function(t){if(!this.hasBorders)return this;var e=this._calculateCurrentDimensions(),i=1/this.borderScaleFactor,r=e.x+i,n=e.y+i;if(t.save(),t.strokeStyle=this.borderColor,this._setLineDash(t,this.borderDashArray,null),t.strokeRect(-r/2,-n/2,r,n),this.hasRotatingPoint&&this.isControlVisible("mtr")&&!this.get("lockRotation")&&this.hasControls){var s=-n/2;t.beginPath(),t.moveTo(0,s),t.lineTo(0,s-this.rotatingPointOffset),t.closePath(),t.stroke()}return t.restore(),this},drawBordersInGroup:function(t,e){if(!this.hasBorders)return this;var i=this._getNonTransformedDimensions(),r=fabric.util.customTransformMatrix(e.scaleX,e.scaleY,e.skewX),n=fabric.util.transformPoint(i,r),s=1/this.borderScaleFactor,o=n.x+s+2*this.padding,a=n.y+s+2*this.padding;return t.save(),this._setLineDash(t,this.borderDashArray,null),t.strokeStyle=this.borderColor,t.strokeRect(-o/2,-a/2,o,a),t.restore(),this},drawControls:function(t){if(!this.hasControls)return this;var e=this._calculateCurrentDimensions(),i=e.x,r=e.y,n=this.cornerSize,s=-(i+n)/2,o=-(r+n)/2,a=this.transparentCorners?"stroke":"fill";return t.save(),t.strokeStyle=t.fillStyle=this.cornerColor,this.transparentCorners||(t.strokeStyle=this.cornerStrokeColor),this._setLineDash(t,this.cornerDashArray,null),this._drawControl("tl",t,a,s,o),this._drawControl("tr",t,a,s+i,o),this._drawControl("bl",t,a,s,o+r),this._drawControl("br",t,a,s+i,o+r),this.get("lockUniScaling")||(this._drawControl("mt",t,a,s+i/2,o),this._drawControl("mb",t,a,s+i/2,o+r),this._drawControl("mr",t,a,s+i,o+r/2),this._drawControl("ml",t,a,s,o+r/2)),this.hasRotatingPoint&&this._drawControl("mtr",t,a,s+i/2,o-this.rotatingPointOffset),t.restore(),this},_drawControl:function(t,i,r,n,s){if(this.isControlVisible(t)){var o=this.cornerSize,a=!this.transparentCorners&&this.cornerStrokeColor;switch(this.cornerStyle){case"circle":i.beginPath(),i.arc(n+o/2,s+o/2,o/2,0,2*Math.PI,!1),i[r](),a&&i.stroke();break;default:e()||this.transparentCorners||i.clearRect(n,s,o,o),i[r+"Rect"](n,s,o,o),a&&i.strokeRect(n,s,o,o)}}},isControlVisible:function(t){return this._getControlsVisibility()[t]},setControlVisible:function(t,e){return this._getControlsVisibility()[t]=e,this},setControlsVisibility:function(t){t||(t={});for(var e in t)this.setControlVisible(e,t[e]);return this},_getControlsVisibility:function(){return this._controlsVisibility||(this._controlsVisibility={tl:!0,tr:!0,br:!0,bl:!0,ml:!0,mt:!0,mr:!0,mb:!0,mtr:!0}),this._controlsVisibility}})}(),fabric.util.object.extend(fabric.StaticCanvas.prototype,{FX_DURATION:500,fxCenterObjectH:function(t,e){e=e||{};var i=function(){},r=e.onComplete||i,n=e.onChange||i,s=this;return fabric.util.animate({startValue:t.get("left"),endValue:this.getCenter().left,duration:this.FX_DURATION,onChange:function(e){t.set("left",e),s.renderAll(),n()},onComplete:function(){t.setCoords(),r()}}),this},fxCenterObjectV:function(t,e){e=e||{};var i=function(){},r=e.onComplete||i,n=e.onChange||i,s=this;return fabric.util.animate({startValue:t.get("top"),endValue:this.getCenter().top,duration:this.FX_DURATION,onChange:function(e){t.set("top",e),s.renderAll(),n()},onComplete:function(){t.setCoords(),r()}}),this},fxRemove:function(t,e){e=e||{};var i=function(){},r=e.onComplete||i,n=e.onChange||i,s=this;return fabric.util.animate({startValue:t.get("opacity"),endValue:0,duration:this.FX_DURATION,onStart:function(){t.set("active",!1)},onChange:function(e){t.set("opacity",e),s.renderAll(),n()},onComplete:function(){s.remove(t),r()}}),this}}),fabric.util.object.extend(fabric.Object.prototype,{animate:function(){if(arguments[0]&&"object"==typeof arguments[0]){var t,e,i=[];for(t in arguments[0])i.push(t);for(var r=0,n=i.length;r<n;r++)t=i[r],e=r!==n-1,this._animate(t,arguments[0][t],arguments[1],e)}else this._animate.apply(this,arguments);return this},_animate:function(t,e,i,r){var n,s=this;e=e.toString(),i=i?fabric.util.object.clone(i):{},~t.indexOf(".")&&(n=t.split("."));var o=n?this.get(n[0])[n[1]]:this.get(t);"from"in i||(i.from=o),e=~e.indexOf("=")?o+parseFloat(e.replace("=","")):parseFloat(e),fabric.util.animate({startValue:i.from,endValue:e,byValue:i.by,easing:i.easing,duration:i.duration,abort:i.abort&&function(){return i.abort.call(s)},onChange:function(e){n?s[n[0]][n[1]]=e:s.set(t,e),r||i.onChange&&i.onChange()},onComplete:function(){r||(s.setCoords(),i.onComplete&&i.onComplete())}})}}),function(t){"use strict";function e(t,e){var i=t.origin,r=t.axis1,n=t.axis2,s=t.dimension,o=e.nearest,a=e.center,h=e.farthest;return function(){switch(this.get(i)){case o:return Math.min(this.get(r),this.get(n));case a:return Math.min(this.get(r),this.get(n))+.5*this.get(s);case h:return Math.max(this.get(r),this.get(n))}}}var i=t.fabric||(t.fabric={}),r=i.util.object.extend,n={x1:1,x2:1,y1:1,y2:1},s=i.StaticCanvas.supports("setLineDash");return i.Line?void i.warn("fabric.Line is already defined"):(i.Line=i.util.createClass(i.Object,{type:"line",x1:0,y1:0,x2:0,y2:0,initialize:function(t,e){e=e||{},t||(t=[0,0,0,0]),this.callSuper("initialize",e),this.set("x1",t[0]),this.set("y1",t[1]),this.set("x2",t[2]),this.set("y2",t[3]),this._setWidthHeight(e)},_setWidthHeight:function(t){t||(t={}),this.width=Math.abs(this.x2-this.x1),this.height=Math.abs(this.y2-this.y1),this.left="left"in t?t.left:this._getLeftToOriginX(),this.top="top"in t?t.top:this._getTopToOriginY()},_set:function(t,e){return this.callSuper("_set",t,e),"undefined"!=typeof n[t]&&this._setWidthHeight(),this},_getLeftToOriginX:e({origin:"originX",axis1:"x1",axis2:"x2",dimension:"width"},{nearest:"left",center:"center",farthest:"right"}),_getTopToOriginY:e({origin:"originY",axis1:"y1",axis2:"y2",dimension:"height"},{nearest:"top",center:"center",farthest:"bottom"}),_render:function(t,e){if(t.beginPath(),e){var i=this.getCenterPoint();t.translate(i.x-this.strokeWidth/2,i.y-this.strokeWidth/2)}if(!this.strokeDashArray||this.strokeDashArray&&s){var r=this.calcLinePoints();t.moveTo(r.x1,r.y1),t.lineTo(r.x2,r.y2)}t.lineWidth=this.strokeWidth;var n=t.strokeStyle;t.strokeStyle=this.stroke||t.fillStyle,this.stroke&&this._renderStroke(t),t.strokeStyle=n},_renderDashedStroke:function(t){var e=this.calcLinePoints();t.beginPath(),i.util.drawDashedLine(t,e.x1,e.y1,e.x2,e.y2,this.strokeDashArray),t.closePath()},toObject:function(t){return r(this.callSuper("toObject",t),this.calcLinePoints())},calcLinePoints:function(){var t=this.x1<=this.x2?-1:1,e=this.y1<=this.y2?-1:1,i=t*this.width*.5,r=e*this.height*.5,n=t*this.width*-.5,s=e*this.height*-.5;return{x1:i,x2:n,y1:r,y2:s}},toSVG:function(t){var e=this._createBaseSVGMarkup(),i={x1:this.x1,x2:this.x2,y1:this.y1,y2:this.y2};return this.group&&"path-group"===this.group.type||(i=this.calcLinePoints()),e.push("<line ",this.getSvgId(),'x1="',i.x1,'" y1="',i.y1,'" x2="',i.x2,'" y2="',i.y2,'" style="',this.getSvgStyles(),'" transform="',this.getSvgTransform(),this.getSvgTransformMatrix(),'"/>\n'),t?t(e.join("")):e.join("")},complexity:function(){return 1}}),i.Line.ATTRIBUTE_NAMES=i.SHARED_ATTRIBUTES.concat("x1 y1 x2 y2".split(" ")),i.Line.fromElement=function(t,e){var n=i.parseAttributes(t,i.Line.ATTRIBUTE_NAMES),s=[n.x1||0,n.y1||0,n.x2||0,n.y2||0];return new i.Line(s,r(n,e))},void(i.Line.fromObject=function(t){var e=[t.x1,t.y1,t.x2,t.y2];return new i.Line(e,t)}))}("undefined"!=typeof exports?exports:this),function(t){"use strict";function e(t){return"radius"in t&&t.radius>=0}var i=t.fabric||(t.fabric={}),r=Math.PI,n=i.util.object.extend;return i.Circle?void i.warn("fabric.Circle is already defined."):(i.Circle=i.util.createClass(i.Object,{type:"circle",radius:0,startAngle:0,endAngle:2*r,initialize:function(t){t=t||{},this.callSuper("initialize",t),this.set("radius",t.radius||0),this.startAngle=t.startAngle||this.startAngle,this.endAngle=t.endAngle||this.endAngle},_set:function(t,e){return this.callSuper("_set",t,e),"radius"===t&&this.setRadius(e),this},toObject:function(t){return n(this.callSuper("toObject",t),{radius:this.get("radius"),startAngle:this.startAngle,endAngle:this.endAngle})},toSVG:function(t){var e=this._createBaseSVGMarkup(),i=0,n=0,s=(this.endAngle-this.startAngle)%(2*r);if(0===s)this.group&&"path-group"===this.group.type&&(i=this.left+this.radius,n=this.top+this.radius),e.push("<circle ",this.getSvgId(),'cx="'+i+'" cy="'+n+'" ','r="',this.radius,'" style="',this.getSvgStyles(),'" transform="',this.getSvgTransform()," ",this.getSvgTransformMatrix(),'"/>\n');else{var o=Math.cos(this.startAngle)*this.radius,a=Math.sin(this.startAngle)*this.radius,h=Math.cos(this.endAngle)*this.radius,c=Math.sin(this.endAngle)*this.radius,l=s>r?"1":"0";e.push('<path d="M '+o+" "+a," A "+this.radius+" "+this.radius," 0 ",+l+" 1"," "+h+" "+c,'" style="',this.getSvgStyles(),'" transform="',this.getSvgTransform()," ",this.getSvgTransformMatrix(),'"/>\n')}return t?t(e.join("")):e.join("")},_render:function(t,e){t.beginPath(),t.arc(e?this.left+this.radius:0,e?this.top+this.radius:0,this.radius,this.startAngle,this.endAngle,!1),this._renderFill(t),this._renderStroke(t)},getRadiusX:function(){return this.get("radius")*this.get("scaleX")},getRadiusY:function(){return this.get("radius")*this.get("scaleY")},setRadius:function(t){return this.radius=t,this.set("width",2*t).set("height",2*t)},complexity:function(){return 1}}),i.Circle.ATTRIBUTE_NAMES=i.SHARED_ATTRIBUTES.concat("cx cy r".split(" ")),i.Circle.fromElement=function(t,r){r||(r={});var s=i.parseAttributes(t,i.Circle.ATTRIBUTE_NAMES);if(!e(s))throw new Error("value of `r` attribute is required and can not be negative");s.left=s.left||0,s.top=s.top||0;var o=new i.Circle(n(s,r));return o.left-=o.radius,o.top-=o.radius,o},void(i.Circle.fromObject=function(t){return new i.Circle(t)}))}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={});return e.Triangle?void e.warn("fabric.Triangle is already defined"):(e.Triangle=e.util.createClass(e.Object,{type:"triangle",initialize:function(t){t=t||{},this.callSuper("initialize",t),this.set("width",t.width||100).set("height",t.height||100)},_render:function(t){var e=this.width/2,i=this.height/2;t.beginPath(),t.moveTo(-e,i),t.lineTo(0,-i),t.lineTo(e,i),t.closePath(),this._renderFill(t),this._renderStroke(t)},_renderDashedStroke:function(t){var i=this.width/2,r=this.height/2;t.beginPath(),e.util.drawDashedLine(t,-i,r,0,-r,this.strokeDashArray),e.util.drawDashedLine(t,0,-r,i,r,this.strokeDashArray),e.util.drawDashedLine(t,i,r,-i,r,this.strokeDashArray),t.closePath()},toSVG:function(t){var e=this._createBaseSVGMarkup(),i=this.width/2,r=this.height/2,n=[-i+" "+r,"0 "+-r,i+" "+r].join(",");return e.push("<polygon ",this.getSvgId(),'points="',n,'" style="',this.getSvgStyles(),'" transform="',this.getSvgTransform(),'"/>'),t?t(e.join("")):e.join("")},complexity:function(){return 1}}),void(e.Triangle.fromObject=function(t){return new e.Triangle(t)}))}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=2*Math.PI,r=e.util.object.extend;return e.Ellipse?void e.warn("fabric.Ellipse is already defined."):(e.Ellipse=e.util.createClass(e.Object,{type:"ellipse",rx:0,ry:0,initialize:function(t){t=t||{},this.callSuper("initialize",t),this.set("rx",t.rx||0),this.set("ry",t.ry||0)},_set:function(t,e){switch(this.callSuper("_set",t,e),t){case"rx":this.rx=e,this.set("width",2*e);break;case"ry":this.ry=e,this.set("height",2*e)}return this},getRx:function(){return this.get("rx")*this.get("scaleX")},getRy:function(){return this.get("ry")*this.get("scaleY")},toObject:function(t){return r(this.callSuper("toObject",t),{rx:this.get("rx"),ry:this.get("ry")})},toSVG:function(t){var e=this._createBaseSVGMarkup(),i=0,r=0;return this.group&&"path-group"===this.group.type&&(i=this.left+this.rx,r=this.top+this.ry),e.push("<ellipse ",this.getSvgId(),'cx="',i,'" cy="',r,'" ','rx="',this.rx,'" ry="',this.ry,'" style="',this.getSvgStyles(),'" transform="',this.getSvgTransform(),this.getSvgTransformMatrix(),'"/>\n'),t?t(e.join("")):e.join("")},_render:function(t,e){t.beginPath(),t.save(),t.transform(1,0,0,this.ry/this.rx,0,0),t.arc(e?this.left+this.rx:0,e?(this.top+this.ry)*this.rx/this.ry:0,this.rx,0,i,!1),t.restore(),this._renderFill(t),this._renderStroke(t)},complexity:function(){return 1}}),e.Ellipse.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat("cx cy rx ry".split(" ")),e.Ellipse.fromElement=function(t,i){i||(i={});var n=e.parseAttributes(t,e.Ellipse.ATTRIBUTE_NAMES);n.left=n.left||0,n.top=n.top||0;var s=new e.Ellipse(r(n,i));return s.top-=s.ry,s.left-=s.rx,s},void(e.Ellipse.fromObject=function(t){return new e.Ellipse(t)}))}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.extend;if(e.Rect)return void e.warn("fabric.Rect is already defined");var r=e.Object.prototype.stateProperties.concat();r.push("rx","ry","x","y"),e.Rect=e.util.createClass(e.Object,{stateProperties:r,type:"rect",rx:0,ry:0,strokeDashArray:null,initialize:function(t){t=t||{},this.callSuper("initialize",t),this._initRxRy()},_initRxRy:function(){this.rx&&!this.ry?this.ry=this.rx:this.ry&&!this.rx&&(this.rx=this.ry)},_render:function(t,e){if(1===this.width&&1===this.height)return void t.fillRect(-.5,-.5,1,1);var i=this.rx?Math.min(this.rx,this.width/2):0,r=this.ry?Math.min(this.ry,this.height/2):0,n=this.width,s=this.height,o=e?this.left:-this.width/2,a=e?this.top:-this.height/2,h=0!==i||0!==r,c=.4477152502;t.beginPath(),t.moveTo(o+i,a),t.lineTo(o+n-i,a),h&&t.bezierCurveTo(o+n-c*i,a,o+n,a+c*r,o+n,a+r),t.lineTo(o+n,a+s-r),h&&t.bezierCurveTo(o+n,a+s-c*r,o+n-c*i,a+s,o+n-i,a+s),t.lineTo(o+i,a+s),h&&t.bezierCurveTo(o+c*i,a+s,o,a+s-c*r,o,a+s-r),t.lineTo(o,a+r),h&&t.bezierCurveTo(o,a+c*r,o+c*i,a,o+i,a),t.closePath(),this._renderFill(t),this._renderStroke(t)},_renderDashedStroke:function(t){var i=-this.width/2,r=-this.height/2,n=this.width,s=this.height;t.beginPath(),e.util.drawDashedLine(t,i,r,i+n,r,this.strokeDashArray),e.util.drawDashedLine(t,i+n,r,i+n,r+s,this.strokeDashArray),e.util.drawDashedLine(t,i+n,r+s,i,r+s,this.strokeDashArray),e.util.drawDashedLine(t,i,r+s,i,r,this.strokeDashArray),t.closePath()},toObject:function(t){var e=i(this.callSuper("toObject",t),{rx:this.get("rx")||0,ry:this.get("ry")||0});return this.includeDefaultValues||this._removeDefaultValues(e),e},toSVG:function(t){var e=this._createBaseSVGMarkup(),i=this.left,r=this.top;return this.group&&"path-group"===this.group.type||(i=-this.width/2,r=-this.height/2),e.push("<rect ",this.getSvgId(),'x="',i,'" y="',r,'" rx="',this.get("rx"),'" ry="',this.get("ry"),'" width="',this.width,'" height="',this.height,'" style="',this.getSvgStyles(),'" transform="',this.getSvgTransform(),this.getSvgTransformMatrix(),'"/>\n'),t?t(e.join("")):e.join("")},complexity:function(){return 1}}),e.Rect.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat("x y rx ry width height".split(" ")),e.Rect.fromElement=function(t,r){if(!t)return null;r=r||{};var n=e.parseAttributes(t,e.Rect.ATTRIBUTE_NAMES);n.left=n.left||0,n.top=n.top||0;var s=new e.Rect(i(r?e.util.object.clone(r):{},n));return s.visible=s.visible&&s.width>0&&s.height>0,s},e.Rect.fromObject=function(t){return new e.Rect(t)}}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={});return e.Polyline?void e.warn("fabric.Polyline is already defined"):(e.Polyline=e.util.createClass(e.Object,{type:"polyline",points:null,minX:0,minY:0,initialize:function(t,i){return e.Polygon.prototype.initialize.call(this,t,i)},_calcDimensions:function(){return e.Polygon.prototype._calcDimensions.call(this)},toObject:function(t){return e.Polygon.prototype.toObject.call(this,t)},toSVG:function(t){return e.Polygon.prototype.toSVG.call(this,t)},_render:function(t,i){e.Polygon.prototype.commonRender.call(this,t,i)&&(this._renderFill(t),this._renderStroke(t))},_renderDashedStroke:function(t){var i,r;t.beginPath();for(var n=0,s=this.points.length;n<s;n++)i=this.points[n],r=this.points[n+1]||i,e.util.drawDashedLine(t,i.x,i.y,r.x,r.y,this.strokeDashArray)},complexity:function(){return this.get("points").length}}),e.Polyline.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat(),e.Polyline.fromElement=function(t,i){if(!t)return null;i||(i={});var r=e.parsePointsAttribute(t.getAttribute("points")),n=e.parseAttributes(t,e.Polyline.ATTRIBUTE_NAMES);return new e.Polyline(r,e.util.object.extend(n,i))},void(e.Polyline.fromObject=function(t){var i=t.points;return new e.Polyline(i,t,!0)}))}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.extend,r=e.util.array.min,n=e.util.array.max,s=e.util.toFixed;return e.Polygon?void e.warn("fabric.Polygon is already defined"):(e.Polygon=e.util.createClass(e.Object,{type:"polygon",points:null,minX:0,minY:0,initialize:function(t,e){e=e||{},this.points=t||[],this.callSuper("initialize",e),this._calcDimensions(),"top"in e||(this.top=this.minY),"left"in e||(this.left=this.minX),this.pathOffset={x:this.minX+this.width/2,y:this.minY+this.height/2}},_calcDimensions:function(){var t=this.points,e=r(t,"x"),i=r(t,"y"),s=n(t,"x"),o=n(t,"y");this.width=s-e||0,this.height=o-i||0,this.minX=e||0,this.minY=i||0},toObject:function(t){return i(this.callSuper("toObject",t),{points:this.points.concat()})},toSVG:function(t){for(var e,i=[],r=this._createBaseSVGMarkup(),n=0,o=this.points.length;n<o;n++)i.push(s(this.points[n].x,2),",",s(this.points[n].y,2)," ");return this.group&&"path-group"===this.group.type||(e=" translate("+-this.pathOffset.x+", "+-this.pathOffset.y+") "),r.push("<",this.type," ",this.getSvgId(),'points="',i.join(""),'" style="',this.getSvgStyles(),'" transform="',this.getSvgTransform(),e," ",this.getSvgTransformMatrix(),'"/>\n'),t?t(r.join("")):r.join("")},_render:function(t,e){this.commonRender(t,e)&&(this._renderFill(t),(this.stroke||this.strokeDashArray)&&(t.closePath(),this._renderStroke(t)))},commonRender:function(t,e){var i,r=this.points.length;if(!r||isNaN(this.points[r-1].y))return!1;e||t.translate(-this.pathOffset.x,-this.pathOffset.y),t.beginPath(),t.moveTo(this.points[0].x,this.points[0].y);for(var n=0;n<r;n++)i=this.points[n],t.lineTo(i.x,i.y);return!0},_renderDashedStroke:function(t){e.Polyline.prototype._renderDashedStroke.call(this,t),t.closePath()},complexity:function(){return this.points.length}}),e.Polygon.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat(),e.Polygon.fromElement=function(t,r){if(!t)return null;r||(r={});var n=e.parsePointsAttribute(t.getAttribute("points")),s=e.parseAttributes(t,e.Polygon.ATTRIBUTE_NAMES);return new e.Polygon(n,i(s,r))},void(e.Polygon.fromObject=function(t){return new e.Polygon(t.points,t,!0)}))}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.array.min,r=e.util.array.max,n=e.util.object.extend,s=Object.prototype.toString,o=e.util.drawArc,a={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7},h={m:"l",M:"L"};return e.Path?void e.warn("fabric.Path is already defined"):(e.Path=e.util.createClass(e.Object,{type:"path",path:null,minX:0,minY:0,initialize:function(t,e){e=e||{},this.setOptions(e),t||(t=[]);var i="[object Array]"===s.call(t);this.path=i?t:t.match&&t.match(/[mzlhvcsqta][^mzlhvcsqta]*/gi),this.path&&(i||(this.path=this._parsePath()),this._setPositionDimensions(e),e.sourcePath&&this.setSourcePath(e.sourcePath))},_setPositionDimensions:function(t){var e=this._parseDimensions();this.minX=e.left,this.minY=e.top,this.width=e.width,this.height=e.height,"undefined"==typeof t.left&&(this.left=e.left+("center"===this.originX?this.width/2:"right"===this.originX?this.width:0)),"undefined"==typeof t.top&&(this.top=e.top+("center"===this.originY?this.height/2:"bottom"===this.originY?this.height:0)),this.pathOffset=this.pathOffset||{x:this.minX+this.width/2,y:this.minY+this.height/2}},_renderPathCommands:function(t){var e,i,r,n=null,s=0,a=0,h=0,c=0,l=0,u=0,f=-this.pathOffset.x,d=-this.pathOffset.y;this.group&&"path-group"===this.group.type&&(f=0,d=0),t.beginPath();for(var g=0,p=this.path.length;g<p;++g){switch(e=this.path[g],e[0]){case"l":h+=e[1],c+=e[2],t.lineTo(h+f,c+d);break;case"L":h=e[1],c=e[2],t.lineTo(h+f,c+d);break;case"h":h+=e[1],t.lineTo(h+f,c+d);break;case"H":h=e[1],t.lineTo(h+f,c+d);break;case"v":c+=e[1],t.lineTo(h+f,c+d);break;case"V":c=e[1],t.lineTo(h+f,c+d);break;case"m":h+=e[1],c+=e[2],s=h,a=c,t.moveTo(h+f,c+d);break;case"M":h=e[1],c=e[2],s=h,a=c,t.moveTo(h+f,c+d);break;case"c":i=h+e[5],r=c+e[6],l=h+e[3],u=c+e[4],t.bezierCurveTo(h+e[1]+f,c+e[2]+d,l+f,u+d,i+f,r+d),h=i,c=r;break;case"C":h=e[5],c=e[6],l=e[3],u=e[4],t.bezierCurveTo(e[1]+f,e[2]+d,l+f,u+d,h+f,c+d);break;case"s":i=h+e[3],r=c+e[4],null===n[0].match(/[CcSs]/)?(l=h,u=c):(l=2*h-l,u=2*c-u),t.bezierCurveTo(l+f,u+d,h+e[1]+f,c+e[2]+d,i+f,r+d),l=h+e[1],u=c+e[2],h=i,c=r;break;case"S":i=e[3],r=e[4],null===n[0].match(/[CcSs]/)?(l=h,u=c):(l=2*h-l,u=2*c-u),t.bezierCurveTo(l+f,u+d,e[1]+f,e[2]+d,i+f,r+d),h=i,c=r,l=e[1],u=e[2];break;case"q":i=h+e[3],r=c+e[4],l=h+e[1],u=c+e[2],t.quadraticCurveTo(l+f,u+d,i+f,r+d),h=i,c=r;break;case"Q":i=e[3],r=e[4],t.quadraticCurveTo(e[1]+f,e[2]+d,i+f,r+d),h=i,c=r,l=e[1],u=e[2];break;case"t":i=h+e[1],r=c+e[2],null===n[0].match(/[QqTt]/)?(l=h,u=c):(l=2*h-l,u=2*c-u),t.quadraticCurveTo(l+f,u+d,i+f,r+d),h=i,c=r;break;case"T":i=e[1],r=e[2],null===n[0].match(/[QqTt]/)?(l=h,u=c):(l=2*h-l,u=2*c-u),t.quadraticCurveTo(l+f,u+d,i+f,r+d),h=i,c=r;break;case"a":o(t,h+f,c+d,[e[1],e[2],e[3],e[4],e[5],e[6]+h+f,e[7]+c+d]),h+=e[6],c+=e[7];break;case"A":o(t,h+f,c+d,[e[1],e[2],e[3],e[4],e[5],e[6]+f,e[7]+d]),h=e[6],c=e[7];break;case"z":case"Z":h=s,c=a,t.closePath()}n=e}},_render:function(t){this._renderPathCommands(t),this._renderFill(t),this._renderStroke(t)},toString:function(){return"#<fabric.Path ("+this.complexity()+'): { "top": '+this.top+', "left": '+this.left+" }>"},toObject:function(t){var e=n(this.callSuper("toObject",t),{path:this.path.map(function(t){return t.slice()}),pathOffset:this.pathOffset});return this.sourcePath&&(e.sourcePath=this.sourcePath),this.transformMatrix&&(e.transformMatrix=this.transformMatrix),e},toDatalessObject:function(t){var e=this.toObject(t);return this.sourcePath&&(e.path=this.sourcePath),delete e.sourcePath,e},toSVG:function(t){for(var e=[],i=this._createBaseSVGMarkup(),r="",n=0,s=this.path.length;n<s;n++)e.push(this.path[n].join(" "));var o=e.join(" ");return this.group&&"path-group"===this.group.type||(r=" translate("+-this.pathOffset.x+", "+-this.pathOffset.y+") "),i.push("<path ",this.getSvgId(),'d="',o,'" style="',this.getSvgStyles(),'" transform="',this.getSvgTransform(),r,this.getSvgTransformMatrix(),'" stroke-linecap="round" ',"/>\n"),t?t(i.join("")):i.join("")},complexity:function(){return this.path.length},_parsePath:function(){for(var t,e,i,r,n,s=[],o=[],c=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi,l=0,u=this.path.length;l<u;l++){for(t=this.path[l],r=t.slice(1).trim(),o.length=0;i=c.exec(r);)o.push(i[0]);n=[t.charAt(0)];for(var f=0,d=o.length;f<d;f++)e=parseFloat(o[f]),isNaN(e)||n.push(e);var g=n[0],p=a[g.toLowerCase()],v=h[g]||g;if(n.length-1>p)for(var b=1,m=n.length;b<m;b+=p)s.push([g].concat(n.slice(b,b+p))),g=v;else s.push(n)}return s},_parseDimensions:function(){for(var t,n,s,o,a=[],h=[],c=null,l=0,u=0,f=0,d=0,g=0,p=0,v=0,b=this.path.length;v<b;++v){switch(t=this.path[v],t[0]){case"l":f+=t[1],d+=t[2],o=[];break;case"L":f=t[1],d=t[2],o=[];break;case"h":f+=t[1],o=[];break;case"H":f=t[1],o=[];break;case"v":d+=t[1],o=[];break;case"V":d=t[1],o=[];break;case"m":f+=t[1],d+=t[2],l=f,u=d,o=[];break;case"M":f=t[1],d=t[2],l=f,u=d,o=[];break;case"c":n=f+t[5],s=d+t[6],g=f+t[3],p=d+t[4],o=e.util.getBoundsOfCurve(f,d,f+t[1],d+t[2],g,p,n,s),f=n,d=s;break;case"C":f=t[5],d=t[6],g=t[3],p=t[4],o=e.util.getBoundsOfCurve(f,d,t[1],t[2],g,p,f,d);break;case"s":n=f+t[3],s=d+t[4],null===c[0].match(/[CcSs]/)?(g=f,p=d):(g=2*f-g,p=2*d-p),o=e.util.getBoundsOfCurve(f,d,g,p,f+t[1],d+t[2],n,s),g=f+t[1],p=d+t[2],f=n,d=s;break;case"S":n=t[3],s=t[4],null===c[0].match(/[CcSs]/)?(g=f,p=d):(g=2*f-g,p=2*d-p),o=e.util.getBoundsOfCurve(f,d,g,p,t[1],t[2],n,s),f=n,d=s,g=t[1],p=t[2];break;case"q":n=f+t[3],s=d+t[4],g=f+t[1],p=d+t[2],o=e.util.getBoundsOfCurve(f,d,g,p,g,p,n,s),f=n,d=s;break;case"Q":g=t[1],p=t[2],o=e.util.getBoundsOfCurve(f,d,g,p,g,p,t[3],t[4]),f=t[3],d=t[4];break;case"t":n=f+t[1],s=d+t[2],null===c[0].match(/[QqTt]/)?(g=f,p=d):(g=2*f-g,p=2*d-p),o=e.util.getBoundsOfCurve(f,d,g,p,g,p,n,s),f=n,d=s;break;case"T":n=t[1],s=t[2],null===c[0].match(/[QqTt]/)?(g=f,p=d):(g=2*f-g,p=2*d-p),o=e.util.getBoundsOfCurve(f,d,g,p,g,p,n,s),f=n,d=s;break;case"a":o=e.util.getBoundsOfArc(f,d,t[1],t[2],t[3],t[4],t[5],t[6]+f,t[7]+d),f+=t[6],d+=t[7];break;case"A":o=e.util.getBoundsOfArc(f,d,t[1],t[2],t[3],t[4],t[5],t[6],t[7]),f=t[6],d=t[7];break;case"z":case"Z":f=l,d=u}c=t,o.forEach(function(t){a.push(t.x),h.push(t.y)}),a.push(f),h.push(d)}var m=i(a)||0,y=i(h)||0,_=r(a)||0,x=r(h)||0,S=_-m,C=x-y,w={left:m,top:y,width:S,height:C};return w}}),e.Path.fromObject=function(t,i){"string"==typeof t.path?e.loadSVGFromURL(t.path,function(r){var n=r[0],s=t.path;delete t.path,e.util.object.extend(n,t),n.setSourcePath(s),i(n)}):i(new e.Path(t.path,t))},e.Path.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat(["d"]),e.Path.fromElement=function(t,i,r){var s=e.parseAttributes(t,e.Path.ATTRIBUTE_NAMES);i&&i(new e.Path(s.d,n(s,r)))},void(e.Path.async=!0))}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.extend,r=e.util.array.invoke,n=e.Object.prototype.toObject;return e.PathGroup?void e.warn("fabric.PathGroup is already defined"):(e.PathGroup=e.util.createClass(e.Path,{type:"path-group",fill:"",initialize:function(t,e){e=e||{},this.paths=t||[];for(var i=this.paths.length;i--;)this.paths[i].group=this;e.toBeParsed&&(this.parseDimensionsFromPaths(e),delete e.toBeParsed),this.setOptions(e),this.setCoords(),e.sourcePath&&this.setSourcePath(e.sourcePath)},parseDimensionsFromPaths:function(t){for(var i,r,n,s,o,a,h=[],c=[],l=this.paths.length;l--;){n=this.paths[l],s=n.height+n.strokeWidth,o=n.width+n.strokeWidth,i=[{x:n.left,y:n.top},{x:n.left+o,y:n.top},{x:n.left,y:n.top+s},{x:n.left+o,y:n.top+s}],a=this.paths[l].transformMatrix;for(var u=0;u<i.length;u++)r=i[u],a&&(r=e.util.transformPoint(r,a,!1)),h.push(r.x),c.push(r.y)}t.width=Math.max.apply(null,h),t.height=Math.max.apply(null,c)},render:function(t){if(this.visible){t.save(),this.transformMatrix&&t.transform.apply(t,this.transformMatrix),this.transform(t),this._setShadow(t),this.clipTo&&e.util.clipContext(this,t),t.translate(-this.width/2,-this.height/2);for(var i=0,r=this.paths.length;i<r;++i)this.paths[i].render(t,!0);this.clipTo&&t.restore(),t.restore()}},_set:function(t,e){if("fill"===t&&e&&this.isSameColor())for(var i=this.paths.length;i--;)this.paths[i]._set(t,e);return this.callSuper("_set",t,e)},toObject:function(t){var e=i(n.call(this,t),{paths:r(this.getObjects(),"toObject",t)});return this.sourcePath&&(e.sourcePath=this.sourcePath),e},toDatalessObject:function(t){
var e=this.toObject(t);return this.sourcePath&&(e.paths=this.sourcePath),e},toSVG:function(t){var e=this.getObjects(),i=this.getPointByOrigin("left","top"),r="translate("+i.x+" "+i.y+")",n=this._createBaseSVGMarkup();n.push("<g ",this.getSvgId(),'style="',this.getSvgStyles(),'" ','transform="',this.getSvgTransformMatrix(),r,this.getSvgTransform(),'" ',">\n");for(var s=0,o=e.length;s<o;s++)n.push("\t",e[s].toSVG(t));return n.push("</g>\n"),t?t(n.join("")):n.join("")},toString:function(){return"#<fabric.PathGroup ("+this.complexity()+"): { top: "+this.top+", left: "+this.left+" }>"},isSameColor:function(){var t=this.getObjects()[0].get("fill")||"";return"string"==typeof t&&(t=t.toLowerCase(),this.getObjects().every(function(e){var i=e.get("fill")||"";return"string"==typeof i&&i.toLowerCase()===t}))},complexity:function(){return this.paths.reduce(function(t,e){return t+(e&&e.complexity?e.complexity():0)},0)},getObjects:function(){return this.paths}}),e.PathGroup.fromObject=function(t,i){"string"==typeof t.paths?e.loadSVGFromURL(t.paths,function(r){var n=t.paths;delete t.paths;var s=e.util.groupSVGElements(r,t,n);i(s)}):e.util.enlivenObjects(t.paths,function(r){delete t.paths,i(new e.PathGroup(r,t))})},void(e.PathGroup.async=!0))}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.extend,r=e.util.array.min,n=e.util.array.max,s=e.util.array.invoke;if(!e.Group){var o={lockMovementX:!0,lockMovementY:!0,lockRotation:!0,lockScalingX:!0,lockScalingY:!0,lockUniScaling:!0};e.Group=e.util.createClass(e.Object,e.Collection,{type:"group",strokeWidth:0,subTargetCheck:!1,initialize:function(t,e,i){e=e||{},this._objects=[],i&&this.callSuper("initialize",e),this._objects=t||[];for(var r=this._objects.length;r--;)this._objects[r].group=this;this.originalState={},e.originX&&(this.originX=e.originX),e.originY&&(this.originY=e.originY),i?this._updateObjectsCoords(!0):(this._calcBounds(),this._updateObjectsCoords(),this.callSuper("initialize",e)),this.setCoords(),this.saveCoords()},_updateObjectsCoords:function(t){for(var e=this._objects.length;e--;)this._updateObjectCoords(this._objects[e],t)},_updateObjectCoords:function(t,e){if(t.__origHasControls=t.hasControls,t.hasControls=!1,!e){var i=t.getLeft(),r=t.getTop(),n=this.getCenterPoint();t.set({originalLeft:i,originalTop:r,left:i-n.x,top:r-n.y}),t.setCoords()}},toString:function(){return"#<fabric.Group: ("+this.complexity()+")>"},addWithUpdate:function(t){return this._restoreObjectsState(),e.util.resetObjectTransform(this),t&&(this._objects.push(t),t.group=this,t._set("canvas",this.canvas)),this.forEachObject(this._setObjectActive,this),this._calcBounds(),this._updateObjectsCoords(),this},_setObjectActive:function(t){t.set("active",!0),t.group=this},removeWithUpdate:function(t){return this._restoreObjectsState(),e.util.resetObjectTransform(this),this.forEachObject(this._setObjectActive,this),this.remove(t),this._calcBounds(),this._updateObjectsCoords(),this},_onObjectAdded:function(t){t.group=this,t._set("canvas",this.canvas)},_onObjectRemoved:function(t){delete t.group,t.set("active",!1)},delegatedProperties:{fill:!0,stroke:!0,strokeWidth:!0,fontFamily:!0,fontWeight:!0,fontSize:!0,fontStyle:!0,lineHeight:!0,textDecoration:!0,textAlign:!0,backgroundColor:!0},_set:function(t,e){var i=this._objects.length;if(this.delegatedProperties[t]||"canvas"===t)for(;i--;)this._objects[i].set(t,e);else for(;i--;)this._objects[i].setOnGroup(t,e);this.callSuper("_set",t,e)},toObject:function(t){return i(this.callSuper("toObject",t),{objects:s(this._objects,"toObject",t)})},render:function(t){if(this.visible){t.save(),this.transformMatrix&&t.transform.apply(t,this.transformMatrix),this.transform(t),this._setShadow(t),this.clipTo&&e.util.clipContext(this,t),this._transformDone=!0;for(var i=0,r=this._objects.length;i<r;i++)this._renderObject(this._objects[i],t);this.clipTo&&t.restore(),t.restore(),this._transformDone=!1}},_renderControls:function(t,e){this.callSuper("_renderControls",t,e);for(var i=0,r=this._objects.length;i<r;i++)this._objects[i]._renderControls(t)},_renderObject:function(t,e){if(t.visible){var i=t.hasRotatingPoint;t.hasRotatingPoint=!1,t.render(e),t.hasRotatingPoint=i}},_restoreObjectsState:function(){return this._objects.forEach(this._restoreObjectState,this),this},realizeTransform:function(t){var i=t.calcTransformMatrix(),r=e.util.qrDecompose(i),n=new e.Point(r.translateX,r.translateY);return t.scaleX=r.scaleX,t.scaleY=r.scaleY,t.skewX=r.skewX,t.skewY=r.skewY,t.angle=r.angle,t.flipX=!1,t.flipY=!1,t.setPositionByOrigin(n,"center","center"),t},_restoreObjectState:function(t){return this.realizeTransform(t),t.setCoords(),t.hasControls=t.__origHasControls,delete t.__origHasControls,t.set("active",!1),delete t.group,this},destroy:function(){return this._restoreObjectsState()},saveCoords:function(){return this._originalLeft=this.get("left"),this._originalTop=this.get("top"),this},hasMoved:function(){return this._originalLeft!==this.get("left")||this._originalTop!==this.get("top")},setObjectsCoords:function(){return this.forEachObject(function(t){t.setCoords()}),this},_calcBounds:function(t){for(var e,i,r,n=[],s=[],o=["tr","br","bl","tl"],a=0,h=this._objects.length,c=o.length;a<h;++a)for(e=this._objects[a],e.setCoords(),r=0;r<c;r++)i=o[r],n.push(e.oCoords[i].x),s.push(e.oCoords[i].y);this.set(this._getBounds(n,s,t))},_getBounds:function(t,i,s){var o=e.util.invertTransform(this.getViewportTransform()),a=e.util.transformPoint(new e.Point(r(t),r(i)),o),h=e.util.transformPoint(new e.Point(n(t),n(i)),o),c={width:h.x-a.x||0,height:h.y-a.y||0};return s||(c.left=a.x||0,c.top=a.y||0,"center"===this.originX&&(c.left+=c.width/2),"right"===this.originX&&(c.left+=c.width),"center"===this.originY&&(c.top+=c.height/2),"bottom"===this.originY&&(c.top+=c.height)),c},toSVG:function(t){var e=this._createBaseSVGMarkup();e.push("<g ",this.getSvgId(),'transform="',this.getSvgTransform(),this.getSvgTransformMatrix(),'" style="',this.getSvgFilter(),'">\n');for(var i=0,r=this._objects.length;i<r;i++)e.push("\t",this._objects[i].toSVG(t));return e.push("</g>\n"),t?t(e.join("")):e.join("")},get:function(t){if(t in o){if(this[t])return this[t];for(var e=0,i=this._objects.length;e<i;e++)if(this._objects[e][t])return!0;return!1}return t in this.delegatedProperties?this._objects[0]&&this._objects[0].get(t):this[t]}}),e.Group.fromObject=function(t,i){e.util.enlivenObjects(t.objects,function(r){delete t.objects,i&&i(new e.Group(r,t,!0))})},e.Group.async=!0}}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=fabric.util.object.extend;return t.fabric||(t.fabric={}),t.fabric.Image?void fabric.warn("fabric.Image is already defined."):(fabric.Image=fabric.util.createClass(fabric.Object,{type:"image",crossOrigin:"",alignX:"none",alignY:"none",meetOrSlice:"meet",strokeWidth:0,_lastScaleX:1,_lastScaleY:1,minimumScaleTrigger:.5,initialize:function(t,e,i){e||(e={}),this.filters=[],this.resizeFilters=[],this.callSuper("initialize",e),this._initElement(t,e,i)},getElement:function(){return this._element},setElement:function(t,e,i){var r,n;return this._element=t,this._originalElement=t,this._initConfig(i),0===this.resizeFilters.length?r=e:(n=this,r=function(){n.applyFilters(e,n.resizeFilters,n._filteredEl||n._originalElement,!0)}),0!==this.filters.length?this.applyFilters(r):r&&r(this),this},setCrossOrigin:function(t){return this.crossOrigin=t,this._element.crossOrigin=t,this},getOriginalSize:function(){var t=this.getElement();return{width:t.width,height:t.height}},_stroke:function(t){if(this.stroke&&0!==this.strokeWidth){var e=this.width/2,i=this.height/2;t.beginPath(),t.moveTo(-e,-i),t.lineTo(e,-i),t.lineTo(e,i),t.lineTo(-e,i),t.lineTo(-e,-i),t.closePath()}},_renderDashedStroke:function(t){var e=-this.width/2,i=-this.height/2,r=this.width,n=this.height;t.save(),this._setStrokeStyles(t),t.beginPath(),fabric.util.drawDashedLine(t,e,i,e+r,i,this.strokeDashArray),fabric.util.drawDashedLine(t,e+r,i,e+r,i+n,this.strokeDashArray),fabric.util.drawDashedLine(t,e+r,i+n,e,i+n,this.strokeDashArray),fabric.util.drawDashedLine(t,e,i+n,e,i,this.strokeDashArray),t.closePath(),t.restore()},toObject:function(t){var i=[],r=[],n=1,s=1;this.filters.forEach(function(t){t&&("Resize"===t.type&&(n*=t.scaleX,s*=t.scaleY),i.push(t.toObject()))}),this.resizeFilters.forEach(function(t){t&&r.push(t.toObject())});var o=e(this.callSuper("toObject",t),{src:this.getSrc(),filters:i,resizeFilters:r,crossOrigin:this.crossOrigin,alignX:this.alignX,alignY:this.alignY,meetOrSlice:this.meetOrSlice});return o.width/=n,o.height/=s,this.includeDefaultValues||this._removeDefaultValues(o),o},toSVG:function(t){var e=this._createBaseSVGMarkup(),i=-this.width/2,r=-this.height/2,n="none";if(this.group&&"path-group"===this.group.type&&(i=this.left,r=this.top),"none"!==this.alignX&&"none"!==this.alignY&&(n="x"+this.alignX+"Y"+this.alignY+" "+this.meetOrSlice),e.push('<g transform="',this.getSvgTransform(),this.getSvgTransformMatrix(),'">\n',"<image ",this.getSvgId(),'xlink:href="',this.getSvgSrc(),'" x="',i,'" y="',r,'" style="',this.getSvgStyles(),'" width="',this.width,'" height="',this.height,'" preserveAspectRatio="',n,'"',"></image>\n"),this.stroke||this.strokeDashArray){var s=this.fill;this.fill=null,e.push("<rect ",'x="',i,'" y="',r,'" width="',this.width,'" height="',this.height,'" style="',this.getSvgStyles(),'"/>\n'),this.fill=s}return e.push("</g>\n"),t?t(e.join("")):e.join("")},getSrc:function(){var t=this._originalElement;return t?fabric.isLikelyNode?t._src:t.src:this.src||""},setSrc:function(t,e,i){fabric.util.loadImage(t,function(t){return this.setElement(t,e,i)},this,i&&i.crossOrigin)},toString:function(){return'#<fabric.Image: { src: "'+this.getSrc()+'" }>'},clone:function(t,e){this.constructor.fromObject(this.toObject(e),t)},applyFilters:function(t,e,i,r){if(e=e||this.filters,i=i||this._originalElement){var n,s,o=fabric.util.createImage(),a=this.canvas?this.canvas.getRetinaScaling():fabric.devicePixelRatio,h=this.minimumScaleTrigger/a,c=this;if(0===e.length)return this._element=i,t&&t(this),i;var l=fabric.util.createCanvasElement();return l.width=i.width,l.height=i.height,l.getContext("2d").drawImage(i,0,0,i.width,i.height),e.forEach(function(t){r?(n=c.scaleX<h?c.scaleX:1,s=c.scaleY<h?c.scaleY:1,n*a<1&&(n*=a),s*a<1&&(s*=a)):(n=t.scaleX,s=t.scaleY),t&&t.applyTo(l,n,s),!r&&t&&"Resize"===t.type&&(c.width*=t.scaleX,c.height*=t.scaleY)}),o.width=l.width,o.height=l.height,fabric.isLikelyNode?(o.src=l.toBuffer(void 0,fabric.Image.pngCompression),c._element=o,t&&t(c)):(o.onload=function(){c._element=o,!r&&(c._filteredEl=o),t&&t(c),o.onload=l=null},o.src=l.toDataURL("image/png")),l}},_render:function(t,e){var i,r,n,s=this._findMargins();i=e?this.left:-this.width/2,r=e?this.top:-this.height/2,"slice"===this.meetOrSlice&&(t.beginPath(),t.rect(i,r,this.width,this.height),t.clip()),this.isMoving===!1&&this.resizeFilters.length&&this._needsResize()?(this._lastScaleX=this.scaleX,this._lastScaleY=this.scaleY,n=this.applyFilters(null,this.resizeFilters,this._filteredEl||this._originalElement,!0)):n=this._element,n&&t.drawImage(n,i+s.marginX,r+s.marginY,s.width,s.height),this._stroke(t),this._renderStroke(t)},_needsResize:function(){return this.scaleX!==this._lastScaleX||this.scaleY!==this._lastScaleY},_findMargins:function(){var t,e,i=this.width,r=this.height,n=0,s=0;return"none"===this.alignX&&"none"===this.alignY||(t=[this.width/this._element.width,this.height/this._element.height],e="meet"===this.meetOrSlice?Math.min.apply(null,t):Math.max.apply(null,t),i=this._element.width*e,r=this._element.height*e,"Mid"===this.alignX&&(n=(this.width-i)/2),"Max"===this.alignX&&(n=this.width-i),"Mid"===this.alignY&&(s=(this.height-r)/2),"Max"===this.alignY&&(s=this.height-r)),{width:i,height:r,marginX:n,marginY:s}},_resetWidthHeight:function(){var t=this.getElement();this.set("width",t.width),this.set("height",t.height)},_initElement:function(t,e,i){this.setElement(fabric.util.getById(t),i,e),fabric.util.addClass(this.getElement(),fabric.Image.CSS_CANVAS)},_initConfig:function(t){t||(t={}),this.setOptions(t),this._setWidthHeight(t),this._element&&this.crossOrigin&&(this._element.crossOrigin=this.crossOrigin)},_initFilters:function(t,e){t&&t.length?fabric.util.enlivenObjects(t,function(t){e&&e(t)},"fabric.Image.filters"):e&&e()},_setWidthHeight:function(t){this.width="width"in t?t.width:this.getElement()?this.getElement().width||0:0,this.height="height"in t?t.height:this.getElement()?this.getElement().height||0:0},complexity:function(){return 1}}),fabric.Image.CSS_CANVAS="canvas-img",fabric.Image.prototype.getSvgSrc=fabric.Image.prototype.getSrc,fabric.Image.fromObject=function(t,e){fabric.util.loadImage(t.src,function(i){fabric.Image.prototype._initFilters.call(t,t.filters,function(r){t.filters=r||[],fabric.Image.prototype._initFilters.call(t,t.resizeFilters,function(r){return t.resizeFilters=r||[],new fabric.Image(i,t,e)})})},null,t.crossOrigin)},fabric.Image.fromURL=function(t,e,i){fabric.util.loadImage(t,function(t){e&&e(new fabric.Image(t,i))},null,i&&i.crossOrigin)},fabric.Image.ATTRIBUTE_NAMES=fabric.SHARED_ATTRIBUTES.concat("x y width height preserveAspectRatio xlink:href".split(" ")),fabric.Image.fromElement=function(t,i,r){var n,s=fabric.parseAttributes(t,fabric.Image.ATTRIBUTE_NAMES);s.preserveAspectRatio&&(n=fabric.util.parsePreserveAspectRatioAttribute(s.preserveAspectRatio),e(s,n)),fabric.Image.fromURL(s["xlink:href"],i,e(r?fabric.util.object.clone(r):{},s))},fabric.Image.async=!0,void(fabric.Image.pngCompression=1))}("undefined"!=typeof exports?exports:this),fabric.util.object.extend(fabric.Object.prototype,{_getAngleValueForStraighten:function(){var t=this.getAngle()%360;return t>0?90*Math.round((t-1)/90):90*Math.round(t/90)},straighten:function(){return this.setAngle(this._getAngleValueForStraighten()),this},fxStraighten:function(t){t=t||{};var e=function(){},i=t.onComplete||e,r=t.onChange||e,n=this;return fabric.util.animate({startValue:this.get("angle"),endValue:this._getAngleValueForStraighten(),duration:this.FX_DURATION,onChange:function(t){n.setAngle(t),r()},onComplete:function(){n.setCoords(),i()},onStart:function(){n.set("active",!1)}}),this}}),fabric.util.object.extend(fabric.StaticCanvas.prototype,{straightenObject:function(t){return t.straighten(),this.renderAll(),this},fxStraightenObject:function(t){return t.fxStraighten({onChange:this.renderAll.bind(this)}),this}}),fabric.Image.filters=fabric.Image.filters||{},fabric.Image.filters.BaseFilter=fabric.util.createClass({type:"BaseFilter",initialize:function(t){t&&this.setOptions(t)},setOptions:function(t){for(var e in t)this[e]=t[e]},toObject:function(){return{type:this.type}},toJSON:function(){return this.toObject()}}),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.extend;e.Image.filters.Brightness=e.util.createClass(e.Image.filters.BaseFilter,{type:"Brightness",initialize:function(t){t=t||{},this.brightness=t.brightness||0},applyTo:function(t){for(var e=t.getContext("2d"),i=e.getImageData(0,0,t.width,t.height),r=i.data,n=this.brightness,s=0,o=r.length;s<o;s+=4)r[s]+=n,r[s+1]+=n,r[s+2]+=n;e.putImageData(i,0,0)},toObject:function(){return i(this.callSuper("toObject"),{brightness:this.brightness})}}),e.Image.filters.Brightness.fromObject=function(t){return new e.Image.filters.Brightness(t)}}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.extend;e.Image.filters.Convolute=e.util.createClass(e.Image.filters.BaseFilter,{type:"Convolute",initialize:function(t){t=t||{},this.opaque=t.opaque,this.matrix=t.matrix||[0,0,0,0,1,0,0,0,0]},applyTo:function(t){for(var e,i,r,n,s,o,a,h,c,l=this.matrix,u=t.getContext("2d"),f=u.getImageData(0,0,t.width,t.height),d=Math.round(Math.sqrt(l.length)),g=Math.floor(d/2),p=f.data,v=f.width,b=f.height,m=u.createImageData(v,b),y=m.data,_=this.opaque?1:0,x=0;x<b;x++)for(var S=0;S<v;S++){s=4*(x*v+S),e=0,i=0,r=0,n=0;for(var C=0;C<d;C++)for(var w=0;w<d;w++)a=x+C-g,o=S+w-g,a<0||a>b||o<0||o>v||(h=4*(a*v+o),c=l[C*d+w],e+=p[h]*c,i+=p[h+1]*c,r+=p[h+2]*c,n+=p[h+3]*c);y[s]=e,y[s+1]=i,y[s+2]=r,y[s+3]=n+_*(255-n)}u.putImageData(m,0,0)},toObject:function(){return i(this.callSuper("toObject"),{opaque:this.opaque,matrix:this.matrix})}}),e.Image.filters.Convolute.fromObject=function(t){return new e.Image.filters.Convolute(t)}}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.extend;e.Image.filters.GradientTransparency=e.util.createClass(e.Image.filters.BaseFilter,{type:"GradientTransparency",initialize:function(t){t=t||{},this.threshold=t.threshold||100},applyTo:function(t){for(var e=t.getContext("2d"),i=e.getImageData(0,0,t.width,t.height),r=i.data,n=this.threshold,s=r.length,o=0,a=r.length;o<a;o+=4)r[o+3]=n+255*(s-o)/s;e.putImageData(i,0,0)},toObject:function(){return i(this.callSuper("toObject"),{threshold:this.threshold})}}),e.Image.filters.GradientTransparency.fromObject=function(t){return new e.Image.filters.GradientTransparency(t)}}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={});e.Image.filters.Grayscale=e.util.createClass(e.Image.filters.BaseFilter,{type:"Grayscale",applyTo:function(t){for(var e,i=t.getContext("2d"),r=i.getImageData(0,0,t.width,t.height),n=r.data,s=r.width*r.height*4,o=0;o<s;)e=(n[o]+n[o+1]+n[o+2])/3,n[o]=e,n[o+1]=e,n[o+2]=e,o+=4;i.putImageData(r,0,0)}}),e.Image.filters.Grayscale.fromObject=function(){return new e.Image.filters.Grayscale}}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={});e.Image.filters.Invert=e.util.createClass(e.Image.filters.BaseFilter,{type:"Invert",applyTo:function(t){var e,i=t.getContext("2d"),r=i.getImageData(0,0,t.width,t.height),n=r.data,s=n.length;for(e=0;e<s;e+=4)n[e]=255-n[e],n[e+1]=255-n[e+1],n[e+2]=255-n[e+2];i.putImageData(r,0,0)}}),e.Image.filters.Invert.fromObject=function(){return new e.Image.filters.Invert}}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.extend;e.Image.filters.Mask=e.util.createClass(e.Image.filters.BaseFilter,{type:"Mask",initialize:function(t){t=t||{},this.mask=t.mask,this.channel=[0,1,2,3].indexOf(t.channel)>-1?t.channel:0},applyTo:function(t){if(this.mask){var i,r=t.getContext("2d"),n=r.getImageData(0,0,t.width,t.height),s=n.data,o=this.mask.getElement(),a=e.util.createCanvasElement(),h=this.channel,c=n.width*n.height*4;a.width=t.width,a.height=t.height,a.getContext("2d").drawImage(o,0,0,t.width,t.height);var l=a.getContext("2d").getImageData(0,0,t.width,t.height),u=l.data;for(i=0;i<c;i+=4)s[i+3]=u[i+h];r.putImageData(n,0,0)}},toObject:function(){return i(this.callSuper("toObject"),{mask:this.mask.toObject(),channel:this.channel})}}),e.Image.filters.Mask.fromObject=function(t,i){e.util.loadImage(t.mask.src,function(r){t.mask=new e.Image(r,t.mask),i&&i(new e.Image.filters.Mask(t))})},e.Image.filters.Mask.async=!0}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.extend;e.Image.filters.Noise=e.util.createClass(e.Image.filters.BaseFilter,{type:"Noise",initialize:function(t){t=t||{},this.noise=t.noise||0},applyTo:function(t){for(var e,i=t.getContext("2d"),r=i.getImageData(0,0,t.width,t.height),n=r.data,s=this.noise,o=0,a=n.length;o<a;o+=4)e=(.5-Math.random())*s,n[o]+=e,n[o+1]+=e,n[o+2]+=e;i.putImageData(r,0,0)},toObject:function(){return i(this.callSuper("toObject"),{noise:this.noise})}}),e.Image.filters.Noise.fromObject=function(t){return new e.Image.filters.Noise(t)}}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.extend;e.Image.filters.Pixelate=e.util.createClass(e.Image.filters.BaseFilter,{type:"Pixelate",initialize:function(t){t=t||{},this.blocksize=t.blocksize||4},applyTo:function(t){var e,i,r,n,s,o,a,h=t.getContext("2d"),c=h.getImageData(0,0,t.width,t.height),l=c.data,u=c.height,f=c.width;for(i=0;i<u;i+=this.blocksize)for(r=0;r<f;r+=this.blocksize){e=4*i*f+4*r,n=l[e],s=l[e+1],o=l[e+2],a=l[e+3];for(var d=i,g=i+this.blocksize;d<g;d++)for(var p=r,v=r+this.blocksize;p<v;p++)e=4*d*f+4*p,l[e]=n,l[e+1]=s,l[e+2]=o,l[e+3]=a}h.putImageData(c,0,0)},toObject:function(){return i(this.callSuper("toObject"),{blocksize:this.blocksize})}}),e.Image.filters.Pixelate.fromObject=function(t){return new e.Image.filters.Pixelate(t)}}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.extend;e.Image.filters.RemoveWhite=e.util.createClass(e.Image.filters.BaseFilter,{type:"RemoveWhite",initialize:function(t){t=t||{},this.threshold=t.threshold||30,this.distance=t.distance||20},applyTo:function(t){for(var e,i,r,n=t.getContext("2d"),s=n.getImageData(0,0,t.width,t.height),o=s.data,a=this.threshold,h=this.distance,c=255-a,l=Math.abs,u=0,f=o.length;u<f;u+=4)e=o[u],i=o[u+1],r=o[u+2],e>c&&i>c&&r>c&&l(e-i)<h&&l(e-r)<h&&l(i-r)<h&&(o[u+3]=0);n.putImageData(s,0,0)},toObject:function(){return i(this.callSuper("toObject"),{threshold:this.threshold,distance:this.distance})}}),e.Image.filters.RemoveWhite.fromObject=function(t){return new e.Image.filters.RemoveWhite(t)}}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={});e.Image.filters.Sepia=e.util.createClass(e.Image.filters.BaseFilter,{type:"Sepia",applyTo:function(t){var e,i,r=t.getContext("2d"),n=r.getImageData(0,0,t.width,t.height),s=n.data,o=s.length;for(e=0;e<o;e+=4)i=.3*s[e]+.59*s[e+1]+.11*s[e+2],s[e]=i+100,s[e+1]=i+50,s[e+2]=i+255;r.putImageData(n,0,0)}}),e.Image.filters.Sepia.fromObject=function(){return new e.Image.filters.Sepia}}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={});e.Image.filters.Sepia2=e.util.createClass(e.Image.filters.BaseFilter,{type:"Sepia2",applyTo:function(t){var e,i,r,n,s=t.getContext("2d"),o=s.getImageData(0,0,t.width,t.height),a=o.data,h=a.length;for(e=0;e<h;e+=4)i=a[e],r=a[e+1],n=a[e+2],a[e]=(.393*i+.769*r+.189*n)/1.351,a[e+1]=(.349*i+.686*r+.168*n)/1.203,a[e+2]=(.272*i+.534*r+.131*n)/2.14;s.putImageData(o,0,0)}}),e.Image.filters.Sepia2.fromObject=function(){return new e.Image.filters.Sepia2}}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.extend;e.Image.filters.Tint=e.util.createClass(e.Image.filters.BaseFilter,{type:"Tint",initialize:function(t){t=t||{},this.color=t.color||"#000000",this.opacity="undefined"!=typeof t.opacity?t.opacity:new e.Color(this.color).getAlpha()},applyTo:function(t){var i,r,n,s,o,a,h,c,l,u=t.getContext("2d"),f=u.getImageData(0,0,t.width,t.height),d=f.data,g=d.length;for(l=new e.Color(this.color).getSource(),r=l[0]*this.opacity,n=l[1]*this.opacity,s=l[2]*this.opacity,c=1-this.opacity,i=0;i<g;i+=4)o=d[i],a=d[i+1],h=d[i+2],d[i]=r+o*c,d[i+1]=n+a*c,d[i+2]=s+h*c;u.putImageData(f,0,0)},toObject:function(){return i(this.callSuper("toObject"),{color:this.color,opacity:this.opacity})}}),e.Image.filters.Tint.fromObject=function(t){return new e.Image.filters.Tint(t)}}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.extend;e.Image.filters.Multiply=e.util.createClass(e.Image.filters.BaseFilter,{type:"Multiply",initialize:function(t){t=t||{},this.color=t.color||"#000000"},applyTo:function(t){var i,r,n=t.getContext("2d"),s=n.getImageData(0,0,t.width,t.height),o=s.data,a=o.length;for(r=new e.Color(this.color).getSource(),i=0;i<a;i+=4)o[i]*=r[0]/255,o[i+1]*=r[1]/255,o[i+2]*=r[2]/255;n.putImageData(s,0,0)},toObject:function(){return i(this.callSuper("toObject"),{color:this.color})}}),e.Image.filters.Multiply.fromObject=function(t){return new e.Image.filters.Multiply(t)}}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric;e.Image.filters.Blend=e.util.createClass(e.Image.filters.BaseFilter,{type:"Blend",initialize:function(t){t=t||{},this.color=t.color||"#000",this.image=t.image||!1,this.mode=t.mode||"multiply",this.alpha=t.alpha||1},applyTo:function(t){var i,r,n,s,o,a,h,c,l,u,f=t.getContext("2d"),d=f.getImageData(0,0,t.width,t.height),g=d.data,p=!1;if(this.image){p=!0;var v=e.util.createCanvasElement();v.width=this.image.width,v.height=this.image.height;var b=new e.StaticCanvas(v);b.add(this.image);var m=b.getContext("2d");u=m.getImageData(0,0,b.width,b.height).data}else u=new e.Color(this.color).getSource(),i=u[0]*this.alpha,r=u[1]*this.alpha,n=u[2]*this.alpha;for(var y=0,_=g.length;y<_;y+=4)switch(s=g[y],o=g[y+1],a=g[y+2],p&&(i=u[y]*this.alpha,r=u[y+1]*this.alpha,n=u[y+2]*this.alpha),this.mode){case"multiply":g[y]=s*i/255,g[y+1]=o*r/255,g[y+2]=a*n/255;break;case"screen":g[y]=1-(1-s)*(1-i),g[y+1]=1-(1-o)*(1-r),g[y+2]=1-(1-a)*(1-n);break;case"add":g[y]=Math.min(255,s+i),g[y+1]=Math.min(255,o+r),g[y+2]=Math.min(255,a+n);break;case"diff":case"difference":g[y]=Math.abs(s-i),g[y+1]=Math.abs(o-r),g[y+2]=Math.abs(a-n);break;case"subtract":h=s-i,c=o-r,l=a-n,g[y]=h<0?0:h,g[y+1]=c<0?0:c,g[y+2]=l<0?0:l;break;case"darken":g[y]=Math.min(s,i),g[y+1]=Math.min(o,r),g[y+2]=Math.min(a,n);break;case"lighten":g[y]=Math.max(s,i),g[y+1]=Math.max(o,r),g[y+2]=Math.max(a,n)}f.putImageData(d,0,0)},toObject:function(){return{color:this.color,image:this.image,mode:this.mode,alpha:this.alpha}}}),e.Image.filters.Blend.fromObject=function(t){return new e.Image.filters.Blend(t)}}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=Math.pow,r=Math.floor,n=Math.sqrt,s=Math.abs,o=Math.max,a=Math.round,h=Math.sin,c=Math.ceil;e.Image.filters.Resize=e.util.createClass(e.Image.filters.BaseFilter,{type:"Resize",resizeType:"hermite",scaleX:0,scaleY:0,lanczosLobes:3,applyTo:function(t,e,i){if(1!==e||1!==i){this.rcpScaleX=1/e,this.rcpScaleY=1/i;var r,n=t.width,s=t.height,o=a(n*e),h=a(s*i);"sliceHack"===this.resizeType&&(r=this.sliceByTwo(t,n,s,o,h)),"hermite"===this.resizeType&&(r=this.hermiteFastResize(t,n,s,o,h)),"bilinear"===this.resizeType&&(r=this.bilinearFiltering(t,n,s,o,h)),"lanczos"===this.resizeType&&(r=this.lanczosResize(t,n,s,o,h)),t.width=o,t.height=h,t.getContext("2d").putImageData(r,0,0)}},sliceByTwo:function(t,i,n,s,a){var h,c=t.getContext("2d"),l=.5,u=.5,f=1,d=1,g=!1,p=!1,v=i,b=n,m=e.util.createCanvasElement(),y=m.getContext("2d");for(s=r(s),a=r(a),m.width=o(s,i),m.height=o(a,n),s>i&&(l=2,f=-1),a>n&&(u=2,d=-1),h=c.getImageData(0,0,i,n),t.width=o(s,i),t.height=o(a,n),c.putImageData(h,0,0);!g||!p;)i=v,n=b,s*f<r(v*l*f)?v=r(v*l):(v=s,g=!0),a*d<r(b*u*d)?b=r(b*u):(b=a,p=!0),h=c.getImageData(0,0,i,n),y.putImageData(h,0,0),c.clearRect(0,0,v,b),c.drawImage(m,0,0,i,n,0,0,v,b);return c.getImageData(0,0,s,a)},lanczosResize:function(t,e,o,a,l){function u(t){return function(e){if(e>t)return 0;if(e*=Math.PI,s(e)<1e-16)return 1;var i=e/t;return h(e)*h(i)/e/i}}function f(t){var h,c,u,d,g,j,A,M,P,I,L;for(T.x=(t+.5)*y,k.x=r(T.x),h=0;h<l;h++){for(T.y=(h+.5)*_,k.y=r(T.y),g=0,j=0,A=0,M=0,P=0,c=k.x-C;c<=k.x+C;c++)if(!(c<0||c>=e)){I=r(1e3*s(c-T.x)),O[I]||(O[I]={});for(var E=k.y-w;E<=k.y+w;E++)E<0||E>=o||(L=r(1e3*s(E-T.y)),O[I][L]||(O[I][L]=m(n(i(I*x,2)+i(L*S,2))/1e3)),u=O[I][L],u>0&&(d=4*(E*e+c),g+=u,j+=u*v[d],A+=u*v[d+1],M+=u*v[d+2],P+=u*v[d+3]))}d=4*(h*a+t),b[d]=j/g,b[d+1]=A/g,b[d+2]=M/g,b[d+3]=P/g}return++t<a?f(t):p}var d=t.getContext("2d"),g=d.getImageData(0,0,e,o),p=d.getImageData(0,0,a,l),v=g.data,b=p.data,m=u(this.lanczosLobes),y=this.rcpScaleX,_=this.rcpScaleY,x=2/this.rcpScaleX,S=2/this.rcpScaleY,C=c(y*this.lanczosLobes/2),w=c(_*this.lanczosLobes/2),O={},T={},k={};return f(0)},bilinearFiltering:function(t,e,i,n,s){var o,a,h,c,l,u,f,d,g,p,v,b,m,y=0,_=this.rcpScaleX,x=this.rcpScaleY,S=t.getContext("2d"),C=4*(e-1),w=S.getImageData(0,0,e,i),O=w.data,T=S.getImageData(0,0,n,s),k=T.data;for(f=0;f<s;f++)for(d=0;d<n;d++)for(l=r(_*d),u=r(x*f),g=_*d-l,p=x*f-u,m=4*(u*e+l),v=0;v<4;v++)o=O[m+v],a=O[m+4+v],h=O[m+C+v],c=O[m+C+4+v],b=o*(1-g)*(1-p)+a*g*(1-p)+h*p*(1-g)+c*g*p,k[y++]=b;return T},hermiteFastResize:function(t,e,i,o,a){for(var h=this.rcpScaleX,l=this.rcpScaleY,u=c(h/2),f=c(l/2),d=t.getContext("2d"),g=d.getImageData(0,0,e,i),p=g.data,v=d.getImageData(0,0,o,a),b=v.data,m=0;m<a;m++)for(var y=0;y<o;y++){for(var _=4*(y+m*o),x=0,S=0,C=0,w=0,O=0,T=0,k=0,j=(m+.5)*l,A=r(m*l);A<(m+1)*l;A++)for(var M=s(j-(A+.5))/f,P=(y+.5)*h,I=M*M,L=r(y*h);L<(y+1)*h;L++){var E=s(P-(L+.5))/u,D=n(I+E*E);D>1&&D<-1||(x=2*D*D*D-3*D*D+1,x>0&&(E=4*(L+A*e),k+=x*p[E+3],C+=x,p[E+3]<255&&(x=x*p[E+3]/250),w+=x*p[E],O+=x*p[E+1],T+=x*p[E+2],S+=x))}b[_]=w/S,b[_+1]=O/S,b[_+2]=T/S,b[_+3]=k/C}return v},toObject:function(){return{type:this.type,scaleX:this.scaleX,scaleY:this.scaleY,resizeType:this.resizeType,lanczosLobes:this.lanczosLobes}}}),e.Image.filters.Resize.fromObject=function(t){return new e.Image.filters.Resize(t)}}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.extend;e.Image.filters.ColorMatrix=e.util.createClass(e.Image.filters.BaseFilter,{type:"ColorMatrix",initialize:function(t){t||(t={}),this.matrix=t.matrix||[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]},applyTo:function(t){var e,i,r,n,s,o=t.getContext("2d"),a=o.getImageData(0,0,t.width,t.height),h=a.data,c=h.length,l=this.matrix;for(e=0;e<c;e+=4)i=h[e],r=h[e+1],n=h[e+2],s=h[e+3],h[e]=i*l[0]+r*l[1]+n*l[2]+s*l[3]+l[4],h[e+1]=i*l[5]+r*l[6]+n*l[7]+s*l[8]+l[9],h[e+2]=i*l[10]+r*l[11]+n*l[12]+s*l[13]+l[14],h[e+3]=i*l[15]+r*l[16]+n*l[17]+s*l[18]+l[19];o.putImageData(a,0,0)},toObject:function(){return i(this.callSuper("toObject"),{type:this.type,matrix:this.matrix})}}),e.Image.filters.ColorMatrix.fromObject=function(t){return new e.Image.filters.ColorMatrix(t)}}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.extend,r=e.util.object.clone,n=e.util.toFixed,s=e.Object.NUM_FRACTION_DIGITS;if(e.Text)return void e.warn("fabric.Text is already defined");var o=e.Object.prototype.stateProperties.concat();o.push("fontFamily","fontWeight","fontSize","text","textDecoration","textAlign","fontStyle","lineHeight","textBackgroundColor"),e.Text=e.util.createClass(e.Object,{_dimensionAffectingProps:{fontSize:!0,fontWeight:!0,fontFamily:!0,fontStyle:!0,lineHeight:!0,text:!0,charSpacing:!0,textAlign:!0,stroke:!1,strokeWidth:!1},_reNewline:/\r?\n/,_reSpacesAndTabs:/[ \t\r]+/g,type:"text",fontSize:40,fontWeight:"normal",fontFamily:"Times New Roman",textDecoration:"",textAlign:"left",fontStyle:"",lineHeight:1.16,textBackgroundColor:"",stateProperties:o,stroke:null,shadow:null,_fontSizeFraction:.25,_fontSizeMult:1.13,charSpacing:0,initialize:function(t,e){e=e||{},this.text=t,this.__skipDimension=!0,this.setOptions(e),this.__skipDimension=!1,this._initDimensions()},_initDimensions:function(t){this.__skipDimension||(t||(t=e.util.createCanvasElement().getContext("2d"),this._setTextStyles(t)),this._textLines=this._splitTextIntoLines(),this._clearCache(),this.width=this._getTextWidth(t),this.height=this._getTextHeight(t))},toString:function(){return"#<fabric.Text ("+this.complexity()+'): { "text": "'+this.text+'", "fontFamily": "'+this.fontFamily+'" }>'},_render:function(t){this.clipTo&&e.util.clipContext(this,t),this._setOpacity(t),this._setShadow(t),this._setupCompositeOperation(t),this._renderTextBackground(t),this._setStrokeStyles(t),this._setFillStyles(t),this._renderText(t),this._renderTextDecoration(t),this.clipTo&&t.restore()},_renderText:function(t){this._renderTextFill(t),this._renderTextStroke(t)},_setTextStyles:function(t){t.textBaseline="alphabetic",t.font=this._getFontDeclaration()},_getTextHeight:function(){return this._getHeightOfSingleLine()+(this._textLines.length-1)*this._getHeightOfLine()},_getTextWidth:function(t){for(var e=this._getLineWidth(t,0),i=1,r=this._textLines.length;i<r;i++){var n=this._getLineWidth(t,i);n>e&&(e=n)}return e},_getNonTransformedDimensions:function(){return{x:this.width,
y:this.height}},_renderChars:function(t,e,i,r,n){var s,o,a=t.slice(0,-4);if(this[a].toLive){var h=-this.width/2+this[a].offsetX||0,c=-this.height/2+this[a].offsetY||0;e.save(),e.translate(h,c),r-=h,n-=c}if(0!==this.charSpacing){var l=this._getWidthOfCharSpacing();i=i.split("");for(var u=0,f=i.length;u<f;u++)s=i[u],o=e.measureText(s).width+l,e[t](s,r,n),r+=o}else e[t](i,r,n);this[a].toLive&&e.restore()},_renderTextLine:function(t,e,i,r,n,s){n-=this.fontSize*this._fontSizeFraction;var o=this._getLineWidth(e,s);if("justify"!==this.textAlign||this.width<o)return void this._renderChars(t,e,i,r,n,s);for(var a,h=i.split(/\s+/),c=0,l=this._getWidthOfWords(e,h.join(""),s,0),u=this.width-l,f=h.length-1,d=f>0?u/f:0,g=0,p=0,v=h.length;p<v;p++){for(;" "===i[c]&&c<i.length;)c++;a=h[p],this._renderChars(t,e,a,r+g,n,s,c),g+=this._getWidthOfWords(e,a,s,c)+d,c+=a.length}},_getWidthOfWords:function(t,e){var i,r,n=t.measureText(e).width;return 0!==this.charSpacing&&(i=e.split("").length,r=i*this._getWidthOfCharSpacing(),n+=r),n},_getLeftOffset:function(){return-this.width/2},_getTopOffset:function(){return-this.height/2},isEmptyStyles:function(){return!0},_renderTextCommon:function(t,e){for(var i=0,r=this._getLeftOffset(),n=this._getTopOffset(),s=0,o=this._textLines.length;s<o;s++){var a=this._getHeightOfLine(t,s),h=a/this.lineHeight,c=this._getLineWidth(t,s),l=this._getLineLeftOffset(c);this._renderTextLine(e,t,this._textLines[s],r+l,n+i+h,s),i+=a}},_renderTextFill:function(t){!this.fill&&this.isEmptyStyles()||this._renderTextCommon(t,"fillText")},_renderTextStroke:function(t){(this.stroke&&0!==this.strokeWidth||!this.isEmptyStyles())&&(this.shadow&&!this.shadow.affectStroke&&this._removeShadow(t),t.save(),this._setLineDash(t,this.strokedashArray),t.beginPath(),this._renderTextCommon(t,"strokeText"),t.closePath(),t.restore())},_getHeightOfLine:function(){return this._getHeightOfSingleLine()*this.lineHeight},_getHeightOfSingleLine:function(){return this.fontSize*this._fontSizeMult},_renderTextBackground:function(t){this._renderTextBoxBackground(t),this._renderTextLinesBackground(t)},_renderTextBoxBackground:function(t){this.backgroundColor&&(t.fillStyle=this.backgroundColor,t.fillRect(this._getLeftOffset(),this._getTopOffset(),this.width,this.height),this._removeShadow(t))},_renderTextLinesBackground:function(t){if(this.textBackgroundColor){var e,i,r,n=0;t.fillStyle=this.textBackgroundColor;for(var s=0,o=this._textLines.length;s<o;s++)e=this._getHeightOfLine(t,s),i=this._getLineWidth(t,s),i>0&&(r=this._getLineLeftOffset(i),t.fillRect(this._getLeftOffset()+r,this._getTopOffset()+n,i,e/this.lineHeight)),n+=e;this._removeShadow(t)}},_getLineLeftOffset:function(t){return"center"===this.textAlign?(this.width-t)/2:"right"===this.textAlign?this.width-t:0},_clearCache:function(){this.__lineWidths=[],this.__lineHeights=[]},_shouldClearCache:function(){var t=!1;if(this._forceClearCache)return this._forceClearCache=!1,!0;for(var e in this._dimensionAffectingProps)this["__"+e]!==this[e]&&(this["__"+e]=this[e],t=!0);return t},_getLineWidth:function(t,e){if(this.__lineWidths[e])return this.__lineWidths[e]===-1?this.width:this.__lineWidths[e];var i,r,n=this._textLines[e];return i=""===n?0:this._measureLine(t,e),this.__lineWidths[e]=i,i&&"justify"===this.textAlign&&(r=n.split(/\s+/),r.length>1&&(this.__lineWidths[e]=-1)),i},_getWidthOfCharSpacing:function(){return 0!==this.charSpacing?this.fontSize*this.charSpacing/1e3:0},_measureLine:function(t,e){var i,r=this._textLines[e],n=t.measureText(r).width,s=0;return 0!==this.charSpacing&&(i=r.split("").length,s=(i-1)*this._getWidthOfCharSpacing()),n+s},_renderTextDecoration:function(t){function e(e){var n,s,o,a,h,c,l,u=0;for(n=0,s=r._textLines.length;n<s;n++){for(h=r._getLineWidth(t,n),c=r._getLineLeftOffset(h),l=r._getHeightOfLine(t,n),o=0,a=e.length;o<a;o++)t.fillRect(r._getLeftOffset()+c,u+(r._fontSizeMult-1+e[o])*r.fontSize-i,h,r.fontSize/15);u+=l}}if(this.textDecoration){var i=this.height/2,r=this,n=[];this.textDecoration.indexOf("underline")>-1&&n.push(.85),this.textDecoration.indexOf("line-through")>-1&&n.push(.43),this.textDecoration.indexOf("overline")>-1&&n.push(-.12),n.length>0&&e(n)}},_getFontDeclaration:function(){return[e.isLikelyNode?this.fontWeight:this.fontStyle,e.isLikelyNode?this.fontStyle:this.fontWeight,this.fontSize+"px",'"'+this.fontFamily+'"'].join(" ")},render:function(t,e){this.visible&&(t.save(),this._setTextStyles(t),this._shouldClearCache()&&this._initDimensions(t),this.drawSelectionBackground(t),e||this.transform(t),this.transformMatrix&&t.transform.apply(t,this.transformMatrix),this.group&&"path-group"===this.group.type&&t.translate(this.left,this.top),this._render(t),t.restore())},_splitTextIntoLines:function(){return this.text.split(this._reNewline)},toObject:function(t){var e=i(this.callSuper("toObject",t),{text:this.text,fontSize:this.fontSize,fontWeight:this.fontWeight,fontFamily:this.fontFamily,fontStyle:this.fontStyle,lineHeight:this.lineHeight,textDecoration:this.textDecoration,textAlign:this.textAlign,textBackgroundColor:this.textBackgroundColor,charSpacing:this.charSpacing});return this.includeDefaultValues||this._removeDefaultValues(e),e},toSVG:function(t){var e=this._createBaseSVGMarkup(),i=this._getSVGLeftTopOffsets(this.ctx),r=this._getSVGTextAndBg(i.textTop,i.textLeft);return this._wrapSVGTextAndBg(e,r),t?t(e.join("")):e.join("")},_getSVGLeftTopOffsets:function(t){var e=this._getHeightOfLine(t,0),i=-this.width/2,r=0;return{textLeft:i+(this.group&&"path-group"===this.group.type?this.left:0),textTop:r+(this.group&&"path-group"===this.group.type?-this.top:0),lineTop:e}},_wrapSVGTextAndBg:function(t,e){var i=!0,r=this.getSvgFilter(),n=""===r?"":' style="'+r+'"';t.push("\t<g ",this.getSvgId(),'transform="',this.getSvgTransform(),this.getSvgTransformMatrix(),'"',n,">\n",e.textBgRects.join(""),"\t\t<text ",this.fontFamily?'font-family="'+this.fontFamily.replace(/"/g,"'")+'" ':"",this.fontSize?'font-size="'+this.fontSize+'" ':"",this.fontStyle?'font-style="'+this.fontStyle+'" ':"",this.fontWeight?'font-weight="'+this.fontWeight+'" ':"",this.textDecoration?'text-decoration="'+this.textDecoration+'" ':"",'style="',this.getSvgStyles(i),'" >\n',e.textSpans.join(""),"\t\t</text>\n","\t</g>\n")},_getSVGTextAndBg:function(t,e){var i=[],r=[],n=0;this._setSVGBg(r);for(var s=0,o=this._textLines.length;s<o;s++)this.textBackgroundColor&&this._setSVGTextLineBg(r,s,e,t,n),this._setSVGTextLineText(s,i,n,e,t,r),n+=this._getHeightOfLine(this.ctx,s);return{textSpans:i,textBgRects:r}},_setSVGTextLineText:function(t,i,r,o,a){var h=this.fontSize*(this._fontSizeMult-this._fontSizeFraction)-a+r-this.height/2;return"justify"===this.textAlign?void this._setSVGTextLineJustifed(t,i,h,o):void i.push('\t\t\t<tspan x="',n(o+this._getLineLeftOffset(this._getLineWidth(this.ctx,t)),s),'" ','y="',n(h,s),'" ',this._getFillAttributes(this.fill),">",e.util.string.escapeXml(this._textLines[t]),"</tspan>\n")},_setSVGTextLineJustifed:function(t,i,r,o){var a=e.util.createCanvasElement().getContext("2d");this._setTextStyles(a);var h,c,l=this._textLines[t],u=l.split(/\s+/),f=this._getWidthOfWords(a,u.join("")),d=this.width-f,g=u.length-1,p=g>0?d/g:0,v=this._getFillAttributes(this.fill);for(o+=this._getLineLeftOffset(this._getLineWidth(a,t)),t=0,c=u.length;t<c;t++)h=u[t],i.push('\t\t\t<tspan x="',n(o,s),'" ','y="',n(r,s),'" ',v,">",e.util.string.escapeXml(h),"</tspan>\n"),o+=this._getWidthOfWords(a,h)+p},_setSVGTextLineBg:function(t,e,i,r,o){t.push("\t\t<rect ",this._getFillAttributes(this.textBackgroundColor),' x="',n(i+this._getLineLeftOffset(this._getLineWidth(this.ctx,e)),s),'" y="',n(o-this.height/2,s),'" width="',n(this._getLineWidth(this.ctx,e),s),'" height="',n(this._getHeightOfLine(this.ctx,e)/this.lineHeight,s),'"></rect>\n')},_setSVGBg:function(t){this.backgroundColor&&t.push("\t\t<rect ",this._getFillAttributes(this.backgroundColor),' x="',n(-this.width/2,s),'" y="',n(-this.height/2,s),'" width="',n(this.width,s),'" height="',n(this.height,s),'"></rect>\n')},_getFillAttributes:function(t){var i=t&&"string"==typeof t?new e.Color(t):"";return i&&i.getSource()&&1!==i.getAlpha()?'opacity="'+i.getAlpha()+'" fill="'+i.setAlpha(1).toRgb()+'"':'fill="'+t+'"'},_set:function(t,e){this.callSuper("_set",t,e),t in this._dimensionAffectingProps&&(this._initDimensions(),this.setCoords())},complexity:function(){return 1}}),e.Text.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat("x y dx dy font-family font-style font-weight font-size text-decoration text-anchor".split(" ")),e.Text.DEFAULT_SVG_FONT_SIZE=16,e.Text.fromElement=function(t,i){if(!t)return null;var r=e.parseAttributes(t,e.Text.ATTRIBUTE_NAMES);i=e.util.object.extend(i?e.util.object.clone(i):{},r),i.top=i.top||0,i.left=i.left||0,"dx"in r&&(i.left+=r.dx),"dy"in r&&(i.top+=r.dy),"fontSize"in i||(i.fontSize=e.Text.DEFAULT_SVG_FONT_SIZE),i.originX||(i.originX="left");var n="";"textContent"in t?n=t.textContent:"firstChild"in t&&null!==t.firstChild&&"data"in t.firstChild&&null!==t.firstChild.data&&(n=t.firstChild.data),n=n.replace(/^\s+|\s+$|\n+/g,"").replace(/\s+/g," ");var s=new e.Text(n,i),o=s.getHeight()/s.height,a=(s.height+s.strokeWidth)*s.lineHeight-s.height,h=a*o,c=s.getHeight()+h,l=0;return"left"===s.originX&&(l=s.getWidth()/2),"right"===s.originX&&(l=-s.getWidth()/2),s.set({left:s.getLeft()+l,top:s.getTop()-c/2+s.fontSize*(.18+s._fontSizeFraction)/s.lineHeight}),s},e.Text.fromObject=function(t){return new e.Text(t.text,r(t))},e.util.createAccessors(e.Text)}("undefined"!=typeof exports?exports:this),function(){var t=fabric.util.object.clone;fabric.IText=fabric.util.createClass(fabric.Text,fabric.Observable,{type:"i-text",selectionStart:0,selectionEnd:0,selectionColor:"rgba(17,119,255,0.3)",isEditing:!1,editable:!0,editingBorderColor:"rgba(102,153,255,0.25)",cursorWidth:2,cursorColor:"#333",cursorDelay:1e3,cursorDuration:600,styles:null,caching:!0,_reSpace:/\s|\n/,_currentCursorOpacity:0,_selectionDirection:null,_abortCursorAnimation:!1,__widthOfSpace:[],initialize:function(t,e){this.styles=e?e.styles||{}:{},this.callSuper("initialize",t,e),this.initBehavior()},_clearCache:function(){this.callSuper("_clearCache"),this.__widthOfSpace=[]},isEmptyStyles:function(){if(!this.styles)return!0;var t=this.styles;for(var e in t)for(var i in t[e])for(var r in t[e][i])return!1;return!0},setSelectionStart:function(t){t=Math.max(t,0),this._updateAndFire("selectionStart",t)},setSelectionEnd:function(t){t=Math.min(t,this.text.length),this._updateAndFire("selectionEnd",t)},_updateAndFire:function(t,e){this[t]!==e&&(this._fireSelectionChanged(),this[t]=e),this._updateTextarea()},_fireSelectionChanged:function(){this.fire("selection:changed"),this.canvas&&this.canvas.fire("text:selection:changed",{target:this})},getSelectionStyles:function(t,e){if(2===arguments.length){for(var i=[],r=t;r<e;r++)i.push(this.getSelectionStyles(r));return i}var n=this.get2DCursorLocation(t),s=this._getStyleDeclaration(n.lineIndex,n.charIndex);return s||{}},setSelectionStyles:function(t){if(this.selectionStart===this.selectionEnd)this._extendStyles(this.selectionStart,t);else for(var e=this.selectionStart;e<this.selectionEnd;e++)this._extendStyles(e,t);return this._forceClearCache=!0,this},_extendStyles:function(t,e){var i=this.get2DCursorLocation(t);this._getLineStyle(i.lineIndex)||this._setLineStyle(i.lineIndex,{}),this._getStyleDeclaration(i.lineIndex,i.charIndex)||this._setStyleDeclaration(i.lineIndex,i.charIndex,{}),fabric.util.object.extend(this._getStyleDeclaration(i.lineIndex,i.charIndex),e)},_render:function(t){this.oldWidth=this.width,this.oldHeight=this.height,this.callSuper("_render",t),this.ctx=t,this.cursorOffsetCache={},this.renderCursorOrSelection()},renderCursorOrSelection:function(){if(this.active&&this.isEditing){var t,e,i=this.text.split("");this.canvas.contextTop?(e=this.canvas.contextTop,e.save(),e.transform.apply(e,this.canvas.viewportTransform),this.transform(e),this.transformMatrix&&e.transform.apply(e,this.transformMatrix),this._clearTextArea(e)):(e=this.ctx,e.save()),this.selectionStart===this.selectionEnd?(t=this._getCursorBoundaries(i,"cursor"),this.renderCursor(t,e)):(t=this._getCursorBoundaries(i,"selection"),this.renderSelection(i,t,e)),e.restore()}},_clearTextArea:function(t){var e=this.oldWidth+4,i=this.oldHeight+4;t.clearRect(-e/2,-i/2,e,i)},get2DCursorLocation:function(t){"undefined"==typeof t&&(t=this.selectionStart);for(var e=this._textLines.length,i=0;i<e;i++){if(t<=this._textLines[i].length)return{lineIndex:i,charIndex:t};t-=this._textLines[i].length+1}return{lineIndex:i-1,charIndex:this._textLines[i-1].length<t?this._textLines[i-1].length:t}},getCurrentCharStyle:function(t,e){var i=this._getStyleDeclaration(t,0===e?0:e-1);return{fontSize:i&&i.fontSize||this.fontSize,fill:i&&i.fill||this.fill,textBackgroundColor:i&&i.textBackgroundColor||this.textBackgroundColor,textDecoration:i&&i.textDecoration||this.textDecoration,fontFamily:i&&i.fontFamily||this.fontFamily,fontWeight:i&&i.fontWeight||this.fontWeight,fontStyle:i&&i.fontStyle||this.fontStyle,stroke:i&&i.stroke||this.stroke,strokeWidth:i&&i.strokeWidth||this.strokeWidth}},getCurrentCharFontSize:function(t,e){var i=this._getStyleDeclaration(t,0===e?0:e-1);return i&&i.fontSize?i.fontSize:this.fontSize},getCurrentCharColor:function(t,e){var i=this._getStyleDeclaration(t,0===e?0:e-1);return i&&i.fill?i.fill:this.cursorColor},_getCursorBoundaries:function(t,e){var i=Math.round(this._getLeftOffset()),r=this._getTopOffset(),n=this._getCursorBoundariesOffsets(t,e);return{left:i,top:r,leftOffset:n.left+n.lineLeft,topOffset:n.top}},_getCursorBoundariesOffsets:function(t,e){if(this.cursorOffsetCache&&"top"in this.cursorOffsetCache)return this.cursorOffsetCache;for(var i,r=0,n=0,s=0,o=0,a=0,h=0;h<this.selectionStart;h++)"\n"===t[h]?(a=0,o+=this._getHeightOfLine(this.ctx,n),n++,s=0):(a+=this._getWidthOfChar(this.ctx,t[h],n,s),s++),r=this._getLineLeftOffset(this._getLineWidth(this.ctx,n));return"cursor"===e&&(o+=(1-this._fontSizeFraction)*this._getHeightOfLine(this.ctx,n)/this.lineHeight-this.getCurrentCharFontSize(n,s)*(1-this._fontSizeFraction)),0!==this.charSpacing&&s===this._textLines[n].length&&(a-=this._getWidthOfCharSpacing()),i={top:o,left:a,lineLeft:r},this.cursorOffsetCache=i,this.cursorOffsetCache},renderCursor:function(t,e){var i=this.get2DCursorLocation(),r=i.lineIndex,n=i.charIndex,s=this.getCurrentCharFontSize(r,n),o=0===r&&0===n?this._getLineLeftOffset(this._getLineWidth(e,r)):t.leftOffset,a=this.scaleX*this.canvas.getZoom(),h=this.cursorWidth/a;e.fillStyle=this.getCurrentCharColor(r,n),e.globalAlpha=this.__isMousedown?1:this._currentCursorOpacity,e.fillRect(t.left+o-h/2,t.top+t.topOffset,h,s)},renderSelection:function(t,e,i){i.fillStyle=this.selectionColor;for(var r=this.get2DCursorLocation(this.selectionStart),n=this.get2DCursorLocation(this.selectionEnd),s=r.lineIndex,o=n.lineIndex,a=s;a<=o;a++){var h=this._getLineLeftOffset(this._getLineWidth(i,a))||0,c=this._getHeightOfLine(this.ctx,a),l=0,u=0,f=this._textLines[a];if(a===s){for(var d=0,g=f.length;d<g;d++)d>=r.charIndex&&(a!==o||d<n.charIndex)&&(u+=this._getWidthOfChar(i,f[d],a,d)),d<r.charIndex&&(h+=this._getWidthOfChar(i,f[d],a,d));d===f.length&&(u-=this._getWidthOfCharSpacing())}else if(a>s&&a<o)u+=this._getLineWidth(i,a)||5;else if(a===o){for(var p=0,v=n.charIndex;p<v;p++)u+=this._getWidthOfChar(i,f[p],a,p);n.charIndex===f.length&&(u-=this._getWidthOfCharSpacing())}l=c,(this.lineHeight<1||a===o&&this.lineHeight>1)&&(c/=this.lineHeight),i.fillRect(e.left+h,e.top+e.topOffset,u,c),e.topOffset+=l}},_renderChars:function(t,e,i,r,n,s,o){if(this.isEmptyStyles())return this._renderCharsFast(t,e,i,r,n);o=o||0;var a,h,c=this._getHeightOfLine(e,s),l="";e.save(),n-=c/this.lineHeight*this._fontSizeFraction;for(var u=o,f=i.length+o;u<=f;u++)a=a||this.getCurrentCharStyle(s,u),h=this.getCurrentCharStyle(s,u+1),(this._hasStyleChanged(a,h)||u===f)&&(this._renderChar(t,e,s,u-1,l,r,n,c),l="",a=h),l+=i[u-o];e.restore()},_renderCharsFast:function(t,e,i,r,n){"fillText"===t&&this.fill&&this.callSuper("_renderChars",t,e,i,r,n),"strokeText"===t&&(this.stroke&&this.strokeWidth>0||this.skipFillStrokeCheck)&&this.callSuper("_renderChars",t,e,i,r,n)},_renderChar:function(t,e,i,r,n,s,o,a){var h,c,l,u,f,d,g,p=this._getStyleDeclaration(i,r);if(p?(c=this._getHeightOfChar(e,n,i,r),u=p.stroke,l=p.fill,d=p.textDecoration):c=this.fontSize,u=(u||this.stroke)&&"strokeText"===t,l=(l||this.fill)&&"fillText"===t,p&&e.save(),h=this._applyCharStylesGetWidth(e,n,i,r,p||null),d=d||this.textDecoration,p&&p.textBackgroundColor&&this._removeShadow(e),0!==this.charSpacing){g=n.split(""),h=0;for(var v,b=0,m=g.length;b<m;b++)v=g[b],l&&e.fillText(v,s+h,o),u&&e.strokeText(v,s+h,o),h+=e.measureText(v).width+this._getWidthOfCharSpacing()}else l&&e.fillText(n,s,o),u&&e.strokeText(n,s,o);(d||""!==d)&&(f=this._fontSizeFraction*a/this.lineHeight,this._renderCharDecoration(e,d,s,o,f,h,c)),p&&e.restore(),e.translate(h,0)},_hasStyleChanged:function(t,e){return t.fill!==e.fill||t.fontSize!==e.fontSize||t.textBackgroundColor!==e.textBackgroundColor||t.textDecoration!==e.textDecoration||t.fontFamily!==e.fontFamily||t.fontWeight!==e.fontWeight||t.fontStyle!==e.fontStyle||t.stroke!==e.stroke||t.strokeWidth!==e.strokeWidth},_renderCharDecoration:function(t,e,i,r,n,s,o){if(e){var a,h,c=o/15,l={underline:r+o/10,"line-through":r-o*(this._fontSizeFraction+this._fontSizeMult-1)+c,overline:r-(this._fontSizeMult-this._fontSizeFraction)*o},u=["underline","line-through","overline"];for(a=0;a<u.length;a++)h=u[a],e.indexOf(h)>-1&&t.fillRect(i,l[h],s,c)}},_renderTextLine:function(t,e,i,r,n,s){this.isEmptyStyles()||(n+=this.fontSize*(this._fontSizeFraction+.03)),this.callSuper("_renderTextLine",t,e,i,r,n,s)},_renderTextDecoration:function(t){if(this.isEmptyStyles())return this.callSuper("_renderTextDecoration",t)},_renderTextLinesBackground:function(t){this.callSuper("_renderTextLinesBackground",t);for(var e,i,r,n,s,o,a=0,h=this._getLeftOffset(),c=this._getTopOffset(),l=0,u=this._textLines.length;l<u;l++)if(e=this._getHeightOfLine(t,l),n=this._textLines[l],""!==n&&this.styles&&this._getLineStyle(l)){i=this._getLineWidth(t,l),r=this._getLineLeftOffset(i);for(var f=0,d=n.length;f<d;f++)o=this._getStyleDeclaration(l,f),o&&o.textBackgroundColor&&(s=n[f],t.fillStyle=o.textBackgroundColor,t.fillRect(h+r+this._getWidthOfCharsAt(t,l,f),c+a,this._getWidthOfChar(t,s,l,f)+1,e/this.lineHeight));a+=e}else a+=e},_getCacheProp:function(t,e){return t+e.fontSize+e.fontWeight+e.fontStyle},_getFontCache:function(t){return fabric.charWidthsCache[t]||(fabric.charWidthsCache[t]={}),fabric.charWidthsCache[t]},_applyCharStylesGetWidth:function(e,i,r,n,s){var o,a,h,c=s||this._getStyleDeclaration(r,n),l=t(c);if(this._applyFontStyles(l),h=this._getFontCache(l.fontFamily),a=this._getCacheProp(i,l),!c&&h[a]&&this.caching)return h[a];"string"==typeof l.shadow&&(l.shadow=new fabric.Shadow(l.shadow));var u=l.fill||this.fill;return e.fillStyle=u.toLive?u.toLive(e,this):u,l.stroke&&(e.strokeStyle=l.stroke&&l.stroke.toLive?l.stroke.toLive(e,this):l.stroke),e.lineWidth=l.strokeWidth||this.strokeWidth,e.font=this._getFontDeclaration.call(l),l.shadow&&(l.scaleX=this.scaleX,l.scaleY=this.scaleY,l.canvas=this.canvas,this._setShadow.call(l,e)),this.caching&&h[a]?h[a]:(o=e.measureText(i).width,this.caching&&(h[a]=o),o)},_applyFontStyles:function(t){t.fontFamily||(t.fontFamily=this.fontFamily),t.fontSize||(t.fontSize=this.fontSize),t.fontWeight||(t.fontWeight=this.fontWeight),t.fontStyle||(t.fontStyle=this.fontStyle)},_getStyleDeclaration:function(e,i,r){return r?this.styles[e]&&this.styles[e][i]?t(this.styles[e][i]):{}:this.styles[e]&&this.styles[e][i]?this.styles[e][i]:null},_setStyleDeclaration:function(t,e,i){this.styles[t][e]=i},_deleteStyleDeclaration:function(t,e){delete this.styles[t][e]},_getLineStyle:function(t){return this.styles[t]},_setLineStyle:function(t,e){this.styles[t]=e},_deleteLineStyle:function(t){delete this.styles[t]},_getWidthOfChar:function(t,e,i,r){if(!this._isMeasuring&&"justify"===this.textAlign&&this._reSpacesAndTabs.test(e))return this._getWidthOfSpace(t,i);t.save();var n=this._applyCharStylesGetWidth(t,e,i,r);return 0!==this.charSpacing&&(n+=this._getWidthOfCharSpacing()),t.restore(),n},_getHeightOfChar:function(t,e,i){var r=this._getStyleDeclaration(e,i);return r&&r.fontSize?r.fontSize:this.fontSize},_getWidthOfCharsAt:function(t,e,i){var r,n,s=0;for(r=0;r<i;r++)n=this._textLines[e][r],s+=this._getWidthOfChar(t,n,e,r);return s},_measureLine:function(t,e){this._isMeasuring=!0;var i=this._getWidthOfCharsAt(t,e,this._textLines[e].length);return 0!==this.charSpacing&&(i-=this._getWidthOfCharSpacing()),this._isMeasuring=!1,i},_getWidthOfSpace:function(t,e){if(this.__widthOfSpace[e])return this.__widthOfSpace[e];var i=this._textLines[e],r=this._getWidthOfWords(t,i,e,0),n=this.width-r,s=i.length-i.replace(this._reSpacesAndTabs,"").length,o=Math.max(n/s,t.measureText(" ").width);return this.__widthOfSpace[e]=o,o},_getWidthOfWords:function(t,e,i,r){for(var n=0,s=0;s<e.length;s++){var o=e[s];o.match(/\s/)||(n+=this._getWidthOfChar(t,o,i,s+r))}return n},_getHeightOfLine:function(t,e){if(this.__lineHeights[e])return this.__lineHeights[e];for(var i=this._textLines[e],r=this._getHeightOfChar(t,e,0),n=1,s=i.length;n<s;n++){var o=this._getHeightOfChar(t,e,n);o>r&&(r=o)}return this.__lineHeights[e]=r*this.lineHeight*this._fontSizeMult,this.__lineHeights[e]},_getTextHeight:function(t){for(var e,i=0,r=0,n=this._textLines.length;r<n;r++)e=this._getHeightOfLine(t,r),i+=r===n-1?e/this.lineHeight:e;return i},toObject:function(e){var i,r,n,s={};for(i in this.styles){n=this.styles[i],s[i]={};for(r in n)s[i][r]=t(n[r])}return fabric.util.object.extend(this.callSuper("toObject",e),{styles:s})}}),fabric.IText.fromObject=function(e){return new fabric.IText(e.text,t(e))}}(),function(){var t=fabric.util.object.clone;fabric.util.object.extend(fabric.IText.prototype,{initBehavior:function(){this.initAddedHandler(),this.initRemovedHandler(),this.initCursorSelectionHandlers(),this.initDoubleClickSimulation()},initSelectedHandler:function(){this.on("selected",function(){var t=this;setTimeout(function(){t.selected=!0},100)})},initAddedHandler:function(){var t=this;this.on("added",function(){this.canvas&&!this.canvas._hasITextHandlers&&(this.canvas._hasITextHandlers=!0,this._initCanvasHandlers()),t.canvas&&(t.canvas._iTextInstances=t.canvas._iTextInstances||[],t.canvas._iTextInstances.push(t))})},initRemovedHandler:function(){var t=this;this.on("removed",function(){t.canvas&&(t.canvas._iTextInstances=t.canvas._iTextInstances||[],fabric.util.removeFromArray(t.canvas._iTextInstances,t))})},_initCanvasHandlers:function(){var t=this;this.canvas.on("selection:cleared",function(){fabric.IText.prototype.exitEditingOnOthers(t.canvas)}),this.canvas.on("mouse:up",function(){t.canvas._iTextInstances&&t.canvas._iTextInstances.forEach(function(t){t.__isMousedown=!1})}),this.canvas.on("object:selected",function(){fabric.IText.prototype.exitEditingOnOthers(t.canvas)})},_tick:function(){this._currentTickState=this._animateCursor(this,1,this.cursorDuration,"_onTickComplete")},_animateCursor:function(t,e,i,r){var n;return n={isAborted:!1,abort:function(){this.isAborted=!0}},t.animate("_currentCursorOpacity",e,{duration:i,onComplete:function(){n.isAborted||t[r]()},onChange:function(){t.canvas&&t.selectionStart===t.selectionEnd&&t.renderCursorOrSelection()},abort:function(){return n.isAborted}}),n},_onTickComplete:function(){var t=this;this._cursorTimeout1&&clearTimeout(this._cursorTimeout1),this._cursorTimeout1=setTimeout(function(){t._currentTickCompleteState=t._animateCursor(t,0,this.cursorDuration/2,"_tick")},100)},initDelayedCursor:function(t){var e=this,i=t?0:this.cursorDelay;this.abortCursorAnimation(),this._currentCursorOpacity=1,this._cursorTimeout2=setTimeout(function(){e._tick()},i)},abortCursorAnimation:function(){var t=this._currentTickState||this._currentTickCompleteState;this._currentTickState&&this._currentTickState.abort(),this._currentTickCompleteState&&this._currentTickCompleteState.abort(),clearTimeout(this._cursorTimeout1),clearTimeout(this._cursorTimeout2),this._currentCursorOpacity=0,t&&this.canvas&&this.canvas.clearContext(this.canvas.contextTop||this.ctx)},selectAll:function(){this.selectionStart=0,this.selectionEnd=this.text.length,this._fireSelectionChanged(),this._updateTextarea()},getSelectedText:function(){return this.text.slice(this.selectionStart,this.selectionEnd)},findWordBoundaryLeft:function(t){var e=0,i=t-1;if(this._reSpace.test(this.text.charAt(i)))for(;this._reSpace.test(this.text.charAt(i));)e++,i--;for(;/\S/.test(this.text.charAt(i))&&i>-1;)e++,i--;return t-e},findWordBoundaryRight:function(t){var e=0,i=t;if(this._reSpace.test(this.text.charAt(i)))for(;this._reSpace.test(this.text.charAt(i));)e++,i++;for(;/\S/.test(this.text.charAt(i))&&i<this.text.length;)e++,i++;return t+e},findLineBoundaryLeft:function(t){for(var e=0,i=t-1;!/\n/.test(this.text.charAt(i))&&i>-1;)e++,i--;return t-e},findLineBoundaryRight:function(t){for(var e=0,i=t;!/\n/.test(this.text.charAt(i))&&i<this.text.length;)e++,i++;return t+e},getNumNewLinesInSelectedText:function(){for(var t=this.getSelectedText(),e=0,i=0,r=t.length;i<r;i++)"\n"===t[i]&&e++;return e},searchWordBoundary:function(t,e){for(var i=this._reSpace.test(this.text.charAt(t))?t-1:t,r=this.text.charAt(i),n=/[ \n\.,;!\?\-]/;!n.test(r)&&i>0&&i<this.text.length;)i+=e,r=this.text.charAt(i);return n.test(r)&&"\n"!==r&&(i+=1===e?0:1),i},selectWord:function(t){t=t||this.selectionStart;var e=this.searchWordBoundary(t,-1),i=this.searchWordBoundary(t,1);this.selectionStart=e,this.selectionEnd=i,this._fireSelectionChanged(),this._updateTextarea(),this.renderCursorOrSelection()},selectLine:function(t){t=t||this.selectionStart;var e=this.findLineBoundaryLeft(t),i=this.findLineBoundaryRight(t);this.selectionStart=e,this.selectionEnd=i,this._fireSelectionChanged(),this._updateTextarea()},enterEditing:function(t){if(!this.isEditing&&this.editable)return this.canvas&&this.exitEditingOnOthers(this.canvas),this.isEditing=!0,this.initHiddenTextarea(t),this.hiddenTextarea.focus(),this._updateTextarea(),this._saveEditingProps(),this._setEditingProps(),this._textBeforeEdit=this.text,this._tick(),this.fire("editing:entered"),this.canvas?(this.canvas.fire("text:editing:entered",{target:this}),this.canvas.renderAll(),this.initMouseMoveHandler(),this):this},exitEditingOnOthers:function(t){t._iTextInstances&&t._iTextInstances.forEach(function(t){t.selected=!1,t.isEditing&&t.exitEditing()})},initMouseMoveHandler:function(){this.canvas.on("mouse:move",this.mouseMoveHandler.bind(this))},mouseMoveHandler:function(t){if(this.__isMousedown&&this.isEditing){var e=this.getSelectionStartFromPointer(t.e),i=this.selectionStart,r=this.selectionEnd;e!==this.__selectionStartOnMouseDown&&(e>this.__selectionStartOnMouseDown?(this.selectionStart=this.__selectionStartOnMouseDown,this.selectionEnd=e):(this.selectionStart=e,this.selectionEnd=this.__selectionStartOnMouseDown),this.selectionStart===i&&this.selectionEnd===r||(this._fireSelectionChanged(),this._updateTextarea(),this.renderCursorOrSelection()))}},_setEditingProps:function(){this.hoverCursor="text",this.canvas&&(this.canvas.defaultCursor=this.canvas.moveCursor="text"),this.borderColor=this.editingBorderColor,this.hasControls=this.selectable=!1,this.lockMovementX=this.lockMovementY=!0},_updateTextarea:function(){if(this.hiddenTextarea&&!this.inCompositionMode&&(this.cursorOffsetCache={},this.hiddenTextarea.value=this.text,this.hiddenTextarea.selectionStart=this.selectionStart,this.hiddenTextarea.selectionEnd=this.selectionEnd,this.selectionStart===this.selectionEnd)){var t=this._calcTextareaPosition();this.hiddenTextarea.style.left=t.left,this.hiddenTextarea.style.top=t.top,this.hiddenTextarea.style.fontSize=t.fontSize}},_calcTextareaPosition:function(){if(!this.canvas)return{x:1,y:1};var t=this.text.split(""),e=this._getCursorBoundaries(t,"cursor"),i=this.get2DCursorLocation(),r=i.lineIndex,n=i.charIndex,s=this.getCurrentCharFontSize(r,n),o=0===r&&0===n?this._getLineLeftOffset(this._getLineWidth(this.ctx,r)):e.leftOffset,a=this.calcTransformMatrix(),h={x:e.left+o,y:e.top+e.topOffset+s},c=this.canvas.upperCanvasEl,l=c.width-s,u=c.height-s;return h=fabric.util.transformPoint(h,a),h=fabric.util.transformPoint(h,this.canvas.viewportTransform),h.x<0&&(h.x=0),h.x>l&&(h.x=l),h.y<0&&(h.y=0),h.y>u&&(h.y=u),{left:h.x+"px",top:h.y+"px",fontSize:s}},_saveEditingProps:function(){this._savedProps={hasControls:this.hasControls,borderColor:this.borderColor,lockMovementX:this.lockMovementX,lockMovementY:this.lockMovementY,hoverCursor:this.hoverCursor,defaultCursor:this.canvas&&this.canvas.defaultCursor,moveCursor:this.canvas&&this.canvas.moveCursor}},_restoreEditingProps:function(){this._savedProps&&(this.hoverCursor=this._savedProps.overCursor,this.hasControls=this._savedProps.hasControls,this.borderColor=this._savedProps.borderColor,this.lockMovementX=this._savedProps.lockMovementX,this.lockMovementY=this._savedProps.lockMovementY,this.canvas&&(this.canvas.defaultCursor=this._savedProps.defaultCursor,this.canvas.moveCursor=this._savedProps.moveCursor))},exitEditing:function(){var t=this._textBeforeEdit!==this.text;return this.selected=!1,this.isEditing=!1,this.selectable=!0,this.selectionEnd=this.selectionStart,this.hiddenTextarea&&this.canvas&&this.hiddenTextarea.parentNode.removeChild(this.hiddenTextarea),this.hiddenTextarea=null,this.abortCursorAnimation(),this._restoreEditingProps(),this._currentCursorOpacity=0,this.fire("editing:exited"),t&&this.fire("modified"),this.canvas&&(this.canvas.off("mouse:move",this.mouseMoveHandler),this.canvas.fire("text:editing:exited",{target:this}),t&&this.canvas.fire("object:modified",{target:this})),this},_removeExtraneousStyles:function(){for(var t in this.styles)this._textLines[t]||delete this.styles[t]},_removeCharsFromTo:function(t,e){for(;e!==t;)this._removeSingleCharAndStyle(t+1),e--;this.selectionStart=t,this.selectionEnd=t},_removeSingleCharAndStyle:function(t){var e="\n"===this.text[t-1],i=e?t:t-1;this.removeStyleObject(e,i),this.text=this.text.slice(0,t-1)+this.text.slice(t),this._textLines=this._splitTextIntoLines()},insertChars:function(t,e){var i;if(this.selectionEnd-this.selectionStart>1&&this._removeCharsFromTo(this.selectionStart,this.selectionEnd),!e&&this.isEmptyStyles())return void this.insertChar(t,!1);for(var r=0,n=t.length;r<n;r++)e&&(i=fabric.copiedTextStyle[r]),this.insertChar(t[r],r<n-1,i)},insertChar:function(t,e,i){var r="\n"===this.text[this.selectionStart];this.text=this.text.slice(0,this.selectionStart)+t+this.text.slice(this.selectionEnd),this._textLines=this._splitTextIntoLines(),this.insertStyleObjects(t,r,i),this.selectionStart+=t.length,this.selectionEnd=this.selectionStart,e||(this._updateTextarea(),this.setCoords(),this._fireSelectionChanged(),this.fire("changed"),this.canvas&&this.canvas.fire("text:changed",{target:this}),this.canvas&&this.canvas.renderAll())},insertNewlineStyleObject:function(e,i,r){this.shiftLineStyles(e,1),this.styles[e+1]||(this.styles[e+1]={});var n={},s={};if(this.styles[e]&&this.styles[e][i-1]&&(n=this.styles[e][i-1]),r)s[0]=t(n),this.styles[e+1]=s;else{for(var o in this.styles[e])parseInt(o,10)>=i&&(s[parseInt(o,10)-i]=this.styles[e][o],delete this.styles[e][o]);this.styles[e+1]=s}this._forceClearCache=!0},insertCharStyleObject:function(e,i,r){var n=this.styles[e],s=t(n);0!==i||r||(i=1);for(var o in s){var a=parseInt(o,10);a>=i&&(n[a+1]=s[a],s[a-1]||delete n[a])}this.styles[e][i]=r||t(n[i-1]),this._forceClearCache=!0},insertStyleObjects:function(t,e,i){var r=this.get2DCursorLocation(),n=r.lineIndex,s=r.charIndex;this._getLineStyle(n)||this._setLineStyle(n,{}),"\n"===t?this.insertNewlineStyleObject(n,s,e):this.insertCharStyleObject(n,s,i)},shiftLineStyles:function(e,i){var r=t(this.styles);for(var n in this.styles){var s=parseInt(n,10);s>e&&(this.styles[s+i]=r[s],r[s-i]||delete this.styles[s]);
}},removeStyleObject:function(t,e){var i=this.get2DCursorLocation(e),r=i.lineIndex,n=i.charIndex;this._removeStyleObject(t,i,r,n)},_getTextOnPreviousLine:function(t){return this._textLines[t-1]},_removeStyleObject:function(e,i,r,n){if(e){var s=this._getTextOnPreviousLine(i.lineIndex),o=s?s.length:0;this.styles[r-1]||(this.styles[r-1]={});for(n in this.styles[r])this.styles[r-1][parseInt(n,10)+o]=this.styles[r][n];this.shiftLineStyles(i.lineIndex,-1)}else{var a=this.styles[r];a&&delete a[n];var h=t(a);for(var c in h){var l=parseInt(c,10);l>=n&&0!==l&&(a[l-1]=h[l],delete a[l])}}},insertNewline:function(){this.insertChars("\n")}})}(),fabric.util.object.extend(fabric.IText.prototype,{initDoubleClickSimulation:function(){this.__lastClickTime=+new Date,this.__lastLastClickTime=+new Date,this.__lastPointer={},this.on("mousedown",this.onMouseDown.bind(this))},onMouseDown:function(t){this.__newClickTime=+new Date;var e=this.canvas.getPointer(t.e);this.isTripleClick(e)?(this.fire("tripleclick",t),this._stopEvent(t.e)):this.isDoubleClick(e)&&(this.fire("dblclick",t),this._stopEvent(t.e)),this.__lastLastClickTime=this.__lastClickTime,this.__lastClickTime=this.__newClickTime,this.__lastPointer=e,this.__lastIsEditing=this.isEditing,this.__lastSelected=this.selected},isDoubleClick:function(t){return this.__newClickTime-this.__lastClickTime<500&&this.__lastPointer.x===t.x&&this.__lastPointer.y===t.y&&this.__lastIsEditing},isTripleClick:function(t){return this.__newClickTime-this.__lastClickTime<500&&this.__lastClickTime-this.__lastLastClickTime<500&&this.__lastPointer.x===t.x&&this.__lastPointer.y===t.y},_stopEvent:function(t){t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation()},initCursorSelectionHandlers:function(){this.initSelectedHandler(),this.initMousedownHandler(),this.initMouseupHandler(),this.initClicks()},initClicks:function(){this.on("dblclick",function(t){this.selectWord(this.getSelectionStartFromPointer(t.e))}),this.on("tripleclick",function(t){this.selectLine(this.getSelectionStartFromPointer(t.e))})},initMousedownHandler:function(){this.on("mousedown",function(t){if(this.editable){var e=this.canvas.getPointer(t.e);this.__mousedownX=e.x,this.__mousedownY=e.y,this.__isMousedown=!0,this.selected&&this.setCursorByClick(t.e),this.isEditing&&(this.__selectionStartOnMouseDown=this.selectionStart,this.selectionStart===this.selectionEnd&&this.abortCursorAnimation(),this.renderCursorOrSelection())}})},_isObjectMoved:function(t){var e=this.canvas.getPointer(t);return this.__mousedownX!==e.x||this.__mousedownY!==e.y},initMouseupHandler:function(){this.on("mouseup",function(t){this.__isMousedown=!1,this.editable&&!this._isObjectMoved(t.e)&&(this.__lastSelected&&!this.__corner&&(this.enterEditing(t.e),this.selectionStart===this.selectionEnd?this.initDelayedCursor(!0):this.renderCursorOrSelection()),this.selected=!0)})},setCursorByClick:function(t){var e=this.getSelectionStartFromPointer(t);t.shiftKey?e<this.selectionStart?(this.selectionEnd=this.selectionStart,this.selectionStart=e):this.selectionEnd=e:(this.selectionStart=e,this.selectionEnd=e),this._fireSelectionChanged(),this._updateTextarea()},getSelectionStartFromPointer:function(t){for(var e,i,r=this.getLocalPointer(t),n=0,s=0,o=0,a=0,h=0,c=this._textLines.length;h<c;h++){i=this._textLines[h],o+=this._getHeightOfLine(this.ctx,h)*this.scaleY;var l=this._getLineWidth(this.ctx,h),u=this._getLineLeftOffset(l);s=u*this.scaleX;for(var f=0,d=i.length;f<d;f++){if(n=s,s+=this._getWidthOfChar(this.ctx,i[f],h,this.flipX?d-f:f)*this.scaleX,!(o<=r.y||s<=r.x))return this._getNewSelectionStartFromOffset(r,n,s,a+h,d);a++}if(r.y<o)return this._getNewSelectionStartFromOffset(r,n,s,a+h-1,d)}if("undefined"==typeof e)return this.text.length},_getNewSelectionStartFromOffset:function(t,e,i,r,n){var s=t.x-e,o=i-t.x,a=o>s?0:1,h=r+a;return this.flipX&&(h=n-h),h>this.text.length&&(h=this.text.length),h}}),fabric.util.object.extend(fabric.IText.prototype,{initHiddenTextarea:function(){this.hiddenTextarea=fabric.document.createElement("textarea"),this.hiddenTextarea.setAttribute("autocapitalize","off");var t=this._calcTextareaPosition();this.hiddenTextarea.style.cssText="position: absolute; top: "+t.top+"; left: "+t.left+"; opacity: 0; width: 0px; height: 0px; z-index: -999;",fabric.document.body.appendChild(this.hiddenTextarea),fabric.util.addListener(this.hiddenTextarea,"keydown",this.onKeyDown.bind(this)),fabric.util.addListener(this.hiddenTextarea,"keyup",this.onKeyUp.bind(this)),fabric.util.addListener(this.hiddenTextarea,"input",this.onInput.bind(this)),fabric.util.addListener(this.hiddenTextarea,"copy",this.copy.bind(this)),fabric.util.addListener(this.hiddenTextarea,"cut",this.cut.bind(this)),fabric.util.addListener(this.hiddenTextarea,"paste",this.paste.bind(this)),fabric.util.addListener(this.hiddenTextarea,"compositionstart",this.onCompositionStart.bind(this)),fabric.util.addListener(this.hiddenTextarea,"compositionupdate",this.onCompositionUpdate.bind(this)),fabric.util.addListener(this.hiddenTextarea,"compositionend",this.onCompositionEnd.bind(this)),!this._clickHandlerInitialized&&this.canvas&&(fabric.util.addListener(this.canvas.upperCanvasEl,"click",this.onClick.bind(this)),this._clickHandlerInitialized=!0)},_keysMap:{8:"removeChars",9:"exitEditing",27:"exitEditing",13:"insertNewline",33:"moveCursorUp",34:"moveCursorDown",35:"moveCursorRight",36:"moveCursorLeft",37:"moveCursorLeft",38:"moveCursorUp",39:"moveCursorRight",40:"moveCursorDown",46:"forwardDelete"},_ctrlKeysMapUp:{67:"copy",88:"cut"},_ctrlKeysMapDown:{65:"selectAll"},onClick:function(){this.hiddenTextarea&&this.hiddenTextarea.focus()},onKeyDown:function(t){if(this.isEditing){if(t.keyCode in this._keysMap)this[this._keysMap[t.keyCode]](t);else{if(!(t.keyCode in this._ctrlKeysMapDown&&(t.ctrlKey||t.metaKey)))return;this[this._ctrlKeysMapDown[t.keyCode]](t)}t.stopImmediatePropagation(),t.preventDefault(),this.canvas&&this.canvas.renderAll()}},onKeyUp:function(t){return!this.isEditing||this._copyDone?void(this._copyDone=!1):void(t.keyCode in this._ctrlKeysMapUp&&(t.ctrlKey||t.metaKey)&&(this[this._ctrlKeysMapUp[t.keyCode]](t),t.stopImmediatePropagation(),t.preventDefault(),this.canvas&&this.canvas.renderAll()))},onInput:function(t){if(this.isEditing&&!this.inCompositionMode){var e,i,r,n=this.selectionStart||0,s=this.selectionEnd||0,o=this.text.length,a=this.hiddenTextarea.value.length;a>o?(r="left"===this._selectionDirection?s:n,e=a-o,i=this.hiddenTextarea.value.slice(r,r+e)):(e=a-o+s-n,i=this.hiddenTextarea.value.slice(n,n+e)),this.insertChars(i),t.stopPropagation()}},onCompositionStart:function(){this.inCompositionMode=!0,this.prevCompositionLength=0,this.compositionStart=this.selectionStart},onCompositionEnd:function(){this.inCompositionMode=!1},onCompositionUpdate:function(t){var e=t.data;this.selectionStart=this.compositionStart,this.selectionEnd=this.selectionEnd===this.selectionStart?this.compositionStart+this.prevCompositionLength:this.selectionEnd,this.insertChars(e,!1),this.prevCompositionLength=e.length},forwardDelete:function(t){if(this.selectionStart===this.selectionEnd){if(this.selectionStart===this.text.length)return;this.moveCursorRight(t)}this.removeChars(t)},copy:function(t){if(this.selectionStart!==this.selectionEnd){var e=this.getSelectedText(),i=this._getClipboardData(t);i&&i.setData("text",e),fabric.copiedText=e,fabric.copiedTextStyle=this.getSelectionStyles(this.selectionStart,this.selectionEnd),t.stopImmediatePropagation(),t.preventDefault(),this._copyDone=!0}},paste:function(t){var e=null,i=this._getClipboardData(t),r=!0;i?(e=i.getData("text").replace(/\r/g,""),fabric.copiedTextStyle&&fabric.copiedText===e||(r=!1)):e=fabric.copiedText,e&&this.insertChars(e,r),t.stopImmediatePropagation(),t.preventDefault()},cut:function(t){this.selectionStart!==this.selectionEnd&&(this.copy(t),this.removeChars(t))},_getClipboardData:function(t){return t&&t.clipboardData||fabric.window.clipboardData},getDownCursorOffset:function(t,e){var i,r,n=e?this.selectionEnd:this.selectionStart,s=this.get2DCursorLocation(n),o=s.lineIndex,a=this._textLines[o].slice(0,s.charIndex),h=this._textLines[o].slice(s.charIndex),c=this._textLines[o+1]||"";if(o===this._textLines.length-1||t.metaKey||34===t.keyCode)return this.text.length-n;var l=this._getLineWidth(this.ctx,o);r=this._getLineLeftOffset(l);for(var u=r,f=0,d=a.length;f<d;f++)i=a[f],u+=this._getWidthOfChar(this.ctx,i,o,f);var g=this._getIndexOnNextLine(s,c,u);return h.length+1+g},_getIndexOnNextLine:function(t,e,i){for(var r,n=t.lineIndex+1,s=this._getLineWidth(this.ctx,n),o=this._getLineLeftOffset(s),a=o,h=0,c=0,l=e.length;c<l;c++){var u=e[c],f=this._getWidthOfChar(this.ctx,u,n,c);if(a+=f,a>i){r=!0;var d=a-f,g=a,p=Math.abs(d-i),v=Math.abs(g-i);h=v<p?c+1:c;break}}return r||(h=e.length),h},moveCursorDown:function(t){this.selectionStart>=this.text.length&&this.selectionEnd>=this.text.length||this._moveCursorUpOrDown("Down",t)},moveCursorDownWithoutShift:function(t){return this._selectionDirection="right",this.selectionEnd=this.selectionEnd+t,this.selectionStart=this.selectionEnd,0!==t},swapSelectionPoints:function(){var t=this.selectionEnd;this.selectionEnd=this.selectionStart,this.selectionStart=t},moveCursorDownWithShift:function(t){return this.selectionEnd===this.selectionStart&&(this._selectionDirection="right"),"right"===this._selectionDirection?this.selectionEnd+=t:this.selectionStart+=t,this.selectionEnd<this.selectionStart&&"left"===this._selectionDirection&&(this.swapSelectionPoints(),this._selectionDirection="right"),this.selectionEnd>this.text.length&&(this.selectionEnd=this.text.length),0!==t},getUpCursorOffset:function(t,e){var i=e?this.selectionEnd:this.selectionStart,r=this.get2DCursorLocation(i),n=r.lineIndex;if(0===n||t.metaKey||33===t.keyCode)return i;for(var s,o=this._textLines[n].slice(0,r.charIndex),a=this._textLines[n-1]||"",h=this._getLineWidth(this.ctx,r.lineIndex),c=this._getLineLeftOffset(h),l=c,u=0,f=o.length;u<f;u++)s=o[u],l+=this._getWidthOfChar(this.ctx,s,n,u);var d=this._getIndexOnPrevLine(r,a,l);return a.length-d+o.length},_getIndexOnPrevLine:function(t,e,i){for(var r,n=t.lineIndex-1,s=this._getLineWidth(this.ctx,n),o=this._getLineLeftOffset(s),a=o,h=0,c=0,l=e.length;c<l;c++){var u=e[c],f=this._getWidthOfChar(this.ctx,u,n,c);if(a+=f,a>i){r=!0;var d=a-f,g=a,p=Math.abs(d-i),v=Math.abs(g-i);h=v<p?c:c-1;break}}return r||(h=e.length-1),h},moveCursorUp:function(t){0===this.selectionStart&&0===this.selectionEnd||this._moveCursorUpOrDown("Up",t)},_moveCursorUpOrDown:function(t,e){var i="get"+t+"CursorOffset",r="moveCursor"+t,n=this[i](e,"right"===this._selectionDirection);r+=e.shiftKey?"WithShift":"WithoutShift",this[r](n)&&(this.abortCursorAnimation(),this._currentCursorOpacity=1,this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea())},moveCursorUpWithShift:function(t){return this.selectionEnd===this.selectionStart&&(this._selectionDirection="left"),"right"===this._selectionDirection?this.selectionEnd-=t:this.selectionStart-=t,this.selectionEnd<this.selectionStart&&"right"===this._selectionDirection&&(this.swapSelectionPoints(),this._selectionDirection="left"),0!==t},moveCursorUpWithoutShift:function(t){return this._selectionDirection="left",this.selectionStart-=t,this.selectionEnd=this.selectionStart,0!==t},moveCursorLeft:function(t){0===this.selectionStart&&0===this.selectionEnd||this._moveCursorLeftOrRight("Left",t)},_move:function(t,e,i){var r;if(t.altKey)r=this["findWordBoundary"+i](this[e]);else{if(!t.metaKey&&35!==t.keyCode&&36!==t.keyCode)return this[e]+="Left"===i?-1:1,!0;r=this["findLineBoundary"+i](this[e])}if(void 0!==typeof r&&this[e]!==r)return this[e]=r,!0},_moveLeft:function(t,e){return this._move(t,e,"Left")},_moveRight:function(t,e){return this._move(t,e,"Right")},moveCursorLeftWithoutShift:function(t){var e=!0;return this._selectionDirection="left",this.selectionEnd===this.selectionStart&&0!==this.selectionStart&&(e=this._moveLeft(t,"selectionStart")),this.selectionEnd=this.selectionStart,e},moveCursorLeftWithShift:function(t){return"right"===this._selectionDirection&&this.selectionStart!==this.selectionEnd?this._moveLeft(t,"selectionEnd"):0!==this.selectionStart?(this._selectionDirection="left",this._moveLeft(t,"selectionStart")):void 0},moveCursorRight:function(t){this.selectionStart>=this.text.length&&this.selectionEnd>=this.text.length||this._moveCursorLeftOrRight("Right",t)},_moveCursorLeftOrRight:function(t,e){var i="moveCursor"+t+"With";this._currentCursorOpacity=1,i+=e.shiftKey?"Shift":"outShift",this[i](e)&&(this.abortCursorAnimation(),this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea())},moveCursorRightWithShift:function(t){return"left"===this._selectionDirection&&this.selectionStart!==this.selectionEnd?this._moveRight(t,"selectionStart"):this.selectionEnd!==this.text.length?(this._selectionDirection="right",this._moveRight(t,"selectionEnd")):void 0},moveCursorRightWithoutShift:function(t){var e=!0;return this._selectionDirection="right",this.selectionStart===this.selectionEnd?(e=this._moveRight(t,"selectionStart"),this.selectionEnd=this.selectionStart):this.selectionStart=this.selectionEnd,e},removeChars:function(t){this.selectionStart===this.selectionEnd?this._removeCharsNearCursor(t):this._removeCharsFromTo(this.selectionStart,this.selectionEnd),this.setSelectionEnd(this.selectionStart),this._removeExtraneousStyles(),this.canvas&&this.canvas.renderAll(),this.setCoords(),this.fire("changed"),this.canvas&&this.canvas.fire("text:changed",{target:this})},_removeCharsNearCursor:function(t){if(0!==this.selectionStart)if(t.metaKey){var e=this.findLineBoundaryLeft(this.selectionStart);this._removeCharsFromTo(e,this.selectionStart),this.setSelectionStart(e)}else if(t.altKey){var i=this.findWordBoundaryLeft(this.selectionStart);this._removeCharsFromTo(i,this.selectionStart),this.setSelectionStart(i)}else this._removeSingleCharAndStyle(this.selectionStart),this.setSelectionStart(this.selectionStart-1)}}),function(){var t=fabric.util.toFixed,e=fabric.Object.NUM_FRACTION_DIGITS;fabric.util.object.extend(fabric.IText.prototype,{_setSVGTextLineText:function(t,e,i,r,n,s){this._getLineStyle(t)?this._setSVGTextLineChars(t,e,i,r,s):fabric.Text.prototype._setSVGTextLineText.call(this,t,e,i,r,n)},_setSVGTextLineChars:function(t,e,i,r,n){for(var s=this._textLines[t],o=0,a=this._getLineLeftOffset(this._getLineWidth(this.ctx,t))-this.width/2,h=this._getSVGLineTopOffset(t),c=this._getHeightOfLine(this.ctx,t),l=0,u=s.length;l<u;l++){var f=this._getStyleDeclaration(t,l)||{};e.push(this._createTextCharSpan(s[l],f,a,h.lineTop+h.offset,o));var d=this._getWidthOfChar(this.ctx,s[l],t,l);f.textBackgroundColor&&n.push(this._createTextCharBg(f,a,h.lineTop,c,d,o)),o+=d}},_getSVGLineTopOffset:function(t){for(var e=0,i=0,r=0;r<t;r++)e+=this._getHeightOfLine(this.ctx,r);return i=this._getHeightOfLine(this.ctx,r),{lineTop:e,offset:(this._fontSizeMult-this._fontSizeFraction)*i/(this.lineHeight*this._fontSizeMult)}},_createTextCharBg:function(i,r,n,s,o,a){return['\t\t<rect fill="',i.textBackgroundColor,'" x="',t(r+a,e),'" y="',t(n-this.height/2,e),'" width="',t(o,e),'" height="',t(s/this.lineHeight,e),'"></rect>\n'].join("")},_createTextCharSpan:function(i,r,n,s,o){var a=this.getSvgStyles.call(fabric.util.object.extend({visible:!0,fill:this.fill,stroke:this.stroke,type:"text",getSvgFilter:fabric.Object.prototype.getSvgFilter},r));return['\t\t\t<tspan x="',t(n+o,e),'" y="',t(s-this.height/2,e),'" ',r.fontFamily?'font-family="'+r.fontFamily.replace(/"/g,"'")+'" ':"",r.fontSize?'font-size="'+r.fontSize+'" ':"",r.fontStyle?'font-style="'+r.fontStyle+'" ':"",r.fontWeight?'font-weight="'+r.fontWeight+'" ':"",r.textDecoration?'text-decoration="'+r.textDecoration+'" ':"",'style="',a,'">',fabric.util.string.escapeXml(i),"</tspan>\n"].join("")}})}(),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.clone;e.Textbox=e.util.createClass(e.IText,e.Observable,{type:"textbox",minWidth:20,dynamicMinWidth:0,__cachedLines:null,lockScalingY:!0,lockScalingFlip:!0,initialize:function(t,i){this.ctx=e.util.createCanvasElement().getContext("2d"),this.callSuper("initialize",t,i),this.setControlsVisibility(e.Textbox.getTextboxControlVisibility()),this._dimensionAffectingProps.width=!0},_initDimensions:function(t){this.__skipDimension||(t||(t=e.util.createCanvasElement().getContext("2d"),this._setTextStyles(t)),this.dynamicMinWidth=0,this._textLines=this._splitTextIntoLines(),this.dynamicMinWidth>this.width&&this._set("width",this.dynamicMinWidth),this._clearCache(),this.height=this._getTextHeight(t))},_generateStyleMap:function(){for(var t=0,e=0,i=0,r={},n=0;n<this._textLines.length;n++)"\n"===this.text[i]?(e=0,i++,t++):" "===this.text[i]&&(e++,i++),r[n]={line:t,offset:e},i+=this._textLines[n].length,e+=this._textLines[n].length;return r},_getStyleDeclaration:function(t,e,i){if(this._styleMap){var r=this._styleMap[t];if(!r)return i?{}:null;t=r.line,e=r.offset+e}return this.callSuper("_getStyleDeclaration",t,e,i)},_setStyleDeclaration:function(t,e,i){var r=this._styleMap[t];t=r.line,e=r.offset+e,this.styles[t][e]=i},_deleteStyleDeclaration:function(t,e){var i=this._styleMap[t];t=i.line,e=i.offset+e,delete this.styles[t][e]},_getLineStyle:function(t){var e=this._styleMap[t];return this.styles[e.line]},_setLineStyle:function(t,e){var i=this._styleMap[t];this.styles[i.line]=e},_deleteLineStyle:function(t){var e=this._styleMap[t];delete this.styles[e.line]},_wrapText:function(t,e){var i,r=e.split(this._reNewline),n=[];for(i=0;i<r.length;i++)n=n.concat(this._wrapLine(t,r[i],i));return n},_measureText:function(t,e,i,r){var n=0;r=r||0;for(var s=0,o=e.length;s<o;s++)n+=this._getWidthOfChar(t,e[s],i,s+r);return n},_wrapLine:function(t,e,i){for(var r=0,n=[],s="",o=e.split(" "),a="",h=0,c=" ",l=0,u=0,f=0,d=!0,g=this._getWidthOfCharSpacing(),p=0;p<o.length;p++)a=o[p],l=this._measureText(t,a,i,h),h+=a.length,r+=u+l-g,r>=this.width&&!d?(n.push(s),s="",r=l,d=!0):r+=g,d||(s+=c),s+=a,u=this._measureText(t,c,i,h)+g,h++,d=!1,l>f&&(f=l);return p&&n.push(s),f>this.dynamicMinWidth&&(this.dynamicMinWidth=f-g),n},_splitTextIntoLines:function(){var t=this.textAlign;this.ctx.save(),this._setTextStyles(this.ctx),this.textAlign="left";var e=this._wrapText(this.ctx,this.text);return this.textAlign=t,this.ctx.restore(),this._textLines=e,this._styleMap=this._generateStyleMap(),e},setOnGroup:function(t,e){"scaleX"===t&&(this.set("scaleX",Math.abs(1/e)),this.set("width",this.get("width")*e/("undefined"==typeof this.__oldScaleX?1:this.__oldScaleX)),this.__oldScaleX=e)},get2DCursorLocation:function(t){"undefined"==typeof t&&(t=this.selectionStart);for(var e=this._textLines.length,i=0,r=0;r<e;r++){var n=this._textLines[r],s=n.length;if(t<=i+s)return{lineIndex:r,charIndex:t-i};i+=s,"\n"!==this.text[i]&&" "!==this.text[i]||i++}return{lineIndex:e-1,charIndex:this._textLines[e-1].length}},_getCursorBoundariesOffsets:function(t,e){for(var i=0,r=0,n=this.get2DCursorLocation(),s=this._textLines[n.lineIndex].split(""),o=this._getLineLeftOffset(this._getLineWidth(this.ctx,n.lineIndex)),a=0;a<n.charIndex;a++)r+=this._getWidthOfChar(this.ctx,s[a],n.lineIndex,a);for(a=0;a<n.lineIndex;a++)i+=this._getHeightOfLine(this.ctx,a);return"cursor"===e&&(i+=(1-this._fontSizeFraction)*this._getHeightOfLine(this.ctx,n.lineIndex)/this.lineHeight-this.getCurrentCharFontSize(n.lineIndex,n.charIndex)*(1-this._fontSizeFraction)),{top:i,left:r,lineLeft:o}},getMinWidth:function(){return Math.max(this.minWidth,this.dynamicMinWidth)},toObject:function(t){return e.util.object.extend(this.callSuper("toObject",t),{minWidth:this.minWidth})}}),e.Textbox.fromObject=function(t){return new e.Textbox(t.text,i(t))},e.Textbox.getTextboxControlVisibility=function(){return{tl:!1,tr:!1,br:!1,bl:!1,ml:!0,mt:!1,mr:!0,mb:!1,mtr:!0}}}("undefined"!=typeof exports?exports:this),function(){var t=fabric.Canvas.prototype._setObjectScale;fabric.Canvas.prototype._setObjectScale=function(e,i,r,n,s,o,a){var h=i.target;if(!(h instanceof fabric.Textbox))return t.call(fabric.Canvas.prototype,e,i,r,n,s,o,a);var c=h.width*(e.x/i.scaleX/(h.width+h.strokeWidth));return c>=h.getMinWidth()?(h.set("width",c),!0):void 0},fabric.Group.prototype._refreshControlsVisibility=function(){if("undefined"!=typeof fabric.Textbox)for(var t=this._objects.length;t--;)if(this._objects[t]instanceof fabric.Textbox)return void this.setControlsVisibility(fabric.Textbox.getTextboxControlVisibility())};var e=fabric.util.object.clone;fabric.util.object.extend(fabric.Textbox.prototype,{_removeExtraneousStyles:function(){for(var t in this._styleMap)this._textLines[t]||delete this.styles[this._styleMap[t].line]},insertCharStyleObject:function(t,e,i){var r=this._styleMap[t];t=r.line,e=r.offset+e,fabric.IText.prototype.insertCharStyleObject.apply(this,[t,e,i])},insertNewlineStyleObject:function(t,e,i){var r=this._styleMap[t];t=r.line,e=r.offset+e,fabric.IText.prototype.insertNewlineStyleObject.apply(this,[t,e,i])},shiftLineStyles:function(t,i){var r=e(this.styles),n=this._styleMap[t];t=n.line;for(var s in this.styles){var o=parseInt(s,10);o>t&&(this.styles[o+i]=r[o],r[o-i]||delete this.styles[o])}},_getTextOnPreviousLine:function(t){for(var e=this._textLines[t-1];this._styleMap[t-2]&&this._styleMap[t-2].line===this._styleMap[t-1].line;)e=this._textLines[t-2]+e,t--;return e},removeStyleObject:function(t,e){var i=this.get2DCursorLocation(e),r=this._styleMap[i.lineIndex],n=r.line,s=r.offset+i.charIndex;this._removeStyleObject(t,i,n,s)}})}(),function(){var t=fabric.IText.prototype._getNewSelectionStartFromOffset;fabric.IText.prototype._getNewSelectionStartFromOffset=function(e,i,r,n,s){n=t.call(this,e,i,r,n,s);for(var o=0,a=0,h=0;h<this._textLines.length&&(o+=this._textLines[h].length,!(o+a>=n));h++)"\n"!==this.text[o+a]&&" "!==this.text[o+a]||a++;return n-h+a}}(),function(){function request(t,e,i){var r=URL.parse(t);r.port||(r.port=0===r.protocol.indexOf("https:")?443:80);var n=0===r.protocol.indexOf("https:")?HTTPS:HTTP,s=n.request({hostname:r.hostname,port:r.port,path:r.path,method:"GET"},function(t){var r="";e&&t.setEncoding(e),t.on("end",function(){i(r)}),t.on("data",function(e){200===t.statusCode&&(r+=e)})});s.on("error",function(t){t.errno===process.ECONNREFUSED?fabric.log("ECONNREFUSED: connection refused to "+r.hostname+":"+r.port):fabric.log(t.message),i(null)}),s.end()}function requestFs(t,e){var i=require("fs");i.readFile(t,function(t,i){if(t)throw fabric.log(t),t;e(i)})}if("undefined"==typeof document||"undefined"==typeof window){var DOMParser=require("xmldom").DOMParser,URL=require("url"),HTTP=require("http"),HTTPS=require("https"),Canvas=require("canvas"),Image=require("canvas").Image;fabric.util.loadImage=function(t,e,i){function r(r){r?(n.src=new Buffer(r,"binary"),n._src=t,e&&e.call(i,n)):(n=null,e&&e.call(i,null,!0))}var n=new Image;t&&(t instanceof Buffer||0===t.indexOf("data"))?(n.src=n._src=t,e&&e.call(i,n)):t&&0!==t.indexOf("http")?requestFs(t,r):t?request(t,"binary",r):e&&e.call(i,t)},fabric.loadSVGFromURL=function(t,e,i){t=t.replace(/^\n\s*/,"").replace(/\?.*$/,"").trim(),0!==t.indexOf("http")?requestFs(t,function(t){fabric.loadSVGFromString(t.toString(),e,i)}):request(t,"",function(t){fabric.loadSVGFromString(t,e,i)})},fabric.loadSVGFromString=function(t,e,i){var r=(new DOMParser).parseFromString(t);fabric.parseSVGDocument(r.documentElement,function(t,i){e&&e(t,i)},i)},fabric.util.getScript=function(url,callback){request(url,"",function(body){eval(body),callback&&callback()})},fabric.createCanvasForNode=function(t,e,i,r){r=r||i;var n=fabric.document.createElement("canvas"),s=new Canvas(t||600,e||600,r),o=new Canvas(t||600,e||600,r);n.style={},n.width=s.width,n.height=s.height;var a=fabric.Canvas||fabric.StaticCanvas,h=new a(n,i);return h.contextContainer=s.getContext("2d"),h.nodeCanvas=s,h.contextCache=o.getContext("2d"),h.nodeCacheCanvas=o,h.Font=Canvas.Font,h},fabric.StaticCanvas.prototype.createPNGStream=function(){return this.nodeCanvas.createPNGStream()},fabric.StaticCanvas.prototype.createJPEGStream=function(t){return this.nodeCanvas.createJPEGStream(t)};var origSetWidth=fabric.StaticCanvas.prototype.setWidth;fabric.StaticCanvas.prototype.setWidth=function(t,e){return origSetWidth.call(this,t,e),this.nodeCanvas.width=t,this},fabric.Canvas&&(fabric.Canvas.prototype.setWidth=fabric.StaticCanvas.prototype.setWidth);var origSetHeight=fabric.StaticCanvas.prototype.setHeight;fabric.StaticCanvas.prototype.setHeight=function(t,e){return origSetHeight.call(this,t,e),this.nodeCanvas.height=t,this},fabric.Canvas&&(fabric.Canvas.prototype.setHeight=fabric.StaticCanvas.prototype.setHeight)}}(),window.fabric=fabric,"function"==typeof define&&define.amd&&define([],function(){return fabric});
//# sourceMappingURL=fabric.require.min.js.map | dlueth/cdnjs | ajax/libs/fabric.js/1.6.4/fabric.require.min.js | JavaScript | mit | 249,540 |
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hdfs.protocol;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.io.Writable;
import org.apache.hadoop.io.WritableFactories;
import org.apache.hadoop.io.WritableFactory;
import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability;
/**
* A block and the full path information to the block data file and
* the metadata file stored on the local file system.
*/
@InterfaceAudience.Private
@InterfaceStability.Evolving
public class BlockLocalPathInfo implements Writable {
static final WritableFactory FACTORY = new WritableFactory() {
public Writable newInstance() { return new BlockLocalPathInfo(); }
};
static { // register a ctor
WritableFactories.setFactory(BlockLocalPathInfo.class, FACTORY);
}
private Block block;
private String localBlockPath = ""; // local file storing the data
private String localMetaPath = ""; // local file storing the checksum
public BlockLocalPathInfo() {}
/**
* Constructs BlockLocalPathInfo.
* @param b The block corresponding to this lock path info.
* @param file Block data file.
* @param metafile Metadata file for the block.
*/
public BlockLocalPathInfo(Block b, String file, String metafile) {
block = b;
localBlockPath = file;
localMetaPath = metafile;
}
/**
* Get the Block data file.
* @return Block data file.
*/
public String getBlockPath() {return localBlockPath;}
/**
* Get the Block metadata file.
* @return Block metadata file.
*/
public String getMetaPath() {return localMetaPath;}
@Override
public void write(DataOutput out) throws IOException {
block.write(out);
Text.writeString(out, localBlockPath);
Text.writeString(out, localMetaPath);
}
@Override
public void readFields(DataInput in) throws IOException {
block = new Block();
block.readFields(in);
localBlockPath = Text.readString(in);
localMetaPath = Text.readString(in);
}
/**
* Get number of bytes in the block.
* @return Number of bytes in the block.
*/
public long getNumBytes() {
return block.getNumBytes();
}
}
| Mitali-Sodhi/CodeLingo | Dataset/java/BlockLocalPathInfo.java | Java | mit | 3,102 |
/*!
* OOjs UI v0.12.9
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2015 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* Date: 2015-09-22T20:09:59Z
*/
.oo-ui-icon-edit {
background-image: /* @embed */ url(themes/mediawiki/images/icons/edit-rtl.svg);
}
.oo-ui-icon-edit-progressive {
background-image: /* @embed */ url(themes/mediawiki/images/icons/edit-rtl-progressive.svg);
}
.oo-ui-icon-edit-invert {
background-image: /* @embed */ url(themes/mediawiki/images/icons/edit-rtl-invert.svg);
}
.oo-ui-icon-editLock {
background-image: /* @embed */ url(themes/mediawiki/images/icons/editLock-rtl.svg);
}
.oo-ui-icon-editLock-invert {
background-image: /* @embed */ url(themes/mediawiki/images/icons/editLock-rtl-invert.svg);
}
.oo-ui-icon-editUndo {
background-image: /* @embed */ url(themes/mediawiki/images/icons/editUndo-rtl.svg);
}
.oo-ui-icon-editUndo-invert {
background-image: /* @embed */ url(themes/mediawiki/images/icons/editUndo-rtl-invert.svg);
}
.oo-ui-icon-link {
background-image: /* @embed */ url(themes/mediawiki/images/icons/link-rtl.svg);
}
.oo-ui-icon-link-invert {
background-image: /* @embed */ url(themes/mediawiki/images/icons/link-rtl-invert.svg);
}
.oo-ui-icon-linkExternal {
background-image: /* @embed */ url(themes/mediawiki/images/icons/external-link-rtl.svg);
}
.oo-ui-icon-linkExternal-invert {
background-image: /* @embed */ url(themes/mediawiki/images/icons/external-link-rtl-invert.svg);
}
.oo-ui-icon-linkSecure {
background-image: /* @embed */ url(themes/mediawiki/images/icons/secure-link.svg);
}
.oo-ui-icon-linkSecure-invert {
background-image: /* @embed */ url(themes/mediawiki/images/icons/secure-link-invert.svg);
}
| emmy41124/cdnjs | ajax/libs/oojs-ui/0.12.9/oojs-ui-mediawiki-icons-editing-core.vector.rtl.css | CSS | mit | 1,750 |
.oo-ui-fieldLayout>.oo-ui-fieldLayout-help>.oo-ui-popupWidget>.oo-ui-popupWidget-popup,.oo-ui-fieldsetLayout>.oo-ui-fieldsetLayout-help>.oo-ui-popupWidget>.oo-ui-popupWidget-popup{z-index:1}.oo-ui-fieldLayout:after,.oo-ui-toolbar{clear:both}@-webkit-keyframes oo-ui-progressBarWidget-slide{from{margin-left:-40%}to{margin-left:100%}}@-moz-keyframes oo-ui-progressBarWidget-slide{from{margin-left:-40%}to{margin-left:100%}}@-ms-keyframes oo-ui-progressBarWidget-slide{from{margin-left:-40%}to{margin-left:100%}}@-o-keyframes oo-ui-progressBarWidget-slide{from{margin-left:-40%}to{margin-left:100%}}@keyframes oo-ui-progressBarWidget-slide{from{margin-left:-40%}to{margin-left:100%}}.oo-ui-rtl{direction:rtl}.oo-ui-ltr{direction:ltr}.oo-ui-element-hidden{display:none!important}.oo-ui-buttonElement>.oo-ui-buttonElement-button{cursor:pointer;display:inline-block;vertical-align:middle;font:inherit;white-space:nowrap;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-weight:700}.oo-ui-buttonElement-framed.oo-ui-widget-disabled.oo-ui-buttonElement-active>.oo-ui-buttonElement-button,.oo-ui-buttonElement-framed.oo-ui-widget-disabled.oo-ui-buttonElement-pressed>.oo-ui-buttonElement-button,.oo-ui-buttonElement-framed.oo-ui-widget-disabled>.oo-ui-buttonElement-button,.oo-ui-buttonElement.oo-ui-widget-disabled>.oo-ui-buttonElement-button{cursor:default}.oo-ui-buttonElement>.oo-ui-buttonElement-button>.oo-ui-iconElement-icon,.oo-ui-buttonElement>.oo-ui-buttonElement-button>.oo-ui-indicatorElement-indicator{display:none}.oo-ui-buttonElement.oo-ui-iconElement>.oo-ui-buttonElement-button>.oo-ui-iconElement-icon,.oo-ui-buttonElement.oo-ui-indicatorElement>.oo-ui-buttonElement-button>.oo-ui-indicatorElement-indicator{display:inline-block;vertical-align:middle;background-position:center center;background-repeat:no-repeat}.oo-ui-buttonElement-frameless{display:inline-block;position:relative}.oo-ui-buttonElement-frameless.oo-ui-labelElement>.oo-ui-buttonElement-button>.oo-ui-labelElement-label{display:inline-block;vertical-align:middle}.oo-ui-buttonElement-framed>.oo-ui-buttonElement-button{display:inline-block;vertical-align:top;text-align:center}.oo-ui-buttonElement-framed.oo-ui-labelElement>.oo-ui-buttonElement-button>.oo-ui-labelElement-label{display:inline-block;vertical-align:middle}.oo-ui-buttonElement.oo-ui-iconElement>.oo-ui-buttonElement-button>.oo-ui-iconElement-icon{margin-left:0}.oo-ui-buttonElement.oo-ui-indicatorElement>.oo-ui-buttonElement-button>.oo-ui-indicatorElement-indicator{width:.9375em;height:.9375em;margin:.46875em}.oo-ui-buttonElement.oo-ui-iconElement>.oo-ui-buttonElement-button>.oo-ui-indicatorElement-indicator{margin-left:.46875em}.oo-ui-buttonElement.oo-ui-iconElement>.oo-ui-buttonElement-button>.oo-ui-iconElement-icon{width:1.875em;height:1.875em}.oo-ui-buttonElement-frameless>.oo-ui-buttonElement-button:focus{box-shadow:inset 0 0 0 1px rgba(0,0,0,.2),0 0 0 1px rgba(0,0,0,.2);outline:0}.oo-ui-buttonElement-frameless>.oo-ui-buttonElement-button .oo-ui-indicatorElement-indicator{margin-right:0}.oo-ui-buttonElement-frameless.oo-ui-labelElement>.oo-ui-buttonElement-button>.oo-ui-labelElement-label{margin-left:.25em;margin-right:.25em}.oo-ui-buttonElement-frameless.oo-ui-widget-enabled>.oo-ui-buttonElement-button>.oo-ui-labelElement-label{color:#555}.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-buttonElement-pressed>.oo-ui-buttonElement-button>.oo-ui-labelElement-label{color:#444}.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive>.oo-ui-buttonElement-button:focus>.oo-ui-labelElement-label,.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive>.oo-ui-buttonElement-button:hover>.oo-ui-labelElement-label{color:#347bff}.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive>.oo-ui-buttonElement-button>.oo-ui-labelElement-label{color:#777}.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive.oo-ui-widget-enabled.oo-ui-buttonElement-pressed>.oo-ui-buttonElement-button>.oo-ui-labelElement-label,.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive.oo-ui-widget-enabled>.oo-ui-buttonElement-button:active>.oo-ui-labelElement-label{color:#1f4999;box-shadow:none}.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-constructive>.oo-ui-buttonElement-button:focus>.oo-ui-labelElement-label,.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-constructive>.oo-ui-buttonElement-button:hover>.oo-ui-labelElement-label{color:#00af89}.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-constructive>.oo-ui-buttonElement-button>.oo-ui-labelElement-label{color:#777}.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-constructive.oo-ui-widget-enabled.oo-ui-buttonElement-pressed>.oo-ui-buttonElement-button>.oo-ui-labelElement-label,.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-constructive.oo-ui-widget-enabled>.oo-ui-buttonElement-button:active>.oo-ui-labelElement-label{color:#005946;box-shadow:none}.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive>.oo-ui-buttonElement-button:focus>.oo-ui-labelElement-label,.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive>.oo-ui-buttonElement-button:hover>.oo-ui-labelElement-label{color:#d11d13}.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive>.oo-ui-buttonElement-button>.oo-ui-labelElement-label{color:#777}.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive.oo-ui-widget-enabled.oo-ui-buttonElement-pressed>.oo-ui-buttonElement-button>.oo-ui-labelElement-label,.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive.oo-ui-widget-enabled>.oo-ui-buttonElement-button:active>.oo-ui-labelElement-label{color:#73100a;box-shadow:none}.oo-ui-buttonElement-frameless.oo-ui-widget-disabled>.oo-ui-buttonElement-button{color:#ccc}.oo-ui-buttonElement-frameless.oo-ui-widget-disabled>.oo-ui-buttonElement-button>.oo-ui-iconElement-icon,.oo-ui-buttonElement-frameless.oo-ui-widget-disabled>.oo-ui-buttonElement-button>.oo-ui-indicatorElement-indicator{opacity:.2}.oo-ui-buttonElement-framed>.oo-ui-buttonElement-button{margin:.1em 0;padding:.2em .8em;border-radius:2px;-webkit-transition:background .1s ease-in-out,color .1s ease-in-out,box-shadow .1s ease-in-out;-moz-transition:background .1s ease-in-out,color .1s ease-in-out,box-shadow .1s ease-in-out;-ms-transition:background .1s ease-in-out,color .1s ease-in-out,box-shadow .1s ease-in-out;-o-transition:background .1s ease-in-out,color .1s ease-in-out,box-shadow .1s ease-in-out;transition:background .1s ease-in-out,color .1s ease-in-out,box-shadow .1s ease-in-out}.oo-ui-buttonElement-framed>.oo-ui-buttonElement-button:focus,.oo-ui-buttonElement-framed>.oo-ui-buttonElement-button:hover{outline:0}.oo-ui-buttonElement-framed.oo-ui-labelElement>.oo-ui-buttonElement-button>.oo-ui-labelElement-label,.oo-ui-buttonElement-framed>input.oo-ui-buttonElement-button{line-height:1.875em}.oo-ui-buttonElement-framed.oo-ui-iconElement>.oo-ui-buttonElement-button>.oo-ui-iconElement-icon{margin-left:-.5em;margin-right:-.5em}.oo-ui-buttonElement-framed.oo-ui-iconElement.oo-ui-labelElement>.oo-ui-buttonElement-button>.oo-ui-iconElement-icon{margin-right:.3em}.oo-ui-buttonElement-framed.oo-ui-indicatorElement>.oo-ui-buttonElement-button>.oo-ui-indicatorElement-indicator{margin-left:-.005em;margin-right:-.005em}.oo-ui-buttonElement-framed.oo-ui-indicatorElement.oo-ui-iconElement:not( .oo-ui-labelElement )>.oo-ui-buttonElement-button>.oo-ui-indicatorElement-indicator,.oo-ui-buttonElement-framed.oo-ui-indicatorElement.oo-ui-labelElement>.oo-ui-buttonElement-button>.oo-ui-indicatorElement-indicator{margin-left:.46875em;margin-right:-.275em}.oo-ui-buttonElement-framed.oo-ui-widget-disabled>.oo-ui-buttonElement-button{color:#fff;background:#ddd;border:1px solid #ddd}.oo-ui-buttonElement-framed.oo-ui-widget-enabled>.oo-ui-buttonElement-button{color:#555;background-color:#fff;border:1px solid #cdcdcd}.oo-ui-buttonElement-framed.oo-ui-widget-enabled>.oo-ui-buttonElement-button:hover{background-color:#ebebeb}.oo-ui-buttonElement-framed.oo-ui-widget-enabled>.oo-ui-buttonElement-button:focus{box-shadow:inset 0 0 0 1px rgba(0,0,0,.2)}.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-buttonElement-pressed>.oo-ui-buttonElement-button,.oo-ui-buttonElement-framed.oo-ui-widget-enabled>.oo-ui-buttonElement-button:active{background-color:#d9d9d9;border-color:#d9d9d9;box-shadow:none}.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-buttonElement-active>.oo-ui-buttonElement-button{background-color:#999;color:#fff}.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive>.oo-ui-buttonElement-button{color:#347bff}.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive>.oo-ui-buttonElement-button:hover{background-color:rgba(52,123,255,.1);border-color:rgba(31,73,153,.5)}.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive>.oo-ui-buttonElement-button:focus{box-shadow:inset 0 0 0 1px #1f4999;border-color:#1f4999}.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive.oo-ui-widget-enabled .oo-ui-buttonElement-button:active,.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive.oo-ui-widget-enabled.oo-ui-buttonElement-pressed>.oo-ui-buttonElement-button{color:#1f4999;border-color:#1f4999;box-shadow:none}.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive.oo-ui-widget-enabled.oo-ui-buttonElement-active>.oo-ui-buttonElement-button{background-color:#999;color:#fff}.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-constructive>.oo-ui-buttonElement-button{color:#00af89}.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-constructive>.oo-ui-buttonElement-button:hover{background-color:rgba(0,171,137,.1);border-color:rgba(0,89,70,.5)}.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-constructive>.oo-ui-buttonElement-button:focus{box-shadow:inset 0 0 0 1px #005946;border-color:#005946}.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-constructive.oo-ui-widget-enabled .oo-ui-buttonElement-button:active,.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-constructive.oo-ui-widget-enabled.oo-ui-buttonElement-pressed>.oo-ui-buttonElement-button{color:#005946;border-color:#005946;box-shadow:none}.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-constructive.oo-ui-widget-enabled.oo-ui-buttonElement-active>.oo-ui-buttonElement-button{background-color:#999;color:#fff}.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive>.oo-ui-buttonElement-button{color:#d11d13}.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive>.oo-ui-buttonElement-button:hover{background-color:rgba(209,29,19,.1);border-color:rgba(115,16,10,.5)}.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive>.oo-ui-buttonElement-button:focus{box-shadow:inset 0 0 0 1px #73100a;border-color:#73100a}.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive.oo-ui-widget-enabled .oo-ui-buttonElement-button:active,.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive.oo-ui-widget-enabled.oo-ui-buttonElement-pressed>.oo-ui-buttonElement-button{color:#73100a;border-color:#73100a;box-shadow:none}.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive.oo-ui-widget-enabled.oo-ui-buttonElement-active>.oo-ui-buttonElement-button{background-color:#999;color:#fff}.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-progressive>.oo-ui-buttonElement-button{color:#fff;background-color:#347bff;border-color:#347bff}.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-progressive>.oo-ui-buttonElement-button:hover{background:#2962cc;border-color:#2962cc}.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-progressive>.oo-ui-buttonElement-button:focus{box-shadow:inset 0 0 0 1px #fff;border-color:#347bff}.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-progressive.oo-ui-widget-enabled .oo-ui-buttonElement-button:active,.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-progressive.oo-ui-widget-enabled.oo-ui-buttonElement-pressed>.oo-ui-buttonElement-button{color:#fff;background-color:#1f4999;border-color:#1f4999;box-shadow:none}.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-progressive.oo-ui-widget-enabled.oo-ui-buttonElement-active>.oo-ui-buttonElement-button{background-color:#999;color:#fff}.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-constructive>.oo-ui-buttonElement-button{color:#fff;background-color:#00af89;border-color:#00af89}.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-constructive>.oo-ui-buttonElement-button:hover{background:#008064;border-color:#008064}.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-constructive>.oo-ui-buttonElement-button:focus{box-shadow:inset 0 0 0 1px #fff;border-color:#00af89}.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-constructive.oo-ui-widget-enabled .oo-ui-buttonElement-button:active,.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-constructive.oo-ui-widget-enabled.oo-ui-buttonElement-pressed>.oo-ui-buttonElement-button{color:#fff;background-color:#005946;border-color:#005946;box-shadow:none}.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-constructive.oo-ui-widget-enabled.oo-ui-buttonElement-active>.oo-ui-buttonElement-button{background-color:#999;color:#fff}.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-destructive>.oo-ui-buttonElement-button{color:#fff;background-color:#d11d13;border-color:#d11d13}.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-destructive>.oo-ui-buttonElement-button:hover{background:#8c130d;border-color:#8c130d}.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-destructive>.oo-ui-buttonElement-button:focus{box-shadow:inset 0 0 0 1px #fff;border-color:#d11d13}.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-destructive.oo-ui-widget-enabled .oo-ui-buttonElement-button:active,.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-destructive.oo-ui-widget-enabled.oo-ui-buttonElement-pressed>.oo-ui-buttonElement-button{color:#fff;background-color:#73100a;border-color:#73100a;box-shadow:none}.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-destructive.oo-ui-widget-enabled.oo-ui-buttonElement-active>.oo-ui-buttonElement-button{background-color:#999;color:#fff}.oo-ui-clippableElement-clippable{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.oo-ui-draggableElement{cursor:-webkit-grab -moz-grab,url(images/grab.cur),move}.oo-ui-draggableElement-dragging{cursor:-webkit-grabbing -moz-grabbing,url(images/grabbing.cur),move;background:rgba(0,0,0,.2);opacity:.4}.oo-ui-draggableGroupElement-horizontal .oo-ui-draggableElement.oo-ui-optionWidget{display:inline-block}.oo-ui-draggableGroupElement-placeholder{position:absolute;display:block;background:rgba(0,0,0,.4)}.oo-ui-fieldsetLayout.oo-ui-iconElement>.oo-ui-iconElement-icon,.oo-ui-popupToolGroup .oo-ui-toolGroup-tools .oo-ui-iconElement-icon,.oo-ui-toolGroup .oo-ui-tool-link .oo-ui-iconElement-icon{background-repeat:no-repeat;background-position:center center}.oo-ui-iconElement .oo-ui-iconElement-icon,.oo-ui-iconElement.oo-ui-iconElement-icon,.oo-ui-indicatorElement .oo-ui-indicatorElement-indicator,.oo-ui-indicatorElement.oo-ui-indicatorElement-indicator{background-size:contain;background-position:center center}.oo-ui-lookupElement>.oo-ui-menuSelectWidget{z-index:1;width:100%}.oo-ui-bookletLayout-stackLayout.oo-ui-stackLayout-continuous>.oo-ui-panelLayout-scrollable{overflow-y:hidden}.oo-ui-bookletLayout-stackLayout>.oo-ui-panelLayout-scrollable{overflow-y:auto}.oo-ui-bookletLayout-stackLayout>.oo-ui-panelLayout-padded{padding:2em}.oo-ui-bookletLayout-outlinePanel-editable>.oo-ui-outlineSelectWidget{position:absolute;top:0;left:0;right:0;bottom:3em;overflow-y:auto}.oo-ui-bookletLayout-outlinePanel>.oo-ui-outlineControlsWidget{position:absolute;bottom:0;left:0;right:0;box-shadow:0 0 .25em rgba(0,0,0,.25)}.oo-ui-bookletLayout-stackLayout>.oo-ui-panelLayout{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1.5em}.oo-ui-bookletLayout-outlinePanel{border-right:1px solid #ddd}.oo-ui-indexLayout>.oo-ui-menuLayout-menu{height:3em}.oo-ui-indexLayout>.oo-ui-menuLayout-content{top:3em}.oo-ui-indexLayout-stackLayout>.oo-ui-panelLayout{padding:1.5em}.oo-ui-fieldLayout{display:block;margin-bottom:1em}.oo-ui-fieldLayout:after,.oo-ui-fieldLayout:before{content:" ";display:table}.oo-ui-fieldLayout.oo-ui-fieldLayout-align-left>.oo-ui-fieldLayout-body>.oo-ui-fieldLayout-field,.oo-ui-fieldLayout.oo-ui-fieldLayout-align-left>.oo-ui-fieldLayout-body>.oo-ui-labelElement-label,.oo-ui-fieldLayout.oo-ui-fieldLayout-align-right>.oo-ui-fieldLayout-body>.oo-ui-fieldLayout-field,.oo-ui-fieldLayout.oo-ui-fieldLayout-align-right>.oo-ui-fieldLayout-body>.oo-ui-labelElement-label{display:block;float:left}.oo-ui-fieldLayout>.oo-ui-fieldLayout-help,.oo-ui-fieldsetLayout>.oo-ui-fieldsetLayout-help,.oo-ui-popupWidget-head .oo-ui-buttonWidget,.oo-ui-toolbar-actions{float:right}.oo-ui-fieldLayout.oo-ui-fieldLayout-align-right>.oo-ui-fieldLayout-body>.oo-ui-labelElement-label{text-align:right}.oo-ui-fieldLayout.oo-ui-fieldLayout-align-inline>.oo-ui-fieldLayout-body{display:table}.oo-ui-fieldLayout.oo-ui-fieldLayout-align-inline>.oo-ui-fieldLayout-body>.oo-ui-fieldLayout-field,.oo-ui-fieldLayout.oo-ui-fieldLayout-align-inline>.oo-ui-fieldLayout-body>.oo-ui-labelElement-label{display:table-cell;vertical-align:middle}.oo-ui-fieldLayout.oo-ui-labelElement.oo-ui-fieldLayout-align-top>.oo-ui-fieldLayout-body>.oo-ui-labelElement-label{display:inline-block}.oo-ui-fieldLayout>.oo-ui-fieldLayout-help .oo-ui-fieldLayout-help-content{padding:.5em .75em;line-height:1.5em}.oo-ui-fieldLayout:last-child{margin-bottom:0}.oo-ui-fieldLayout.oo-ui-fieldLayout-align-left.oo-ui-labelElement>.oo-ui-fieldLayout-body>.oo-ui-labelElement-label,.oo-ui-fieldLayout.oo-ui-fieldLayout-align-right.oo-ui-labelElement>.oo-ui-fieldLayout-body>.oo-ui-labelElement-label{padding-top:.5em;margin-right:5%;width:35%}.oo-ui-fieldLayout.oo-ui-fieldLayout-align-left>.oo-ui-fieldLayout-body>.oo-ui-fieldLayout-field,.oo-ui-fieldLayout.oo-ui-fieldLayout-align-right>.oo-ui-fieldLayout-body>.oo-ui-fieldLayout-field{width:60%}.oo-ui-fieldLayout.oo-ui-fieldLayout-align-inline.oo-ui-labelElement>.oo-ui-fieldLayout-body>.oo-ui-labelElement-label{padding:.5em .5em .5em 1em}.oo-ui-fieldLayout.oo-ui-fieldLayout-align-inline>.oo-ui-fieldLayout-body>.oo-ui-fieldLayout-field,.oo-ui-fieldLayout.oo-ui-fieldLayout-align-top.oo-ui-labelElement>.oo-ui-fieldLayout-body>.oo-ui-labelElement-label{padding:.5em 0}.oo-ui-fieldLayout>.oo-ui-popupButtonWidget{margin-right:0;margin-top:.25em}.oo-ui-fieldLayout>.oo-ui-popupButtonWidget:last-child{margin-right:0}.oo-ui-fieldLayout-disabled .oo-ui-labelElement-label{color:#ccc}.oo-ui-actionFieldLayout-button,.oo-ui-actionFieldLayout-input{display:table-cell;vertical-align:middle}.oo-ui-actionFieldLayout-input{padding-right:1em}.oo-ui-actionFieldLayout-button{width:1%;white-space:nowrap}.oo-ui-fieldsetLayout{position:relative;margin:0;padding:0;border:none}.oo-ui-fieldsetLayout+.oo-ui-fieldsetLayout,.oo-ui-fieldsetLayout+.oo-ui-formLayout,.oo-ui-formLayout+.oo-ui-fieldsetLayout,.oo-ui-formLayout+.oo-ui-formLayout{margin-top:2em}.oo-ui-fieldsetLayout.oo-ui-iconElement>.oo-ui-iconElement-icon{display:block;position:absolute;left:0;top:.25em;width:1.875em;height:1.875em}.oo-ui-fieldsetLayout.oo-ui-labelElement>.oo-ui-labelElement-label{display:inline-block}.oo-ui-fieldsetLayout>.oo-ui-fieldsetLayout-help .oo-ui-fieldsetLayout-help-content{padding:.5em .75em;line-height:1.5em}.oo-ui-fieldsetLayout>.oo-ui-labelElement-label{font-size:1.1em;margin-bottom:.5em;padding:.25em 0;font-weight:700}.oo-ui-fieldsetLayout.oo-ui-iconElement>.oo-ui-labelElement-label{padding-left:2em;line-height:1.8em}.oo-ui-fieldsetLayout>.oo-ui-popupButtonWidget{margin-right:0}.oo-ui-fieldsetLayout>.oo-ui-popupButtonWidget:last-child{margin-right:0}.oo-ui-menuLayout{position:absolute;top:0;left:0;right:0;bottom:0}.oo-ui-menuLayout-content,.oo-ui-menuLayout-menu{position:absolute;-webkit-transition:all ease-in-out 200ms;-moz-transition:all ease-in-out 200ms;-ms-transition:all ease-in-out 200ms;-o-transition:all ease-in-out 200ms;transition:all ease-in-out 200ms}.oo-ui-menuLayout-menu{height:18em;width:18em}.oo-ui-menuLayout-content{top:18em;left:18em;right:18em;bottom:18em}.oo-ui-menuLayout.oo-ui-menuLayout-hideMenu .oo-ui-menuLayout-menu{width:0!important;height:0!important;overflow:hidden}.oo-ui-menuLayout.oo-ui-menuLayout-hideMenu .oo-ui-menuLayout-content{top:0!important;left:0!important;right:0!important;bottom:0!important}.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-top .oo-ui-menuLayout-menu{width:auto!important;left:0;top:0;right:0}.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-top .oo-ui-menuLayout-content{right:0!important;bottom:0!important;left:0!important}.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-after .oo-ui-menuLayout-menu{height:auto!important;top:0;right:0;bottom:0}.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-after .oo-ui-menuLayout-content{bottom:0!important;left:0!important;top:0!important}.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-bottom .oo-ui-menuLayout-menu{width:auto!important;right:0;bottom:0;left:0}.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-bottom .oo-ui-menuLayout-content{left:0!important;top:0!important;right:0!important}.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-before .oo-ui-menuLayout-menu{height:auto!important;bottom:0;left:0;top:0}.oo-ui-menuLayout.oo-ui-menuLayout-showMenu.oo-ui-menuLayout-before .oo-ui-menuLayout-content{top:0!important;right:0!important;bottom:0!important}.oo-ui-panelLayout{position:relative}.oo-ui-panelLayout-scrollable{overflow-y:auto}.oo-ui-panelLayout-expanded{position:absolute;top:0;left:0;right:0;bottom:0}.oo-ui-panelLayout-padded{padding:1.25em}.oo-ui-panelLayout-framed{border:1px solid #aaa;border-radius:.2em;box-shadow:inset 0 -.2em 0 0 rgba(0,0,0,.2)}.oo-ui-stackLayout-continuous>.oo-ui-panelLayout{display:block;position:relative}.oo-ui-popupTool .oo-ui-popupWidget-anchor,.oo-ui-popupTool .oo-ui-popupWidget-popup{z-index:4}.oo-ui-popupTool .oo-ui-popupWidget{margin-left:1.25em}.oo-ui-toolGroupTool>.oo-ui-popupToolGroup{border:0;border-radius:0;margin:0}.oo-ui-toolGroupTool>.oo-ui-toolGroup{border-right:none}.oo-ui-toolGroupTool>.oo-ui-popupToolGroup>.oo-ui-popupToolGroup-handle{height:2.5em;padding:.3125em}.oo-ui-toolGroupTool>.oo-ui-popupToolGroup>.oo-ui-popupToolGroup-handle .oo-ui-iconElement-icon{height:2.5em;width:1.875em}.oo-ui-toolGroupTool>.oo-ui-popupToolGroup.oo-ui-labelElement>.oo-ui-popupToolGroup-handle .oo-ui-labelElement-label{line-height:2.1em}.oo-ui-toolGroup{display:inline-block;vertical-align:middle;border-radius:0;border-right:1px solid #ddd}.oo-ui-barToolGroup>.oo-ui-iconElement-icon,.oo-ui-barToolGroup>.oo-ui-labelElement-label,.oo-ui-toolGroup-empty{display:none}.oo-ui-toolGroup .oo-ui-tool-link{text-decoration:none}.oo-ui-toolbar-narrow .oo-ui-toolGroup+.oo-ui-toolGroup{margin-left:0}.oo-ui-toolGroup .oo-ui-toolGroup .oo-ui-widget-enabled{border-right:none!important}.oo-ui-barToolGroup.oo-ui-widget-enabled>.oo-ui-toolGroup-tools>.oo-ui-tool>.oo-ui-tool-link{cursor:pointer}.oo-ui-barToolGroup>.oo-ui-toolGroup-tools>.oo-ui-tool{display:inline-block;position:relative;vertical-align:top}.oo-ui-barToolGroup>.oo-ui-toolGroup-tools>.oo-ui-tool>.oo-ui-tool-link{display:block;height:1.875em;padding:.625em}.oo-ui-barToolGroup>.oo-ui-toolGroup-tools>.oo-ui-tool>.oo-ui-tool-link .oo-ui-tool-accel{display:none}.oo-ui-barToolGroup>.oo-ui-toolGroup-tools>.oo-ui-tool.oo-ui-iconElement>.oo-ui-tool-link .oo-ui-iconElement-icon{display:inline-block;vertical-align:top}.oo-ui-barToolGroup>.oo-ui-toolGroup-tools>.oo-ui-tool.oo-ui-iconElement>.oo-ui-tool-link .oo-ui-tool-title{display:none}.oo-ui-barToolGroup>.oo-ui-toolGroup-tools>.oo-ui-tool.oo-ui-iconElement.oo-ui-tool-with-label>.oo-ui-tool-link .oo-ui-tool-title{display:inline}.oo-ui-barToolGroup>.oo-ui-toolGroup-tools>.oo-ui-tool.oo-ui-widget-disabled>.oo-ui-tool-link{cursor:default}.oo-ui-barToolGroup>.oo-ui-toolGroup-tools>.oo-ui-tool>.oo-ui-tool-link .oo-ui-iconElement-icon{height:1.875em;width:1.875em}.oo-ui-barToolGroup>.oo-ui-toolGroup-tools>.oo-ui-tool>.oo-ui-tool-link .oo-ui-tool-title{line-height:2.1em;padding:0 .4em}.oo-ui-barToolGroup.oo-ui-widget-enabled>.oo-ui-toolGroup-tools>.oo-ui-tool.oo-ui-widget-enabled:hover{border-color:rgba(0,0,0,.2);background-color:#eee}.oo-ui-barToolGroup.oo-ui-widget-enabled>.oo-ui-toolGroup-tools>.oo-ui-tool>a.oo-ui-tool-link .oo-ui-tool-title{color:#555}.oo-ui-barToolGroup.oo-ui-widget-disabled>.oo-ui-toolGroup-tools>.oo-ui-tool>a.oo-ui-tool-link .oo-ui-tool-title,.oo-ui-barToolGroup.oo-ui-widget-enabled>.oo-ui-toolGroup-tools>.oo-ui-tool.oo-ui-widget-disabled>.oo-ui-tool-link .oo-ui-tool-title{color:#ccc}.oo-ui-barToolGroup.oo-ui-widget-enabled>.oo-ui-toolGroup-tools>.oo-ui-tool.oo-ui-tool-active.oo-ui-widget-enabled{border-color:rgba(0,0,0,.2);box-shadow:inset 0 .07em .07em 0 rgba(0,0,0,.07);background-color:#e5e5e5}.oo-ui-barToolGroup.oo-ui-widget-enabled>.oo-ui-toolGroup-tools>.oo-ui-tool.oo-ui-tool-active.oo-ui-widget-enabled:hover{background-color:#eee}.oo-ui-barToolGroup.oo-ui-widget-enabled>.oo-ui-toolGroup-tools>.oo-ui-tool.oo-ui-tool-active.oo-ui-widget-enabled+.oo-ui-tool-active.oo-ui-widget-enabled{border-left-color:rgba(0,0,0,.1)}.oo-ui-barToolGroup.oo-ui-widget-enabled>.oo-ui-toolGroup-tools>.oo-ui-tool.oo-ui-widget-disabled>.oo-ui-tool-link .oo-ui-iconElement-icon{opacity:.2}.oo-ui-barToolGroup.oo-ui-widget-enabled>.oo-ui-toolGroup-tools>.oo-ui-tool.oo-ui-widget-enabled>.oo-ui-tool-link .oo-ui-iconElement-icon{opacity:.7}.oo-ui-barToolGroup.oo-ui-widget-enabled>.oo-ui-toolGroup-tools>.oo-ui-tool.oo-ui-widget-enabled:hover>.oo-ui-tool-link .oo-ui-iconElement-icon{opacity:.9}.oo-ui-barToolGroup.oo-ui-widget-enabled>.oo-ui-toolGroup-tools>.oo-ui-tool.oo-ui-widget-enabled:active{background-color:#e7e7e7}.oo-ui-barToolGroup.oo-ui-widget-disabled>.oo-ui-toolGroup-tools>.oo-ui-tool>a.oo-ui-tool-link .oo-ui-iconElement-icon{opacity:.2}.oo-ui-popupToolGroup{position:relative;height:3.125em;min-width:2em}.oo-ui-popupToolGroup-handle{display:block;cursor:pointer}.oo-ui-popupToolGroup-handle .oo-ui-iconElement-icon,.oo-ui-popupToolGroup-handle .oo-ui-indicatorElement-indicator{position:absolute;background-position:center center;background-repeat:no-repeat}.oo-ui-popupToolGroup.oo-ui-widget-disabled .oo-ui-popupToolGroup-handle{cursor:default}.oo-ui-popupToolGroup .oo-ui-toolGroup-tools{display:none;position:absolute;z-index:4}.oo-ui-popupToolGroup-active.oo-ui-widget-enabled>.oo-ui-toolGroup-tools{display:block}.oo-ui-popupToolGroup-left>.oo-ui-toolGroup-tools{left:0}.oo-ui-popupToolGroup-right>.oo-ui-toolGroup-tools{right:0}.oo-ui-popupToolGroup .oo-ui-tool-link{display:table;width:100%;vertical-align:middle;white-space:nowrap}.oo-ui-popupToolGroup .oo-ui-tool-link .oo-ui-iconElement-icon,.oo-ui-popupToolGroup .oo-ui-tool-link .oo-ui-tool-accel,.oo-ui-popupToolGroup .oo-ui-tool-link .oo-ui-tool-title{display:table-cell;vertical-align:middle}.oo-ui-popupToolGroup .oo-ui-tool-link .oo-ui-tool-accel:not(:empty){padding-left:3em}.oo-ui-toolbar-narrow .oo-ui-popupToolGroup{min-width:1.875em}.oo-ui-popupToolGroup.oo-ui-iconElement{min-width:3.125em}.oo-ui-toolbar-narrow .oo-ui-popupToolGroup.oo-ui-iconElement{min-width:2.5em}.oo-ui-popupToolGroup.oo-ui-indicatorElement.oo-ui-iconElement{min-width:4.375em}.oo-ui-toolbar-narrow .oo-ui-popupToolGroup.oo-ui-indicatorElement.oo-ui-iconElement{min-width:3.75em}.oo-ui-popupToolGroup.oo-ui-labelElement .oo-ui-popupToolGroup-handle .oo-ui-labelElement-label{line-height:2.6em;margin:0 1em}.oo-ui-toolbar-narrow .oo-ui-popupToolGroup.oo-ui-labelElement .oo-ui-popupToolGroup-handle .oo-ui-labelElement-label{margin:0 .5em}.oo-ui-popupToolGroup.oo-ui-labelElement.oo-ui-iconElement .oo-ui-popupToolGroup-handle .oo-ui-labelElement-label{margin-left:3em}.oo-ui-toolbar-narrow .oo-ui-popupToolGroup.oo-ui-labelElement.oo-ui-iconElement .oo-ui-popupToolGroup-handle .oo-ui-labelElement-label{margin-left:2.5em}.oo-ui-popupToolGroup.oo-ui-labelElement.oo-ui-indicatorElement .oo-ui-popupToolGroup-handle .oo-ui-labelElement-label{margin-right:2em}.oo-ui-toolbar-narrow .oo-ui-popupToolGroup.oo-ui-labelElement.oo-ui-indicatorElement .oo-ui-popupToolGroup-handle .oo-ui-labelElement-label{margin-right:1.75em}.oo-ui-popupToolGroup.oo-ui-widget-enabled .oo-ui-popupToolGroup-handle:hover{background-color:#eee}.oo-ui-popupToolGroup.oo-ui-widget-enabled .oo-ui-popupToolGroup-handle:active{background-color:#e5e5e5}.oo-ui-popupToolGroup-handle{padding:.3125em;height:2.5em}.oo-ui-popupToolGroup-handle .oo-ui-indicatorElement-indicator{width:.9375em;height:1.625em;margin:.78125em .5em;top:0;right:0;opacity:.3}.oo-ui-toolbar-narrow .oo-ui-popupToolGroup-handle .oo-ui-indicatorElement-indicator{right:-.3125em}.oo-ui-popupToolGroup-handle .oo-ui-iconElement-icon{width:1.875em;height:2.6em;margin:.25em;top:0;left:.3125em;opacity:.7}.oo-ui-toolbar-narrow .oo-ui-popupToolGroup-handle .oo-ui-iconElement-icon{left:0}.oo-ui-popupToolGroup-header{line-height:2.6em;margin:0 .6em;font-weight:700}.oo-ui-popupToolGroup-active.oo-ui-widget-enabled{border-bottom-left-radius:0;border-bottom-right-radius:0;box-shadow:inset 0 .07em .07em 0 rgba(0,0,0,.07);background-color:#eee}.oo-ui-popupToolGroup .oo-ui-toolGroup-tools{top:3.125em;margin:0 -1px;border:1px solid #ccc;background-color:#fff;box-shadow:0 2px 3px rgba(0,0,0,.2);min-width:16em}.oo-ui-popupToolGroup .oo-ui-tool-link{padding:.4em .625em;box-sizing:border-box}.oo-ui-popupToolGroup .oo-ui-tool-link .oo-ui-iconElement-icon{height:2.5em;width:1.875em;min-width:1.875em}.oo-ui-popupToolGroup .oo-ui-tool-link .oo-ui-tool-title{padding-left:.5em;color:#000}.oo-ui-popupToolGroup .oo-ui-tool-link .oo-ui-tool-accel,.oo-ui-popupToolGroup .oo-ui-tool-link .oo-ui-tool-title{line-height:2em}.oo-ui-popupToolGroup .oo-ui-tool-link .oo-ui-tool-accel{text-align:right;color:#888}.oo-ui-listToolGroup .oo-ui-tool{display:block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.oo-ui-listToolGroup .oo-ui-tool-link{cursor:pointer}.oo-ui-listToolGroup .oo-ui-tool.oo-ui-widget-disabled .oo-ui-tool-link{cursor:default}.oo-ui-listToolGroup.oo-ui-popupToolGroup-active{border-color:rgba(0,0,0,.2)}.oo-ui-listToolGroup .oo-ui-tool.oo-ui-widget-enabled:hover{border-color:rgba(0,0,0,.2);background-color:#eee}.oo-ui-listToolGroup .oo-ui-tool.oo-ui-widget-enabled:active{background-color:#e7e7e7}.oo-ui-listToolGroup .oo-ui-tool.oo-ui-widget-enabled:hover .oo-ui-tool-link .oo-ui-iconElement-icon{opacity:.9}.oo-ui-decoratedOptionWidget.oo-ui-widget-disabled .oo-ui-iconElement-icon,.oo-ui-decoratedOptionWidget.oo-ui-widget-disabled .oo-ui-indicatorElement-indicator,.oo-ui-listToolGroup .oo-ui-tool.oo-ui-widget-disabled .oo-ui-tool-link .oo-ui-iconElement-icon,.oo-ui-listToolGroup.oo-ui-widget-disabled .oo-ui-iconElement-icon,.oo-ui-listToolGroup.oo-ui-widget-disabled .oo-ui-indicatorElement-indicator,.oo-ui-menuToolGroup .oo-ui-tool.oo-ui-widget-disabled .oo-ui-tool-link .oo-ui-iconElement-icon,.oo-ui-menuToolGroup.oo-ui-widget-disabled .oo-ui-iconElement-icon,.oo-ui-menuToolGroup.oo-ui-widget-disabled .oo-ui-indicatorElement-indicator{opacity:.2}.oo-ui-listToolGroup .oo-ui-tool-active.oo-ui-widget-enabled{border-color:rgba(0,0,0,.1);box-shadow:inset 0 .07em .07em 0 rgba(0,0,0,.07);background-color:#e5e5e5}.oo-ui-listToolGroup .oo-ui-tool-active.oo-ui-widget-enabled+.oo-ui-tool-active.oo-ui-widget-enabled{border-top-color:rgba(0,0,0,.1)}.oo-ui-listToolGroup .oo-ui-tool-active.oo-ui-widget-enabled:hover{border-color:rgba(0,0,0,.2);background-color:#eee}.oo-ui-listToolGroup .oo-ui-tool.oo-ui-widget-disabled .oo-ui-tool-link .oo-ui-tool-title{color:#ccc}.oo-ui-listToolGroup .oo-ui-tool.oo-ui-widget-disabled .oo-ui-tool-link .oo-ui-tool-accel{color:#ddd}.oo-ui-listToolGroup.oo-ui-widget-disabled,.oo-ui-menuToolGroup .oo-ui-tool.oo-ui-widget-disabled .oo-ui-tool-link .oo-ui-tool-title,.oo-ui-menuToolGroup.oo-ui-widget-disabled{color:#ccc}.oo-ui-menuToolGroup .oo-ui-tool{display:block}.oo-ui-menuToolGroup .oo-ui-tool-link{cursor:pointer}.oo-ui-menuToolGroup .oo-ui-tool.oo-ui-widget-disabled .oo-ui-tool-link{cursor:default}.oo-ui-menuToolGroup .oo-ui-popupToolGroup-handle{min-width:10em}.oo-ui-toolbar-narrow .oo-ui-menuToolGroup .oo-ui-popupToolGroup-handle{min-width:8.125em}.oo-ui-menuToolGroup .oo-ui-tool-link .oo-ui-iconElement-icon{background-image:none}.oo-ui-menuToolGroup .oo-ui-tool-active .oo-ui-tool-link .oo-ui-iconElement-icon{background-image:url(themes/mediawiki/images/icons/check.png)}.oo-ui-menuToolGroup .oo-ui-tool.oo-ui-widget-enabled:hover{background-color:#eee}.oo-ui-toolbar-bar{line-height:1em;position:relative;border-bottom:1px solid #ccc;background-color:#fff;box-shadow:0 1px 1px rgba(0,0,0,.1);font-weight:500;color:#555}.oo-ui-toolbar-actions .oo-ui-toolbar{display:inline-block}.oo-ui-toolbar-tools{display:inline;white-space:nowrap}.oo-ui-toolbar-narrow .oo-ui-toolbar-tools,.oo-ui-toolbar-tools .oo-ui-tool{white-space:normal}.oo-ui-toolbar-actions,.oo-ui-toolbar-shadow,.oo-ui-toolbar-tools{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.oo-ui-toolbar-actions .oo-ui-popupWidget{-webkit-touch-callout:default;-webkit-user-select:all;-moz-user-select:all;-ms-user-select:all;user-select:all}.oo-ui-toolbar-shadow{background-position:left top;background-repeat:repeat-x;position:absolute;width:100%;pointer-events:none}.oo-ui-toolbar-bar .oo-ui-toolbar-bar{border:none;background:0 0;box-shadow:none}.oo-ui-toolbar-actions>.oo-ui-buttonElement{margin-top:.25em;margin-bottom:.25em}.oo-ui-toolbar-actions>.oo-ui-buttonElement:last-child,.oo-ui-toolbar-actions>.oo-ui-toolbar{margin-right:.5em}.oo-ui-optionWidget{position:relative;display:block;cursor:pointer;padding:.25em .5em;border:none}.oo-ui-optionWidget.oo-ui-widget-disabled{cursor:default;color:#ccc}.oo-ui-optionWidget.oo-ui-labelElement .oo-ui-labelElement-label{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.oo-ui-optionWidget-highlighted{background-color:#eee}.oo-ui-optionWidget .oo-ui-labelElement-label{line-height:1.5em}.oo-ui-iconWidget,.oo-ui-indicatorWidget{display:inline-block;vertical-align:middle;background-position:center center;background-repeat:no-repeat;line-height:2.5em}.oo-ui-selectWidget-depressed .oo-ui-optionWidget-selected,.oo-ui-selectWidget-pressed .oo-ui-optionWidget-pressed,.oo-ui-selectWidget-pressed .oo-ui-optionWidget-pressed.oo-ui-optionWidget-highlighted,.oo-ui-selectWidget-pressed .oo-ui-optionWidget-pressed.oo-ui-optionWidget-highlighted.oo-ui-optionWidget-selected{background-color:#d0d0d0}.oo-ui-buttonOptionWidget,.oo-ui-buttonOptionWidget.oo-ui-optionWidget-highlighted,.oo-ui-buttonOptionWidget.oo-ui-optionWidget-pressed,.oo-ui-buttonOptionWidget.oo-ui-optionWidget-selected,.oo-ui-radioOptionWidget,.oo-ui-radioOptionWidget.oo-ui-optionWidget-highlighted,.oo-ui-radioOptionWidget.oo-ui-optionWidget-pressed,.oo-ui-radioOptionWidget.oo-ui-optionWidget-selected{background-color:transparent}.oo-ui-decoratedOptionWidget{padding:.5em 2em .5em 3em}.oo-ui-decoratedOptionWidget .oo-ui-iconElement-icon,.oo-ui-decoratedOptionWidget .oo-ui-indicatorElement-indicator{position:absolute;background-repeat:no-repeat;background-position:center center}.oo-ui-decoratedOptionWidget.oo-ui-iconElement .oo-ui-iconElement-icon,.oo-ui-decoratedOptionWidget.oo-ui-indicatorElement .oo-ui-indicatorElement-indicator{top:0;height:100%}.oo-ui-decoratedOptionWidget.oo-ui-iconElement .oo-ui-iconElement-icon{width:1.875em;left:.5em}.oo-ui-decoratedOptionWidget.oo-ui-indicatorElement .oo-ui-indicatorElement-indicator{width:.9375em;right:.5em}.oo-ui-buttonSelectWidget{display:inline-block;white-space:nowrap;border-radius:2px;margin-right:.5em}.oo-ui-buttonSelectWidget:last-child{margin-right:0}.oo-ui-buttonSelectWidget .oo-ui-buttonOptionWidget .oo-ui-buttonElement-button{border-radius:0;margin-left:-1px}.oo-ui-buttonSelectWidget .oo-ui-buttonOptionWidget:first-child .oo-ui-buttonElement-button{border-bottom-left-radius:2px;border-top-left-radius:2px;margin-left:0}.oo-ui-buttonSelectWidget .oo-ui-buttonOptionWidget:last-child .oo-ui-buttonElement-button{border-bottom-right-radius:2px;border-top-right-radius:2px}.oo-ui-buttonOptionWidget{display:inline-block;padding:0}.oo-ui-buttonOptionWidget .oo-ui-buttonElement-button{position:relative;height:1.875em}.oo-ui-buttonOptionWidget.oo-ui-iconElement .oo-ui-iconElement-icon,.oo-ui-buttonOptionWidget.oo-ui-indicatorElement .oo-ui-indicatorElement-indicator{position:static;display:inline-block;vertical-align:middle}.oo-ui-buttonOptionWidget.oo-ui-iconElement .oo-ui-iconElement-icon{margin-top:0}.oo-ui-buttonOptionWidget.oo-ui-widget-disabled .oo-ui-iconElement-icon,.oo-ui-buttonOptionWidget.oo-ui-widget-disabled .oo-ui-indicatorElement-indicator{opacity:1}.oo-ui-iconWidget.oo-ui-widget-disabled,.oo-ui-indicatorWidget.oo-ui-widget-disabled,.oo-ui-textInputWidget.oo-ui-widget-disabled .oo-ui-iconElement-icon,.oo-ui-textInputWidget.oo-ui-widget-disabled .oo-ui-indicatorElement-indicator{opacity:.2}.oo-ui-radioOptionWidget{cursor:default;padding:.25em 0}.oo-ui-radioOptionWidget .oo-ui-radioInputWidget,.oo-ui-radioOptionWidget.oo-ui-labelElement .oo-ui-labelElement-label{display:inline-block;vertical-align:middle}.oo-ui-radioOptionWidget.oo-ui-labelElement .oo-ui-labelElement-label{padding:.25em .25em .25em 1em}.oo-ui-radioOptionWidget .oo-ui-radioInputWidget{margin-right:0}.oo-ui-labelWidget{display:inline-block}.oo-ui-iconWidget{height:1.875em;width:1.875em}.oo-ui-indicatorWidget{height:.9375em;width:.9375em;margin:.46875em}.oo-ui-buttonWidget{display:inline-block;vertical-align:middle;margin-right:.5em}.oo-ui-buttonWidget:last-child{margin-right:0}.oo-ui-buttonGroupWidget{display:inline-block;white-space:nowrap;border-radius:2px;margin-right:.5em}.oo-ui-buttonGroupWidget:last-child{margin-right:0}.oo-ui-buttonGroupWidget .oo-ui-buttonElement{margin-right:0}.oo-ui-buttonGroupWidget .oo-ui-buttonElement:last-child{margin-right:0}.oo-ui-toggleButtonWidget,.oo-ui-toggleSwitchWidget{vertical-align:middle;display:inline-block;margin-right:.5em}.oo-ui-buttonGroupWidget .oo-ui-buttonElement-framed .oo-ui-buttonElement-button{border-radius:0;margin-left:-1px}.oo-ui-buttonGroupWidget .oo-ui-buttonElement-framed:first-child .oo-ui-buttonElement-button{border-bottom-left-radius:2px;border-top-left-radius:2px;margin-left:0}.oo-ui-buttonGroupWidget .oo-ui-buttonElement-framed:last-child .oo-ui-buttonElement-button{border-bottom-right-radius:2px;border-top-right-radius:2px}.oo-ui-toggleButtonWidget:last-child{margin-right:0}.oo-ui-toggleSwitchWidget{position:relative;overflow:hidden;cursor:pointer;box-sizing:border-box;-webkit-transform:translateZ(0);-moz-transform:translateZ(0);-ms-transform:translateZ(0);-o-transform:translateZ(0);transform:translateZ(0);height:2em;width:4em;border-radius:1em;border:1px solid #ddd}.oo-ui-toggleSwitchWidget,.oo-ui-toggleSwitchWidget-grip{-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.oo-ui-toggleSwitchWidget.oo-ui-widget-disabled{cursor:default}.oo-ui-toggleSwitchWidget-grip{position:absolute;display:block;box-sizing:border-box}.oo-ui-toggleSwitchWidget .oo-ui-toggleSwitchWidget-glow{position:absolute;top:0;bottom:0;right:0;left:0;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.oo-ui-toggleWidget-off .oo-ui-toggleSwitchWidget-glow{display:none}.oo-ui-toggleSwitchWidget:last-child{margin-right:0}.oo-ui-toggleSwitchWidget-grip{top:.25em;left:.25em;width:1.5em;height:1.5em;margin-top:-1px;border-radius:1em;border:1px solid #ddd;background-color:#f7f7f7;-webkit-transition:left .1s ease-in-out,margin-left .1s ease-in-out;-moz-transition:left .1s ease-in-out,margin-left .1s ease-in-out;-ms-transition:left .1s ease-in-out,margin-left .1s ease-in-out;-o-transition:left .1s ease-in-out,margin-left .1s ease-in-out;transition:left .1s ease-in-out,margin-left .1s ease-in-out}.oo-ui-toggleSwitchWidget-glow{border-radius:1em;background-color:#f7f7f7;-webkit-transition:background-color .1s ease-in-out;-moz-transition:background-color .1s ease-in-out;-ms-transition:background-color .1s ease-in-out;-o-transition:background-color .1s ease-in-out;transition:background-color .1s ease-in-out}.oo-ui-toggleSwitchWidget.oo-ui-toggleWidget-on .oo-ui-toggleSwitchWidget-grip{left:2.25em;margin-left:-2px}.oo-ui-toggleSwitchWidget.oo-ui-toggleWidget-off .oo-ui-toggleSwitchWidget-glow{display:block}.oo-ui-toggleSwitchWidget.oo-ui-toggleWidget-off .oo-ui-toggleSwitchWidget-grip{left:.25em;margin-left:0}.oo-ui-toggleSwitchWidget.oo-ui-widget-enabled{border:1px solid #ccc}.oo-ui-toggleSwitchWidget.oo-ui-widget-enabled:hover{border-color:#aaa}.oo-ui-toggleSwitchWidget.oo-ui-widget-enabled .oo-ui-toggleSwitchWidget-grip{background-color:#fff;border-color:#aaa}.oo-ui-toggleSwitchWidget.oo-ui-widget-enabled.oo-ui-toggleWidget-on .oo-ui-toggleSwitchWidget-glow{background-color:#d0d0d0}.oo-ui-toggleSwitchWidget.oo-ui-widget-enabled.oo-ui-toggleWidget-off .oo-ui-toggleSwitchWidget-glow{background-color:#fff}.oo-ui-progressBarWidget{max-width:50em;border:1px solid #ccc;border-radius:.1em;overflow:hidden}.oo-ui-progressBarWidget-bar{height:1em;background:#ddd;-webkit-transition:width 200ms,margin-left 200ms;-moz-transition:width 200ms,margin-left 200ms;-ms-transition:width 200ms,margin-left 200ms;-o-transition:width 200ms,margin-left 200ms;transition:width 200ms,margin-left 200ms}.oo-ui-progressBarWidget-indeterminate .oo-ui-progressBarWidget-bar{-webkit-animation:oo-ui-progressBarWidget-slide 2s infinite linear;-moz-animation:oo-ui-progressBarWidget-slide 2s infinite linear;-ms-animation:oo-ui-progressBarWidget-slide 2s infinite linear;-o-animation:oo-ui-progressBarWidget-slide 2s infinite linear;animation:oo-ui-progressBarWidget-slide 2s infinite linear;width:40%;margin-left:-10%;border-left-width:1px}.oo-ui-progressBarWidget.oo-ui-widget-disabled{opacity:.6}.oo-ui-actionWidget.oo-ui-pendingElement-pending{background-image:url(themes/mediawiki/images/textures/pending.gif)}.oo-ui-popupWidget{position:absolute;left:0}.oo-ui-popupWidget-popup{position:relative;overflow:hidden;z-index:1;border:1px solid #aaa;border-radius:.2em;background-color:#fff;box-shadow:inset 0 -.2em 0 0 rgba(0,0,0,.2)}.oo-ui-popupWidget-anchor{display:none;z-index:1}.oo-ui-popupWidget-anchored .oo-ui-popupWidget-anchor{display:block;position:absolute;top:0;left:0;background-repeat:no-repeat}.oo-ui-popupWidget-body{clear:both;overflow:hidden}.oo-ui-popupWidget-anchored .oo-ui-popupWidget-popup{margin-top:9px}.oo-ui-popupWidget-anchored .oo-ui-popupWidget-anchor:after,.oo-ui-popupWidget-anchored .oo-ui-popupWidget-anchor:before{content:"";position:absolute;width:0;height:0;border-style:solid;border-color:transparent;border-top:0}.oo-ui-popupWidget-anchored .oo-ui-popupWidget-anchor:before{bottom:-10px;left:-9px;border-bottom-color:#888;border-width:10px}.oo-ui-popupWidget-anchored .oo-ui-popupWidget-anchor:after{bottom:-10px;left:-8px;border-bottom-color:#fff;border-width:9px}.oo-ui-popupWidget-transitioning .oo-ui-popupWidget-popup{-webkit-transition:width .1s ease-in-out,height .1s ease-in-out,left .1s ease-in-out;-moz-transition:width .1s ease-in-out,height .1s ease-in-out,left .1s ease-in-out;-ms-transition:width .1s ease-in-out,height .1s ease-in-out,left .1s ease-in-out;-o-transition:width .1s ease-in-out,height .1s ease-in-out,left .1s ease-in-out;transition:width .1s ease-in-out,height .1s ease-in-out,left .1s ease-in-out}.oo-ui-popupWidget-head{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;height:2.5em}.oo-ui-popupWidget-head .oo-ui-buttonWidget{margin:.25em}.oo-ui-popupWidget-head .oo-ui-labelElement-label{float:left;cursor:default;margin:.75em 1em}.oo-ui-popupWidget-body-padded{padding:0 1em}.oo-ui-popupButtonWidget{position:relative}.oo-ui-popupButtonWidget .oo-ui-popupWidget{position:absolute;cursor:auto}.oo-ui-popupButtonWidget.oo-ui-buttonElement-frameless>.oo-ui-popupWidget{left:1em}.oo-ui-popupButtonWidget.oo-ui-buttonElement-framed>.oo-ui-popupWidget{left:1.75em}.oo-ui-inputWidget{margin-right:.5em}.oo-ui-inputWidget:last-child{margin-right:0}.oo-ui-buttonInputWidget{display:inline-block;vertical-align:middle}.oo-ui-checkboxInputWidget{position:relative;line-height:1.6em;white-space:nowrap}.oo-ui-checkboxInputWidget *{font:inherit;vertical-align:middle}.oo-ui-checkboxInputWidget input[type=checkbox]{opacity:0;z-index:1;position:relative;margin:0;width:1.6em;height:1.6em;max-width:none}.oo-ui-checkboxInputWidget input[type=checkbox]+span{cursor:pointer;transition:background-size .2s cubic-bezier(.175,.885,.32,1.275);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;left:0;border-radius:2px;width:1.6em;height:1.6em;background-color:#fff;border:1px solid #777;background-image:url(themes/mediawiki/images/icons/check-constructive.png);background-repeat:no-repeat;background-position:center center;background-origin:border-box;background-size:0 0}.oo-ui-checkboxInputWidget input[type=checkbox]+span,.oo-ui-radioInputWidget input[type=radio]+span{-webkit-transition:background-size .2s cubic-bezier(.175,.885,.32,1.275);-moz-transition:background-size .2s cubic-bezier(.175,.885,.32,1.275);-ms-transition:background-size .2s cubic-bezier(.175,.885,.32,1.275);-o-transition:background-size .2s cubic-bezier(.175,.885,.32,1.275)}.oo-ui-checkboxInputWidget input[type=checkbox]:checked+span{background-size:100% 100%}.oo-ui-checkboxInputWidget input[type=checkbox]:active+span{background-color:#ddd;border-color:#ddd}.oo-ui-checkboxInputWidget input[type=checkbox]:focus+span{border-width:2px}.oo-ui-checkboxInputWidget input[type=checkbox]:focus:hover+span,.oo-ui-checkboxInputWidget input[type=checkbox]:hover+span{border-bottom-width:3px}.oo-ui-checkboxInputWidget input[type=checkbox]:disabled+span{cursor:default;background-color:#eee;border-color:#eee}.oo-ui-checkboxInputWidget input[type=checkbox]:disabled:checked+span{background-image:url(themes/mediawiki/images/icons/check-invert.png)}.oo-ui-dropdownInputWidget{position:relative;vertical-align:middle;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%;max-width:50em}.oo-ui-dropdownInputWidget select{display:inline-block;width:100%;resize:none;background:#fff;height:2.275em;font-size:inherit;font-family:inherit;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:1px solid #ccc}.oo-ui-dropdownInputWidget.oo-ui-widget-enabled select:focus,.oo-ui-dropdownInputWidget.oo-ui-widget-enabled select:hover{border-color:#aaa;outline:0}.oo-ui-dropdownInputWidget.oo-ui-widget-disabled select{color:#ccc;border-color:#ddd;background-color:#f3f3f3}.oo-ui-radioInputWidget{position:relative;line-height:1.6em;white-space:nowrap}.oo-ui-radioInputWidget *{font:inherit;vertical-align:middle}.oo-ui-messageDialog-actions .oo-ui-actionWidget.oo-ui-flaggedElement-progressive .oo-ui-labelElement-label,.oo-ui-outlineOptionWidget.oo-ui-flaggedElement-important,.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-flaggedElement-progressive .oo-ui-labelElement-label,.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-flaggedElement-progressive .oo-ui-labelElement-label,.oo-ui-tabOptionWidget{font-weight:700}.oo-ui-radioInputWidget input[type=radio]{opacity:0;z-index:1;position:relative;margin:0;width:1.6em;height:1.6em;max-width:none}.oo-ui-radioInputWidget input[type=radio]+span{cursor:pointer;transition:background-size .2s cubic-bezier(.175,.885,.32,1.275);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;left:0;border-radius:100%;width:1.6em;height:1.6em;background:url(themes/mediawiki/images/icons/circle-constructive.png) center center no-repeat #fff;border:1px solid #777;background-origin:border-box;background-size:0 0}.oo-ui-radioInputWidget input[type=radio]:checked+span{background-size:100% 100%}.oo-ui-radioInputWidget input[type=radio]:active+span{background-color:#ddd;border-color:#ddd}.oo-ui-radioInputWidget input[type=radio]:focus+span{border-width:2px}.oo-ui-radioInputWidget input[type=radio]:focus:hover+span,.oo-ui-radioInputWidget input[type=radio]:hover+span{border-bottom-width:3px}.oo-ui-radioInputWidget input[type=radio]:disabled+span{cursor:default;background-color:#eee;border-color:#eee}.oo-ui-radioInputWidget input[type=radio]:disabled:checked+span{background-image:url(themes/mediawiki/images/icons/circle-invert.png)}.oo-ui-radioSelectInputWidget .oo-ui-fieldLayout{margin-bottom:0}.oo-ui-textInputWidget{position:relative;vertical-align:middle;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%;max-width:50em}.oo-ui-textInputWidget input,.oo-ui-textInputWidget textarea{display:inline-block;width:100%;resize:none;padding:.5em;line-height:1.275em;margin:0;font-size:inherit;font-family:inherit;background-color:#fff;color:#000;border:1px solid #ccc;box-shadow:inset 0 0 0 0 #347bff;border-radius:.1em;-webkit-transition:box-shadow .1s ease-in-out;-moz-transition:box-shadow .1s ease-in-out;-ms-transition:box-shadow .1s ease-in-out;-o-transition:box-shadow .1s ease-in-out;transition:box-shadow .1s ease-in-out;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.oo-ui-textInputWidget>.oo-ui-iconElement-icon,.oo-ui-textInputWidget>.oo-ui-indicatorElement-indicator,.oo-ui-textInputWidget>.oo-ui-labelElement-label{display:none}.oo-ui-textInputWidget.oo-ui-iconElement>.oo-ui-iconElement-icon,.oo-ui-textInputWidget.oo-ui-indicatorElement>.oo-ui-indicatorElement-indicator{display:block;position:absolute;top:0;height:100%;background-repeat:no-repeat;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.oo-ui-textInputWidget.oo-ui-widget-enabled>.oo-ui-iconElement-icon,.oo-ui-textInputWidget.oo-ui-widget-enabled>.oo-ui-indicatorElement-indicator{cursor:pointer}.oo-ui-textInputWidget.oo-ui-labelElement>.oo-ui-labelElement-label{display:block}.oo-ui-menuOptionWidget .oo-ui-iconElement-icon,.oo-ui-menuOptionWidget.oo-ui-optionWidget-selected .oo-ui-iconElement-icon{display:none}.oo-ui-textInputWidget>.oo-ui-iconElement-icon{left:0}.oo-ui-textInputWidget>.oo-ui-indicatorElement-indicator{right:0}.oo-ui-textInputWidget-labelPosition-after>.oo-ui-labelElement-label{right:0}.oo-ui-textInputWidget-labelPosition-before>.oo-ui-labelElement-label{left:0}.oo-ui-textInputWidget-decorated input,.oo-ui-textInputWidget-decorated textarea{padding-left:2em}.oo-ui-textInputWidget-icon{width:2em}.oo-ui-textInputWidget.oo-ui-widget-enabled input,.oo-ui-textInputWidget.oo-ui-widget-enabled textarea{-webkit-transition:border .2s cubic-bezier(.39,.575,.565,1),box-shadow .2s cubic-bezier(.39,.575,.565,1);-moz-transition:border .2s cubic-bezier(.39,.575,.565,1),box-shadow .2s cubic-bezier(.39,.575,.565,1);-ms-transition:border .2s cubic-bezier(.39,.575,.565,1),box-shadow .2s cubic-bezier(.39,.575,.565,1);-o-transition:border .2s cubic-bezier(.39,.575,.565,1),box-shadow .2s cubic-bezier(.39,.575,.565,1);transition:border .2s cubic-bezier(.39,.575,.565,1),box-shadow .2s cubic-bezier(.39,.575,.565,1)}.oo-ui-textInputWidget.oo-ui-widget-enabled input:focus,.oo-ui-textInputWidget.oo-ui-widget-enabled textarea:focus{outline:0;border-color:#347bff;box-shadow:inset 0 0 0 .1em #347bff}.oo-ui-textInputWidget.oo-ui-widget-enabled input[readonly],.oo-ui-textInputWidget.oo-ui-widget-enabled textarea[readonly]{color:#777;text-shadow:0 1px 1px #fff}.oo-ui-textInputWidget.oo-ui-widget-enabled input[readonly]:focus,.oo-ui-textInputWidget.oo-ui-widget-enabled textarea[readonly]:focus{border-color:#ccc;box-shadow:inset 0 0 0 .1em #ccc}.oo-ui-textInputWidget.oo-ui-widget-enabled.oo-ui-flaggedElement-invalid input,.oo-ui-textInputWidget.oo-ui-widget-enabled.oo-ui-flaggedElement-invalid textarea{border-color:red;box-shadow:inset 0 0 0 0 red}.oo-ui-textInputWidget.oo-ui-widget-enabled.oo-ui-flaggedElement-invalid input:focus,.oo-ui-textInputWidget.oo-ui-widget-enabled.oo-ui-flaggedElement-invalid textarea:focus{border-color:red;box-shadow:inset 0 0 0 .1em red}.oo-ui-textInputWidget.oo-ui-widget-disabled input,.oo-ui-textInputWidget.oo-ui-widget-disabled textarea{color:#ccc;text-shadow:0 1px 1px #fff;border-color:#ddd;background-color:#f3f3f3}.oo-ui-textInputWidget.oo-ui-widget-disabled .oo-ui-labelElement-label{color:#ddd;text-shadow:0 1px 1px #fff}.oo-ui-textInputWidget.oo-ui-pendingElement-pending input,.oo-ui-textInputWidget.oo-ui-pendingElement-pending textarea{background-color:transparent;background-image:url(themes/mediawiki/images/textures/pending.gif)}.oo-ui-textInputWidget.oo-ui-iconElement input,.oo-ui-textInputWidget.oo-ui-iconElement textarea{padding-left:2.75em}.oo-ui-textInputWidget.oo-ui-iconElement .oo-ui-iconElement-icon{left:.4em;width:1.875em;margin-left:.1em;height:100%;background-position:right center}.oo-ui-textInputWidget.oo-ui-indicatorElement input,.oo-ui-textInputWidget.oo-ui-indicatorElement textarea{padding-right:1.875em}.oo-ui-textInputWidget.oo-ui-indicatorElement .oo-ui-indicatorElement-indicator{width:.9375em;margin:0 .775em;height:100%}.oo-ui-textInputWidget>.oo-ui-labelElement-label{position:absolute;top:0;padding:.4em;line-height:1.5em;color:#888}.oo-ui-textInputWidget-labelPosition-after.oo-ui-indicatorElement>.oo-ui-labelElement-label{margin-right:2em}.oo-ui-textInputWidget-labelPosition-before.oo-ui-iconElement>.oo-ui-labelElement-label{margin-left:2.5em}.oo-ui-menuSelectWidget{position:absolute;background:#fff;margin-top:-1px;border:1px solid #aaa;border-radius:0 0 .2em .2em;padding-bottom:.25em;box-shadow:inset 0 -.2em 0 0 rgba(0,0,0,.2),0 .1em 0 0 rgba(0,0,0,.2)}.oo-ui-menuSelectWidget input{position:absolute;width:0;height:0;overflow:hidden;opacity:0}.oo-ui-menuOptionWidget{position:relative;padding:.5em 1em}.oo-ui-menuOptionWidget.oo-ui-optionWidget-selected{background-color:#d8e6fe;color:rgba(0,0,0,.8)}.oo-ui-menuOptionWidget.oo-ui-optionWidget-highlighted{background-color:#eee;color:#000}.oo-ui-menuOptionWidget.oo-ui-optionWidget-selected.oo-ui-menuOptionWidget.oo-ui-optionWidget-highlighted{background-color:#d8e6fe}.oo-ui-menuSectionOptionWidget{cursor:default;padding:.33em .75em;color:#888}.oo-ui-dropdownWidget{display:inline-block;position:relative;margin:.25em .5em .25em 0;width:100%;max-width:50em}.oo-ui-dropdownWidget-handle{width:100%;cursor:pointer;user-select:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:.5em 0;border:1px solid #ccc;border-radius:.1em}.oo-ui-dropdownWidget-handle,.oo-ui-selectFileWidget-handle{display:inline-block;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.oo-ui-dropdownWidget-handle .oo-ui-iconElement-icon,.oo-ui-dropdownWidget-handle .oo-ui-indicatorElement-indicator{position:absolute;background-position:center center;background-repeat:no-repeat}.oo-ui-dropdownWidget>.oo-ui-menuSelectWidget{z-index:1;width:100%}.oo-ui-dropdownWidget:last-child{margin-right:0}.oo-ui-dropdownWidget-handle .oo-ui-labelElement-label{line-height:1.275em;margin:0 1em}.oo-ui-dropdownWidget-handle .oo-ui-indicatorElement-indicator{right:0;top:0;width:.9375em;height:.9375em;margin:.775em}.oo-ui-dropdownWidget-handle .oo-ui-iconElement-icon{left:.25em;top:0;width:1.875em;height:1.875em;margin:.3em}.oo-ui-dropdownWidget:hover .oo-ui-dropdownWidget-handle{border-color:#aaa}.oo-ui-dropdownWidget.oo-ui-widget-disabled .oo-ui-dropdownWidget-handle{cursor:default;color:#ccc;text-shadow:0 1px 1px #fff;border-color:#ddd;background-color:#f3f3f3}.oo-ui-dropdownWidget.oo-ui-widget-disabled .oo-ui-indicatorElement-indicator{opacity:.2}.oo-ui-dropdownWidget.oo-ui-iconElement .oo-ui-dropdownWidget-handle .oo-ui-labelElement-label{margin-left:3em}.oo-ui-dropdownWidget.oo-ui-indicatorElement .oo-ui-dropdownWidget-handle .oo-ui-labelElement-label{margin-right:2em}.oo-ui-dropdownWidget .oo-ui-selectWidget{border-top-color:#fff}.oo-ui-selectFileWidget{display:inline-block;position:relative;vertical-align:middle;margin:.25em .5em .25em 0;width:100%;max-width:50em}.oo-ui-selectFileWidget-handle{width:100%;cursor:pointer;overflow:hidden;user-select:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.oo-ui-selectFileWidget-handle>.oo-ui-iconElement-icon,.oo-ui-selectFileWidget-handle>.oo-ui-indicatorElement-indicator,.oo-ui-selectFileWidget-handle>.oo-ui-selectFileWidget-clearButton{position:absolute;background-position:center center;background-repeat:no-repeat}.oo-ui-selectFileWidget-handle>input[type=file]{position:absolute;margin:0;top:0;bottom:0;left:0;right:0;width:100%;height:100%;opacity:0;z-index:1;cursor:pointer}.oo-ui-selectFileWidget-handle>.oo-ui-selectFileWidget-clearButton{z-index:2}.oo-ui-selectFileWidget-notsupported .oo-ui-selectFileWidget-handle,.oo-ui-selectFileWidget.oo-ui-widget-disabled .oo-ui-selectFileWidget-handle{cursor:default}.oo-ui-selectFileWidget-empty .oo-ui-selectFileWidget-clearButton,.oo-ui-selectFileWidget-notsupported .oo-ui-selectFileWidget-clearButton,.oo-ui-selectFileWidget-notsupported .oo-ui-selectFileWidget-handle>input[type=file],.oo-ui-selectFileWidget.oo-ui-widget-disabled .oo-ui-selectFileWidget-handle>input[type=file]{display:none}.oo-ui-selectFileWidget:last-child{margin-right:0}.oo-ui-selectFileWidget-handle{height:2.5em;border:1px solid #ccc;border-radius:.1em;padding:0 1em}.oo-ui-selectFileWidget-handle .oo-ui-selectFileWidget-label{line-height:2.5em;margin:0;display:inline-block;overflow:hidden;width:100%;white-space:nowrap;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;text-overflow:ellipsis}.oo-ui-selectFileWidget-handle .oo-ui-selectFileWidget-clearButton{top:0;width:1.875em;height:1.875em;margin:.3em}.oo-ui-selectFileWidget-handle>.oo-ui-indicatorElement-indicator{right:0;top:0;width:.9375em;height:.9375em;margin:.775em}.oo-ui-selectFileWidget-handle>.oo-ui-iconElement-icon{left:.25em;top:0;width:1.875em;height:1.875em;margin:.3em}.oo-ui-selectFileWidget:hover .oo-ui-selectFileWidget-handle{border-color:#aaa}.oo-ui-selectFileWidget.oo-ui-widget-disabled .oo-ui-selectFileWidget-handle{color:#ccc;text-shadow:0 1px 1px #fff;border-color:#ddd;background-color:#f3f3f3}.oo-ui-selectFileWidget.oo-ui-widget-disabled .oo-ui-selectFileWidget-handle>.oo-ui-iconElement-icon,.oo-ui-selectFileWidget.oo-ui-widget-disabled .oo-ui-selectFileWidget-handle>.oo-ui-indicatorElement-indicator{opacity:.2}.oo-ui-outlineOptionWidget.oo-ui-flaggedElement-empty .oo-ui-iconElement-icon,.oo-ui-outlineOptionWidget.oo-ui-indicatorElement .oo-ui-indicatorElement-indicator{opacity:.5}.oo-ui-selectFileWidget-empty .oo-ui-selectFileWidget-label{color:#ccc}.oo-ui-selectFileWidget.oo-ui-iconElement .oo-ui-selectFileWidget-handle{padding-left:3em}.oo-ui-selectFileWidget .oo-ui-selectFileWidget-handle{padding-right:3em}.oo-ui-selectFileWidget .oo-ui-selectFileWidget-handle .oo-ui-selectFileWidget-clearButton{right:0}.oo-ui-selectFileWidget.oo-ui-indicatorElement .oo-ui-selectFileWidget-handle{padding-right:5em}.oo-ui-selectFileWidget.oo-ui-indicatorElement .oo-ui-selectFileWidget-handle .oo-ui-selectFileWidget-clearButton{right:2em}.oo-ui-selectFileWidget-empty .oo-ui-selectFileWidget-handle,.oo-ui-selectFileWidget-notsupported .oo-ui-selectFileWidget-handle{padding-right:1em}.oo-ui-selectFileWidget-empty.oo-ui-indicatorElement .oo-ui-selectFileWidget-handle,.oo-ui-selectFileWidget-notsupported.oo-ui-indicatorElement .oo-ui-selectFileWidget-handle{padding-right:2em}.oo-ui-outlineOptionWidget{position:relative;cursor:pointer;user-select:none;font-size:1.1em;padding:.75em}.oo-ui-outlineOptionWidget,.oo-ui-window-foot,.oo-ui-window-head{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.oo-ui-outlineOptionWidget.oo-ui-indicatorElement .oo-ui-labelElement-label{padding-right:1.5em}.oo-ui-outlineOptionWidget-level-0{padding-left:3.5em}.oo-ui-outlineOptionWidget-level-0 .oo-ui-iconElement-icon{left:1em}.oo-ui-outlineOptionWidget-level-1{padding-left:5em}.oo-ui-outlineOptionWidget-level-1 .oo-ui-iconElement-icon{left:2.5em}.oo-ui-outlineOptionWidget-level-2{padding-left:6.5em}.oo-ui-outlineOptionWidget-level-2 .oo-ui-iconElement-icon{left:4em}.oo-ui-selectWidget-depressed .oo-ui-outlineOptionWidget.oo-ui-optionWidget-selected{background-color:#d0d0d0;text-shadow:0 1px 1px #fff}.oo-ui-outlineOptionWidget.oo-ui-flaggedElement-placeholder{font-style:italic}.oo-ui-outlineOptionWidget.oo-ui-flaggedElement-empty .oo-ui-labelElement-label{color:#777}.oo-ui-outlineControlsWidget{height:3em;background-color:#fff}.oo-ui-outlineControlsWidget-items,.oo-ui-outlineControlsWidget-movers{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;height:2em;margin:.5em .5em .5em 0;padding:0}.oo-ui-outlineControlsWidget>.oo-ui-iconElement-icon{float:left;background-position:right center;background-repeat:no-repeat;width:1.5em;height:2em;margin:.5em 0 .5em .5em;opacity:.2}.oo-ui-outlineControlsWidget-items,.oo-ui-outlineControlsWidget-items .oo-ui-buttonWidget{float:left}.oo-ui-outlineControlsWidget-movers,.oo-ui-outlineControlsWidget-movers .oo-ui-buttonWidget{float:right}.oo-ui-tabSelectWidget{text-align:left;white-space:nowrap;overflow:hidden;background-color:#ddd}.oo-ui-tabOptionWidget{display:inline-block;vertical-align:bottom;padding:.35em 1em;margin:.5em 0 0 .75em;border:1px solid transparent;border-bottom:none;border-top-left-radius:2px;border-top-right-radius:2px;color:#666}.oo-ui-tabOptionWidget.oo-ui-widget-enabled:hover{background-color:rgba(255,255,255,.3)}.oo-ui-tabOptionWidget.oo-ui-widget-enabled:active{background-color:rgba(255,255,255,.8)}.oo-ui-tabOptionWidget.oo-ui-indicatorElement .oo-ui-labelElement-label{padding-right:1.5em}.oo-ui-tabOptionWidget.oo-ui-indicatorElement .oo-ui-indicatorElement-indicator{opacity:.5}.oo-ui-selectWidget-depressed .oo-ui-tabOptionWidget.oo-ui-optionWidget-selected,.oo-ui-selectWidget-pressed .oo-ui-tabOptionWidget.oo-ui-optionWidget-selected,.oo-ui-tabOptionWidget.oo-ui-optionWidget-selected:hover{background-color:#fff;color:#333}.oo-ui-comboBoxWidget{display:inline-block;position:relative;width:100%;max-width:50em;margin-right:.5em}.oo-ui-comboBoxWidget>.oo-ui-menuSelectWidget{z-index:1;width:100%}.oo-ui-comboBoxWidget:last-child{margin-right:0}.oo-ui-comboBoxWidget .oo-ui-textInputWidget input,.oo-ui-comboBoxWidget .oo-ui-textInputWidget textarea{height:2.35em}.oo-ui-searchWidget-query{position:absolute;top:0;left:0;right:0;height:4em;padding:0 1em;border-bottom:1px solid #ccc}.oo-ui-searchWidget-query .oo-ui-textInputWidget{width:100%;margin:.75em 0}.oo-ui-searchWidget-results{position:absolute;bottom:0;left:0;right:0;overflow-x:hidden;overflow-y:auto;top:4em;padding:1em;line-height:0}.oo-ui-numberInputWidget{display:inline-block;position:relative;max-width:50em}.oo-ui-numberInputWidget-field{display:table;table-layout:fixed;width:100%}.oo-ui-numberInputWidget-field>.oo-ui-buttonWidget,.oo-ui-numberInputWidget-field>.oo-ui-textInputWidget{display:table-cell;vertical-align:middle}.oo-ui-numberInputWidget-field>.oo-ui-textInputWidget{width:100%}.oo-ui-numberInputWidget-field>.oo-ui-buttonWidget{white-space:nowrap}.oo-ui-numberInputWidget-field>.oo-ui-buttonWidget>.oo-ui-buttonElement-button{box-sizing:border-box}.oo-ui-numberInputWidget-field>.oo-ui-buttonWidget,.oo-ui-numberInputWidget-field>.oo-ui-buttonWidget>.oo-ui-buttonElement-button{margin:0;width:2.5em}.oo-ui-numberInputWidget-minusButton.oo-ui-buttonElement-framed.oo-ui-widget-enabled>.oo-ui-buttonElement-button{border-top-right-radius:0;border-bottom-right-radius:0;border-right-width:0}.oo-ui-numberInputWidget-plusButton.oo-ui-buttonElement-framed.oo-ui-widget-enabled>.oo-ui-buttonElement-button{border-top-left-radius:0;border-bottom-left-radius:0;border-left-width:0}.oo-ui-numberInputWidget .oo-ui-textInputWidget input{border-radius:0}.oo-ui-window{background:0 0}.oo-ui-window-frame{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.oo-ui-window-content:focus{outline:0}.oo-ui-window-foot,.oo-ui-window-head{user-select:none}.oo-ui-window-body{margin:0;padding:0;background:0 0}.oo-ui-window-overlay{position:absolute;top:0;left:0}.oo-ui-dialog-content>.oo-ui-window-body,.oo-ui-dialog-content>.oo-ui-window-foot,.oo-ui-dialog-content>.oo-ui-window-head{position:absolute;left:0;right:0;overflow:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.oo-ui-dialog-content>.oo-ui-window-head{z-index:1;top:0}.oo-ui-dialog-content>.oo-ui-window-body{z-index:2;top:0;bottom:0;outline:#aaa solid 1px}.oo-ui-dialog-content>.oo-ui-window-foot{z-index:1;bottom:0}.oo-ui-messageDialog-actions-horizontal{display:table;table-layout:fixed;width:100%}.oo-ui-messageDialog-actions-horizontal .oo-ui-actionWidget{display:table-cell;width:1%;border-right:1px solid #e5e5e5;margin:0}.oo-ui-messageDialog-actions .oo-ui-actionWidget .oo-ui-buttonElement-button,.oo-ui-messageDialog-actions-vertical{display:block}.oo-ui-messageDialog-actions-vertical .oo-ui-actionWidget{display:block;overflow:hidden;text-overflow:ellipsis;border-bottom:1px solid #e5e5e5;margin:0}.oo-ui-messageDialog-actions .oo-ui-actionWidget{position:relative;text-align:center;height:3.4em;margin-right:0}.oo-ui-messageDialog-actions .oo-ui-actionWidget .oo-ui-labelElement-label{position:relative;top:auto;bottom:auto;display:inline;white-space:nowrap}.oo-ui-processDialog-actions-primary,.oo-ui-processDialog-actions-safe,.oo-ui-processDialog-errors{bottom:0;position:absolute;top:0}.oo-ui-messageDialog-message,.oo-ui-messageDialog-title{display:block;text-align:center;padding-top:.5em}.oo-ui-messageDialog-title{font-size:1.5em;line-height:1em;color:#000}.oo-ui-messageDialog-message{font-size:.9em;line-height:1.25em;color:#666}.oo-ui-messageDialog-message-verbose{font-size:1.1em;line-height:1.5em;text-align:left}.oo-ui-messageDialog-actions-horizontal .oo-ui-actionWidget:last-child{border-right-width:0}.oo-ui-messageDialog-actions-vertical .oo-ui-actionWidget:last-child{border-bottom-width:0}.oo-ui-messageDialog-actions .oo-ui-actionWidget:last-child{margin-right:0}.oo-ui-messageDialog-actions .oo-ui-actionWidget.oo-ui-labelElement .oo-ui-labelElement-label{text-align:center;line-height:3.4em;padding:0 2em}.oo-ui-messageDialog-actions .oo-ui-actionWidget:hover{background-color:rgba(0,0,0,.05)}.oo-ui-messageDialog-actions .oo-ui-actionWidget:active{background-color:rgba(0,0,0,.1)}.oo-ui-messageDialog-actions .oo-ui-actionWidget.oo-ui-flaggedElement-progressive:hover{background-color:rgba(8,126,204,.05)}.oo-ui-messageDialog-actions .oo-ui-actionWidget.oo-ui-flaggedElement-progressive:active{background-color:rgba(8,126,204,.1)}.oo-ui-messageDialog-actions .oo-ui-actionWidget.oo-ui-flaggedElement-constructive:hover{background-color:rgba(118,171,54,.05)}.oo-ui-messageDialog-actions .oo-ui-actionWidget.oo-ui-flaggedElement-constructive:active{background-color:rgba(118,171,54,.1)}.oo-ui-messageDialog-actions .oo-ui-actionWidget.oo-ui-flaggedElement-destructive:hover{background-color:rgba(212,83,83,.05)}.oo-ui-messageDialog-actions .oo-ui-actionWidget.oo-ui-flaggedElement-destructive:active{background-color:rgba(212,83,83,.1)}.oo-ui-processDialog-location{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.oo-ui-processDialog-title{display:inline;padding:0;font-weight:700;line-height:1.875em}.oo-ui-processDialog-actions-other .oo-ui-actionWidget,.oo-ui-processDialog-actions-primary .oo-ui-actionWidget,.oo-ui-processDialog-actions-safe .oo-ui-actionWidget{white-space:nowrap}.oo-ui-processDialog-actions-safe{left:0}.oo-ui-processDialog-actions-primary{right:0}.oo-ui-processDialog-errors{left:0;right:0;z-index:2;overflow-x:hidden;overflow-y:auto}.oo-ui-processDialog-content .oo-ui-window-head{height:3.4em}.oo-ui-processDialog-content .oo-ui-window-head.oo-ui-pendingElement-pending{background-image:url(themes/mediawiki/images/textures/pending.gif)}.oo-ui-processDialog-content .oo-ui-window-body{top:3.4em;outline:rgba(0,0,0,.2) solid 1px}.oo-ui-processDialog-navigation{position:relative;height:3.4em;padding:0 1em}.oo-ui-processDialog-location{padding:.75em 0;height:1.875em;cursor:default;text-align:center}.oo-ui-processDialog-actions-other .oo-ui-actionWidget .oo-ui-buttonElement-button,.oo-ui-processDialog-actions-primary .oo-ui-actionWidget .oo-ui-buttonElement-button,.oo-ui-processDialog-actions-safe .oo-ui-actionWidget .oo-ui-buttonElement-button{min-width:1.875em;min-height:1.875em}.oo-ui-processDialog-actions-other .oo-ui-actionWidget .oo-ui-labelElement-label,.oo-ui-processDialog-actions-primary .oo-ui-actionWidget .oo-ui-labelElement-label,.oo-ui-processDialog-actions-safe .oo-ui-actionWidget .oo-ui-labelElement-label{line-height:1.875em}.oo-ui-processDialog-actions-other .oo-ui-actionWidget.oo-ui-iconElement .oo-ui-iconElement-icon,.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-iconElement .oo-ui-iconElement-icon,.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-iconElement .oo-ui-iconElement-icon{margin-top:-.125em}.oo-ui-processDialog-actions-other .oo-ui-actionWidget.oo-ui-buttonElement-framed,.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-buttonElement-framed,.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-buttonElement-framed{margin:.75em 0 .75em .75em}.oo-ui-processDialog-actions-other .oo-ui-actionWidget.oo-ui-buttonElement-framed .oo-ui-buttonElement-button,.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-buttonElement-framed .oo-ui-buttonElement-button,.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-buttonElement-framed .oo-ui-buttonElement-button{padding:0 1em;vertical-align:middle}.oo-ui-processDialog-actions-primary .oo-ui-actionWidget:hover,.oo-ui-processDialog-actions-safe .oo-ui-actionWidget:hover{background-color:rgba(0,0,0,.05)}.oo-ui-processDialog-actions-primary .oo-ui-actionWidget:active,.oo-ui-processDialog-actions-safe .oo-ui-actionWidget:active{background-color:rgba(0,0,0,.1)}.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-buttonElement-framed,.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-buttonElement-framed{margin:.75em}.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-buttonElement-framed .oo-ui-buttonElement-button,.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-buttonElement-framed .oo-ui-buttonElement-button{margin:-1px}.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-flaggedElement-progressive:hover,.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-flaggedElement-progressive:hover{background-color:rgba(8,126,204,.05)}.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-flaggedElement-progressive:active,.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-flaggedElement-progressive:active{background-color:rgba(8,126,204,.1)}.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-flaggedElement-constructive:hover,.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-flaggedElement-constructive:hover{background-color:rgba(118,171,54,.05)}.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-flaggedElement-constructive:active,.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-flaggedElement-constructive:active{background-color:rgba(118,171,54,.1)}.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-flaggedElement-destructive:hover,.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-flaggedElement-destructive:hover{background-color:rgba(212,83,83,.05)}.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-flaggedElement-destructive:active,.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-flaggedElement-destructive:active{background-color:rgba(212,83,83,.1)}.oo-ui-processDialog>.oo-ui-window-frame{min-height:5em}.oo-ui-processDialog-errors{background-color:rgba(255,255,255,.9);padding:3em 3em 1.5em;text-align:center}.oo-ui-processDialog-errors .oo-ui-buttonWidget{margin:2em 1em}.oo-ui-processDialog-errors-title{font-size:1.5em;color:#000;margin-bottom:2em}.oo-ui-processDialog-error{text-align:left;margin:1em;padding:1em;border:1px solid #ff9e9e;background-color:#fff7f7;border-radius:.25em}.oo-ui-windowManager-modal>.oo-ui-dialog{position:fixed;width:0;height:0;overflow:hidden;background-color:rgba(255,255,255,.5);opacity:0;-webkit-transition:opacity 250ms ease-in-out;-moz-transition:opacity 250ms ease-in-out;-ms-transition:opacity 250ms ease-in-out;-o-transition:opacity 250ms ease-in-out;transition:opacity 250ms ease-in-out}.oo-ui-windowManager-modal>.oo-ui-dialog.oo-ui-window-active{width:auto;height:auto;top:0;right:0;bottom:0;left:0;padding:1em}.oo-ui-windowManager-modal>.oo-ui-dialog.oo-ui-window-setup>.oo-ui-window-frame{position:absolute;right:0;left:0;margin:auto;overflow:hidden;max-width:100%;max-height:100%}.oo-ui-windowManager-fullscreen>.oo-ui-dialog>.oo-ui-window-frame{width:100%;height:100%;top:0;bottom:0}.oo-ui-windowManager-modal>.oo-ui-dialog>.oo-ui-window-frame{top:1em;bottom:1em;background-color:#fff;opacity:0;-webkit-transform:scale(.5);-moz-transform:scale(.5);-ms-transform:scale(.5);-o-transform:scale(.5);transform:scale(.5);-webkit-transition:all 250ms ease-in-out;-moz-transition:all 250ms ease-in-out;-ms-transition:all 250ms ease-in-out;-o-transition:all 250ms ease-in-out;transition:all 250ms ease-in-out}.oo-ui-windowManager-modal>.oo-ui-dialog.oo-ui-window-ready{opacity:1}.oo-ui-windowManager-modal>.oo-ui-dialog.oo-ui-window-ready>.oo-ui-window-frame{opacity:1;-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}.oo-ui-windowManager-modal.oo-ui-windowManager-floating>.oo-ui-dialog>.oo-ui-window-frame{border:1px solid #aaa;border-radius:.2em;box-shadow:inset 0 -.2em 0 0 rgba(0,0,0,.2)} | holtkamp/cdnjs | ajax/libs/oojs-ui/0.11.4/oojs-ui-mediawiki-noimages.raster.min.css | CSS | mit | 75,903 |
package org.robolectric.internal.bytecode.testing;
public class AClassToForget {
public String memorableMethod() {
return "get this!";
}
public String forgettableMethod() {
return "shouldn't get this!";
}
public static String memorableStaticMethod() {
return "yess?";
}
public static String forgettableStaticMethod() {
return "noooo!";
}
public static int intReturningMethod() {
return 1;
}
public static int[] intArrayReturningMethod() {
return new int[0];
}
public static long longReturningMethod(String str, int i, long l) {
return 1;
}
public static long[] longArrayReturningMethod() {
return new long[0];
}
public static byte byteReturningMethod() {
return 0;
}
public static byte[] byteArrayReturningMethod() {
return new byte[0];
}
public static float floatReturningMethod() {
return 0f;
}
public static float[] floatArrayReturningMethod() {
return new float[0];
}
public static double doubleReturningMethod() {
return 0;
}
public static double[] doubleArrayReturningMethod() {
return new double[0];
}
public static short shortReturningMethod() {
return 0;
}
public static short[] shortArrayReturningMethod() {
return new short[0];
}
public static void voidReturningMethod() {
}
}
| fiower/robolectric | robolectric/src/test/java/org/robolectric/internal/bytecode/testing/AClassToForget.java | Java | mit | 1,337 |
'use strict';
/*
* angular-foundation-6
* http://circlingthesun.github.io/angular-foundation-6/
* Version: 0.9.21 - 2016-04-24
* License: MIT
* (c)
*/
AccordionController.$inject = ['$scope', '$attrs', 'accordionConfig'];
DropdownToggleController.$inject = ['$scope', '$attrs', 'mediaQueries', '$element', '$position'];
dropdownToggle.$inject = ['$document', '$window', '$location'];
function AccordionController($scope, $attrs, accordionConfig) {
'ngInject';
var $ctrl = this;
// This array keeps track of the accordion groups
$ctrl.groups = [];
// Ensure that all the groups in this accordion are closed, unless close-others explicitly says not to
$ctrl.closeOthers = function (openGroup) {
var closeOthers = angular.isDefined($attrs.closeOthers) ? $scope.$eval($attrs.closeOthers) : accordionConfig.closeOthers;
if (closeOthers) {
angular.forEach(this.groups, function (group) {
if (group !== openGroup) {
group.isOpen = false;
}
});
}
};
// This is called from the accordion-group directive to add itself to the accordion
$ctrl.addGroup = function (groupScope) {
var that = this;
this.groups.push(groupScope);
};
// This is called from the accordion-group directive when to remove itself
$ctrl.removeGroup = function (group) {
var index = this.groups.indexOf(group);
if (index !== -1) {
this.groups.splice(index, 1);
}
};
}
angular.module('mm.foundation.accordion', []).constant('accordionConfig', {
closeOthers: true
}).controller('AccordionController', AccordionController)
// The accordion directive simply sets up the directive controller
// and adds an accordion CSS class to itself element.
.directive('accordion', function () {
'ngInject';
return {
restrict: 'EA',
controller: AccordionController,
controllerAs: '$ctrl',
transclude: true,
replace: false,
templateUrl: 'template/accordion/accordion.html'
};
})
// The accordion-group directive indicates a block of html that will expand and collapse in an accordion
.directive('accordionGroup', function () {
'ngInject';
return {
require: { 'accordion': '^accordion' }, // We need this directive to be inside an accordion
restrict: 'EA',
transclude: true, // It transcludes the contents of the directive into the template
replace: true, // The element containing the directive will be replaced with the template
templateUrl: 'template/accordion/accordion-group.html',
scope: {},
controllerAs: "$ctrl",
bindToController: {
heading: '@'
}, // Create an isolated scope and interpolate the heading attribute onto this scope
controller: ['$scope', '$attrs', '$parse', function accordionGroupController($scope, $attrs, $parse) {
'ngInject';
var $ctrl = this;
$ctrl.isOpen = false;
$ctrl.setHTMLHeading = function (element) {
$ctrl.HTMLHeading = element;
};
$ctrl.$onInit = function () {
$ctrl.accordion.addGroup($ctrl);
$scope.$on('$destroy', function (event) {
$ctrl.accordion.removeGroup($ctrl);
});
var getIsOpen;
var setIsOpen;
if ($attrs.isOpen) {
getIsOpen = $parse($attrs.isOpen);
setIsOpen = getIsOpen.assign;
$scope.$parent.$watch(getIsOpen, function (value) {
$ctrl.isOpen = !!value;
});
}
$scope.$watch(function () {
return $ctrl.isOpen;
}, function (value) {
if (value) {
$ctrl.accordion.closeOthers($ctrl);
}
setIsOpen && setIsOpen($scope.$parent, value);
});
};
}]
};
})
// Use accordion-heading below an accordion-group to provide a heading containing HTML
// <accordion-group>
// <accordion-heading>Heading containing HTML - <img src="..."></accordion-heading>
// </accordion-group>
.directive('accordionHeading', function () {
'ngInject';
return {
restrict: 'EA',
transclude: true, // Grab the contents to be used as the heading
template: '', // In effect remove this element!
replace: true,
require: '^accordionGroup',
link: function link(scope, element, attr, accordionGroupCtrl, transclude) {
// Pass the heading to the accordion-group controller
// so that it can be transcluded into the right place in the template
// [The second parameter to transclude causes the elements to be cloned so that they work in ng-repeat]
accordionGroupCtrl.setHTMLHeading(transclude(scope, function () {}));
}
};
})
// Use in the accordion-group template to indicate where you want the heading to be transcluded
// You must provide the property on the accordion-group controller that will hold the transcluded element
// <div class="accordion-group">
// <div class="accordion-heading" ><a ... accordion-transclude="heading">...</a></div>
// ...
// </div>
.directive('accordionTransclude', function () {
'ngInject';
return {
require: '^accordionGroup',
link: function link(scope, element, attr, accordionGroupController) {
scope.$watch(function () {
return accordionGroupController.HTMLHeading;
}, function (heading) {
if (heading) {
element.html('');
element.append(heading);
}
});
}
};
});
angular.module("mm.foundation.alert", []).controller('AlertController', ['$scope', '$attrs', function ($scope, $attrs) {
'ngInject';
$scope.closeable = 'close' in $attrs && typeof $attrs.close !== "undefined";
}]).directive('alert', function () {
'ngInject';
return {
restrict: 'EA',
controller: 'AlertController',
templateUrl: 'template/alert/alert.html',
transclude: true,
replace: true,
scope: {
type: '=',
close: '&'
}
};
});
angular.module('mm.foundation.bindHtml', []).directive('bindHtmlUnsafe', function () {
'ngInject';
return function (scope, element, attr) {
element.addClass('ng-binding').data('$binding', attr.bindHtmlUnsafe);
scope.$watch(attr.bindHtmlUnsafe, function bindHtmlUnsafeWatchAction(value) {
element.html(value || '');
});
};
});
angular.module('mm.foundation.buttons', []).constant('buttonConfig', {
activeClass: 'hollow',
toggleEvent: 'click'
}).controller('ButtonsController', ['buttonConfig', function (buttonConfig) {
this.activeClass = buttonConfig.activeClass;
this.toggleEvent = buttonConfig.toggleEvent;
}]).directive('btnRadio', function () {
'ngInject';
return {
require: ['btnRadio', 'ngModel'],
controller: 'ButtonsController',
link: function link(scope, element, attrs, ctrls) {
var buttonsCtrl = ctrls[0],
ngModelCtrl = ctrls[1];
//model -> UI
ngModelCtrl.$render = function () {
element.toggleClass(buttonsCtrl.activeClass, angular.equals(ngModelCtrl.$modelValue, scope.$eval(attrs.btnRadio)));
};
//ui->model
element.bind(buttonsCtrl.toggleEvent, function () {
if (!element.hasClass(buttonsCtrl.activeClass)) {
scope.$apply(function () {
ngModelCtrl.$setViewValue(scope.$eval(attrs.btnRadio));
ngModelCtrl.$render();
});
}
});
}
};
}).directive('btnCheckbox', function () {
'ngInject';
return {
require: ['btnCheckbox', 'ngModel'],
controller: 'ButtonsController',
link: function link(scope, element, attrs, ctrls) {
var buttonsCtrl = ctrls[0],
ngModelCtrl = ctrls[1];
function getTrueValue() {
return getCheckboxValue(attrs.btnCheckboxTrue, true);
}
function getFalseValue() {
return getCheckboxValue(attrs.btnCheckboxFalse, false);
}
function getCheckboxValue(attributeValue, defaultValue) {
var val = scope.$eval(attributeValue);
return angular.isDefined(val) ? val : defaultValue;
}
//model -> UI
ngModelCtrl.$render = function () {
element.toggleClass(buttonsCtrl.activeClass, angular.equals(ngModelCtrl.$modelValue, getTrueValue()));
};
//ui->model
element.bind(buttonsCtrl.toggleEvent, function () {
scope.$apply(function () {
ngModelCtrl.$setViewValue(element.hasClass(buttonsCtrl.activeClass) ? getFalseValue() : getTrueValue());
ngModelCtrl.$render();
});
});
}
};
});
angular.module('mm.foundation.dropdownMenu', []).directive('dropdownMenu', ['$compile', function ($compile) {
'ngInject';
return {
bindToController: {
disableHover: '=',
disableClickOpen: '='
},
scope: {},
restrict: 'A',
controllerAs: 'vm',
controller: ['$scope', '$element', function controller($scope, $element) {
'ngInject';
var vm = this;
// $element is-dropdown-submenu-parent
}]
};
}]).directive('li', function () {
return {
require: '?^^dropdownMenu',
restrict: 'E',
link: function link($scope, $element, $attrs, dropdownMenu) {
if (!dropdownMenu) {
return;
}
var ulChild = null;
var children = $element[0].children;
for (var i = 0; i < children.length; i++) {
var child = angular.element(children[i]);
if (child[0].nodeName === 'UL' && child.hasClass('menu')) {
ulChild = child;
}
}
var topLevel = $element.parent()[0].hasAttribute('dropdown-menu');
if (!topLevel) {
$element.addClass('is-submenu-item');
}
if (ulChild) {
ulChild.addClass('is-dropdown-submenu menu submenu vertical');
$element.addClass('is-dropdown-submenu-parent opens-right');
if (topLevel) {
ulChild.addClass('first-sub');
}
if (!dropdownMenu.disableHover) {
$element.on('mouseenter', function () {
ulChild.addClass('js-dropdown-active');
$element.addClass('is-active');
});
}
$element.on('click', function () {
ulChild.addClass('js-dropdown-active');
$element.addClass('is-active');
// $element.attr('data-is-click', 'true');
});
$element.on('mouseleave', function () {
ulChild.removeClass('js-dropdown-active');
$element.removeClass('is-active');
});
}
}
};
});
function DropdownToggleController($scope, $attrs, mediaQueries, $element, $position) {
'ngInject';
var $ctrl = this;
$ctrl.css = {};
$ctrl.toggle = function () {
$ctrl.active = !$ctrl.active;
$ctrl.css = {};
if (!$ctrl.active) {
return;
}
var dropdown = angular.element($element[0].querySelector('.dropdown-pane'));
var dropdownTrigger = angular.element($element[0].querySelector('toggle *:first-child'));
// var dropdownWidth = dropdown.prop('offsetWidth');
var triggerPosition = $position.position(dropdownTrigger);
$ctrl.css.top = triggerPosition.top + triggerPosition.height + 2 + 'px';
$ctrl.css.left = triggerPosition.left + 'px';
// if (mediaQueries.small() && !mediaQueries.medium()) {
// }
};
}
function dropdownToggle($document, $window, $location) {
'ngInject';
return {
scope: {},
restrict: 'EA',
transclude: {
'toggle': 'toggle',
'pane': 'pane'
},
templateUrl: 'template/dropdownToggle/dropdownToggle.html',
controller: DropdownToggleController,
controllerAs: '$ctrl'
};
}
/*
* dropdownToggle - Provides dropdown menu functionality
* @restrict class or attribute
* @example:
<a dropdown-toggle="#dropdown-menu">My Dropdown Menu</a>
<ul id="dropdown-menu" class="f-dropdown">
<li ng-repeat="choice in dropChoices">
<a ng-href="{{choice.href}}">{{choice.text}}</a>
</li>
</ul>
*/
angular.module('mm.foundation.dropdownToggle', ['mm.foundation.position', 'mm.foundation.mediaQueries']).directive('dropdownToggle', dropdownToggle);
angular.module("mm.foundation.mediaQueries", []).factory('matchMedia', ['$document', '$window', function ($document, $window) {
'ngInject';
// MatchMedia for IE <= 9
return $window.matchMedia || function matchMedia(doc, undefined) {
var bool,
docElem = doc.documentElement,
refNode = docElem.firstElementChild || docElem.firstChild,
// fakeBody required for <FF4 when executed in <head>
fakeBody = doc.createElement("body"),
div = doc.createElement("div");
div.id = "mq-test-1";
div.style.cssText = "position:absolute;top:-100em";
fakeBody.style.background = "none";
fakeBody.appendChild(div);
return function (q) {
div.innerHTML = "­<style media=\"" + q + "\"> #mq-test-1 { width: 42px; }</style>";
docElem.insertBefore(fakeBody, refNode);
bool = div.offsetWidth === 42;
docElem.removeChild(fakeBody);
return {
matches: bool,
media: q
};
};
}($document[0]);
}]).factory('mediaQueries', ['$document', 'matchMedia', function ($document, matchMedia) {
'ngInject';
var head = angular.element($document[0].querySelector('head'));
head.append('<meta class="foundation-mq-topbar" />');
head.append('<meta class="foundation-mq-small" />');
head.append('<meta class="foundation-mq-medium" />');
head.append('<meta class="foundation-mq-large" />');
var regex = /^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g;
var queries = {
topbar: getComputedStyle(head[0].querySelector('meta.foundation-mq-topbar')).fontFamily.replace(regex, ''),
small: getComputedStyle(head[0].querySelector('meta.foundation-mq-small')).fontFamily.replace(regex, ''),
medium: getComputedStyle(head[0].querySelector('meta.foundation-mq-medium')).fontFamily.replace(regex, ''),
large: getComputedStyle(head[0].querySelector('meta.foundation-mq-large')).fontFamily.replace(regex, '')
};
return {
topbarBreakpoint: function topbarBreakpoint() {
return !matchMedia(queries.topbar).matches;
},
small: function small() {
return matchMedia(queries.small).matches;
},
medium: function medium() {
return matchMedia(queries.medium).matches;
},
large: function large() {
return matchMedia(queries.large).matches;
}
};
}]);
angular.module('mm.foundation.modal', [])
/**
* A helper, internal data structure that acts as a map but also allows getting / removing
* elements in the LIFO order
*/
.factory('$$stackedMap', function () {
'ngInject';
return {
createNew: function createNew() {
var stack = [];
return {
add: function add(key, value) {
stack.push({
key: key,
value: value
});
},
get: function get(key) {
for (var i = 0; i < stack.length; i++) {
if (key == stack[i].key) {
return stack[i];
}
}
},
keys: function keys() {
var keys = [];
for (var i = 0; i < stack.length; i++) {
keys.push(stack[i].key);
}
return keys;
},
top: function top() {
return stack[stack.length - 1];
},
remove: function remove(key) {
var idx = -1;
for (var i = 0; i < stack.length; i++) {
if (key == stack[i].key) {
idx = i;
break;
}
}
return stack.splice(idx, 1)[0];
},
removeTop: function removeTop() {
return stack.splice(stack.length - 1, 1)[0];
},
length: function length() {
return stack.length;
}
};
}
};
})
/**
* A helper directive for the $modal service. It creates a backdrop element.
*/
.directive('modalBackdrop', ['$modalStack', '$timeout', function ($modalStack, $timeout) {
'ngInject';
return {
restrict: 'EA',
replace: true,
templateUrl: 'template/modal/backdrop.html',
link: function link(scope) {
scope.close = function (evt) {
var modal = $modalStack.getTop();
if (modal && modal.value.backdrop && modal.value.backdrop !== 'static' && evt.target === evt.currentTarget) {
evt.preventDefault();
evt.stopPropagation();
$modalStack.dismiss(modal.key, 'backdrop click');
}
};
}
};
}]).directive('modalWindow', ['$modalStack', '$timeout', function ($modalStack, $timeout) {
'ngInject';
return {
restrict: 'EA',
scope: {
index: '@'
},
replace: true,
transclude: true,
templateUrl: 'template/modal/window.html',
link: function link(scope, element, attrs) {
scope.windowClass = attrs.windowClass || '';
}
};
}]).factory('$modalStack', ['$window', '$timeout', '$document', '$compile', '$rootScope', '$$stackedMap', '$animate', '$q', function ($window, $timeout, $document, $compile, $rootScope, $$stackedMap, $animate, $q) {
var body = $document.find('body').eq(0);
var OPENED_MODAL_CLASS = 'is-reveal-open';
var backdropDomEl;
var backdropScope;
var openedWindows = $$stackedMap.createNew();
var $modalStack = {};
function backdropIndex() {
var topBackdropIndex = -1;
var opened = openedWindows.keys();
for (var i = 0; i < opened.length; i++) {
if (openedWindows.get(opened[i]).value.backdrop) {
topBackdropIndex = i;
}
}
return topBackdropIndex;
}
$rootScope.$watch(backdropIndex, function (newBackdropIndex) {
if (backdropScope) {
backdropScope.index = newBackdropIndex;
}
});
function resizeHandler() {
var opened = openedWindows.keys();
var fixedPositiong = true;
for (var i = 0; i < opened.length; i++) {
var modalPos = $modalStack.reposition(opened[i]);
if (modalPos && modalPos.position !== 'fixed') {
fixedPositiong = false;
}
}
if (fixedPositiong) {
body.addClass(OPENED_MODAL_CLASS);
} else {
body.removeClass(OPENED_MODAL_CLASS);
}
}
function removeModalWindow(modalInstance) {
var body = $document.find('body').eq(0);
var modalWindow = openedWindows.get(modalInstance).value;
// clean up the stack
openedWindows.remove(modalInstance);
// remove window DOM element
$animate.leave(modalWindow.modalDomEl);
checkRemoveBackdrop();
if (openedWindows.length() === 0) {
body.removeClass(OPENED_MODAL_CLASS);
angular.element($window).unbind('resize', resizeHandler);
}
}
function checkRemoveBackdrop() {
// remove backdrop if no longer needed
if (backdropDomEl && backdropIndex() === -1) {
var backdropScopeRef = backdropScope;
$animate.leave(backdropDomEl).then(function () {
backdropScopeRef.$destroy();
backdropScopeRef = null;
});
backdropDomEl = undefined;
backdropScope = undefined;
}
}
function getModalCenter(modalInstance) {
var options = modalInstance.options;
var el = options.modalDomEl;
var windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
var windowHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
var width = el[0].offsetWidth;
var height = el[0].offsetHeight;
var left = parseInt((windowWidth - width) / 2, 10);
var top;
if (height > windowHeight) {
top = parseInt(Math.min(100, windowHeight / 10), 10);
} else {
top = parseInt((windowHeight - height) / 4, 10);
}
// var fitsWindow = windowHeight >= top + height; // Alwats fits on mobile
var fitsWindow = false; // Disable annying fixed positing
var modalPos = options.modalPos = options.modalPos || {};
if (modalPos.windowHeight !== windowHeight) {
modalPos.scrollY = $window.pageYOffset || 0;
}
if (modalPos.position !== 'fixed') {
modalPos.top = fitsWindow ? top : top + modalPos.scrollY;
}
modalPos.left = left;
modalPos.position = fitsWindow ? 'fixed' : 'absolute';
modalPos.windowHeight = windowHeight;
return modalPos;
}
$document.bind('keydown', function (evt) {
var modal;
if (evt.which === 27) {
modal = openedWindows.top();
if (modal && modal.value.keyboard) {
$rootScope.$apply(function () {
$modalStack.dismiss(modal.key);
});
}
}
});
$modalStack.open = function (modalInstance, options) {
modalInstance.options = {
deferred: options.deferred,
modalScope: options.scope,
backdrop: options.backdrop,
keyboard: options.keyboard
};
openedWindows.add(modalInstance, modalInstance.options);
var currBackdropIndex = backdropIndex();
if (currBackdropIndex >= 0 && !backdropDomEl) {
backdropScope = $rootScope.$new(true);
backdropScope.index = currBackdropIndex;
backdropDomEl = $compile('<div modal-backdrop></div>')(backdropScope);
}
if (openedWindows.length() === 1) {
angular.element($window).bind('resize', resizeHandler);
}
var classes = [];
options.windowClass && classes.push(options.windowClass);
options.size && classes.push(options.size);
var modalDomEl = angular.element('<div modal-window></div>').attr({
'style': 'visibility: visible; z-index: -1; display: block;',
'window-class': classes.join(' '),
'index': openedWindows.length() - 1
});
modalDomEl.html(options.content);
$compile(modalDomEl)(options.scope);
return $timeout(function () {
// let the directives kick in
options.scope.$apply();
openedWindows.top().value.modalDomEl = modalDomEl;
// Attach, measure, remove
body.prepend(modalDomEl);
var modalPos = getModalCenter(modalInstance, true);
modalDomEl.detach();
modalDomEl.attr({
'style': 'visibility: visible; top: ' + modalPos.top + 'px; left: ' + modalPos.left + 'px; display: block; position: ' + modalPos.position + ';'
});
var promises = [];
if (backdropDomEl) {
promises.push($animate.enter(backdropDomEl, body));
}
promises.push($animate.enter(modalDomEl, body));
if (modalPos.position === 'fixed') {
body.addClass(OPENED_MODAL_CLASS);
}
return $q.all(promises).then(function () {
// VERY BAD: This moves the modal
// // If the modal contains any autofocus elements refocus onto the first one
// if (modalDomEl[0].querySelectorAll('[autofocus]').length > 0) {
// modalDomEl[0].querySelectorAll('[autofocus]')[0].focus();
// } else {
// // otherwise focus the freshly-opened modal
// modalDomEl[0].focus();
// }
});
});
};
$modalStack.reposition = function (modalInstance) {
var modalWindow = openedWindows.get(modalInstance).value;
if (modalWindow) {
var modalDomEl = modalWindow.modalDomEl;
var modalPos = getModalCenter(modalInstance);
modalDomEl.css('top', modalPos.top + 'px');
modalDomEl.css('left', modalPos.left + 'px');
modalDomEl.css('position', modalPos.position);
return modalPos;
}
};
$modalStack.close = function (modalInstance, result) {
var modalWindow = openedWindows.get(modalInstance);
if (modalWindow) {
modalWindow.value.deferred.resolve(result);
removeModalWindow(modalInstance);
}
};
$modalStack.dismiss = function (modalInstance, reason) {
var modalWindow = openedWindows.get(modalInstance);
if (modalWindow) {
modalWindow.value.deferred.reject(reason);
removeModalWindow(modalInstance);
}
};
$modalStack.dismissAll = function (reason) {
var topModal = this.getTop();
while (topModal) {
this.dismiss(topModal.key, reason);
topModal = this.getTop();
}
};
$modalStack.getTop = function () {
return openedWindows.top();
};
return $modalStack;
}]).provider('$modal', function () {
'ngInject';
var $modalProvider = {
options: {
backdrop: true, //can be also false or 'static'
keyboard: true
},
$get: ['$injector', '$rootScope', '$q', '$http', '$templateCache', '$controller', '$modalStack', function $get($injector, $rootScope, $q, $http, $templateCache, $controller, $modalStack) {
'ngInject';
var $modal = {};
function getTemplatePromise(options) {
if (options.template) {
return $q.when(options.template);
}
return $http.get(options.templateUrl, {
cache: $templateCache
}).then(function (result) {
return result.data;
});
}
function getResolvePromises(resolves) {
var promisesArr = [];
angular.forEach(resolves, function (value, key) {
if (angular.isFunction(value) || angular.isArray(value)) {
promisesArr.push($q.when($injector.invoke(value)));
}
});
return promisesArr;
}
$modal.open = function (modalOpts) {
var modalResultDeferred = $q.defer();
var modalOpenedDeferred = $q.defer();
// prepare an instance of a modal to be injected into controllers and returned to a caller
var modalInstance = {
result: modalResultDeferred.promise,
opened: modalOpenedDeferred.promise,
close: function close(result) {
$modalStack.close(modalInstance, result);
},
dismiss: function dismiss(reason) {
$modalStack.dismiss(modalInstance, reason);
},
reposition: function reposition() {
$modalStack.reposition(modalInstance);
}
};
// merge and clean up options
var modalOptions = angular.extend({}, $modalProvider.options, modalOpts);
modalOptions.resolve = modalOptions.resolve || {};
// verify options
if (!modalOptions.template && !modalOptions.templateUrl) {
throw new Error('One of template or templateUrl options is required.');
}
var templateAndResolvePromise = $q.all([getTemplatePromise(modalOptions)].concat(getResolvePromises(modalOptions.resolve)));
var openedPromise = templateAndResolvePromise.then(function resolveSuccess(tplAndVars) {
var modalScope = (modalOptions.scope || $rootScope).$new();
modalScope.$close = modalInstance.close;
modalScope.$dismiss = modalInstance.dismiss;
var ctrlInstance;
var ctrlLocals = {};
var resolveIter = 1;
// controllers
if (modalOptions.controller) {
ctrlLocals.$scope = modalScope;
ctrlLocals.$modalInstance = modalInstance;
angular.forEach(modalOptions.resolve, function (value, key) {
ctrlLocals[key] = tplAndVars[resolveIter++];
});
ctrlInstance = $controller(modalOptions.controller, ctrlLocals);
if (modalOptions.controllerAs) {
modalScope[modalOptions.controllerAs] = ctrlInstance;
}
}
return $modalStack.open(modalInstance, {
scope: modalScope,
deferred: modalResultDeferred,
content: tplAndVars[0],
backdrop: modalOptions.backdrop,
keyboard: modalOptions.keyboard,
windowClass: modalOptions.windowClass,
size: modalOptions.size
});
}, function resolveError(reason) {
modalResultDeferred.reject(reason);
});
openedPromise.then(function () {
modalOpenedDeferred.resolve(true);
}, function () {
modalOpenedDeferred.reject(false);
});
return modalInstance;
};
return $modal;
}]
};
return $modalProvider;
});
angular.module('mm.foundation.offcanvas', []).directive('offCanvasWrapper', ['$window', function ($window) {
'ngInject';
return {
scope: {},
bindToController: { disableAutoClose: '=' },
controllerAs: 'vm',
restrict: 'C',
controller: ['$scope', '$element', function controller($scope, $element) {
'ngInject';
var $ctrl = this;
var left = angular.element($element[0].querySelector('.position-left'));
var right = angular.element($element[0].querySelector('.position-right'));
var inner = angular.element($element[0].querySelector('.off-canvas-wrapper-inner'));
// var overlay = angular.element(); js-off-canvas-exit
var exitOverlay = angular.element('<div class="js-off-canvas-exit"></div>');
inner.append(exitOverlay);
exitOverlay.on('click', function () {
$ctrl.hide();
});
$ctrl.leftToggle = function () {
inner && inner.toggleClass('is-off-canvas-open');
inner && inner.toggleClass('is-open-left');
left && left.toggleClass('is-open');
exitOverlay.addClass('is-visible');
// is-visible
};
$ctrl.rightToggle = function () {
inner && inner.toggleClass('is-off-canvas-open');
inner && inner.toggleClass('is-open-right');
right && right.toggleClass('is-open');
exitOverlay.addClass('is-visible');
};
$ctrl.hide = function () {
inner && inner.removeClass('is-open-left');
inner && inner.removeClass('is-open-right');
left && left.removeClass('is-open');
right && right.removeClass('is-open');
inner && inner.removeClass('is-off-canvas-open');
exitOverlay.removeClass('is-visible');
};
var win = angular.element($window);
win.bind('resize.body', $ctrl.hide);
$scope.$on('$destroy', function () {
win.unbind('resize.body', $ctrl.hide);
});
}]
};
}]).directive('leftOffCanvasToggle', function () {
'ngInject';
return {
require: '^^offCanvasWrapper',
restrict: 'C',
link: function link($scope, element, attrs, offCanvasWrapper) {
element.on('click', function () {
offCanvasWrapper.leftToggle();
});
}
};
}).directive('rightOffCanvasToggle', function () {
'ngInject';
return {
require: '^^offCanvasWrapper',
restrict: 'C',
link: function link($scope, element, attrs, offCanvasWrapper) {
element.on('click', function () {
offCanvasWrapper.rightToggle();
});
}
};
}).directive('offCanvas', function () {
'ngInject';
return {
require: { 'offCanvasWrapper': '^^offCanvasWrapper' },
restrict: 'C',
bindToController: {},
scope: {},
controllerAs: 'vm',
controller: function controller() {}
};
}).directive('li', function () {
'ngInject';
return {
require: '?^^offCanvas',
restrict: 'E',
link: function link($scope, element, attrs, offCanvas) {
if (!offCanvas || offCanvas.offCanvasWrapper.disableAutoClose) {
return;
}
element.on('click', function () {
offCanvas.offCanvasWrapper.hide();
});
}
};
});
angular.module('mm.foundation.pagination', []).controller('PaginationController', ['$scope', '$attrs', '$parse', '$interpolate', function ($scope, $attrs, $parse, $interpolate) {
var self = this,
setNumPages = $attrs.numPages ? $parse($attrs.numPages).assign : angular.noop;
this.init = function (defaultItemsPerPage) {
if ($attrs.itemsPerPage) {
$scope.$parent.$watch($parse($attrs.itemsPerPage), function (value) {
self.itemsPerPage = parseInt(value, 10);
$scope.totalPages = self.calculateTotalPages();
});
} else {
this.itemsPerPage = defaultItemsPerPage;
}
};
this.noPrevious = function () {
return this.page === 1;
};
this.noNext = function () {
return this.page === $scope.totalPages;
};
this.isActive = function (page) {
return this.page === page;
};
this.calculateTotalPages = function () {
var totalPages = this.itemsPerPage < 1 ? 1 : Math.ceil($scope.totalItems / this.itemsPerPage);
return Math.max(totalPages || 0, 1);
};
this.getAttributeValue = function (attribute, defaultValue, interpolate) {
return angular.isDefined(attribute) ? interpolate ? $interpolate(attribute)($scope.$parent) : $scope.$parent.$eval(attribute) : defaultValue;
};
this.render = function () {
this.page = parseInt($scope.page, 10) || 1;
if (this.page > 0 && this.page <= $scope.totalPages) {
$scope.pages = this.getPages(this.page, $scope.totalPages);
}
};
$scope.selectPage = function (page) {
if (!self.isActive(page) && page > 0 && page <= $scope.totalPages) {
$scope.page = page;
$scope.onSelectPage({
page: page
});
}
};
$scope.$watch('page', function () {
self.render();
});
$scope.$watch('totalItems', function () {
$scope.totalPages = self.calculateTotalPages();
});
$scope.$watch('totalPages', function (value) {
setNumPages($scope.$parent, value); // Readonly variable
if (self.page > value) {
$scope.selectPage(value);
} else {
self.render();
}
});
}]).constant('paginationConfig', {
itemsPerPage: 10,
boundaryLinks: false,
directionLinks: true,
firstText: 'First',
previousText: 'Previous',
nextText: 'Next',
lastText: 'Last',
rotate: true
}).directive('pagination', ['$parse', 'paginationConfig', function ($parse, paginationConfig) {
'ngInject';
return {
restrict: 'EA',
scope: {
page: '=',
totalItems: '=',
onSelectPage: ' &'
},
controller: 'PaginationController',
templateUrl: 'template/pagination/pagination.html',
replace: true,
link: function link(scope, element, attrs, paginationCtrl) {
// Setup configuration parameters
var maxSize,
boundaryLinks = paginationCtrl.getAttributeValue(attrs.boundaryLinks, paginationConfig.boundaryLinks),
directionLinks = paginationCtrl.getAttributeValue(attrs.directionLinks, paginationConfig.directionLinks),
firstText = paginationCtrl.getAttributeValue(attrs.firstText, paginationConfig.firstText, true),
previousText = paginationCtrl.getAttributeValue(attrs.previousText, paginationConfig.previousText, true),
nextText = paginationCtrl.getAttributeValue(attrs.nextText, paginationConfig.nextText, true),
lastText = paginationCtrl.getAttributeValue(attrs.lastText, paginationConfig.lastText, true),
rotate = paginationCtrl.getAttributeValue(attrs.rotate, paginationConfig.rotate);
paginationCtrl.init(paginationConfig.itemsPerPage);
if (attrs.maxSize) {
scope.$parent.$watch($parse(attrs.maxSize), function (value) {
maxSize = parseInt(value, 10);
paginationCtrl.render();
});
}
// Create page object used in template
function makePage(number, text, isActive, isDisabled) {
return {
number: number,
text: text,
active: isActive,
disabled: isDisabled
};
}
paginationCtrl.getPages = function (currentPage, totalPages) {
var pages = [];
// Default page limits
var startPage = 1,
endPage = totalPages;
var isMaxSized = angular.isDefined(maxSize) && maxSize < totalPages;
// recompute if maxSize
if (isMaxSized) {
if (rotate) {
// Current page is displayed in the middle of the visible ones
startPage = Math.max(currentPage - Math.floor(maxSize / 2), 1);
endPage = startPage + maxSize - 1;
// Adjust if limit is exceeded
if (endPage > totalPages) {
endPage = totalPages;
startPage = endPage - maxSize + 1;
}
} else {
// Visible pages are paginated with maxSize
startPage = (Math.ceil(currentPage / maxSize) - 1) * maxSize + 1;
// Adjust last page if limit is exceeded
endPage = Math.min(startPage + maxSize - 1, totalPages);
}
}
// Add page number links
for (var number = startPage; number <= endPage; number++) {
var page = makePage(number, number, paginationCtrl.isActive(number), false);
pages.push(page);
}
// Add links to move between page sets
if (isMaxSized && !rotate) {
if (startPage > 1) {
var previousPageSet = makePage(startPage - 1, '...', false, false);
pages.unshift(previousPageSet);
}
if (endPage < totalPages) {
var nextPageSet = makePage(endPage + 1, '...', false, false);
pages.push(nextPageSet);
}
}
// Add previous & next links
if (directionLinks) {
var previousPage = makePage(currentPage - 1, previousText, false, paginationCtrl.noPrevious());
pages.unshift(previousPage);
var nextPage = makePage(currentPage + 1, nextText, false, paginationCtrl.noNext());
pages.push(nextPage);
}
// Add first & last links
if (boundaryLinks) {
var firstPage = makePage(1, firstText, false, paginationCtrl.noPrevious());
pages.unshift(firstPage);
var lastPage = makePage(totalPages, lastText, false, paginationCtrl.noNext());
pages.push(lastPage);
}
return pages;
};
}
};
}]).constant('pagerConfig', {
itemsPerPage: 10,
previousText: '« Previous',
nextText: 'Next »',
align: true
}).directive('pager', ['pagerConfig', function (pagerConfig) {
'ngInject';
return {
restrict: 'EA',
scope: {
page: '=',
totalItems: '=',
onSelectPage: ' &'
},
controller: 'PaginationController',
templateUrl: 'template/pagination/pager.html',
replace: true,
link: function link(scope, element, attrs, paginationCtrl) {
// Setup configuration parameters
var previousText = paginationCtrl.getAttributeValue(attrs.previousText, pagerConfig.previousText, true),
nextText = paginationCtrl.getAttributeValue(attrs.nextText, pagerConfig.nextText, true),
align = paginationCtrl.getAttributeValue(attrs.align, pagerConfig.align);
paginationCtrl.init(pagerConfig.itemsPerPage);
// Create page object used in template
function makePage(number, text, isDisabled, isPrevious, isNext) {
return {
number: number,
text: text,
disabled: isDisabled,
previous: align && isPrevious,
next: align && isNext
};
}
paginationCtrl.getPages = function (currentPage) {
return [makePage(currentPage - 1, previousText, paginationCtrl.noPrevious(), true, false), makePage(currentPage + 1, nextText, paginationCtrl.noNext(), false, true)];
};
}
};
}]);
angular.module('mm.foundation.position', [])
/**
* A set of utility methods that can be use to retrieve position of DOM elements.
* It is meant to be used where we need to absolute-position DOM elements in
* relation to other, existing elements (this is the case for tooltips, popovers,
* typeahead suggestions etc.).
*/
.factory('$position', ['$document', '$window', function ($document, $window) {
'ngInject';
function getStyle(el, cssprop) {
if (el.currentStyle) {
//IE
return el.currentStyle[cssprop];
} else if ($window.getComputedStyle) {
return $window.getComputedStyle(el)[cssprop];
}
// finally try and get inline style
return el.style[cssprop];
}
/**
* Checks if a given element is statically positioned
* @param element - raw DOM element
*/
function isStaticPositioned(element) {
return (getStyle(element, "position") || 'static') === 'static';
}
/**
* returns the closest, non-statically positioned parentOffset of a given element
* @param element
*/
var parentOffsetEl = function parentOffsetEl(element) {
var docDomEl = $document[0];
var offsetParent = element.offsetParent || docDomEl;
while (offsetParent && offsetParent !== docDomEl && isStaticPositioned(offsetParent)) {
offsetParent = offsetParent.offsetParent;
}
return offsetParent || docDomEl;
};
return {
/**
* Provides read-only equivalent of jQuery's position function:
* http://api.jquery.com/position/
*/
position: function position(element) {
var elBCR = this.offset(element);
var offsetParentBCR = {
top: 0,
left: 0
};
var offsetParentEl = parentOffsetEl(element[0]);
if (offsetParentEl != $document[0]) {
offsetParentBCR = this.offset(angular.element(offsetParentEl));
offsetParentBCR.top += offsetParentEl.clientTop - offsetParentEl.scrollTop;
offsetParentBCR.left += offsetParentEl.clientLeft - offsetParentEl.scrollLeft;
}
var boundingClientRect = element[0].getBoundingClientRect();
return {
width: boundingClientRect.width || element.prop('offsetWidth'),
height: boundingClientRect.height || element.prop('offsetHeight'),
top: elBCR.top - offsetParentBCR.top,
left: elBCR.left - offsetParentBCR.left
};
},
/**
* Provides read-only equivalent of jQuery's offset function:
* http://api.jquery.com/offset/
*/
offset: function offset(element) {
var boundingClientRect = element[0].getBoundingClientRect();
return {
width: boundingClientRect.width || element.prop('offsetWidth'),
height: boundingClientRect.height || element.prop('offsetHeight'),
top: boundingClientRect.top + ($window.pageYOffset || $document[0].body.scrollTop || $document[0].documentElement.scrollTop),
left: boundingClientRect.left + ($window.pageXOffset || $document[0].body.scrollLeft || $document[0].documentElement.scrollLeft)
};
}
};
}]);
angular.module('mm.foundation.progressbar', []).constant('progressConfig', {
animate: true,
max: 100
}).controller('ProgressController', ['$scope', '$attrs', 'progressConfig', '$animate', function ($scope, $attrs, progressConfig, $animate) {
'ngInject';
var self = this,
bars = [],
max = angular.isDefined($attrs.max) ? $scope.$parent.$eval($attrs.max) : progressConfig.max,
animate = angular.isDefined($attrs.animate) ? $scope.$parent.$eval($attrs.animate) : progressConfig.animate;
this.addBar = function (bar, element) {
var oldValue = 0,
index = bar.$parent.$index;
if (angular.isDefined(index) && bars[index]) {
oldValue = bars[index].value;
}
bars.push(bar);
this.update(element, bar.value, oldValue);
bar.$watch('value', function (value, oldValue) {
if (value !== oldValue) {
self.update(element, value, oldValue);
}
});
bar.$on('$destroy', function () {
self.removeBar(bar);
});
};
// Update bar element width
this.update = function (element, newValue, oldValue) {
var percent = this.getPercentage(newValue);
if (animate) {
element.css('width', this.getPercentage(oldValue) + '%');
$animate.animate(element, {
'width': this.getPercentage(oldValue) + '%'
}, {
width: percent + '%'
});
// $transition(element, {
// width: percent + '%'
// });
} else {
element.css({
'transition': 'none',
'width': percent + '%'
});
}
};
this.removeBar = function (bar) {
bars.splice(bars.indexOf(bar), 1);
};
this.getPercentage = function (value) {
return Math.round(100 * value / max);
};
}]).directive('progress', function () {
'ngInject';
return {
restrict: 'EA',
replace: true,
transclude: true,
controller: 'ProgressController',
require: 'progress',
scope: {},
template: '<div class="progress" ng-transclude></div>'
//templateUrl: 'template/progressbar/progress.html' // Works in AngularJS 1.2
};
}).directive('bar', function () {
'ngInject';
return {
restrict: 'EA',
replace: true,
transclude: true,
require: '^progress',
scope: {
value: '=',
type: '@'
},
templateUrl: 'template/progressbar/bar.html',
link: function link(scope, element, attrs, progressCtrl) {
progressCtrl.addBar(scope, element);
}
};
}).directive('progressbar', function () {
return {
restrict: 'EA',
replace: true,
transclude: true,
controller: 'ProgressController',
scope: {
value: '=',
type: '@'
},
templateUrl: 'template/progressbar/progressbar.html',
link: function link(scope, element, attrs, progressCtrl) {
progressCtrl.addBar(scope, angular.element(element.children()[0]));
}
};
});
angular.module('mm.foundation.rating', []).constant('ratingConfig', {
max: 5,
stateOn: null,
stateOff: null
}).controller('RatingController', ['$scope', '$attrs', '$parse', 'ratingConfig', function ($scope, $attrs, $parse, ratingConfig) {
this.maxRange = angular.isDefined($attrs.max) ? $scope.$parent.$eval($attrs.max) : ratingConfig.max;
this.stateOn = angular.isDefined($attrs.stateOn) ? $scope.$parent.$eval($attrs.stateOn) : ratingConfig.stateOn;
this.stateOff = angular.isDefined($attrs.stateOff) ? $scope.$parent.$eval($attrs.stateOff) : ratingConfig.stateOff;
this.createRateObjects = function (states) {
var defaultOptions = {
stateOn: this.stateOn,
stateOff: this.stateOff
};
for (var i = 0, n = states.length; i < n; i++) {
states[i] = angular.extend({ index: i }, defaultOptions, states[i]);
}
return states;
};
// Get objects used in template
$scope.range = angular.isDefined($attrs.ratingStates) ? this.createRateObjects(angular.copy($scope.$parent.$eval($attrs.ratingStates))) : this.createRateObjects(new Array(this.maxRange));
$scope.rate = function (value) {
if ($scope.value !== value && !$scope.readonly) {
$scope.value = value;
}
};
$scope.enter = function (value) {
if (!$scope.readonly) {
$scope.val = value;
}
$scope.onHover({ value: value });
};
$scope.reset = function () {
$scope.val = angular.copy($scope.value);
$scope.onLeave();
};
$scope.$watch('value', function (value) {
$scope.val = value;
});
$scope.readonly = false;
if ($attrs.readonly) {
$scope.$parent.$watch($parse($attrs.readonly), function (value) {
$scope.readonly = !!value;
});
}
}]).directive('rating', function () {
return {
restrict: 'EA',
scope: {
value: '=',
onHover: '&',
onLeave: '&'
},
controller: 'RatingController',
templateUrl: 'template/rating/rating.html',
replace: true
};
});
/**
* @ngdoc overview
* @name mm.foundation.tabs
*
* @description
* AngularJS version of the tabs directive.
*/
angular.module('mm.foundation.tabs', []).controller('TabsetController', ['$scope', function TabsetCtrl($scope) {
'ngInject';
var ctrl = this;
var tabs = ctrl.tabs = $scope.tabs = [];
if (angular.isUndefined($scope.openOnLoad)) {
$scope.openOnLoad = true;
}
ctrl.select = function (tab) {
angular.forEach(tabs, function (tab) {
tab.active = false;
});
tab.active = true;
};
ctrl.addTab = function addTab(tab) {
tabs.push(tab);
if ($scope.openOnLoad && (tabs.length === 1 || tab.active)) {
ctrl.select(tab);
}
};
ctrl.removeTab = function removeTab(tab) {
var index = tabs.indexOf(tab);
//Select a new tab if the tab to be removed is selected
if (tab.active && tabs.length > 1) {
//If this is the last tab, select the previous tab. else, the next tab.
var newActiveIndex = index == tabs.length - 1 ? index - 1 : index + 1;
ctrl.select(tabs[newActiveIndex]);
}
tabs.splice(index, 1);
};
}])
/**
* @ngdoc directive
* @name mm.foundation.tabs.directive:tabset
* @restrict EA
*
* @description
* Tabset is the outer container for the tabs directive
*
* @param {boolean=} vertical Whether or not to use vertical styling for the tabs.
* @param {boolean=} justified Whether or not to use justified styling for the tabs.
*
* @example
<example module="mm.foundation">
<file name="index.html">
<tabset>
<tab heading="Tab 1"><b>First</b> Content!</tab>
<tab heading="Tab 2"><i>Second</i> Content!</tab>
</tabset>
<hr />
<tabset vertical="true">
<tab heading="Vertical Tab 1"><b>First</b> Vertical Content!</tab>
<tab heading="Vertical Tab 2"><i>Second</i> Vertical Content!</tab>
</tabset>
<tabset justified="true">
<tab heading="Justified Tab 1"><b>First</b> Justified Content!</tab>
<tab heading="Justified Tab 2"><i>Second</i> Justified Content!</tab>
</tabset>
</file>
</example>
*/
.directive('tabset', function () {
'ngInject';
return {
restrict: 'EA',
transclude: true,
replace: true,
scope: {
openOnLoad: '=?'
},
controller: 'TabsetController',
templateUrl: 'template/tabs/tabset.html',
link: function link(scope, element, attrs) {
scope.vertical = angular.isDefined(attrs.vertical) ? scope.$parent.$eval(attrs.vertical) : false;
scope.justified = angular.isDefined(attrs.justified) ? scope.$parent.$eval(attrs.justified) : false;
scope.type = angular.isDefined(attrs.type) ? scope.$parent.$eval(attrs.type) : 'tabs';
}
};
})
/**
* @ngdoc directive
* @name mm.foundation.tabs.directive:tab
* @restrict EA
*
* @param {string=} heading The visible heading, or title, of the tab. Set HTML headings with {@link mm.foundation.tabs.directive:tabHeading tabHeading}.
* @param {string=} select An expression to evaluate when the tab is selected.
* @param {boolean=} active A binding, telling whether or not this tab is selected.
* @param {boolean=} disabled A binding, telling whether or not this tab is disabled.
*
* @description
* Creates a tab with a heading and content. Must be placed within a {@link mm.foundation.tabs.directive:tabset tabset}.
*
* @example
<example module="mm.foundation">
<file name="index.html">
<div ng-controller="TabsDemoCtrl">
<button class="button small" ng-click="items[0].active = true">
Select item 1, using active binding
</button>
<button class="button small" ng-click="items[1].disabled = !items[1].disabled">
Enable/disable item 2, using disabled binding
</button>
<br />
<tabset>
<tab heading="Tab 1">First Tab</tab>
<tab select="alertMe()">
<tab-heading><i class="fa fa-bell"></i> Alert me!</tab-heading>
Second Tab, with alert callback and html heading!
</tab>
<tab ng-repeat="item in items"
heading="{{item.title}}"
disabled="item.disabled"
active="item.active">
{{item.content}}
</tab>
</tabset>
</div>
</file>
<file name="script.js">
function TabsDemoCtrl($scope) {
$scope.items = [
{ title:"Dynamic Title 1", content:"Dynamic Item 0" },
{ title:"Dynamic Title 2", content:"Dynamic Item 1", disabled: true }
];
$scope.alertMe = function() {
setTimeout(function() {
alert("You've selected the alert tab!");
});
};
};
</file>
</example>
*/
/**
* @ngdoc directive
* @name mm.foundation.tabs.directive:tabHeading
* @restrict EA
*
* @description
* Creates an HTML heading for a {@link mm.foundation.tabs.directive:tab tab}. Must be placed as a child of a tab element.
*
* @example
<example module="mm.foundation">
<file name="index.html">
<tabset>
<tab>
<tab-heading><b>HTML</b> in my titles?!</tab-heading>
And some content, too!
</tab>
<tab>
<tab-heading><i class="fa fa-heart"></i> Icon heading?!?</tab-heading>
That's right.
</tab>
</tabset>
</file>
</example>
*/
.directive('tab', ['$parse', function ($parse) {
'ngInject';
return {
require: '^tabset',
restrict: 'EA',
replace: true,
templateUrl: 'template/tabs/tab.html',
transclude: true,
scope: {
heading: '@',
onSelect: '&select', //This callback is called in contentHeadingTransclude
//once it inserts the tab's content into the dom
onDeselect: '&deselect'
},
controller: function controller() {
//Empty controller so other directives can require being 'under' a tab
},
compile: function compile(elm, attrs, transclude) {
return function postLink(scope, elm, attrs, tabsetCtrl) {
var getActive, setActive;
if (attrs.active) {
getActive = $parse(attrs.active);
setActive = getActive.assign;
scope.$parent.$watch(getActive, function updateActive(value, oldVal) {
// Avoid re-initializing scope.active as it is already initialized
// below. (watcher is called async during init with value ===
// oldVal)
if (value !== oldVal) {
scope.active = !!value;
}
});
scope.active = getActive(scope.$parent);
} else {
setActive = getActive = angular.noop;
}
scope.$watch('active', function (active) {
if (!angular.isFunction(setActive)) {
return;
}
// Note this watcher also initializes and assigns scope.active to the
// attrs.active expression.
setActive(scope.$parent, active);
if (active) {
tabsetCtrl.select(scope);
scope.onSelect();
} else {
scope.onDeselect();
}
});
scope.disabled = false;
if (attrs.disabled) {
scope.$parent.$watch($parse(attrs.disabled), function (value) {
scope.disabled = !!value;
});
}
scope.select = function () {
if (!scope.disabled) {
scope.active = true;
}
};
tabsetCtrl.addTab(scope);
scope.$on('$destroy', function () {
tabsetCtrl.removeTab(scope);
});
//We need to transclude later, once the content container is ready.
//when this link happens, we're inside a tab heading.
scope.$transcludeFn = transclude;
};
}
};
}]).directive('tabHeadingTransclude', function () {
'ngInject';
return {
restrict: 'A',
require: '^tab',
link: function link(scope, elm, attrs, tabCtrl) {
scope.$watch('headingElement', function updateHeadingElement(heading) {
if (heading) {
elm.html('');
elm.append(heading);
}
});
}
};
}).directive('tabContentTransclude', function () {
'ngInject';
return {
restrict: 'A',
require: '^tabset',
link: function link(scope, elm, attrs) {
var tab = scope.$eval(attrs.tabContentTransclude);
//Now our tab is ready to be transcluded: both the tab heading area
//and the tab content area are loaded. Transclude 'em both.
tab.$transcludeFn(tab.$parent, function (contents) {
angular.forEach(contents, function (node) {
if (isTabHeading(node)) {
//Let tabHeadingTransclude know.
tab.headingElement = node;
} else {
elm.append(node);
}
});
});
}
};
function isTabHeading(node) {
return node.tagName && (node.hasAttribute('tab-heading') || node.hasAttribute('data-tab-heading') || node.tagName.toLowerCase() === 'tab-heading' || node.tagName.toLowerCase() === 'data-tab-heading');
}
});
/**
* The following features are still outstanding: animation as a
* function, placement as a function, inside, support for more triggers than
* just mouse enter/leave, html tooltips, and selector delegation.
*/
angular.module('mm.foundation.tooltip', ['mm.foundation.position', 'mm.foundation.bindHtml'])
/**
* The $tooltip service creates tooltip- and popover-like directives as well as
* houses global options for them.
*/
.provider('$tooltip', function () {
'ngInject';
// The default options tooltip and popover.
var defaultOptions = {
placement: 'top',
popupDelay: 0
};
// Default hide triggers for each show trigger
var triggerMap = {
'mouseover': 'mouseout',
'click': 'click',
'focus': 'blur'
};
// The options specified to the provider globally.
var globalOptions = {};
/**
* `options({})` allows global configuration of all tooltips in the
* application.
*
* var app = angular.module( 'App', ['mm.foundation.tooltip'], function( $tooltipProvider ) {
* // place tooltips left instead of top by default
* $tooltipProvider.options( { placement: 'left' } );
* });
*/
this.options = function (value) {
angular.extend(globalOptions, value);
};
/**
* This allows you to extend the set of trigger mappings available. E.g.:
*
* $tooltipProvider.setTriggers( 'openTrigger': 'closeTrigger' );
*/
this.setTriggers = function setTriggers(triggers) {
angular.extend(triggerMap, triggers);
};
/**
* This is a helper function for translating camel-case to snake-case.
*/
function snake_case(name) {
var regexp = /[A-Z]/g;
var separator = '-';
return name.replace(regexp, function (letter, pos) {
return (pos ? separator : '') + letter.toLowerCase();
});
}
/**
* Returns the actual instance of the $tooltip service.
* TODO support multiple triggers
*/
this.$get = ['$window', '$compile', '$timeout', '$parse', '$document', '$position', '$interpolate', '$animate', function ($window, $compile, $timeout, $parse, $document, $position, $interpolate, $animate) {
'ngInject';
return function $tooltip(type, prefix, defaultTriggerShow) {
var options = angular.extend({}, defaultOptions, globalOptions);
/**
* Returns an object of show and hide triggers.
*
* If a trigger is supplied,
* it is used to show the tooltip; otherwise, it will use the `trigger`
* option passed to the `$tooltipProvider.options` method; else it will
* default to the trigger supplied to this directive factory.
*
* The hide trigger is based on the show trigger. If the `trigger` option
* was passed to the `$tooltipProvider.options` method, it will use the
* mapped trigger from `triggerMap` or the passed trigger if the map is
* undefined; otherwise, it uses the `triggerMap` value of the show
* trigger; else it will just use the show trigger.
*/
function getTriggers(trigger) {
var show = trigger || options.trigger || defaultTriggerShow;
var hide = triggerMap[show] || show;
return {
show: show,
hide: hide
};
}
var directiveName = snake_case(type);
var startSym = $interpolate.startSymbol();
var endSym = $interpolate.endSymbol();
var template = '<div ' + directiveName + '-popup ' + 'title="' + startSym + 'tt_title' + endSym + '" ' + 'content="' + startSym + 'tt_content' + endSym + '" ' + 'placement="' + startSym + 'tt_placement' + endSym + '" ' + 'is-open="tt_isOpen"' + '>' + '</div>';
return {
restrict: 'EA',
scope: true,
compile: function compile(tElem) {
var tooltipLinker = $compile(template);
return function link(scope, element, attrs) {
var tooltip;
var transitionTimeout;
var popupTimeout;
var appendToBody = angular.isDefined(options.appendToBody) ? options.appendToBody : false;
var triggers = getTriggers(undefined);
var hasRegisteredTriggers = false;
var hasEnableExp = angular.isDefined(attrs[prefix + 'Enable']);
var positionTooltip = function positionTooltip() {
var position;
var ttWidth;
var ttHeight;
var ttPosition;
// Get the position of the directive element.
position = appendToBody ? $position.offset(element) : $position.position(element);
// Get the height and width of the tooltip so we can center it.
ttWidth = tooltip.prop('offsetWidth');
ttHeight = tooltip.prop('offsetHeight');
// Calculate the tooltip's top and left coordinates to center it with
// this directive.
switch (scope.tt_placement) {
case 'right':
ttPosition = {
top: position.top + position.height / 2 - ttHeight / 2,
left: position.left + position.width + 10
};
break;
case 'bottom':
ttPosition = {
top: position.top + position.height + 10,
left: position.left
};
break;
case 'left':
ttPosition = {
top: position.top + position.height / 2 - ttHeight / 2,
left: position.left - ttWidth - 10
};
break;
default:
ttPosition = {
top: position.top - ttHeight - 10,
left: position.left
};
break;
}
ttPosition.top += 'px';
ttPosition.left += 'px';
// Now set the calculated positioning.
tooltip.css(ttPosition);
};
// By default, the tooltip is not open.
// TODO add ability to start tooltip opened
scope.tt_isOpen = false;
function toggleTooltipBind() {
if (!scope.tt_isOpen) {
showTooltipBind();
} else {
hideTooltipBind();
}
}
// Show the tooltip with delay if specified, otherwise show it immediately
function showTooltipBind() {
if (hasEnableExp && !scope.$eval(attrs[prefix + 'Enable'])) {
return;
}
if (scope.tt_popupDelay) {
popupTimeout = $timeout(show, scope.tt_popupDelay, false);
popupTimeout.then(function (reposition) {
reposition();
});
} else {
show()();
}
}
function hideTooltipBind() {
scope.$apply(function () {
hide();
});
}
// Show the tooltip popup element.
function show() {
// Don't show empty tooltips.
if (!scope.tt_content) {
return angular.noop;
}
createTooltip();
// If there is a pending remove transition, we must cancel it, lest the
// tooltip be mysteriously removed.
if (transitionTimeout) {
$timeout.cancel(transitionTimeout);
}
// Set the initial positioning.
tooltip.css({
top: 0,
left: 0
});
// Now we add it to the DOM because need some info about it. But it's not
// visible yet anyway.
if (appendToBody) {
// $document.find('body').append(tooltip);
// $document.find('body')
$animate.enter(tooltip, $document.find('body'));
} else {
$animate.enter(tooltip, element.parent(), element);
// element.after(tooltip);
}
positionTooltip();
// And show the tooltip.
scope.tt_isOpen = true;
scope.$digest(); // digest required as $apply is not called
// Return positioning function as promise callback for correct
// positioning after draw.
return positionTooltip;
}
// Hide the tooltip popup element.
function hide() {
// First things first: we don't show it anymore.
scope.tt_isOpen = false;
//if tooltip is going to be shown after delay, we must cancel this
$timeout.cancel(popupTimeout);
removeTooltip();
}
function createTooltip() {
// There can only be one tooltip element per directive shown at once.
if (tooltip) {
removeTooltip();
}
tooltip = tooltipLinker(scope, function () {});
// Get contents rendered into the tooltip
scope.$digest();
}
function removeTooltip() {
if (tooltip) {
$animate.leave(tooltip);
// tooltip.remove();
tooltip = null;
}
}
/**
* Observe the relevant attributes.
*/
attrs.$observe(type, function (val) {
scope.tt_content = val;
if (!val && scope.tt_isOpen) {
hide();
}
});
attrs.$observe(prefix + 'Title', function (val) {
scope.tt_title = val;
});
attrs[prefix + 'Placement'] = attrs[prefix + 'Placement'] || null;
attrs.$observe(prefix + 'Placement', function (val) {
scope.tt_placement = angular.isDefined(val) && val ? val : options.placement;
});
attrs[prefix + 'PopupDelay'] = attrs[prefix + 'PopupDelay'] || null;
attrs.$observe(prefix + 'PopupDelay', function (val) {
var delay = parseInt(val, 10);
scope.tt_popupDelay = !isNaN(delay) ? delay : options.popupDelay;
});
var unregisterTriggers = function unregisterTriggers() {
if (hasRegisteredTriggers) {
if (angular.isFunction(triggers.show)) {
unregisterTriggerFunction();
} else {
element.unbind(triggers.show, showTooltipBind);
element.unbind(triggers.hide, hideTooltipBind);
}
}
};
var unregisterTriggerFunction = function unregisterTriggerFunction() {};
attrs[prefix + 'Trigger'] = attrs[prefix + 'Trigger'] || null;
attrs.$observe(prefix + 'Trigger', function (val) {
unregisterTriggers();
unregisterTriggerFunction();
triggers = getTriggers(val);
if (angular.isFunction(triggers.show)) {
unregisterTriggerFunction = scope.$watch(function () {
return triggers.show(scope, element, attrs);
}, function (val) {
return val ? $timeout(show) : $timeout(hide);
});
} else {
if (triggers.show === triggers.hide) {
element.bind(triggers.show, toggleTooltipBind);
} else {
element.bind(triggers.show, showTooltipBind);
element.bind(triggers.hide, hideTooltipBind);
}
}
hasRegisteredTriggers = true;
});
attrs.$observe(prefix + 'AppendToBody', function (val) {
appendToBody = angular.isDefined(val) ? $parse(val)(scope) : appendToBody;
});
// if a tooltip is attached to <body> we need to remove it on
// location change as its parent scope will probably not be destroyed
// by the change.
if (appendToBody) {
scope.$on('$locationChangeSuccess', function closeTooltipOnLocationChangeSuccess() {
if (scope.tt_isOpen) {
hide();
}
});
}
// Make sure tooltip is destroyed and removed.
scope.$on('$destroy', function onDestroyTooltip() {
$timeout.cancel(transitionTimeout);
$timeout.cancel(popupTimeout);
unregisterTriggers();
unregisterTriggerFunction();
removeTooltip();
});
};
}
};
};
}];
}).directive('tooltipPopup', function () {
'ngInject';
return {
restrict: 'EA',
replace: true,
scope: {
content: '@',
placement: '@',
isOpen: '&'
},
templateUrl: 'template/tooltip/tooltip-popup.html'
};
}).directive('tooltip', ['$tooltip', function ($tooltip) {
'ngInject';
return $tooltip('tooltip', 'tooltip', 'mouseover');
}]).directive('tooltipHtmlUnsafePopup', function () {
return {
restrict: 'EA',
replace: true,
scope: {
content: '@',
placement: '@',
isOpen: '&'
},
templateUrl: 'template/tooltip/tooltip-html-unsafe-popup.html'
};
}).directive('tooltipHtmlUnsafe', ['$tooltip', function ($tooltip) {
'ngInject';
return $tooltip('tooltipHtmlUnsafe', 'tooltip', 'mouseover');
}]);
angular.module("mm.foundation", ["mm.foundation.accordion", "mm.foundation.alert", "mm.foundation.bindHtml", "mm.foundation.buttons", "mm.foundation.dropdownMenu", "mm.foundation.dropdownToggle", "mm.foundation.mediaQueries", "mm.foundation.modal", "mm.foundation.offcanvas", "mm.foundation.pagination", "mm.foundation.position", "mm.foundation.progressbar", "mm.foundation.rating", "mm.foundation.tabs", "mm.foundation.tooltip"]); | him2him2/cdnjs | ajax/libs/angular-foundation-6/0.9.22/angular-foundation-no-tpls.js | JavaScript | mit | 80,628 |
.alertify .ajs-dimmer {
position: fixed;
z-index: 1981;
top: 0;
left: 0;
bottom: 0;
right: 0;
padding: 0;
margin: 0;
background-color: #252525;
opacity: .5;
}
.alertify .ajs-modal {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
padding: 0;
overflow-y: auto;
z-index: 1981;
}
.alertify .ajs-dialog {
position: relative;
margin: 5% auto;
min-height: 110px;
max-width: 500px;
padding: 24px 24px 0 24px;
outline: 0;
}
.alertify .ajs-reset {
position: absolute !important;
display: inline !important;
width: 0 !important;
height: 0 !important;
opacity: 0 !important;
}
.alertify .ajs-commands {
position: absolute;
left: 4px;
margin: -14px 0 0 24px;
z-index: 1;
}
.alertify .ajs-commands button {
display: none;
width: 10px;
height: 10px;
margin-right: 10px;
padding: 10px;
border: 0;
background-color: transparent;
background-repeat: no-repeat;
background-position: center;
cursor: pointer;
}
.alertify .ajs-commands button.ajs-close {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAh0lEQVQYlY2QsQ0EIQwEB9cBAR1CJUaI/gigDnwR6NBL/7/xWLNrZ2b8EwGotVpr7eOitWa1VjugiNB7R1UPrKrWe0dEAHBbXUqxMQbeewDmnHjvyTm7C3zDwAUd9c63YQdUVdu6EAJzzquz7HXvTiklt+H9DQFYaxFjvDqllFyMkbXWvfpXHjJrWFgdBq/hAAAAAElFTkSuQmCC);
}
.alertify .ajs-commands button.ajs-maximize {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAOUlEQVQYlWP8//8/AzGAhYGBgaG4uBiv6t7eXkYmooxjYGAgWiELsvHYFMCcRX2rSXcjoSBiJDbAAeD+EGu+8BZcAAAAAElFTkSuQmCC);
}
.alertify .ajs-header {
margin: -24px;
margin-bottom: 0;
padding: 16px 24px;
}
.alertify .ajs-body {
min-height: 56px;
}
.alertify .ajs-body .ajs-content {
padding: 16px 16px 16px 24px;
}
.alertify .ajs-footer {
padding: 4px;
margin-right: -24px;
margin-left: -24px;
}
.alertify .ajs-footer .ajs-buttons.ajs-primary {
text-align: left;
}
.alertify .ajs-footer .ajs-buttons.ajs-primary .ajs-button {
margin: 4px;
}
.alertify .ajs-footer .ajs-buttons.ajs-auxiliary {
float: right;
clear: none;
text-align: right;
}
.alertify .ajs-footer .ajs-buttons.ajs-auxiliary .ajs-button {
margin: 4px;
}
.alertify .ajs-footer .ajs-buttons .ajs-button {
min-width: 88px;
min-height: 35px;
}
.alertify .ajs-footer .ajs-handle {
position: absolute;
display: none;
width: 10px;
height: 10px;
left: 0;
bottom: 0;
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMS8xNEDQYmMAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAQ0lEQVQYlaXNMQoAIAxD0dT7H657l0KX3iJuUlBUNOsPPCGJm7VDp6ryeMxMuDsAQH7owW3pyn3RS26iKxERMLN3ugOaAkaL3sWVigAAAABJRU5ErkJggg==);
-webkit-transform: scaleX(-1);
transform: scaleX(-1);
cursor: sw-resize;
}
.alertify.ajs-no-overflow .ajs-body .ajs-content {
overflow: hidden !important;
}
.alertify.ajs-no-padding.ajs-maximized .ajs-body .ajs-content {
right: 0;
left: 0;
padding: 0;
}
.alertify.ajs-no-padding:not(.ajs-maximized) .ajs-body {
margin-right: -24px;
margin-left: -24px;
}
.alertify.ajs-no-padding:not(.ajs-maximized) .ajs-body .ajs-content {
padding: 0;
}
.alertify.ajs-no-padding.ajs-resizable .ajs-body .ajs-content {
right: 0;
left: 0;
}
.alertify.ajs-maximizable .ajs-commands button.ajs-maximize,
.alertify.ajs-maximizable .ajs-commands button.ajs-restore {
display: inline-block;
}
.alertify.ajs-closable .ajs-commands button.ajs-close {
display: inline-block;
}
.alertify.ajs-maximized .ajs-dialog {
width: 100% !important;
height: 100% !important;
max-width: none !important;
margin: 0 auto !important;
top: 0 !important;
right: 0 !important;
}
.alertify.ajs-maximized.ajs-modeless .ajs-modal {
position: fixed !important;
min-height: 100% !important;
max-height: none !important;
margin: 0 !important;
}
.alertify.ajs-maximized .ajs-commands button.ajs-maximize {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAASklEQVQYlZWQ0QkAMQhDtXRincOZX78KVtrDCwgqJNEoIB3MPLj7lRUROlpyVXGzby6zWuY+kz6tj5sBMTMAyVV3/595RbOh3cAXsww1raeiOcoAAAAASUVORK5CYII=);
}
.alertify.ajs-resizable .ajs-dialog,
.alertify.ajs-maximized .ajs-dialog {
padding: 0;
}
.alertify.ajs-resizable .ajs-commands,
.alertify.ajs-maximized .ajs-commands {
margin: 14px 0 0 24px;
}
.alertify.ajs-resizable .ajs-header,
.alertify.ajs-maximized .ajs-header {
position: absolute;
top: 0;
right: 0;
left: 0;
margin: 0;
padding: 16px 24px;
}
.alertify.ajs-resizable .ajs-body,
.alertify.ajs-maximized .ajs-body {
min-height: 224px;
display: inline-block;
}
.alertify.ajs-resizable .ajs-body .ajs-content,
.alertify.ajs-maximized .ajs-body .ajs-content {
position: absolute;
top: 50px;
left: 24px;
bottom: 50px;
right: 24px;
overflow: auto;
}
.alertify.ajs-resizable .ajs-footer,
.alertify.ajs-maximized .ajs-footer {
position: absolute;
right: 0;
left: 0;
bottom: 0;
margin: 0;
}
.alertify.ajs-resizable:not(.ajs-maximized) .ajs-dialog {
min-width: 548px;
}
.alertify.ajs-resizable:not(.ajs-maximized) .ajs-handle {
display: block;
}
.alertify.ajs-movable:not(.ajs-maximized) .ajs-header {
cursor: move;
}
.alertify.ajs-modeless .ajs-dimmer,
.alertify.ajs-modeless .ajs-reset {
display: none;
}
.alertify.ajs-modeless .ajs-modal {
overflow: visible;
max-width: none;
max-height: 0;
}
.alertify.ajs-modeless.ajs-pinnable .ajs-commands button.ajs-pin {
display: inline-block;
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAQklEQVQYlcWPMQ4AIAwCqU9u38GbcbHRWN1MvKQDhQFMEpKImGJA0gCgnYw0V0rwxseg5erT4oSkQVI5d9f+e9+xA0NbLpWfitPXAAAAAElFTkSuQmCC);
}
.alertify.ajs-modeless.ajs-unpinned .ajs-modal {
position: absolute;
}
.alertify.ajs-modeless.ajs-unpinned .ajs-commands button.ajs-pin {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAO0lEQVQYlWP8//8/AzGAiShV6AqLi4txGs+CLoBLMYbC3t5eRmyaWfBZhwwYkX2NTxPRvibKjRhW4wMAhxkYGbLu3pEAAAAASUVORK5CYII=);
}
.alertify.ajs-modeless:not(.ajs-unpinned) .ajs-body {
max-height: 500px;
overflow: auto;
}
.ajs-no-overflow {
overflow: hidden !important;
outline: none;
}
.ajs-no-selection,
.ajs-no-selection * {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
@media screen and (max-width: 568px) {
.alertify .ajs-dialog {
min-width: 150px;
}
.alertify:not(.ajs-maximized) .ajs-modal {
padding: 0 5%;
}
.alertify:not(.ajs-maximized).ajs-resizable .ajs-dialog {
min-width: initial;
}
}
.alertify {
display: none;
}
.alertify .ajs-dimmer,
.alertify .ajs-modal {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
-webkit-transition-property: opacity, visibility;
transition-property: opacity, visibility;
-webkit-transition-timing-function: linear;
transition-timing-function: linear;
-webkit-transition-duration: 250ms;
transition-duration: 250ms;
}
.alertify.ajs-hidden .ajs-dimmer,
.alertify.ajs-hidden .ajs-modal {
visibility: hidden;
opacity: 0;
}
.alertify.ajs-in:not(.ajs-hidden) .ajs-dialog {
-webkit-animation-duration: 500ms;
animation-duration: 500ms;
}
.alertify.ajs-out.ajs-hidden .ajs-dialog {
-webkit-animation-duration: 250ms;
animation-duration: 250ms;
}
.alertify .ajs-dialog.ajs-shake {
-webkit-animation-name: shake;
animation-name: shake;
-webkit-animation-duration: .1s;
animation-duration: .1s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
@-webkit-keyframes shake {
0%,
100% {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
10%,
30%,
50%,
70%,
90% {
-webkit-transform: translate3d(10px, 0, 0);
transform: translate3d(10px, 0, 0);
}
20%,
40%,
60%,
80% {
-webkit-transform: translate3d(-10px, 0, 0);
transform: translate3d(-10px, 0, 0);
}
}
@keyframes shake {
0%,
100% {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
10%,
30%,
50%,
70%,
90% {
-webkit-transform: translate3d(10px, 0, 0);
transform: translate3d(10px, 0, 0);
}
20%,
40%,
60%,
80% {
-webkit-transform: translate3d(-10px, 0, 0);
transform: translate3d(-10px, 0, 0);
}
}
.alertify.ajs-slide.ajs-hidden .ajs-dialog {
margin: -100% auto !important;
}
.alertify.ajs-slide .ajs-dialog {
-webkit-transition-property: margin, visibility;
transition-property: margin, visibility;
}
.alertify.ajs-slide.ajs-in:not(.ajs-hidden) .ajs-dialog {
-webkit-transition-duration: 500ms;
transition-duration: 500ms;
-webkit-transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.alertify.ajs-slide.ajs-out.ajs-hidden .ajs-dialog {
-webkit-transition-duration: 250ms;
transition-duration: 250ms;
-webkit-transition-timing-function: cubic-bezier(0.6, -0.28, 0.735, 0.045);
transition-timing-function: cubic-bezier(0.6, -0.28, 0.735, 0.045);
}
.alertify.ajs-zoom.ajs-in:not(.ajs-hidden) .ajs-dialog {
-webkit-animation-name: zoomIn;
animation-name: zoomIn;
}
.alertify.ajs-zoom.ajs-out.ajs-hidden .ajs-dialog {
-webkit-animation-name: zoomOut;
animation-name: zoomOut;
}
.alertify.ajs-fade.ajs-in:not(.ajs-hidden) .ajs-dialog {
-webkit-animation-name: fadeIn;
animation-name: fadeIn;
}
.alertify.ajs-fade.ajs-out.ajs-hidden .ajs-dialog {
-webkit-animation-name: fadeOut;
animation-name: fadeOut;
}
.alertify.ajs-pulse.ajs-in:not(.ajs-hidden) .ajs-dialog {
-webkit-animation-name: pulseIn;
animation-name: pulseIn;
}
.alertify.ajs-pulse.ajs-out.ajs-hidden .ajs-dialog {
-webkit-animation-name: pulseOut;
animation-name: pulseOut;
}
.alertify.ajs-flipx.ajs-in:not(.ajs-hidden) .ajs-dialog {
-webkit-animation-name: flipInX;
animation-name: flipInX;
}
.alertify.ajs-flipx.ajs-out.ajs-hidden .ajs-dialog {
-webkit-animation-name: flipOutX;
animation-name: flipOutX;
}
.alertify.ajs-flipy.ajs-in:not(.ajs-hidden) .ajs-dialog {
-webkit-animation-name: flipInY;
animation-name: flipInY;
}
.alertify.ajs-flipy.ajs-out.ajs-hidden .ajs-dialog {
-webkit-animation-name: flipOutY;
animation-name: flipOutY;
}
@-webkit-keyframes pulseIn {
0%,
20%,
40%,
60%,
80%,
100% {
-webkit-transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}
0% {
opacity: 0;
-webkit-transform: scale3d(0.3, 0.3, 0.3);
transform: scale3d(0.3, 0.3, 0.3);
}
20% {
-webkit-transform: scale3d(1.1, 1.1, 1.1);
transform: scale3d(1.1, 1.1, 1.1);
}
40% {
-webkit-transform: scale3d(0.9, 0.9, 0.9);
transform: scale3d(0.9, 0.9, 0.9);
}
60% {
opacity: 1;
-webkit-transform: scale3d(1.03, 1.03, 1.03);
transform: scale3d(1.03, 1.03, 1.03);
}
80% {
-webkit-transform: scale3d(0.97, 0.97, 0.97);
transform: scale3d(0.97, 0.97, 0.97);
}
100% {
opacity: 1;
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
}
@keyframes pulseIn {
0%,
20%,
40%,
60%,
80%,
100% {
-webkit-transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}
0% {
opacity: 0;
-webkit-transform: scale3d(0.3, 0.3, 0.3);
transform: scale3d(0.3, 0.3, 0.3);
}
20% {
-webkit-transform: scale3d(1.1, 1.1, 1.1);
transform: scale3d(1.1, 1.1, 1.1);
}
40% {
-webkit-transform: scale3d(0.9, 0.9, 0.9);
transform: scale3d(0.9, 0.9, 0.9);
}
60% {
opacity: 1;
-webkit-transform: scale3d(1.03, 1.03, 1.03);
transform: scale3d(1.03, 1.03, 1.03);
}
80% {
-webkit-transform: scale3d(0.97, 0.97, 0.97);
transform: scale3d(0.97, 0.97, 0.97);
}
100% {
opacity: 1;
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
}
@-webkit-keyframes pulseOut {
20% {
-webkit-transform: scale3d(0.9, 0.9, 0.9);
transform: scale3d(0.9, 0.9, 0.9);
}
50%,
55% {
opacity: 1;
-webkit-transform: scale3d(1.1, 1.1, 1.1);
transform: scale3d(1.1, 1.1, 1.1);
}
100% {
opacity: 0;
-webkit-transform: scale3d(0.3, 0.3, 0.3);
transform: scale3d(0.3, 0.3, 0.3);
}
}
@keyframes pulseOut {
20% {
-webkit-transform: scale3d(0.9, 0.9, 0.9);
transform: scale3d(0.9, 0.9, 0.9);
}
50%,
55% {
opacity: 1;
-webkit-transform: scale3d(1.1, 1.1, 1.1);
transform: scale3d(1.1, 1.1, 1.1);
}
100% {
opacity: 0;
-webkit-transform: scale3d(0.3, 0.3, 0.3);
transform: scale3d(0.3, 0.3, 0.3);
}
}
@-webkit-keyframes zoomIn {
0% {
opacity: 0;
-webkit-transform: scale3d(0.25, 0.25, 0.25);
transform: scale3d(0.25, 0.25, 0.25);
}
100% {
opacity: 1;
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
}
@keyframes zoomIn {
0% {
opacity: 0;
-webkit-transform: scale3d(0.25, 0.25, 0.25);
transform: scale3d(0.25, 0.25, 0.25);
}
100% {
opacity: 1;
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
}
@-webkit-keyframes zoomOut {
0% {
opacity: 1;
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
100% {
opacity: 0;
-webkit-transform: scale3d(0.25, 0.25, 0.25);
transform: scale3d(0.25, 0.25, 0.25);
}
}
@keyframes zoomOut {
0% {
opacity: 1;
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
100% {
opacity: 0;
-webkit-transform: scale3d(0.25, 0.25, 0.25);
transform: scale3d(0.25, 0.25, 0.25);
}
}
@-webkit-keyframes fadeIn {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes fadeIn {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@-webkit-keyframes fadeOut {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@keyframes fadeOut {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@-webkit-keyframes flipInX {
0% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, -90deg);
transform: perspective(400px) rotate3d(1, 0, 0, -90deg);
-webkit-transition-timing-function: ease-in;
transition-timing-function: ease-in;
opacity: 0;
}
40% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, 20deg);
transform: perspective(400px) rotate3d(1, 0, 0, 20deg);
-webkit-transition-timing-function: ease-in;
transition-timing-function: ease-in;
}
60% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, -10deg);
transform: perspective(400px) rotate3d(1, 0, 0, -10deg);
opacity: 1;
}
80% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, 5deg);
transform: perspective(400px) rotate3d(1, 0, 0, 5deg);
}
100% {
-webkit-transform: perspective(400px);
transform: perspective(400px);
}
}
@keyframes flipInX {
0% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, -90deg);
transform: perspective(400px) rotate3d(1, 0, 0, -90deg);
-webkit-transition-timing-function: ease-in;
transition-timing-function: ease-in;
opacity: 0;
}
40% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, 20deg);
transform: perspective(400px) rotate3d(1, 0, 0, 20deg);
-webkit-transition-timing-function: ease-in;
transition-timing-function: ease-in;
}
60% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, -10deg);
transform: perspective(400px) rotate3d(1, 0, 0, -10deg);
opacity: 1;
}
80% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, 5deg);
transform: perspective(400px) rotate3d(1, 0, 0, 5deg);
}
100% {
-webkit-transform: perspective(400px);
transform: perspective(400px);
}
}
@-webkit-keyframes flipOutX {
0% {
-webkit-transform: perspective(400px);
transform: perspective(400px);
}
30% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, 20deg);
transform: perspective(400px) rotate3d(1, 0, 0, 20deg);
opacity: 1;
}
100% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, -90deg);
transform: perspective(400px) rotate3d(1, 0, 0, -90deg);
opacity: 0;
}
}
@keyframes flipOutX {
0% {
-webkit-transform: perspective(400px);
transform: perspective(400px);
}
30% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, 20deg);
transform: perspective(400px) rotate3d(1, 0, 0, 20deg);
opacity: 1;
}
100% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, -90deg);
transform: perspective(400px) rotate3d(1, 0, 0, -90deg);
opacity: 0;
}
}
@-webkit-keyframes flipInY {
0% {
-webkit-transform: perspective(400px) rotate3d(0, -1, 0, -90deg);
transform: perspective(400px) rotate3d(0, -1, 0, -90deg);
-webkit-transition-timing-function: ease-in;
transition-timing-function: ease-in;
opacity: 0;
}
40% {
-webkit-transform: perspective(400px) rotate3d(0, -1, 0, 20deg);
transform: perspective(400px) rotate3d(0, -1, 0, 20deg);
-webkit-transition-timing-function: ease-in;
transition-timing-function: ease-in;
}
60% {
-webkit-transform: perspective(400px) rotate3d(0, -1, 0, -10deg);
transform: perspective(400px) rotate3d(0, -1, 0, -10deg);
opacity: 1;
}
80% {
-webkit-transform: perspective(400px) rotate3d(0, -1, 0, 5deg);
transform: perspective(400px) rotate3d(0, -1, 0, 5deg);
}
100% {
-webkit-transform: perspective(400px);
transform: perspective(400px);
}
}
@keyframes flipInY {
0% {
-webkit-transform: perspective(400px) rotate3d(0, -1, 0, -90deg);
transform: perspective(400px) rotate3d(0, -1, 0, -90deg);
-webkit-transition-timing-function: ease-in;
transition-timing-function: ease-in;
opacity: 0;
}
40% {
-webkit-transform: perspective(400px) rotate3d(0, -1, 0, 20deg);
transform: perspective(400px) rotate3d(0, -1, 0, 20deg);
-webkit-transition-timing-function: ease-in;
transition-timing-function: ease-in;
}
60% {
-webkit-transform: perspective(400px) rotate3d(0, -1, 0, -10deg);
transform: perspective(400px) rotate3d(0, -1, 0, -10deg);
opacity: 1;
}
80% {
-webkit-transform: perspective(400px) rotate3d(0, -1, 0, 5deg);
transform: perspective(400px) rotate3d(0, -1, 0, 5deg);
}
100% {
-webkit-transform: perspective(400px);
transform: perspective(400px);
}
}
@-webkit-keyframes flipOutY {
0% {
-webkit-transform: perspective(400px);
transform: perspective(400px);
}
30% {
-webkit-transform: perspective(400px) rotate3d(0, -1, 0, 15deg);
transform: perspective(400px) rotate3d(0, -1, 0, 15deg);
opacity: 1;
}
100% {
-webkit-transform: perspective(400px) rotate3d(0, -1, 0, -90deg);
transform: perspective(400px) rotate3d(0, -1, 0, -90deg);
opacity: 0;
}
}
@keyframes flipOutY {
0% {
-webkit-transform: perspective(400px);
transform: perspective(400px);
}
30% {
-webkit-transform: perspective(400px) rotate3d(0, -1, 0, 15deg);
transform: perspective(400px) rotate3d(0, -1, 0, 15deg);
opacity: 1;
}
100% {
-webkit-transform: perspective(400px) rotate3d(0, -1, 0, -90deg);
transform: perspective(400px) rotate3d(0, -1, 0, -90deg);
opacity: 0;
}
}
.alertify-notifier {
position: fixed;
width: 0;
overflow: visible;
z-index: 1982;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
.alertify-notifier .ajs-message {
position: relative;
width: 260px;
max-height: 0;
padding: 0;
opacity: 0;
margin: 0;
-webkit-transition-duration: 250ms;
transition-duration: 250ms;
-webkit-transition-timing-function: linear;
transition-timing-function: linear;
}
.alertify-notifier .ajs-message.ajs-visible {
-webkit-transition-duration: 500ms;
transition-duration: 500ms;
-webkit-transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
opacity: 1;
max-height: 100%;
padding: 15px;
margin-top: 10px;
}
.alertify-notifier.ajs-top {
top: 10px;
}
.alertify-notifier.ajs-bottom {
bottom: 10px;
}
.alertify-notifier.ajs-right {
left: 10px;
}
.alertify-notifier.ajs-right .ajs-message {
left: -320px;
}
.alertify-notifier.ajs-right .ajs-message.ajs-visible {
left: 290px;
}
.alertify-notifier.ajs-left {
right: 10px;
}
.alertify-notifier.ajs-left .ajs-message {
right: -300px;
}
.alertify-notifier.ajs-left .ajs-message.ajs-visible {
right: 0;
}
| emmy41124/cdnjs | ajax/libs/AlertifyJS/0.3.0/css/alertify.rtl.css | CSS | mit | 22,248 |
/*!
* OOjs UI v0.9.6
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2015 OOjs Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* Date: 2015-04-03T19:16:43Z
*/
.oo-ui-progressBarWidget-slide-frames from {
margin-left: -40%;
}
.oo-ui-progressBarWidget-slide-frames to {
margin-left: 100%;
}
@-webkit-keyframes oo-ui-progressBarWidget-slide {
from {
margin-left: -40%;
}
to {
margin-left: 100%;
}
}
@-moz-keyframes oo-ui-progressBarWidget-slide {
from {
margin-left: -40%;
}
to {
margin-left: 100%;
}
}
@-ms-keyframes oo-ui-progressBarWidget-slide {
from {
margin-left: -40%;
}
to {
margin-left: 100%;
}
}
@-o-keyframes oo-ui-progressBarWidget-slide {
from {
margin-left: -40%;
}
to {
margin-left: 100%;
}
}
@keyframes oo-ui-progressBarWidget-slide {
from {
margin-left: -40%;
}
to {
margin-left: 100%;
}
}
/* @noflip */
.oo-ui-rtl {
direction: rtl;
}
/* @noflip */
.oo-ui-ltr {
direction: ltr;
}
.oo-ui-element-hidden {
display: none !important;
}
.oo-ui-buttonElement > .oo-ui-buttonElement-button {
cursor: pointer;
display: inline-block;
vertical-align: middle;
font: inherit;
white-space: nowrap;
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.oo-ui-buttonElement > .oo-ui-buttonElement-button > .oo-ui-iconElement-icon,
.oo-ui-buttonElement > .oo-ui-buttonElement-button > .oo-ui-indicatorElement-indicator {
display: none;
}
.oo-ui-buttonElement.oo-ui-widget-disabled > .oo-ui-buttonElement-button {
cursor: default;
}
.oo-ui-buttonElement.oo-ui-indicatorElement > .oo-ui-buttonElement-button > .oo-ui-indicatorElement-indicator,
.oo-ui-buttonElement.oo-ui-iconElement > .oo-ui-buttonElement-button > .oo-ui-iconElement-icon {
display: inline-block;
vertical-align: middle;
background-position: center center;
background-repeat: no-repeat;
}
.oo-ui-buttonElement-frameless {
display: inline-block;
position: relative;
}
.oo-ui-buttonElement-frameless.oo-ui-labelElement > .oo-ui-buttonElement-button > .oo-ui-labelElement-label {
display: inline-block;
vertical-align: middle;
}
.oo-ui-buttonElement-framed > .oo-ui-buttonElement-button {
display: inline-block;
vertical-align: top;
text-align: center;
}
.oo-ui-buttonElement-framed.oo-ui-labelElement > .oo-ui-buttonElement-button > .oo-ui-labelElement-label {
display: inline-block;
vertical-align: middle;
}
.oo-ui-buttonElement-framed.oo-ui-widget-disabled > .oo-ui-buttonElement-button,
.oo-ui-buttonElement-framed.oo-ui-widget-disabled.oo-ui-buttonElement-active > .oo-ui-buttonElement-button,
.oo-ui-buttonElement-framed.oo-ui-widget-disabled.oo-ui-buttonElement-pressed > .oo-ui-buttonElement-button {
cursor: default;
}
.oo-ui-buttonElement > .oo-ui-buttonElement-button {
color: #333333;
}
.oo-ui-buttonElement.oo-ui-iconElement > .oo-ui-buttonElement-button > .oo-ui-iconElement-icon {
margin-left: 0;
}
.oo-ui-buttonElement.oo-ui-indicatorElement > .oo-ui-buttonElement-button > .oo-ui-indicatorElement-indicator {
width: 0.9375em;
height: 0.9375em;
margin: 0.46875em;
}
.oo-ui-buttonElement.oo-ui-iconElement > .oo-ui-buttonElement-button > .oo-ui-indicatorElement-indicator {
margin-left: 0.46875em;
}
.oo-ui-buttonElement.oo-ui-iconElement > .oo-ui-buttonElement-button > .oo-ui-iconElement-icon {
width: 1.875em;
height: 1.875em;
}
.oo-ui-buttonElement-frameless > .oo-ui-buttonElement-button > .oo-ui-iconElement-icon {
/* Don't animate opacities for now, causes wiggling in Chrome (bug 63020) */
/*.oo-ui-transition(opacity 200ms);*/
}
.oo-ui-buttonElement-frameless > .oo-ui-buttonElement-button:hover,
.oo-ui-buttonElement-frameless > .oo-ui-buttonElement-button:focus {
outline: none;
}
.oo-ui-buttonElement-frameless > .oo-ui-buttonElement-button:hover > .oo-ui-iconElement-icon,
.oo-ui-buttonElement-frameless > .oo-ui-buttonElement-button:focus > .oo-ui-iconElement-icon {
opacity: 1;
}
.oo-ui-buttonElement-frameless > .oo-ui-buttonElement-button:hover > .oo-ui-labelElement-label,
.oo-ui-buttonElement-frameless > .oo-ui-buttonElement-button:focus > .oo-ui-labelElement-label {
color: #000000;
}
.oo-ui-buttonElement-frameless > .oo-ui-buttonElement-button > .oo-ui-labelElement-label {
color: #333333;
}
.oo-ui-buttonElement-frameless.oo-ui-labelElement > .oo-ui-buttonElement-button > .oo-ui-labelElement-label {
margin-left: 0.25em;
}
.oo-ui-buttonElement-frameless.oo-ui-flaggedElement-progressive > .oo-ui-buttonElement-button > .oo-ui-labelElement-label {
color: #087ecc;
}
.oo-ui-buttonElement-frameless.oo-ui-flaggedElement-constructive > .oo-ui-buttonElement-button > .oo-ui-labelElement-label {
color: #76ab36;
}
.oo-ui-buttonElement-frameless.oo-ui-flaggedElement-destructive > .oo-ui-buttonElement-button > .oo-ui-labelElement-label {
color: #d45353;
}
.oo-ui-buttonElement-frameless.oo-ui-widget-disabled > .oo-ui-buttonElement-button > .oo-ui-iconElement-icon {
opacity: 0.2;
}
.oo-ui-buttonElement-frameless.oo-ui-widget-disabled > .oo-ui-buttonElement-button > .oo-ui-labelElement-label {
color: #cccccc;
}
.oo-ui-buttonElement-framed > .oo-ui-buttonElement-button {
margin: 0.1em 0;
padding: 0.2em 0.8em;
border-radius: 0.3em;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
border: 1px #c9c9c9 solid;
-webkit-transition: border-color 100ms ease-in-out;
-moz-transition: border-color 100ms ease-in-out;
-ms-transition: border-color 100ms ease-in-out;
-o-transition: border-color 100ms ease-in-out;
transition: border-color 100ms ease-in-out;
background: #eeeeee;
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#ffffff', endColorstr='#dddddd');
background-image: -webkit-gradient(linear, right top, right bottom, color-stop(0%, #ffffff), color-stop(100%, #dddddd));
background-image: -webkit-linear-gradient(top, #ffffff 0%, #dddddd 100%);
background-image: -moz-linear-gradient(top, #ffffff 0%, #dddddd 100%);
background-image: -ms-linear-gradient(top, #ffffff 0%, #dddddd 100%);
background-image: -o-linear-gradient(top, #ffffff 0%, #dddddd 100%);
background-image: linear-gradient(top, #ffffff 0%, #dddddd 100%);
}
.oo-ui-buttonElement-framed > .oo-ui-buttonElement-button:hover,
.oo-ui-buttonElement-framed > .oo-ui-buttonElement-button:focus {
border-color: #aaaaaa;
outline: none;
}
.oo-ui-buttonElement-framed > input.oo-ui-buttonElement-button,
.oo-ui-buttonElement-framed.oo-ui-labelElement > .oo-ui-buttonElement-button > .oo-ui-labelElement-label {
line-height: 1.875em;
}
.oo-ui-buttonElement-framed.oo-ui-widget-enabled > .oo-ui-buttonElement-button:active,
.oo-ui-buttonElement-framed.oo-ui-buttonElement-active > .oo-ui-buttonElement-button,
.oo-ui-buttonElement-framed.oo-ui-buttonElement-pressed > .oo-ui-buttonElement-button {
box-shadow: inset 0 1px 4px 0 rgba(0, 0, 0, 0.07);
color: black;
border-color: #c9c9c9;
background: #eeeeee;
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#dddddd', endColorstr='#ffffff');
background-image: -webkit-gradient(linear, right top, right bottom, color-stop(0%, #dddddd), color-stop(100%, #ffffff));
background-image: -webkit-linear-gradient(top, #dddddd 0%, #ffffff 100%);
background-image: -moz-linear-gradient(top, #dddddd 0%, #ffffff 100%);
background-image: -ms-linear-gradient(top, #dddddd 0%, #ffffff 100%);
background-image: -o-linear-gradient(top, #dddddd 0%, #ffffff 100%);
background-image: linear-gradient(top, #dddddd 0%, #ffffff 100%);
}
.oo-ui-buttonElement-framed.oo-ui-iconElement > .oo-ui-buttonElement-button > .oo-ui-iconElement-icon {
margin-left: -0.5em;
margin-right: -0.5em;
}
.oo-ui-buttonElement-framed.oo-ui-iconElement.oo-ui-labelElement > .oo-ui-buttonElement-button > .oo-ui-iconElement-icon {
margin-right: 0.3em;
}
.oo-ui-buttonElement-framed.oo-ui-indicatorElement > .oo-ui-buttonElement-button > .oo-ui-indicatorElement-indicator {
/* -0.5 - 0.475 */
margin-left: -0.005em;
margin-right: -0.005em;
}
.oo-ui-buttonElement-framed.oo-ui-indicatorElement.oo-ui-labelElement > .oo-ui-buttonElement-button > .oo-ui-indicatorElement-indicator,
.oo-ui-buttonElement-framed.oo-ui-indicatorElement.oo-ui-iconElement:not( .oo-ui-labelElement ) > .oo-ui-buttonElement-button > .oo-ui-indicatorElement-indicator {
margin-left: 0.46875em;
margin-right: -0.275em;
}
.oo-ui-buttonElement-framed.oo-ui-flaggedElement-progressive > .oo-ui-buttonElement-button {
border: 1px solid #a6cee1;
background: #cde7f4;
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#eaf4fa', endColorstr='#b0d9ee');
background-image: -webkit-gradient(linear, right top, right bottom, color-stop(0%, #eaf4fa), color-stop(100%, #b0d9ee));
background-image: -webkit-linear-gradient(top, #eaf4fa 0%, #b0d9ee 100%);
background-image: -moz-linear-gradient(top, #eaf4fa 0%, #b0d9ee 100%);
background-image: -ms-linear-gradient(top, #eaf4fa 0%, #b0d9ee 100%);
background-image: -o-linear-gradient(top, #eaf4fa 0%, #b0d9ee 100%);
background-image: linear-gradient(top, #eaf4fa 0%, #b0d9ee 100%);
}
.oo-ui-buttonElement-framed.oo-ui-flaggedElement-progressive > .oo-ui-buttonElement-button:hover,
.oo-ui-buttonElement-framed.oo-ui-flaggedElement-progressive > .oo-ui-buttonElement-button:focus {
border-color: #9dc2d4;
}
.oo-ui-buttonElement-framed.oo-ui-flaggedElement-progressive.oo-ui-widget-enabled > .oo-ui-buttonElement-button:active,
.oo-ui-buttonElement-framed.oo-ui-flaggedElement-progressive.oo-ui-buttonElement-active > .oo-ui-buttonElement-button,
.oo-ui-buttonElement-framed.oo-ui-flaggedElement-progressive.oo-ui-buttonElement-pressed > .oo-ui-buttonElement-button {
border: 1px solid #a6cee1;
background: #cde7f4;
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#b0d9ee', endColorstr='#eaf4fa');
background-image: -webkit-gradient(linear, right top, right bottom, color-stop(0%, #b0d9ee), color-stop(100%, #eaf4fa));
background-image: -webkit-linear-gradient(top, #b0d9ee 0%, #eaf4fa 100%);
background-image: -moz-linear-gradient(top, #b0d9ee 0%, #eaf4fa 100%);
background-image: -ms-linear-gradient(top, #b0d9ee 0%, #eaf4fa 100%);
background-image: -o-linear-gradient(top, #b0d9ee 0%, #eaf4fa 100%);
background-image: linear-gradient(top, #b0d9ee 0%, #eaf4fa 100%);
}
.oo-ui-buttonElement-framed.oo-ui-flaggedElement-constructive > .oo-ui-buttonElement-button {
border: 1px solid #b8d892;
background: #daf0be;
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#f0fbe1', endColorstr='#c3e59a');
background-image: -webkit-gradient(linear, right top, right bottom, color-stop(0%, #f0fbe1), color-stop(100%, #c3e59a));
background-image: -webkit-linear-gradient(top, #f0fbe1 0%, #c3e59a 100%);
background-image: -moz-linear-gradient(top, #f0fbe1 0%, #c3e59a 100%);
background-image: -ms-linear-gradient(top, #f0fbe1 0%, #c3e59a 100%);
background-image: -o-linear-gradient(top, #f0fbe1 0%, #c3e59a 100%);
background-image: linear-gradient(top, #f0fbe1 0%, #c3e59a 100%);
}
.oo-ui-buttonElement-framed.oo-ui-flaggedElement-constructive > .oo-ui-buttonElement-button:hover,
.oo-ui-buttonElement-framed.oo-ui-flaggedElement-constructive > .oo-ui-buttonElement-button:focus {
border-color: #adcb89;
}
.oo-ui-buttonElement-framed.oo-ui-flaggedElement-constructive.oo-ui-widget-enabled > .oo-ui-buttonElement-button:active,
.oo-ui-buttonElement-framed.oo-ui-flaggedElement-constructive.oo-ui-buttonElement-active > .oo-ui-buttonElement-button,
.oo-ui-buttonElement-framed.oo-ui-flaggedElement-constructive.oo-ui-buttonElement-pressed > .oo-ui-buttonElement-button {
border: 1px solid #b8d892;
background: #daf0be;
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#c3e59a', endColorstr='#f0fbe1');
background-image: -webkit-gradient(linear, right top, right bottom, color-stop(0%, #c3e59a), color-stop(100%, #f0fbe1));
background-image: -webkit-linear-gradient(top, #c3e59a 0%, #f0fbe1 100%);
background-image: -moz-linear-gradient(top, #c3e59a 0%, #f0fbe1 100%);
background-image: -ms-linear-gradient(top, #c3e59a 0%, #f0fbe1 100%);
background-image: -o-linear-gradient(top, #c3e59a 0%, #f0fbe1 100%);
background-image: linear-gradient(top, #c3e59a 0%, #f0fbe1 100%);
}
.oo-ui-buttonElement-framed.oo-ui-flaggedElement-destructive > .oo-ui-buttonElement-button {
color: #d45353;
}
.oo-ui-buttonElement-framed.oo-ui-widget-disabled > .oo-ui-buttonElement-button,
.oo-ui-buttonElement-framed.oo-ui-widget-disabled.oo-ui-buttonElement-active > .oo-ui-buttonElement-button,
.oo-ui-buttonElement-framed.oo-ui-widget-disabled.oo-ui-buttonElement-pressed > .oo-ui-buttonElement-button {
opacity: 0.5;
-webkit-transform: translate3d(0, 0, 0);
box-shadow: none;
color: #333333;
background: #eeeeee;
border-color: #cccccc;
}
.oo-ui-buttonElement-framed.oo-ui-widget-disabled > .oo-ui-buttonElement-button:hover,
.oo-ui-buttonElement-framed.oo-ui-widget-disabled.oo-ui-buttonElement-active > .oo-ui-buttonElement-button:hover,
.oo-ui-buttonElement-framed.oo-ui-widget-disabled.oo-ui-buttonElement-pressed > .oo-ui-buttonElement-button:hover,
.oo-ui-buttonElement-framed.oo-ui-widget-disabled > .oo-ui-buttonElement-button:focus,
.oo-ui-buttonElement-framed.oo-ui-widget-disabled.oo-ui-buttonElement-active > .oo-ui-buttonElement-button:focus,
.oo-ui-buttonElement-framed.oo-ui-widget-disabled.oo-ui-buttonElement-pressed > .oo-ui-buttonElement-button:focus {
border-color: #cccccc;
box-shadow: none;
}
.oo-ui-clippableElement-clippable {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.oo-ui-draggableElement {
cursor: -webkit-grab -moz-grab, url(images/grab.cur), move;
/*
* HACK: In order to style horizontally, we must override
* OO.ui.OptionWidget's display rule that is currently set
* to be 'block'
*/
}
.oo-ui-draggableElement-dragging {
cursor: -webkit-grabbing -moz-grabbing, url(images/grabbing.cur), move;
background: rgba(0, 0, 0, 0.2);
opacity: 0.4;
}
.oo-ui-draggableGroupElement-horizontal .oo-ui-draggableElement.oo-ui-optionWidget {
display: inline-block;
}
.oo-ui-draggableGroupElement-placeholder {
position: absolute;
display: block;
background: rgba(0, 0, 0, 0.4);
}
.oo-ui-iconElement .oo-ui-iconElement-icon,
.oo-ui-iconElement.oo-ui-iconElement-icon {
opacity: 0.8;
background-size: contain;
background-position: center center;
}
.oo-ui-indicatorElement .oo-ui-indicatorElement-indicator,
.oo-ui-indicatorElement.oo-ui-indicatorElement-indicator {
opacity: 0.8;
background-size: contain;
background-position: center center;
}
.oo-ui-lookupElement > .oo-ui-menuSelectWidget {
z-index: 1;
width: 100%;
}
.oo-ui-bookletLayout-stackLayout.oo-ui-stackLayout-continuous > .oo-ui-panelLayout-scrollable {
overflow-y: hidden;
}
.oo-ui-bookletLayout-stackLayout > .oo-ui-panelLayout {
width: 100%;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.oo-ui-bookletLayout-stackLayout > .oo-ui-panelLayout-scrollable {
overflow-y: auto;
}
.oo-ui-bookletLayout-stackLayout > .oo-ui-panelLayout-padded {
padding: 2em;
}
.oo-ui-bookletLayout-outlinePanel-editable > .oo-ui-outlineSelectWidget {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 3em;
overflow-y: auto;
}
.oo-ui-bookletLayout-outlinePanel > .oo-ui-outlineControlsWidget {
position: absolute;
bottom: 0;
left: 0;
right: 0;
}
.oo-ui-bookletLayout-stackLayout > .oo-ui-panelLayout {
padding: 1.5em;
}
.oo-ui-bookletLayout-outlinePanel {
border-right: 1px solid #dddddd;
}
.oo-ui-bookletLayout-outlinePanel > .oo-ui-outlineControlsWidget {
box-shadow: 0 0 0.25em rgba(0, 0, 0, 0.25);
}
.oo-ui-fieldLayout {
display: block;
margin-bottom: 1em;
}
.oo-ui-fieldLayout:before,
.oo-ui-fieldLayout:after {
content: " ";
display: table;
}
.oo-ui-fieldLayout:after {
clear: both;
}
.oo-ui-fieldLayout.oo-ui-fieldLayout-align-left > .oo-ui-fieldLayout-body > .oo-ui-labelElement-label,
.oo-ui-fieldLayout.oo-ui-fieldLayout-align-right > .oo-ui-fieldLayout-body > .oo-ui-labelElement-label,
.oo-ui-fieldLayout.oo-ui-fieldLayout-align-left > .oo-ui-fieldLayout-body > .oo-ui-fieldLayout-field,
.oo-ui-fieldLayout.oo-ui-fieldLayout-align-right > .oo-ui-fieldLayout-body > .oo-ui-fieldLayout-field {
display: block;
float: left;
}
.oo-ui-fieldLayout.oo-ui-fieldLayout-align-right > .oo-ui-fieldLayout-body > .oo-ui-labelElement-label {
text-align: right;
}
.oo-ui-fieldLayout.oo-ui-fieldLayout-align-inline > .oo-ui-fieldLayout-body {
display: table;
}
.oo-ui-fieldLayout.oo-ui-fieldLayout-align-inline > .oo-ui-fieldLayout-body > .oo-ui-labelElement-label,
.oo-ui-fieldLayout.oo-ui-fieldLayout-align-inline > .oo-ui-fieldLayout-body > .oo-ui-fieldLayout-field {
display: table-cell;
vertical-align: middle;
}
.oo-ui-fieldLayout.oo-ui-labelElement.oo-ui-fieldLayout-align-top > .oo-ui-fieldLayout-body > .oo-ui-labelElement-label {
display: inline-block;
}
.oo-ui-fieldLayout > .oo-ui-fieldLayout-help {
float: right;
}
.oo-ui-fieldLayout > .oo-ui-fieldLayout-help > .oo-ui-popupWidget > .oo-ui-popupWidget-popup {
z-index: 1;
}
.oo-ui-fieldLayout > .oo-ui-fieldLayout-help .oo-ui-fieldLayout-help-content {
padding: 0.5em 0.75em;
line-height: 1.5em;
}
.oo-ui-fieldLayout:last-child {
margin-bottom: 0;
}
.oo-ui-fieldLayout.oo-ui-fieldLayout-align-left.oo-ui-labelElement > .oo-ui-fieldLayout-body > .oo-ui-labelElement-label,
.oo-ui-fieldLayout.oo-ui-fieldLayout-align-right.oo-ui-labelElement > .oo-ui-fieldLayout-body > .oo-ui-labelElement-label {
padding-top: 0.5em;
margin-right: 5%;
width: 35%;
}
.oo-ui-fieldLayout.oo-ui-fieldLayout-align-left > .oo-ui-fieldLayout-body > .oo-ui-fieldLayout-field,
.oo-ui-fieldLayout.oo-ui-fieldLayout-align-right > .oo-ui-fieldLayout-body > .oo-ui-fieldLayout-field {
width: 60%;
}
.oo-ui-fieldLayout.oo-ui-fieldLayout-align-inline.oo-ui-labelElement > .oo-ui-fieldLayout-body > .oo-ui-labelElement-label {
padding: 0.5em;
}
.oo-ui-fieldLayout.oo-ui-fieldLayout-align-inline > .oo-ui-fieldLayout-body > .oo-ui-fieldLayout-field {
padding: 0.5em 0;
}
.oo-ui-fieldLayout.oo-ui-fieldLayout-align-top.oo-ui-labelElement > .oo-ui-fieldLayout-body > .oo-ui-labelElement-label {
padding: 0.5em 0;
}
.oo-ui-fieldLayout > .oo-ui-popupButtonWidget {
margin-right: 0;
margin-top: 0.25em;
}
.oo-ui-fieldLayout > .oo-ui-popupButtonWidget:last-child {
margin-right: 0;
}
.oo-ui-fieldLayout-disabled .oo-ui-labelElement-label {
color: #cccccc;
}
.oo-ui-actionFieldLayout-field {
display: table;
table-layout: fixed;
width: 100%;
}
.oo-ui-actionFieldLayout-input,
.oo-ui-actionFieldLayout-button {
display: table-cell;
vertical-align: middle;
}
.oo-ui-actionFieldLayout-input {
padding-right: 1em;
}
.oo-ui-actionFieldLayout-button {
width: 1%;
white-space: nowrap;
}
.oo-ui-fieldsetLayout {
position: relative;
margin: 0;
padding: 0;
border: none;
}
.oo-ui-fieldsetLayout.oo-ui-iconElement > .oo-ui-iconElement-icon {
display: block;
position: absolute;
background-position: center center;
background-repeat: no-repeat;
}
.oo-ui-fieldsetLayout.oo-ui-labelElement > .oo-ui-labelElement-label {
display: inline-block;
}
.oo-ui-fieldsetLayout > .oo-ui-fieldsetLayout-help {
float: right;
}
.oo-ui-fieldsetLayout > .oo-ui-fieldsetLayout-help > .oo-ui-popupWidget > .oo-ui-popupWidget-popup {
z-index: 1;
}
.oo-ui-fieldsetLayout > .oo-ui-fieldsetLayout-help .oo-ui-fieldsetLayout-help-content {
padding: 0.5em 0.75em;
line-height: 1.5em;
}
.oo-ui-fieldsetLayout + .oo-ui-fieldsetLayout,
.oo-ui-fieldsetLayout + .oo-ui-formLayout {
margin-top: 2em;
}
.oo-ui-fieldsetLayout > .oo-ui-labelElement-label {
font-size: 1.1em;
margin-bottom: 0.5em;
padding: 0.25em 0;
font-weight: bold;
}
.oo-ui-fieldsetLayout.oo-ui-iconElement > .oo-ui-labelElement-label {
padding-left: 2em;
line-height: 1.8em;
}
.oo-ui-fieldsetLayout.oo-ui-iconElement > .oo-ui-iconElement-icon {
left: 0;
top: 0.25em;
width: 1.875em;
height: 1.875em;
}
.oo-ui-fieldsetLayout > .oo-ui-popupButtonWidget {
margin-right: 0;
}
.oo-ui-fieldsetLayout > .oo-ui-popupButtonWidget:last-child {
margin-right: 0;
}
.oo-ui-formLayout + .oo-ui-fieldsetLayout,
.oo-ui-formLayout + .oo-ui-formLayout {
margin-top: 2em;
}
.oo-ui-menuLayout {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.oo-ui-menuLayout-menu,
.oo-ui-menuLayout-content {
position: absolute;
-webkit-transition: all ease-in-out 200ms;
-moz-transition: all ease-in-out 200ms;
-ms-transition: all ease-in-out 200ms;
-o-transition: all ease-in-out 200ms;
transition: all ease-in-out 200ms;
}
.oo-ui-menuLayout-content {
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.oo-ui-menuLayout-top .oo-ui-menuLayout-menu {
left: 0;
top: 0;
right: 0;
}
.oo-ui-menuLayout-top .oo-ui-menuLayout-content {
right: 0 !important;
bottom: 0 !important;
left: 0 !important;
}
.oo-ui-menuLayout-after .oo-ui-menuLayout-menu {
top: 0;
right: 0;
bottom: 0;
}
.oo-ui-menuLayout-after .oo-ui-menuLayout-content {
bottom: 0 !important;
left: 0 !important;
top: 0 !important;
}
.oo-ui-menuLayout-bottom .oo-ui-menuLayout-menu {
right: 0;
bottom: 0;
left: 0;
}
.oo-ui-menuLayout-bottom .oo-ui-menuLayout-content {
left: 0 !important;
top: 0 !important;
right: 0 !important;
}
.oo-ui-menuLayout-before .oo-ui-menuLayout-menu {
bottom: 0;
left: 0;
top: 0;
}
.oo-ui-menuLayout-before .oo-ui-menuLayout-content {
top: 0 !important;
right: 0 !important;
bottom: 0 !important;
}
.oo-ui-panelLayout {
position: relative;
}
.oo-ui-panelLayout-scrollable {
overflow-y: auto;
}
.oo-ui-panelLayout-expanded {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.oo-ui-panelLayout-padded {
padding: 1.25em;
}
.oo-ui-panelLayout-framed {
border-radius: 0.5em;
box-shadow: 0 0.25em 1em rgba(0, 0, 0, 0.25);
}
.oo-ui-stackLayout-continuous > .oo-ui-panelLayout {
display: block;
position: relative;
}
.oo-ui-popupTool .oo-ui-popupWidget-popup,
.oo-ui-popupTool .oo-ui-popupWidget-anchor {
z-index: 4;
}
.oo-ui-popupTool .oo-ui-popupWidget {
/* @noflip */
margin-left: 1.25em;
font-size: 0.8em;
}
.oo-ui-toolGroupTool > .oo-ui-popupToolGroup {
border: 0;
border-radius: 0;
margin: 0;
}
.oo-ui-toolGroupTool:first-child > .oo-ui-popupToolGroup {
border-top-left-radius: 0.25em;
border-bottom-left-radius: 0.25em;
}
.oo-ui-toolGroupTool:last-child > .oo-ui-popupToolGroup {
border-top-right-radius: 0.25em;
border-bottom-right-radius: 0.25em;
}
.oo-ui-toolGroupTool > .oo-ui-popupToolGroup > .oo-ui-popupToolGroup-handle {
height: 1.5em;
padding: 0.25em;
}
.oo-ui-toolGroupTool > .oo-ui-popupToolGroup > .oo-ui-popupToolGroup-handle .oo-ui-iconElement-icon {
height: 1.5em;
width: 1.5em;
}
.oo-ui-toolGroupTool > .oo-ui-popupToolGroup.oo-ui-labelElement > .oo-ui-popupToolGroup-handle .oo-ui-labelElement-label {
line-height: 2.1em;
}
.oo-ui-toolGroup {
display: inline-block;
vertical-align: middle;
margin: 0.3em;
border-radius: 0.25em;
border: 1px solid transparent;
-webkit-transition: border-color 300ms ease-in-out;
-moz-transition: border-color 300ms ease-in-out;
-ms-transition: border-color 300ms ease-in-out;
-o-transition: border-color 300ms ease-in-out;
transition: border-color 300ms ease-in-out;
}
.oo-ui-toolGroup-empty {
display: none;
}
.oo-ui-toolGroup .oo-ui-tool-link .oo-ui-iconElement-icon {
background-position: center center;
background-repeat: no-repeat;
}
.oo-ui-toolbar-narrow .oo-ui-toolGroup + .oo-ui-toolGroup {
margin-left: 0;
}
.oo-ui-toolGroup.oo-ui-widget-enabled:hover {
border-color: rgba(0, 0, 0, 0.1);
}
.oo-ui-toolGroup.oo-ui-widget-enabled .oo-ui-tool-link .oo-ui-tool-title {
color: #000000;
}
.oo-ui-barToolGroup > .oo-ui-iconElement-icon,
.oo-ui-barToolGroup > .oo-ui-labelElement-label {
display: none;
}
.oo-ui-barToolGroup > .oo-ui-toolGroup-tools > .oo-ui-tool {
display: inline-block;
position: relative;
vertical-align: top;
}
.oo-ui-barToolGroup > .oo-ui-toolGroup-tools > .oo-ui-tool > .oo-ui-tool-link {
display: block;
}
.oo-ui-barToolGroup > .oo-ui-toolGroup-tools > .oo-ui-tool > .oo-ui-tool-link .oo-ui-iconElement-icon {
display: block;
}
.oo-ui-barToolGroup > .oo-ui-toolGroup-tools > .oo-ui-tool > .oo-ui-tool-link .oo-ui-tool-accel,
.oo-ui-barToolGroup > .oo-ui-toolGroup-tools > .oo-ui-tool > .oo-ui-tool-link .oo-ui-tool-title {
display: none;
}
.oo-ui-barToolGroup > .oo-ui-toolGroup-tools > .oo-ui-tool.oo-ui-widget-disabled > .oo-ui-tool-link {
cursor: default;
}
.oo-ui-barToolGroup > .oo-ui-toolGroup-tools > .oo-ui-tool > .oo-ui-tool-link > .oo-ui-tool-title,
.oo-ui-barToolGroup > .oo-ui-toolGroup-tools > .oo-ui-tool > .oo-ui-tool-link > .oo-ui-tool-accel {
display: none;
}
.oo-ui-barToolGroup.oo-ui-widget-enabled > .oo-ui-toolGroup-tools > .oo-ui-tool > .oo-ui-tool-link {
cursor: pointer;
}
.oo-ui-barToolGroup > .oo-ui-toolGroup-tools > .oo-ui-tool {
margin: -1px 0 -1px -1px;
border: 1px solid transparent;
}
.oo-ui-barToolGroup > .oo-ui-toolGroup-tools > .oo-ui-tool:first-child {
border-top-left-radius: 0.25em;
border-bottom-left-radius: 0.25em;
}
.oo-ui-barToolGroup > .oo-ui-toolGroup-tools > .oo-ui-tool:last-child {
margin-right: -1px;
border-top-right-radius: 0.25em;
border-bottom-right-radius: 0.25em;
}
.oo-ui-barToolGroup > .oo-ui-toolGroup-tools > .oo-ui-tool > .oo-ui-tool-link {
height: 1.5em;
padding: 0.25em;
}
.oo-ui-barToolGroup > .oo-ui-toolGroup-tools > .oo-ui-tool > .oo-ui-tool-link .oo-ui-iconElement-icon {
height: 1.5em;
width: 1.5em;
}
.oo-ui-barToolGroup.oo-ui-widget-enabled > .oo-ui-toolGroup-tools > .oo-ui-tool.oo-ui-widget-enabled:hover {
border-color: rgba(0, 0, 0, 0.2);
}
.oo-ui-barToolGroup.oo-ui-widget-enabled > .oo-ui-toolGroup-tools > .oo-ui-tool.oo-ui-tool-active.oo-ui-widget-enabled {
border-color: rgba(0, 0, 0, 0.2);
box-shadow: inset 0 0.07em 0.07em 0 rgba(0, 0, 0, 0.07);
background: #f8fbfd;
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#f1f7fb', endColorstr='#ffffff');
background-image: -webkit-gradient(linear, right top, right bottom, color-stop(0%, #f1f7fb), color-stop(100%, #ffffff));
background-image: -webkit-linear-gradient(top, #f1f7fb 0%, #ffffff 100%);
background-image: -moz-linear-gradient(top, #f1f7fb 0%, #ffffff 100%);
background-image: -ms-linear-gradient(top, #f1f7fb 0%, #ffffff 100%);
background-image: -o-linear-gradient(top, #f1f7fb 0%, #ffffff 100%);
background-image: linear-gradient(top, #f1f7fb 0%, #ffffff 100%);
}
.oo-ui-barToolGroup.oo-ui-widget-enabled > .oo-ui-toolGroup-tools > .oo-ui-tool.oo-ui-tool-active.oo-ui-widget-enabled + .oo-ui-tool-active.oo-ui-widget-enabled {
border-left-color: rgba(0, 0, 0, 0.1);
}
.oo-ui-barToolGroup.oo-ui-widget-enabled > .oo-ui-toolGroup-tools > .oo-ui-tool.oo-ui-widget-disabled > .oo-ui-tool-link .oo-ui-iconElement-icon {
opacity: 0.2;
}
.oo-ui-barToolGroup.oo-ui-widget-enabled > .oo-ui-toolGroup-tools > .oo-ui-tool.oo-ui-widget-enabled:hover > .oo-ui-tool-link .oo-ui-iconElement-icon {
opacity: 1;
}
.oo-ui-barToolGroup.oo-ui-widget-disabled > .oo-ui-toolGroup-tools > .oo-ui-tool > .oo-ui-tool-link .oo-ui-iconElement-icon {
opacity: 0.2;
}
.oo-ui-popupToolGroup {
position: relative;
height: 2em;
min-width: 2em;
}
.oo-ui-popupToolGroup-handle {
display: block;
cursor: pointer;
}
.oo-ui-popupToolGroup-handle .oo-ui-indicatorElement-indicator,
.oo-ui-popupToolGroup-handle .oo-ui-iconElement-icon {
position: absolute;
background-position: center center;
background-repeat: no-repeat;
}
.oo-ui-popupToolGroup.oo-ui-widget-disabled .oo-ui-popupToolGroup-handle {
cursor: default;
}
.oo-ui-popupToolGroup .oo-ui-toolGroup-tools {
display: none;
position: absolute;
z-index: 4;
}
.oo-ui-popupToolGroup .oo-ui-toolGroup-tools .oo-ui-iconElement-icon {
background-repeat: no-repeat;
background-position: center center;
}
.oo-ui-popupToolGroup-active.oo-ui-widget-enabled > .oo-ui-toolGroup-tools {
display: block;
}
.oo-ui-popupToolGroup-left > .oo-ui-toolGroup-tools {
left: 0;
}
.oo-ui-popupToolGroup-right > .oo-ui-toolGroup-tools {
right: 0;
}
.oo-ui-popupToolGroup .oo-ui-tool-link {
display: table;
width: 100%;
vertical-align: middle;
white-space: nowrap;
text-decoration: none;
}
.oo-ui-popupToolGroup .oo-ui-tool-link .oo-ui-iconElement-icon,
.oo-ui-popupToolGroup .oo-ui-tool-link .oo-ui-tool-accel,
.oo-ui-popupToolGroup .oo-ui-tool-link .oo-ui-tool-title {
display: table-cell;
vertical-align: middle;
}
.oo-ui-popupToolGroup .oo-ui-tool-link .oo-ui-tool-accel {
text-align: right;
}
.oo-ui-popupToolGroup .oo-ui-tool-link .oo-ui-tool-accel:not(:empty) {
padding-left: 3em;
}
.oo-ui-toolbar-narrow .oo-ui-popupToolGroup {
min-width: 1.5em;
}
.oo-ui-popupToolGroup.oo-ui-iconElement {
min-width: 2.5em;
}
.oo-ui-toolbar-narrow .oo-ui-popupToolGroup.oo-ui-iconElement {
min-width: 2em;
}
.oo-ui-popupToolGroup.oo-ui-indicatorElement.oo-ui-iconElement {
min-width: 3.5em;
}
.oo-ui-toolbar-narrow .oo-ui-popupToolGroup.oo-ui-indicatorElement.oo-ui-iconElement {
min-width: 3em;
}
.oo-ui-popupToolGroup.oo-ui-labelElement .oo-ui-popupToolGroup-handle .oo-ui-labelElement-label {
line-height: 2.6em;
font-size: 0.8em;
margin: 0 1em;
}
.oo-ui-toolbar-narrow .oo-ui-popupToolGroup.oo-ui-labelElement .oo-ui-popupToolGroup-handle .oo-ui-labelElement-label {
margin: 0 0.5em;
}
.oo-ui-popupToolGroup.oo-ui-labelElement.oo-ui-iconElement .oo-ui-popupToolGroup-handle .oo-ui-labelElement-label {
margin-left: 3em;
}
.oo-ui-toolbar-narrow .oo-ui-popupToolGroup.oo-ui-labelElement.oo-ui-iconElement .oo-ui-popupToolGroup-handle .oo-ui-labelElement-label {
margin-left: 2.5em;
}
.oo-ui-popupToolGroup.oo-ui-labelElement.oo-ui-indicatorElement .oo-ui-popupToolGroup-handle .oo-ui-labelElement-label {
margin-right: 2.25em;
}
.oo-ui-toolbar-narrow .oo-ui-popupToolGroup.oo-ui-labelElement.oo-ui-indicatorElement .oo-ui-popupToolGroup-handle .oo-ui-labelElement-label {
margin-right: 1.75em;
}
.oo-ui-popupToolGroup-handle .oo-ui-indicatorElement-indicator {
width: 0.75em;
height: 0.75em;
margin: 0.625em;
top: 0;
right: 0;
}
.oo-ui-toolbar-narrow .oo-ui-popupToolGroup-handle .oo-ui-indicatorElement-indicator {
right: -0.25em;
}
.oo-ui-popupToolGroup-handle .oo-ui-iconElement-icon {
width: 1.5em;
height: 1.5em;
margin: 0.25em;
top: 0;
left: 0.25em;
}
.oo-ui-toolbar-narrow .oo-ui-popupToolGroup-handle .oo-ui-iconElement-icon {
left: 0;
}
.oo-ui-popupToolGroup-header {
line-height: 2.6em;
font-size: 0.8em;
margin: 0 0.6em;
font-weight: bold;
}
.oo-ui-popupToolGroup-active.oo-ui-widget-enabled {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
box-shadow: inset 0 0.07em 0.07em 0 rgba(0, 0, 0, 0.07);
background: #f8fbfd;
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#f1f7fb', endColorstr='#ffffff');
background-image: -webkit-gradient(linear, right top, right bottom, color-stop(0%, #f1f7fb), color-stop(100%, #ffffff));
background-image: -webkit-linear-gradient(top, #f1f7fb 0%, #ffffff 100%);
background-image: -moz-linear-gradient(top, #f1f7fb 0%, #ffffff 100%);
background-image: -ms-linear-gradient(top, #f1f7fb 0%, #ffffff 100%);
background-image: -o-linear-gradient(top, #f1f7fb 0%, #ffffff 100%);
background-image: linear-gradient(top, #f1f7fb 0%, #ffffff 100%);
}
.oo-ui-popupToolGroup .oo-ui-toolGroup-tools {
top: 2em;
margin: 0 -1px;
border: 1px solid #cccccc;
background-color: white;
box-shadow: 0 0.25em 1em rgba(0, 0, 0, 0.25);
}
.oo-ui-popupToolGroup .oo-ui-tool-link {
padding: 0.25em 0 0.25em 0.25em;
}
.oo-ui-popupToolGroup .oo-ui-tool-link .oo-ui-iconElement-icon {
height: 1.5em;
width: 1.5em;
min-width: 1.5em;
}
.oo-ui-popupToolGroup .oo-ui-tool-link .oo-ui-tool-title {
padding-left: 0.5em;
}
.oo-ui-popupToolGroup .oo-ui-tool-link .oo-ui-tool-accel,
.oo-ui-popupToolGroup .oo-ui-tool-link .oo-ui-tool-title {
line-height: 2em;
font-size: 0.8em;
}
.oo-ui-popupToolGroup .oo-ui-tool-link .oo-ui-tool-accel {
color: #888888;
}
.oo-ui-listToolGroup .oo-ui-tool {
display: block;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.oo-ui-listToolGroup .oo-ui-tool-link {
cursor: pointer;
}
.oo-ui-listToolGroup .oo-ui-tool.oo-ui-widget-disabled .oo-ui-tool-link {
cursor: default;
}
.oo-ui-listToolGroup .oo-ui-toolGroup-tools {
padding: 0.25em;
}
.oo-ui-listToolGroup.oo-ui-popupToolGroup-active {
border-color: rgba(0, 0, 0, 0.2);
}
.oo-ui-listToolGroup .oo-ui-tool {
border: 1px solid transparent;
margin: -1px 0;
padding: 0 0.5em 0 0;
}
.oo-ui-listToolGroup .oo-ui-tool-active.oo-ui-widget-enabled {
border-color: rgba(0, 0, 0, 0.1);
box-shadow: inset 0 0.07em 0.07em 0 rgba(0, 0, 0, 0.07);
background: #f8fbfd;
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#f1f7fb', endColorstr='#ffffff');
background-image: -webkit-gradient(linear, right top, right bottom, color-stop(0%, #f1f7fb), color-stop(100%, #ffffff));
background-image: -webkit-linear-gradient(top, #f1f7fb 0%, #ffffff 100%);
background-image: -moz-linear-gradient(top, #f1f7fb 0%, #ffffff 100%);
background-image: -ms-linear-gradient(top, #f1f7fb 0%, #ffffff 100%);
background-image: -o-linear-gradient(top, #f1f7fb 0%, #ffffff 100%);
background-image: linear-gradient(top, #f1f7fb 0%, #ffffff 100%);
}
.oo-ui-listToolGroup .oo-ui-tool-active.oo-ui-widget-enabled + .oo-ui-tool-active.oo-ui-widget-enabled {
border-top-color: rgba(0, 0, 0, 0.1);
}
.oo-ui-listToolGroup .oo-ui-tool-active.oo-ui-widget-enabled:hover {
border-color: rgba(0, 0, 0, 0.2);
}
.oo-ui-listToolGroup .oo-ui-tool.oo-ui-widget-enabled:hover {
border-color: rgba(0, 0, 0, 0.2);
}
.oo-ui-listToolGroup .oo-ui-tool.oo-ui-widget-enabled:hover .oo-ui-tool-link .oo-ui-iconElement-icon {
opacity: 1;
}
.oo-ui-listToolGroup .oo-ui-tool.oo-ui-widget-disabled .oo-ui-tool-link .oo-ui-tool-title {
color: #cccccc;
}
.oo-ui-listToolGroup .oo-ui-tool.oo-ui-widget-disabled .oo-ui-tool-link .oo-ui-tool-accel {
color: #dddddd;
}
.oo-ui-listToolGroup .oo-ui-tool.oo-ui-widget-disabled .oo-ui-tool-link .oo-ui-iconElement-icon {
opacity: 0.2;
}
.oo-ui-listToolGroup.oo-ui-widget-disabled {
color: #cccccc;
}
.oo-ui-listToolGroup.oo-ui-widget-disabled .oo-ui-indicatorElement-indicator,
.oo-ui-listToolGroup.oo-ui-widget-disabled .oo-ui-iconElement-icon {
opacity: 0.2;
}
.oo-ui-menuToolGroup {
border-color: rgba(0, 0, 0, 0.1);
}
.oo-ui-menuToolGroup .oo-ui-tool {
display: block;
}
.oo-ui-menuToolGroup .oo-ui-tool-link {
cursor: pointer;
}
.oo-ui-menuToolGroup .oo-ui-tool.oo-ui-widget-disabled .oo-ui-tool-link {
cursor: default;
}
.oo-ui-menuToolGroup .oo-ui-popupToolGroup-handle {
min-width: 8em;
}
.oo-ui-toolbar-narrow .oo-ui-menuToolGroup .oo-ui-popupToolGroup-handle {
min-width: 6.5em;
}
.oo-ui-menuToolGroup .oo-ui-toolGroup-tools {
padding: 0.25em 0 0.25em 0;
}
.oo-ui-menuToolGroup.oo-ui-widget-enabled:hover {
border-color: rgba(0, 0, 0, 0.2);
}
.oo-ui-menuToolGroup.oo-ui-popupToolGroup-active {
border-color: rgba(0, 0, 0, 0.25);
}
.oo-ui-menuToolGroup .oo-ui-tool {
padding: 0 1em 0 0.25em;
}
.oo-ui-menuToolGroup .oo-ui-tool-link .oo-ui-iconElement-icon {
background-image: none;
}
.oo-ui-menuToolGroup .oo-ui-tool-active .oo-ui-tool-link .oo-ui-iconElement-icon {
background-image: /* @embed */ url(themes/apex/images/icons/check.png);
}
.oo-ui-menuToolGroup .oo-ui-tool.oo-ui-widget-enabled:hover {
background-color: #e1f3ff;
}
.oo-ui-menuToolGroup .oo-ui-tool.oo-ui-widget-disabled .oo-ui-tool-link .oo-ui-tool-title {
color: #cccccc;
}
.oo-ui-menuToolGroup .oo-ui-tool.oo-ui-widget-disabled .oo-ui-tool-link .oo-ui-iconElement-icon {
opacity: 0.2;
}
.oo-ui-menuToolGroup.oo-ui-widget-disabled {
color: #cccccc;
border-color: rgba(0, 0, 0, 0.05);
}
.oo-ui-menuToolGroup.oo-ui-widget-disabled .oo-ui-indicatorElement-indicator,
.oo-ui-menuToolGroup.oo-ui-widget-disabled .oo-ui-iconElement-icon {
opacity: 0.2;
}
.oo-ui-toolbar {
clear: both;
}
.oo-ui-toolbar-bar {
line-height: 1em;
}
.oo-ui-toolbar-actions {
float: right;
}
.oo-ui-toolbar-tools {
display: inline;
white-space: nowrap;
}
.oo-ui-toolbar-narrow .oo-ui-toolbar-tools {
white-space: normal;
}
.oo-ui-toolbar-tools .oo-ui-tool {
white-space: normal;
}
.oo-ui-toolbar-tools,
.oo-ui-toolbar-actions,
.oo-ui-toolbar-shadow {
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.oo-ui-toolbar-actions .oo-ui-popupWidget {
-webkit-touch-callout: default;
-webkit-user-select: all;
-moz-user-select: all;
-ms-user-select: all;
user-select: all;
}
.oo-ui-toolbar-shadow {
background-position: left top;
background-repeat: repeat-x;
position: absolute;
width: 100%;
pointer-events: none;
}
.oo-ui-toolbar-bar {
border-bottom: 1px solid #cccccc;
background: #f8fbfd;
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#ffffff', endColorstr='#f1f7fb');
background-image: -webkit-gradient(linear, right top, right bottom, color-stop(0%, #ffffff), color-stop(100%, #f1f7fb));
background-image: -webkit-linear-gradient(top, #ffffff 0%, #f1f7fb 100%);
background-image: -moz-linear-gradient(top, #ffffff 0%, #f1f7fb 100%);
background-image: -ms-linear-gradient(top, #ffffff 0%, #f1f7fb 100%);
background-image: -o-linear-gradient(top, #ffffff 0%, #f1f7fb 100%);
background-image: linear-gradient(top, #ffffff 0%, #f1f7fb 100%);
}
.oo-ui-toolbar-bar .oo-ui-toolbar-bar {
border: none;
background: none;
}
.oo-ui-toolbar-shadow {
background-image: /* @embed */ url(themes/apex/images/toolbar-shadow.png);
bottom: -9px;
height: 9px;
opacity: 0.125;
-webkit-transition: opacity 500ms ease-in-out;
-moz-transition: opacity 500ms ease-in-out;
-ms-transition: opacity 500ms ease-in-out;
-o-transition: opacity 500ms ease-in-out;
transition: opacity 500ms ease-in-out;
}
.oo-ui-optionWidget {
position: relative;
display: block;
cursor: pointer;
padding: 0.25em 0.5em;
border: none;
}
.oo-ui-optionWidget.oo-ui-widget-disabled {
cursor: default;
}
.oo-ui-optionWidget.oo-ui-labelElement .oo-ui-labelElement-label {
display: block;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.oo-ui-optionWidget-highlighted {
background-color: #e1f3ff;
}
.oo-ui-optionWidget .oo-ui-labelElement-label {
line-height: 1.5em;
}
.oo-ui-selectWidget-depressed .oo-ui-optionWidget-selected {
background-color: #a7dcff;
}
.oo-ui-selectWidget-pressed .oo-ui-optionWidget-pressed,
.oo-ui-selectWidget-pressed .oo-ui-optionWidget-pressed.oo-ui-optionWidget-highlighted,
.oo-ui-selectWidget-pressed .oo-ui-optionWidget-pressed.oo-ui-optionWidget-highlighted.oo-ui-optionWidget-selected {
background-color: #a7dcff;
}
.oo-ui-optionWidget.oo-ui-widget-disabled {
color: #cccccc;
}
.oo-ui-decoratedOptionWidget {
padding: 0.5em 2em 0.5em 3em;
}
.oo-ui-decoratedOptionWidget .oo-ui-iconElement-icon,
.oo-ui-decoratedOptionWidget .oo-ui-indicatorElement-indicator {
position: absolute;
background-repeat: no-repeat;
background-position: center center;
}
.oo-ui-decoratedOptionWidget.oo-ui-iconElement .oo-ui-iconElement-icon,
.oo-ui-decoratedOptionWidget.oo-ui-indicatorElement .oo-ui-indicatorElement-indicator {
top: 0;
height: 100%;
}
.oo-ui-decoratedOptionWidget.oo-ui-iconElement .oo-ui-iconElement-icon {
width: 1.875em;
left: 0.5em;
}
.oo-ui-decoratedOptionWidget.oo-ui-indicatorElement .oo-ui-indicatorElement-indicator {
width: 0.9375em;
right: 0.5em;
}
.oo-ui-decoratedOptionWidget.oo-ui-widget-disabled .oo-ui-iconElement-icon,
.oo-ui-decoratedOptionWidget.oo-ui-widget-disabled .oo-ui-indicatorElement-indicator {
opacity: 0.2;
}
.oo-ui-buttonSelectWidget {
display: inline-block;
white-space: nowrap;
border-radius: 0.3em;
margin-right: 0.5em;
}
.oo-ui-buttonSelectWidget:last-child {
margin-right: 0;
}
.oo-ui-buttonSelectWidget .oo-ui-buttonOptionWidget .oo-ui-buttonElement-button {
border-radius: 0;
margin-left: -1px;
}
.oo-ui-buttonSelectWidget .oo-ui-buttonOptionWidget:first-child .oo-ui-buttonElement-button {
border-bottom-left-radius: 0.3em;
border-top-left-radius: 0.3em;
margin-left: 0;
}
.oo-ui-buttonSelectWidget .oo-ui-buttonOptionWidget:last-child .oo-ui-buttonElement-button {
border-bottom-right-radius: 0.3em;
border-top-right-radius: 0.3em;
}
.oo-ui-radioSelectWidget {
padding: 0.75em 0 0.5em 0;
}
.oo-ui-buttonOptionWidget {
display: inline-block;
padding: 0;
background-color: transparent;
}
.oo-ui-buttonOptionWidget .oo-ui-buttonElement-button {
position: relative;
}
.oo-ui-buttonOptionWidget.oo-ui-iconElement .oo-ui-iconElement-icon,
.oo-ui-buttonOptionWidget.oo-ui-indicatorElement .oo-ui-indicatorElement-indicator {
position: static;
display: inline-block;
vertical-align: middle;
}
.oo-ui-buttonOptionWidget .oo-ui-buttonElement-button {
height: 1.875em;
}
.oo-ui-buttonOptionWidget.oo-ui-iconElement .oo-ui-iconElement-icon {
margin-top: 0;
}
.oo-ui-buttonOptionWidget.oo-ui-optionWidget-selected,
.oo-ui-buttonOptionWidget.oo-ui-optionWidget-pressed,
.oo-ui-buttonOptionWidget.oo-ui-optionWidget-highlighted {
background-color: transparent;
}
.oo-ui-radioOptionWidget {
cursor: default;
padding: 0;
background-color: transparent;
}
.oo-ui-radioOptionWidget .oo-ui-radioInputWidget,
.oo-ui-radioOptionWidget.oo-ui-labelElement .oo-ui-labelElement-label {
display: inline-block;
vertical-align: middle;
}
.oo-ui-radioOptionWidget.oo-ui-optionWidget-selected,
.oo-ui-radioOptionWidget.oo-ui-optionWidget-pressed,
.oo-ui-radioOptionWidget.oo-ui-optionWidget-highlighted {
background-color: transparent;
}
.oo-ui-radioOptionWidget.oo-ui-labelElement .oo-ui-labelElement-label {
padding-left: 0.5em;
}
.oo-ui-radioOptionWidget .oo-ui-radioInputWidget {
margin-right: 0;
}
.oo-ui-labelWidget {
display: inline-block;
padding: 0.5em 0;
}
.oo-ui-iconWidget {
display: inline-block;
vertical-align: middle;
background-position: center center;
background-repeat: no-repeat;
line-height: 2.5em;
height: 1.875em;
width: 1.875em;
}
.oo-ui-iconWidget.oo-ui-widget-disabled {
opacity: 0.2;
}
.oo-ui-indicatorWidget {
display: inline-block;
vertical-align: middle;
background-position: center center;
background-repeat: no-repeat;
line-height: 2.5em;
height: 0.9375em;
width: 0.9375em;
margin: 0.46875em;
}
.oo-ui-indicatorWidget.oo-ui-widget-disabled {
opacity: 0.2;
}
.oo-ui-buttonWidget {
display: inline-block;
vertical-align: middle;
margin-right: 0.5em;
}
.oo-ui-buttonWidget:last-child {
margin-right: 0;
}
.oo-ui-buttonGroupWidget {
display: inline-block;
white-space: nowrap;
border-radius: 0.3em;
margin-right: 0.5em;
}
.oo-ui-buttonGroupWidget:last-child {
margin-right: 0;
}
.oo-ui-buttonGroupWidget .oo-ui-buttonWidget {
margin-right: 0;
}
.oo-ui-buttonGroupWidget .oo-ui-buttonWidget:last-child {
margin-right: 0;
}
.oo-ui-buttonGroupWidget .oo-ui-buttonElement-framed .oo-ui-buttonElement-button {
border-radius: 0;
margin-left: -1px;
}
.oo-ui-buttonGroupWidget .oo-ui-buttonElement-framed:first-child .oo-ui-buttonElement-button {
border-bottom-left-radius: 0.3em;
border-top-left-radius: 0.3em;
margin-left: 0;
}
.oo-ui-buttonGroupWidget .oo-ui-buttonElement-framed:last-child .oo-ui-buttonElement-button {
border-bottom-right-radius: 0.3em;
border-top-right-radius: 0.3em;
}
.oo-ui-toggleSwitchWidget {
position: relative;
display: inline-block;
vertical-align: middle;
overflow: hidden;
cursor: pointer;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-transform: translateZ(0px);
-moz-transform: translateZ(0px);
-ms-transform: translateZ(0px);
-o-transform: translateZ(0px);
transform: translateZ(0px);
height: 2em;
width: 4em;
border-radius: 1em;
box-shadow: 0 0 0 white, inset 0 0.1em 0.2em #dddddd;
border: 1px solid #cccccc;
margin-right: 0.5em;
background: #eeeeee;
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#dddddd', endColorstr='#ffffff');
background-image: -webkit-gradient(linear, right top, right bottom, color-stop(0%, #dddddd), color-stop(100%, #ffffff));
background-image: -webkit-linear-gradient(top, #dddddd 0%, #ffffff 100%);
background-image: -moz-linear-gradient(top, #dddddd 0%, #ffffff 100%);
background-image: -ms-linear-gradient(top, #dddddd 0%, #ffffff 100%);
background-image: -o-linear-gradient(top, #dddddd 0%, #ffffff 100%);
background-image: linear-gradient(top, #dddddd 0%, #ffffff 100%);
}
.oo-ui-toggleSwitchWidget.oo-ui-widget-disabled {
cursor: default;
}
.oo-ui-toggleSwitchWidget-grip {
position: absolute;
display: block;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.oo-ui-toggleSwitchWidget .oo-ui-toggleSwitchWidget-glow {
position: absolute;
top: 0;
bottom: 0;
right: 0;
left: 0;
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.oo-ui-toggleWidget-off .oo-ui-toggleSwitchWidget-glow {
display: none;
}
.oo-ui-toggleSwitchWidget:last-child {
margin-right: 0;
}
.oo-ui-toggleSwitchWidget.oo-ui-widget-disabled {
opacity: 0.5;
}
.oo-ui-toggleSwitchWidget-grip {
top: 0.25em;
left: 0.25em;
width: 1.5em;
height: 1.5em;
margin-top: -1px;
border-radius: 1em;
box-shadow: 0 0.1em 0.25em rgba(0, 0, 0, 0.1);
border: 1px #c9c9c9 solid;
-webkit-transition: left 200ms ease-in-out, margin-left 200ms ease-in-out;
-moz-transition: left 200ms ease-in-out, margin-left 200ms ease-in-out;
-ms-transition: left 200ms ease-in-out, margin-left 200ms ease-in-out;
-o-transition: left 200ms ease-in-out, margin-left 200ms ease-in-out;
transition: left 200ms ease-in-out, margin-left 200ms ease-in-out;
background: #eeeeee;
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#ffffff', endColorstr='#dddddd');
background-image: -webkit-gradient(linear, right top, right bottom, color-stop(0%, #ffffff), color-stop(100%, #dddddd));
background-image: -webkit-linear-gradient(top, #ffffff 0%, #dddddd 100%);
background-image: -moz-linear-gradient(top, #ffffff 0%, #dddddd 100%);
background-image: -ms-linear-gradient(top, #ffffff 0%, #dddddd 100%);
background-image: -o-linear-gradient(top, #ffffff 0%, #dddddd 100%);
background-image: linear-gradient(top, #ffffff 0%, #dddddd 100%);
}
.oo-ui-toggleSwitchWidget.oo-ui-widget-enabled:hover,
.oo-ui-toggleSwitchWidget.oo-ui-widget-enabled:hover .oo-ui-toggleSwitchWidget-grip {
border-color: #aaaaaa;
}
.oo-ui-toggleSwitchWidget .oo-ui-toggleSwitchWidget-glow {
border-radius: 1em;
box-shadow: inset 0 1px 4px 0 rgba(0, 0, 0, 0.07);
-webkit-transition: opacity 200ms ease-in-out;
-moz-transition: opacity 200ms ease-in-out;
-ms-transition: opacity 200ms ease-in-out;
-o-transition: opacity 200ms ease-in-out;
transition: opacity 200ms ease-in-out;
background: #cde7f4;
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#b0d9ee', endColorstr='#eaf4fa');
background-image: -webkit-gradient(linear, right top, right bottom, color-stop(0%, #b0d9ee), color-stop(100%, #eaf4fa));
background-image: -webkit-linear-gradient(top, #b0d9ee 0%, #eaf4fa 100%);
background-image: -moz-linear-gradient(top, #b0d9ee 0%, #eaf4fa 100%);
background-image: -ms-linear-gradient(top, #b0d9ee 0%, #eaf4fa 100%);
background-image: -o-linear-gradient(top, #b0d9ee 0%, #eaf4fa 100%);
background-image: linear-gradient(top, #b0d9ee 0%, #eaf4fa 100%);
}
.oo-ui-toggleWidget-on .oo-ui-toggleSwitchWidget-glow {
opacity: 1;
}
.oo-ui-toggleWidget-on .oo-ui-toggleSwitchWidget-grip {
left: 2.25em;
margin-left: -2px;
}
.oo-ui-toggleWidget-off .oo-ui-toggleSwitchWidget-glow {
display: block;
opacity: 0;
}
.oo-ui-toggleWidget-off .oo-ui-toggleSwitchWidget-grip {
left: 0.25em;
margin-left: 0;
}
.oo-ui-progressBarWidget {
max-width: 50em;
border: 1px solid #cccccc;
border-radius: 0.25em;
overflow: hidden;
}
.oo-ui-progressBarWidget-bar {
height: 1em;
border-right: 1px solid #cccccc;
-webkit-transition: width 200ms, margin-left 200ms;
-moz-transition: width 200ms, margin-left 200ms;
-ms-transition: width 200ms, margin-left 200ms;
-o-transition: width 200ms, margin-left 200ms;
transition: width 200ms, margin-left 200ms;
background: #cde7f4;
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#eaf4fa', endColorstr='#b0d9ee');
background-image: -webkit-gradient(linear, right top, right bottom, color-stop(0%, #eaf4fa), color-stop(100%, #b0d9ee));
background-image: -webkit-linear-gradient(top, #eaf4fa 0%, #b0d9ee 100%);
background-image: -moz-linear-gradient(top, #eaf4fa 0%, #b0d9ee 100%);
background-image: -ms-linear-gradient(top, #eaf4fa 0%, #b0d9ee 100%);
background-image: -o-linear-gradient(top, #eaf4fa 0%, #b0d9ee 100%);
background-image: linear-gradient(top, #eaf4fa 0%, #b0d9ee 100%);
}
.oo-ui-progressBarWidget-indeterminate .oo-ui-progressBarWidget-bar {
-webkit-animation: oo-ui-progressBarWidget-slide 2s infinite linear;
-moz-animation: oo-ui-progressBarWidget-slide 2s infinite linear;
-ms-animation: oo-ui-progressBarWidget-slide 2s infinite linear;
-o-animation: oo-ui-progressBarWidget-slide 2s infinite linear;
animation: oo-ui-progressBarWidget-slide 2s infinite linear;
width: 40%;
margin-left: -10%;
border-left: 1px solid #a6cee1;
}
.oo-ui-progressBarWidget.oo-ui-widget-disabled {
opacity: 0.6;
}
.oo-ui-actionWidget.oo-ui-pendingElement-pending {
background-image: /* @embed */ url(themes/apex/images/textures/pending.gif);
}
.oo-ui-popupWidget {
position: absolute;
/* @noflip */
left: 0;
}
.oo-ui-popupWidget-popup {
position: relative;
overflow: hidden;
z-index: 1;
}
.oo-ui-popupWidget-anchor {
display: none;
z-index: 1;
}
.oo-ui-popupWidget-anchored .oo-ui-popupWidget-anchor {
display: block;
position: absolute;
top: 0;
/* @noflip */
left: 0;
background-repeat: no-repeat;
}
.oo-ui-popupWidget-head {
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.oo-ui-popupWidget-head .oo-ui-buttonWidget {
float: right;
}
.oo-ui-popupWidget-head .oo-ui-labelElement-label {
float: left;
cursor: default;
}
.oo-ui-popupWidget-body {
clear: both;
overflow: hidden;
}
.oo-ui-popupWidget-popup {
border: 1px solid #cccccc;
border-radius: 0.25em;
background-color: #ffffff;
box-shadow: 0 0.15em 0.5em 0 rgba(0, 0, 0, 0.2);
}
.oo-ui-popupWidget-anchored .oo-ui-popupWidget-popup {
margin-top: 6px;
}
.oo-ui-popupWidget-anchored .oo-ui-popupWidget-anchor:before,
.oo-ui-popupWidget-anchored .oo-ui-popupWidget-anchor:after {
content: "";
position: absolute;
width: 0;
height: 0;
border-style: solid;
border-color: transparent;
border-top: 0;
}
.oo-ui-popupWidget-anchored .oo-ui-popupWidget-anchor:before {
bottom: -7px;
left: -6px;
border-bottom-color: #aaaaaa;
border-width: 7px;
}
.oo-ui-popupWidget-anchored .oo-ui-popupWidget-anchor:after {
bottom: -7px;
left: -5px;
border-bottom-color: #ffffff;
border-width: 6px;
}
.oo-ui-popupWidget-transitioning .oo-ui-popupWidget-popup {
-webkit-transition: width 100ms ease-in-out, height 100ms ease-in-out, left 100ms ease-in-out;
-moz-transition: width 100ms ease-in-out, height 100ms ease-in-out, left 100ms ease-in-out;
-ms-transition: width 100ms ease-in-out, height 100ms ease-in-out, left 100ms ease-in-out;
-o-transition: width 100ms ease-in-out, height 100ms ease-in-out, left 100ms ease-in-out;
transition: width 100ms ease-in-out, height 100ms ease-in-out, left 100ms ease-in-out;
}
.oo-ui-popupWidget-head {
height: 2.5em;
}
.oo-ui-popupWidget-head .oo-ui-buttonWidget {
margin: 0.25em;
}
.oo-ui-popupWidget-head .oo-ui-labelElement-label {
margin: 0.75em 1em;
}
.oo-ui-popupWidget-body-padded {
padding: 0 1em;
}
.oo-ui-popupButtonWidget {
position: relative;
}
.oo-ui-popupButtonWidget .oo-ui-popupWidget {
position: absolute;
cursor: auto;
}
.oo-ui-popupButtonWidget.oo-ui-buttonElement-frameless > .oo-ui-popupWidget {
left: 1em;
}
.oo-ui-popupButtonWidget.oo-ui-buttonElement-framed > .oo-ui-popupWidget {
left: 1.25em;
}
.oo-ui-inputWidget {
margin-right: 0.5em;
}
.oo-ui-inputWidget:last-child {
margin-right: 0;
}
.oo-ui-buttonInputWidget {
display: inline-block;
vertical-align: middle;
}
.oo-ui-dropdownInputWidget {
position: relative;
vertical-align: middle;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
width: 100%;
max-width: 50em;
}
.oo-ui-dropdownInputWidget select {
display: inline-block;
width: 100%;
resize: none;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.oo-ui-dropdownInputWidget select {
height: 2.5em;
padding: 0.5em;
font-size: inherit;
font-family: inherit;
border: 1px solid rgba(0, 0, 0, 0.1);
border-radius: 0.25em;
}
.oo-ui-dropdownInputWidget.oo-ui-widget-enabled select:hover,
.oo-ui-dropdownInputWidget.oo-ui-widget-enabled select:focus {
border-color: rgba(0, 0, 0, 0.2);
outline: none;
}
.oo-ui-dropdownInputWidget.oo-ui-widget-disabled select {
color: #cccccc;
border-color: #dddddd;
background-color: #f3f3f3;
}
.oo-ui-textInputWidget {
position: relative;
vertical-align: middle;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
width: 100%;
max-width: 50em;
}
.oo-ui-textInputWidget input,
.oo-ui-textInputWidget textarea {
display: inline-block;
width: 100%;
resize: none;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.oo-ui-textInputWidget > .oo-ui-iconElement-icon,
.oo-ui-textInputWidget > .oo-ui-indicatorElement-indicator,
.oo-ui-textInputWidget > .oo-ui-labelElement-label {
display: none;
}
.oo-ui-textInputWidget.oo-ui-iconElement > .oo-ui-iconElement-icon,
.oo-ui-textInputWidget.oo-ui-indicatorElement > .oo-ui-indicatorElement-indicator {
display: block;
position: absolute;
top: 0;
height: 100%;
background-repeat: no-repeat;
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.oo-ui-textInputWidget.oo-ui-widget-enabled > .oo-ui-iconElement-icon,
.oo-ui-textInputWidget.oo-ui-widget-enabled > .oo-ui-indicatorElement-indicator {
cursor: pointer;
}
.oo-ui-textInputWidget.oo-ui-labelElement > .oo-ui-labelElement-label {
display: block;
}
.oo-ui-textInputWidget > .oo-ui-iconElement-icon {
left: 0;
}
.oo-ui-textInputWidget > .oo-ui-indicatorElement-indicator {
right: 0;
}
.oo-ui-textInputWidget > .oo-ui-labelElement-label {
position: absolute;
top: 0;
}
.oo-ui-textInputWidget-labelPosition-after > .oo-ui-labelElement-label {
right: 0;
}
.oo-ui-textInputWidget-labelPosition-before > .oo-ui-labelElement-label {
left: 0;
}
.oo-ui-textInputWidget input,
.oo-ui-textInputWidget textarea {
padding: 0.5em;
font-size: inherit;
font-family: inherit;
background-color: #ffffff;
color: black;
border: 1px solid #cccccc;
box-shadow: 0 0 0 white, inset 0 0.1em 0.2em #dddddd;
border-radius: 0.25em;
-webkit-transition: border-color 200ms, box-shadow 200ms;
-moz-transition: border-color 200ms, box-shadow 200ms;
-ms-transition: border-color 200ms, box-shadow 200ms;
-o-transition: border-color 200ms, box-shadow 200ms;
transition: border-color 200ms, box-shadow 200ms;
}
.oo-ui-textInputWidget-decorated input,
.oo-ui-textInputWidget-decorated textarea {
padding-left: 2em;
}
.oo-ui-textInputWidget-icon {
width: 2em;
}
.oo-ui-textInputWidget.oo-ui-widget-enabled input:focus,
.oo-ui-textInputWidget.oo-ui-widget-enabled textarea:focus {
outline: none;
border-color: #a7dcff;
box-shadow: 0 0 0.3em #a7dcff, 0 0 0 white;
}
.oo-ui-textInputWidget.oo-ui-widget-enabled input[readonly],
.oo-ui-textInputWidget.oo-ui-widget-enabled textarea[readonly] {
color: #777777;
}
.oo-ui-textInputWidget.oo-ui-widget-disabled input,
.oo-ui-textInputWidget.oo-ui-widget-disabled textarea {
color: #cccccc;
text-shadow: 0 1px 1px #ffffff;
border-color: #dddddd;
background-color: #f3f3f3;
}
.oo-ui-textInputWidget.oo-ui-widget-disabled .oo-ui-iconElement-icon,
.oo-ui-textInputWidget.oo-ui-widget-disabled .oo-ui-indicatorElement-indicator {
opacity: 0.2;
}
.oo-ui-textInputWidget.oo-ui-widget-disabled .oo-ui-labelElement-label {
color: #dddddd;
text-shadow: 0 1px 1px #ffffff;
}
.oo-ui-textInputWidget.oo-ui-pendingElement-pending input,
.oo-ui-textInputWidget.oo-ui-pendingElement-pending textarea {
background-color: transparent;
background-image: /* @embed */ url(themes/apex/images/textures/pending.gif);
}
.oo-ui-textInputWidget.oo-ui-iconElement input,
.oo-ui-textInputWidget.oo-ui-iconElement textarea {
padding-left: 2em;
}
.oo-ui-textInputWidget.oo-ui-iconElement .oo-ui-iconElement-icon {
width: 1.875em;
margin-left: 0.1em;
}
.oo-ui-textInputWidget.oo-ui-indicatorElement input,
.oo-ui-textInputWidget.oo-ui-indicatorElement textarea {
padding-right: 1.5em;
}
.oo-ui-textInputWidget.oo-ui-indicatorElement .oo-ui-indicatorElement-indicator {
width: 0.9375em;
margin-right: 0.775em;
}
.oo-ui-textInputWidget > .oo-ui-labelElement-label {
padding: 0.4em;
line-height: 1.5em;
color: #888888;
}
.oo-ui-textInputWidget-labelPosition-after.oo-ui-indicatorElement > .oo-ui-labelElement-label {
margin-right: 1.6em;
}
.oo-ui-textInputWidget-labelPosition-before.oo-ui-iconElement > .oo-ui-labelElement-label {
margin-left: 2.1em;
}
.oo-ui-menuSelectWidget {
position: absolute;
background: #ffffff;
margin-top: -1px;
border: 1px solid #cccccc;
border-radius: 0 0 0.25em 0.25em;
box-shadow: 0 0.15em 1em 0 rgba(0, 0, 0, 0.2);
}
.oo-ui-menuSelectWidget input {
position: absolute;
width: 0;
height: 0;
overflow: hidden;
opacity: 0;
}
.oo-ui-menuOptionWidget {
position: relative;
}
.oo-ui-menuOptionWidget .oo-ui-iconElement-icon {
display: none;
}
.oo-ui-menuOptionWidget.oo-ui-optionWidget-selected {
background-color: transparent;
}
.oo-ui-menuOptionWidget.oo-ui-optionWidget-selected .oo-ui-iconElement-icon {
display: block;
}
.oo-ui-menuOptionWidget.oo-ui-optionWidget-selected {
background-color: transparent;
}
.oo-ui-menuOptionWidget.oo-ui-optionWidget-highlighted,
.oo-ui-menuOptionWidget.oo-ui-optionWidget-highlighted.oo-ui-optionWidget-selected {
background-color: #e1f3ff;
}
.oo-ui-menuSectionOptionWidget {
cursor: default;
padding: 0.33em 0.75em;
color: #888888;
}
.oo-ui-dropdownWidget {
display: inline-block;
position: relative;
margin: 0.25em 0;
width: 100%;
max-width: 50em;
margin-right: 0.5em;
}
.oo-ui-dropdownWidget-handle {
width: 100%;
display: inline-block;
cursor: pointer;
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.oo-ui-dropdownWidget-handle .oo-ui-indicatorElement-indicator,
.oo-ui-dropdownWidget-handle .oo-ui-iconElement-icon {
position: absolute;
background-position: center center;
background-repeat: no-repeat;
}
.oo-ui-dropdownWidget > .oo-ui-menuSelectWidget {
z-index: 1;
width: 100%;
}
.oo-ui-dropdownWidget.oo-ui-widget-disabled .oo-ui-dropdownWidget-handle {
cursor: default;
}
.oo-ui-dropdownWidget:last-child {
margin-right: 0;
}
.oo-ui-dropdownWidget-handle {
height: 2.5em;
border: 1px solid rgba(0, 0, 0, 0.1);
border-radius: 0.25em;
}
.oo-ui-dropdownWidget-handle:hover {
border-color: rgba(0, 0, 0, 0.2);
}
.oo-ui-dropdownWidget-handle .oo-ui-indicatorElement-indicator {
right: 0;
}
.oo-ui-dropdownWidget-handle .oo-ui-iconElement-icon {
left: 0.25em;
}
.oo-ui-dropdownWidget-handle .oo-ui-labelElement-label {
line-height: 2.5em;
margin: 0 0.5em;
}
.oo-ui-dropdownWidget-handle .oo-ui-indicatorElement-indicator {
top: 0;
width: 0.9375em;
height: 0.9375em;
margin: 0.775em;
}
.oo-ui-dropdownWidget-handle .oo-ui-iconElement-icon {
top: 0;
width: 1.875em;
height: 1.875em;
margin: 0.3em;
}
.oo-ui-dropdownWidget.oo-ui-widget-disabled .oo-ui-dropdownWidget-handle {
color: #cccccc;
text-shadow: 0 1px 1px #ffffff;
border-color: #dddddd;
background-color: #f3f3f3;
}
.oo-ui-dropdownWidget.oo-ui-widget-disabled .oo-ui-indicatorElement-indicator {
opacity: 0.2;
}
.oo-ui-dropdownWidget.oo-ui-iconElement .oo-ui-dropdownWidget-handle .oo-ui-labelElement-label {
margin-left: 3em;
}
.oo-ui-dropdownWidget.oo-ui-indicatorElement .oo-ui-dropdownWidget-handle .oo-ui-labelElement-label {
margin-right: 2em;
}
.oo-ui-outlineOptionWidget {
position: relative;
cursor: pointer;
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
font-size: 1.1em;
padding: 0.75em;
}
.oo-ui-outlineOptionWidget.oo-ui-indicatorElement .oo-ui-labelElement-label {
padding-right: 1.5em;
}
.oo-ui-outlineOptionWidget.oo-ui-indicatorElement .oo-ui-indicatorElement-indicator {
opacity: 0.5;
}
.oo-ui-outlineOptionWidget-level-0 {
padding-left: 3.5em;
}
.oo-ui-outlineOptionWidget-level-0 .oo-ui-iconElement-icon {
left: 1em;
}
.oo-ui-outlineOptionWidget-level-1 {
padding-left: 5em;
}
.oo-ui-outlineOptionWidget-level-1 .oo-ui-iconElement-icon {
left: 2.5em;
}
.oo-ui-outlineOptionWidget-level-2 {
padding-left: 6.5em;
}
.oo-ui-outlineOptionWidget-level-2 .oo-ui-iconElement-icon {
left: 4em;
}
.oo-ui-selectWidget-depressed .oo-ui-outlineOptionWidget.oo-ui-optionWidget-selected {
background-color: #a7dcff;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}
.oo-ui-outlineOptionWidget.oo-ui-flaggedElement-important {
font-weight: bold;
}
.oo-ui-outlineOptionWidget.oo-ui-flaggedElement-placeholder {
font-style: italic;
}
.oo-ui-outlineOptionWidget.oo-ui-flaggedElement-empty .oo-ui-iconElement-icon {
opacity: 0.5;
}
.oo-ui-outlineOptionWidget.oo-ui-flaggedElement-empty .oo-ui-labelElement-label {
color: #777777;
}
.oo-ui-outlineControlsWidget {
height: 3em;
background-color: #ffffff;
}
.oo-ui-outlineControlsWidget-items,
.oo-ui-outlineControlsWidget-movers {
float: left;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.oo-ui-outlineControlsWidget > .oo-ui-iconElement-icon {
float: left;
background-position: right center;
background-repeat: no-repeat;
}
.oo-ui-outlineControlsWidget-items {
float: left;
}
.oo-ui-outlineControlsWidget-items .oo-ui-buttonWidget {
float: left;
}
.oo-ui-outlineControlsWidget-movers {
float: right;
}
.oo-ui-outlineControlsWidget-movers .oo-ui-buttonWidget {
float: right;
}
.oo-ui-outlineControlsWidget-items,
.oo-ui-outlineControlsWidget-movers {
height: 2em;
margin: 0.5em 0.5em 0.5em 0;
padding: 0;
}
.oo-ui-outlineControlsWidget > .oo-ui-iconElement-icon {
width: 1.5em;
height: 2em;
margin: 0.5em 0 0.5em 0.5em;
opacity: 0.2;
}
.oo-ui-comboBoxWidget {
display: inline-block;
position: relative;
width: 100%;
max-width: 50em;
margin-right: 0.5em;
}
.oo-ui-comboBoxWidget > .oo-ui-menuSelectWidget {
z-index: 1;
width: 100%;
}
.oo-ui-comboBoxWidget:last-child {
margin-right: 0;
}
.oo-ui-comboBoxWidget-handle {
border: 1px solid rgba(0, 0, 0, 0.1);
border-radius: 0.25em;
}
.oo-ui-comboBoxWidget-handle:hover {
border-color: rgba(0, 0, 0, 0.2);
}
.oo-ui-comboBoxWidget.oo-ui-widget-disabled .oo-ui-textInputWidget.oo-ui-indicatorElement .oo-ui-indicatorElement-indicator,
.oo-ui-comboBoxWidget-empty .oo-ui-textInputWidget.oo-ui-indicatorElement .oo-ui-indicatorElement-indicator {
cursor: default;
opacity: 0.2;
}
.oo-ui-comboBoxWidget > .oo-ui-selectWidget {
margin-top: -3px;
}
.oo-ui-searchWidget-query {
position: absolute;
top: 0;
left: 0;
right: 0;
}
.oo-ui-searchWidget-query .oo-ui-textInputWidget {
width: 100%;
}
.oo-ui-searchWidget-results {
position: absolute;
bottom: 0;
left: 0;
right: 0;
overflow-x: hidden;
overflow-y: auto;
}
.oo-ui-searchWidget-query {
height: 4em;
padding: 0 1em;
box-shadow: 0 0 0.5em rgba(0, 0, 0, 0.2);
}
.oo-ui-searchWidget-query .oo-ui-textInputWidget {
margin: 0.75em 0;
}
.oo-ui-searchWidget-results {
top: 4em;
padding: 1em;
line-height: 0;
}
.oo-ui-window {
background-color: transparent;
background-image: none;
font-size: 0.8em;
}
.oo-ui-window-frame {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.oo-ui-window-content:focus {
outline: none;
}
.oo-ui-window-head,
.oo-ui-window-foot {
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.oo-ui-window-body {
margin: 0;
padding: 0;
background: none;
}
.oo-ui-window-overlay {
position: absolute;
top: 0;
/* @noflip */
left: 0;
}
.oo-ui-dialog-content > .oo-ui-window-head,
.oo-ui-dialog-content > .oo-ui-window-body,
.oo-ui-dialog-content > .oo-ui-window-foot {
position: absolute;
left: 0;
right: 0;
overflow: hidden;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.oo-ui-dialog-content > .oo-ui-window-head {
z-index: 1;
top: 0;
}
.oo-ui-dialog-content > .oo-ui-window-body {
z-index: 2;
top: 0;
bottom: 0;
}
.oo-ui-dialog-content > .oo-ui-window-foot {
z-index: 1;
bottom: 0;
}
.oo-ui-dialog-content > .oo-ui-window-body {
box-shadow: 0 0 0.66em rgba(0, 0, 0, 0.25);
}
.oo-ui-messageDialog-actions-horizontal {
display: table;
table-layout: fixed;
width: 100%;
}
.oo-ui-messageDialog-actions-horizontal .oo-ui-actionWidget {
display: table-cell;
width: 1%;
}
.oo-ui-messageDialog-actions-vertical {
display: block;
}
.oo-ui-messageDialog-actions-vertical .oo-ui-actionWidget {
display: block;
overflow: hidden;
text-overflow: ellipsis;
}
.oo-ui-messageDialog-actions .oo-ui-actionWidget {
position: relative;
text-align: center;
}
.oo-ui-messageDialog-actions .oo-ui-actionWidget .oo-ui-buttonElement-button {
display: block;
}
.oo-ui-messageDialog-actions .oo-ui-actionWidget .oo-ui-labelElement-label {
position: relative;
top: auto;
bottom: auto;
display: inline;
white-space: nowrap;
}
.oo-ui-messageDialog-content .oo-ui-window-body {
box-shadow: 0 0 0.33em rgba(0, 0, 0, 0.33);
}
.oo-ui-messageDialog-title,
.oo-ui-messageDialog-message {
display: block;
text-align: center;
padding-top: 0.5em;
}
.oo-ui-messageDialog-title {
font-size: 1.5em;
line-height: 1em;
color: #000000;
}
.oo-ui-messageDialog-message {
font-size: 0.9em;
line-height: 1.25em;
color: #666666;
}
.oo-ui-messageDialog-message-verbose {
font-size: 1.1em;
line-height: 1.5em;
text-align: left;
}
.oo-ui-messageDialog-actions-horizontal .oo-ui-actionWidget {
border-right: 1px solid #e5e5e5;
}
.oo-ui-messageDialog-actions-horizontal .oo-ui-actionWidget:last-child {
border-right-width: 0;
}
.oo-ui-messageDialog-actions-vertical .oo-ui-actionWidget {
border-bottom: 1px solid #e5e5e5;
}
.oo-ui-messageDialog-actions-vertical .oo-ui-actionWidget:last-child {
border-bottom-width: 0;
}
.oo-ui-messageDialog-actions .oo-ui-actionWidget {
height: 3.4em;
}
.oo-ui-messageDialog-actions .oo-ui-actionWidget.oo-ui-labelElement .oo-ui-labelElement-label {
text-align: center;
line-height: 3.4em;
padding: 0 2em;
}
.oo-ui-messageDialog-actions .oo-ui-actionWidget:hover {
background-color: rgba(0, 0, 0, 0.05);
}
.oo-ui-messageDialog-actions .oo-ui-actionWidget:active {
background-color: rgba(0, 0, 0, 0.1);
}
.oo-ui-messageDialog-actions .oo-ui-actionWidget.oo-ui-flaggedElement-progressive:hover {
background-color: rgba(8, 126, 204, 0.05);
}
.oo-ui-messageDialog-actions .oo-ui-actionWidget.oo-ui-flaggedElement-progressive:active {
background-color: rgba(8, 126, 204, 0.1);
}
.oo-ui-messageDialog-actions .oo-ui-actionWidget.oo-ui-flaggedElement-progressive .oo-ui-labelElement-label {
font-weight: bold;
}
.oo-ui-messageDialog-actions .oo-ui-actionWidget.oo-ui-flaggedElement-constructive:hover {
background-color: rgba(118, 171, 54, 0.05);
}
.oo-ui-messageDialog-actions .oo-ui-actionWidget.oo-ui-flaggedElement-constructive:active {
background-color: rgba(118, 171, 54, 0.1);
}
.oo-ui-messageDialog-actions .oo-ui-actionWidget.oo-ui-flaggedElement-destructive:hover {
background-color: rgba(212, 83, 83, 0.05);
}
.oo-ui-messageDialog-actions .oo-ui-actionWidget.oo-ui-flaggedElement-destructive:active {
background-color: rgba(212, 83, 83, 0.1);
}
.oo-ui-processDialog-location {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.oo-ui-processDialog-title {
display: inline;
padding: 0;
}
.oo-ui-processDialog-actions-safe .oo-ui-actionWidget,
.oo-ui-processDialog-actions-primary .oo-ui-actionWidget,
.oo-ui-processDialog-actions-other .oo-ui-actionWidget {
white-space: nowrap;
}
.oo-ui-processDialog-actions-safe,
.oo-ui-processDialog-actions-primary {
position: absolute;
top: 0;
bottom: 0;
}
.oo-ui-processDialog-actions-safe {
left: 0;
}
.oo-ui-processDialog-actions-primary {
right: 0;
}
.oo-ui-processDialog-errors {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 2;
overflow-x: hidden;
overflow-y: auto;
}
.oo-ui-processDialog-content .oo-ui-window-head {
height: 3.4em;
}
.oo-ui-processDialog-content .oo-ui-window-head.oo-ui-pendingElement-pending {
background-image: /* @embed */ url(themes/apex/images/textures/pending.gif);
}
.oo-ui-processDialog-content .oo-ui-window-body {
top: 3.4em;
box-shadow: 0 0 0.33em rgba(0, 0, 0, 0.33);
}
.oo-ui-processDialog-navigation {
position: relative;
height: 3.4em;
padding: 0 1em;
}
.oo-ui-processDialog-location {
padding: 0.75em 0;
height: 1.875em;
cursor: default;
text-align: center;
}
.oo-ui-processDialog-title {
font-weight: bold;
line-height: 1.875em;
}
.oo-ui-processDialog-actions-safe .oo-ui-actionWidget .oo-ui-buttonElement-button,
.oo-ui-processDialog-actions-primary .oo-ui-actionWidget .oo-ui-buttonElement-button,
.oo-ui-processDialog-actions-other .oo-ui-actionWidget .oo-ui-buttonElement-button {
min-width: 1.875em;
min-height: 1.875em;
}
.oo-ui-processDialog-actions-safe .oo-ui-actionWidget .oo-ui-labelElement-label,
.oo-ui-processDialog-actions-primary .oo-ui-actionWidget .oo-ui-labelElement-label,
.oo-ui-processDialog-actions-other .oo-ui-actionWidget .oo-ui-labelElement-label {
line-height: 1.875em;
}
.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-iconElement .oo-ui-iconElement-icon,
.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-iconElement .oo-ui-iconElement-icon,
.oo-ui-processDialog-actions-other .oo-ui-actionWidget.oo-ui-iconElement .oo-ui-iconElement-icon {
margin-top: -0.125em;
}
.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-buttonElement-framed,
.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-buttonElement-framed,
.oo-ui-processDialog-actions-other .oo-ui-actionWidget.oo-ui-buttonElement-framed {
margin: 0.75em 0 0.75em 0.75em;
}
.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-buttonElement-framed .oo-ui-buttonElement-button,
.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-buttonElement-framed .oo-ui-buttonElement-button,
.oo-ui-processDialog-actions-other .oo-ui-actionWidget.oo-ui-buttonElement-framed .oo-ui-buttonElement-button {
padding: 0 1em;
vertical-align: middle;
}
.oo-ui-processDialog-actions-safe .oo-ui-actionWidget:hover,
.oo-ui-processDialog-actions-primary .oo-ui-actionWidget:hover {
background-color: rgba(0, 0, 0, 0.05);
}
.oo-ui-processDialog-actions-safe .oo-ui-actionWidget:active,
.oo-ui-processDialog-actions-primary .oo-ui-actionWidget:active {
background-color: rgba(0, 0, 0, 0.1);
}
.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-buttonElement-framed,
.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-buttonElement-framed {
margin: 0.75em;
}
.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-buttonElement-framed .oo-ui-buttonElement-button,
.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-buttonElement-framed .oo-ui-buttonElement-button {
/* Adjust for border so text aligns with title */
margin: -1px;
}
.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-flaggedElement-progressive:hover,
.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-flaggedElement-progressive:hover {
background-color: rgba(8, 126, 204, 0.05);
}
.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-flaggedElement-progressive:active,
.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-flaggedElement-progressive:active {
background-color: rgba(8, 126, 204, 0.1);
}
.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-flaggedElement-progressive .oo-ui-labelElement-label,
.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-flaggedElement-progressive .oo-ui-labelElement-label {
font-weight: bold;
}
.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-flaggedElement-constructive:hover,
.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-flaggedElement-constructive:hover {
background-color: rgba(118, 171, 54, 0.05);
}
.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-flaggedElement-constructive:active,
.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-flaggedElement-constructive:active {
background-color: rgba(118, 171, 54, 0.1);
}
.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-flaggedElement-destructive:hover,
.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-flaggedElement-destructive:hover {
background-color: rgba(212, 83, 83, 0.05);
}
.oo-ui-processDialog-actions-safe .oo-ui-actionWidget.oo-ui-flaggedElement-destructive:active,
.oo-ui-processDialog-actions-primary .oo-ui-actionWidget.oo-ui-flaggedElement-destructive:active {
background-color: rgba(212, 83, 83, 0.1);
}
.oo-ui-processDialog > .oo-ui-window-frame {
min-height: 5em;
}
.oo-ui-processDialog-errors {
background-color: rgba(255, 255, 255, 0.9);
padding: 3em 3em 1.5em 3em;
text-align: center;
}
.oo-ui-processDialog-errors .oo-ui-buttonWidget {
margin: 2em 1em 2em 1em;
}
.oo-ui-processDialog-errors-title {
font-size: 1.5em;
color: #000000;
margin-bottom: 2em;
}
.oo-ui-processDialog-error {
text-align: left;
margin: 1em;
padding: 1em;
border: 1px solid #ff9e9e;
background-color: #fff7f7;
border-radius: 0.25em;
}
.oo-ui-windowManager-modal > .oo-ui-dialog {
position: fixed;
width: 0;
height: 0;
overflow: hidden;
}
.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-active {
width: auto;
height: auto;
top: 0;
right: 0;
bottom: 0;
left: 0;
padding: 1em;
}
.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-setup > .oo-ui-window-frame {
position: absolute;
right: 0;
left: 0;
margin: auto;
overflow: hidden;
max-width: 100%;
max-height: 100%;
}
.oo-ui-windowManager-fullscreen > .oo-ui-dialog > .oo-ui-window-frame {
width: 100%;
height: 100%;
top: 0;
bottom: 0;
}
.oo-ui-windowManager-modal > .oo-ui-dialog {
background-color: rgba(255, 255, 255, 0.5);
opacity: 0;
-webkit-transition: opacity 250ms ease-in-out;
-moz-transition: opacity 250ms ease-in-out;
-ms-transition: opacity 250ms ease-in-out;
-o-transition: opacity 250ms ease-in-out;
transition: opacity 250ms ease-in-out;
}
.oo-ui-windowManager-modal > .oo-ui-dialog > .oo-ui-window-frame {
top: 1em;
bottom: 1em;
background-color: #ffffff;
opacity: 0;
-webkit-transform: scale(0.5);
-moz-transform: scale(0.5);
-ms-transform: scale(0.5);
-o-transform: scale(0.5);
transform: scale(0.5);
-webkit-transition: all 250ms ease-in-out;
-moz-transition: all 250ms ease-in-out;
-ms-transition: all 250ms ease-in-out;
-o-transition: all 250ms ease-in-out;
transition: all 250ms ease-in-out;
}
.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready {
/* Fade window overlay */
opacity: 1;
}
.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready > .oo-ui-window-frame {
/* Fade frame */
opacity: 1;
-webkit-transform: scale(1);
-moz-transform: scale(1);
-ms-transform: scale(1);
-o-transform: scale(1);
transform: scale(1);
}
.oo-ui-windowManager-modal.oo-ui-windowManager-floating > .oo-ui-dialog > .oo-ui-window-frame {
border: 1px solid #cccccc;
border-radius: 0.5em;
box-shadow: 0 0.2em 1em rgba(0, 0, 0, 0.3);
}
.oo-ui-icon-circle {
background-image: /* @embed */ url(themes/apex/images/icons/circle.png);
}
.oo-ui-icon-add {
background-image: /* @embed */ url(themes/apex/images/icons/add.png);
}
.oo-ui-icon-advanced {
background-image: /* @embed */ url(themes/apex/images/icons/advanced.png);
}
.oo-ui-icon-alert {
background-image: /* @embed */ url(themes/apex/images/icons/alert.png);
}
.oo-ui-icon-check {
background-image: /* @embed */ url(themes/apex/images/icons/check.png);
}
.oo-ui-icon-clear {
background-image: /* @embed */ url(themes/apex/images/icons/clear.png);
}
.oo-ui-icon-close {
background-image: /* @embed */ url(themes/apex/images/icons/close.png);
}
.oo-ui-icon-code {
background-image: /* @embed */ url(themes/apex/images/icons/code.png);
}
.oo-ui-icon-collapse {
background-image: /* @embed */ url(themes/apex/images/icons/collapse.png);
}
.oo-ui-icon-comment {
background-image: /* @embed */ url(themes/apex/images/icons/comment.png);
}
.oo-ui-icon-ellipsis {
background-image: /* @embed */ url(themes/apex/images/icons/ellipsis.png);
}
.oo-ui-icon-expand {
background-image: /* @embed */ url(themes/apex/images/icons/expand.png);
}
.oo-ui-icon-help {
background-image: /* @embed */ url(themes/apex/images/icons/help-ltr.png);
}
.oo-ui-icon-info {
background-image: /* @embed */ url(themes/apex/images/icons/info.png);
}
.oo-ui-icon-menu {
background-image: /* @embed */ url(themes/apex/images/icons/menu.png);
}
.oo-ui-icon-next {
background-image: /* @embed */ url(themes/apex/images/icons/move-ltr.png);
}
.oo-ui-icon-picture {
background-image: /* @embed */ url(themes/apex/images/icons/picture.png);
}
.oo-ui-icon-previous {
background-image: /* @embed */ url(themes/apex/images/icons/move-rtl.png);
}
.oo-ui-icon-redo {
background-image: /* @embed */ url(themes/apex/images/icons/arched-arrow-ltr.png);
}
.oo-ui-icon-remove {
background-image: /* @embed */ url(themes/apex/images/icons/remove.png);
}
.oo-ui-icon-search {
background-image: /* @embed */ url(themes/apex/images/icons/search.png);
}
.oo-ui-icon-settings {
background-image: /* @embed */ url(themes/apex/images/icons/settings.png);
}
.oo-ui-icon-tag {
background-image: /* @embed */ url(themes/apex/images/icons/tag.png);
}
.oo-ui-icon-undo {
background-image: /* @embed */ url(themes/apex/images/icons/arched-arrow-rtl.png);
}
.oo-ui-icon-window {
background-image: /* @embed */ url(themes/apex/images/icons/window.png);
}
.oo-ui-indicator-alert {
background-image: /* @embed */ url(themes/apex/images/indicators/alert.png);
}
.oo-ui-indicator-up {
background-image: /* @embed */ url(themes/apex/images/indicators/arrow-up.png);
}
.oo-ui-indicator-down {
background-image: /* @embed */ url(themes/apex/images/indicators/arrow-down.png);
}
.oo-ui-indicator-next {
background-image: /* @embed */ url(themes/apex/images/indicators/arrow-ltr.png);
}
.oo-ui-indicator-previous {
background-image: /* @embed */ url(themes/apex/images/indicators/arrow-rtl.png);
}
.oo-ui-indicator-required {
background-image: /* @embed */ url(themes/apex/images/indicators/required.png);
}
.oo-ui-texture-pending {
background-image: /* @embed */ url(themes/apex/images/textures/pending.gif);
}
.oo-ui-texture-transparency {
background-image: /* @embed */ url(themes/apex/images/textures/transparency.png);
}
| jonobr1/cdnjs | ajax/libs/oojs-ui/0.9.6/oojs-ui-apex.raster.css | CSS | mit | 80,301 |
/*!
* Inheritance.js (0.4.3)
*
* Copyright (c) 2015 Brandon Sara (http://bsara.github.io)
* Licensed under the CPOL-1.02 (https://github.com/bsara/inheritance.js/blob/master/LICENSE.md)
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
define([], factory);
} else if (typeof exports === 'object') {
module.exports = factory();
} else {
root.I = {};
root.I.mix = factory();
}
}(this, function() {/**
* TODO: Add description
*
* @param {Object} obj - The object to mix into.
* NOTE: `undefined` and `null` are both VALID values for
* this parameter. If `obj` is `undefined` or `null`, then
* a new object will be created from the `mixins` given.
* @param {Array<Object>|Object} mixins - An array of objects whose properties should be mixed
* into the given `obj`.
* NOTE: The order of objects in this array does matter!
* If there are properties present in multiple mixin
* objects, then the mixin with the largest index value
* overwrite any values set by the lower index valued
* mixin objects.
*
* @returns {Object} The mixed version of `obj`.
*/
function mix(obj, mixins) {
var newObj = (obj || {});
if (!(mixins instanceof Array)) {
mixins = [ mixins ];
}
for (var i = 0; i < mixins.length; i++) {
var mixin = mixins[i];
if (!mixin) {
continue;
}
for (var propName in mixin) {
if (mixin.hasOwnProperty(propName)) {
newObj[propName] = mixin[propName];
}
}
}
return newObj;
}
return mix;
}));
| redmunds/cdnjs | ajax/libs/inheritance-js/0.4.3/modules/inheritance.mix.js | JavaScript | mit | 1,907 |
/**
* @license
* Video.js 5.12.3 <http://videojs.com/>
* Copyright Brightcove, Inc. <https://www.brightcove.com/>
* Available under Apache License Version 2.0
* <https://github.com/videojs/video.js/blob/master/LICENSE>
*/
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.videojs = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _button = _dereq_(2);
var _button2 = _interopRequireDefault(_button);
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file big-play-button.js
*/
/**
* Initial play button. Shows before the video has played. The hiding of the
* big play button is done via CSS and player states.
*
* @param {Object} player Main Player
* @param {Object=} options Object of option names and values
* @extends Button
* @class BigPlayButton
*/
var BigPlayButton = function (_Button) {
_inherits(BigPlayButton, _Button);
function BigPlayButton(player, options) {
_classCallCheck(this, BigPlayButton);
return _possibleConstructorReturn(this, _Button.call(this, player, options));
}
/**
* Allow sub components to stack CSS class names
*
* @return {String} The constructed class name
* @method buildCSSClass
*/
BigPlayButton.prototype.buildCSSClass = function buildCSSClass() {
return 'vjs-big-play-button';
};
/**
* Handles click for play
*
* @method handleClick
*/
BigPlayButton.prototype.handleClick = function handleClick() {
this.player_.play();
};
return BigPlayButton;
}(_button2['default']);
BigPlayButton.prototype.controlText_ = 'Play Video';
_component2['default'].registerComponent('BigPlayButton', BigPlayButton);
exports['default'] = BigPlayButton;
},{"2":2,"5":5}],2:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _clickableComponent = _dereq_(3);
var _clickableComponent2 = _interopRequireDefault(_clickableComponent);
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _log = _dereq_(85);
var _log2 = _interopRequireDefault(_log);
var _object = _dereq_(136);
var _object2 = _interopRequireDefault(_object);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file button.js
*/
/**
* Base class for all buttons
*
* @param {Object} player Main Player
* @param {Object=} options Object of option names and values
* @extends ClickableComponent
* @class Button
*/
var Button = function (_ClickableComponent) {
_inherits(Button, _ClickableComponent);
function Button(player, options) {
_classCallCheck(this, Button);
return _possibleConstructorReturn(this, _ClickableComponent.call(this, player, options));
}
/**
* Create the component's DOM element
*
* @param {String=} type Element's node type. e.g. 'div'
* @param {Object=} props An object of properties that should be set on the element
* @param {Object=} attributes An object of attributes that should be set on the element
* @return {Element}
* @method createEl
*/
Button.prototype.createEl = function createEl() {
var tag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'button';
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
props = (0, _object2['default'])({
className: this.buildCSSClass()
}, props);
if (tag !== 'button') {
_log2['default'].warn('Creating a Button with an HTML element of ' + tag + ' is deprecated; use ClickableComponent instead.');
// Add properties for clickable element which is not a native HTML button
props = (0, _object2['default'])({
tabIndex: 0
}, props);
// Add ARIA attributes for clickable element which is not a native HTML button
attributes = (0, _object2['default'])({
role: 'button'
}, attributes);
}
// Add attributes for button element
attributes = (0, _object2['default'])({
// Necessary since the default button type is "submit"
'type': 'button',
// let the screen reader user know that the text of the button may change
'aria-live': 'polite'
}, attributes);
var el = _component2['default'].prototype.createEl.call(this, tag, props, attributes);
this.createControlTextEl(el);
return el;
};
/**
* Adds a child component inside this button
*
* @param {String|Component} child The class name or instance of a child to add
* @param {Object=} options Options, including options to be passed to children of the child.
* @return {Component} The child component (created by this process if a string was used)
* @deprecated
* @method addChild
*/
Button.prototype.addChild = function addChild(child) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var className = this.constructor.name;
_log2['default'].warn('Adding an actionable (user controllable) child to a Button (' + className + ') is not supported; use a ClickableComponent instead.');
// Avoid the error message generated by ClickableComponent's addChild method
return _component2['default'].prototype.addChild.call(this, child, options);
};
/**
* Handle KeyPress (document level) - Extend with specific functionality for button
*
* @method handleKeyPress
*/
Button.prototype.handleKeyPress = function handleKeyPress(event) {
// Ignore Space (32) or Enter (13) key operation, which is handled by the browser for a button.
if (event.which === 32 || event.which === 13) {
return;
}
// Pass keypress handling up for unsupported keys
_ClickableComponent.prototype.handleKeyPress.call(this, event);
};
return Button;
}(_clickableComponent2['default']);
_component2['default'].registerComponent('Button', Button);
exports['default'] = Button;
},{"136":136,"3":3,"5":5,"85":85}],3:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _dom = _dereq_(80);
var Dom = _interopRequireWildcard(_dom);
var _events = _dereq_(81);
var Events = _interopRequireWildcard(_events);
var _fn = _dereq_(82);
var Fn = _interopRequireWildcard(_fn);
var _log = _dereq_(85);
var _log2 = _interopRequireDefault(_log);
var _document = _dereq_(92);
var _document2 = _interopRequireDefault(_document);
var _object = _dereq_(136);
var _object2 = _interopRequireDefault(_object);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file button.js
*/
/**
* Clickable Component which is clickable or keyboard actionable, but is not a native HTML button
*
* @param {Object} player Main Player
* @param {Object=} options Object of option names and values
* @extends Component
* @class ClickableComponent
*/
var ClickableComponent = function (_Component) {
_inherits(ClickableComponent, _Component);
function ClickableComponent(player, options) {
_classCallCheck(this, ClickableComponent);
var _this = _possibleConstructorReturn(this, _Component.call(this, player, options));
_this.emitTapEvents();
_this.on('tap', _this.handleClick);
_this.on('click', _this.handleClick);
_this.on('focus', _this.handleFocus);
_this.on('blur', _this.handleBlur);
return _this;
}
/**
* Create the component's DOM element
*
* @param {String=} type Element's node type. e.g. 'div'
* @param {Object=} props An object of properties that should be set on the element
* @param {Object=} attributes An object of attributes that should be set on the element
* @return {Element}
* @method createEl
*/
ClickableComponent.prototype.createEl = function createEl() {
var tag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'div';
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
props = (0, _object2['default'])({
className: this.buildCSSClass(),
tabIndex: 0
}, props);
if (tag === 'button') {
_log2['default'].error('Creating a ClickableComponent with an HTML element of ' + tag + ' is not supported; use a Button instead.');
}
// Add ARIA attributes for clickable element which is not a native HTML button
attributes = (0, _object2['default'])({
'role': 'button',
// let the screen reader user know that the text of the element may change
'aria-live': 'polite'
}, attributes);
var el = _Component.prototype.createEl.call(this, tag, props, attributes);
this.createControlTextEl(el);
return el;
};
/**
* create control text
*
* @param {Element} el Parent element for the control text
* @return {Element}
* @method controlText
*/
ClickableComponent.prototype.createControlTextEl = function createControlTextEl(el) {
this.controlTextEl_ = Dom.createEl('span', {
className: 'vjs-control-text'
});
if (el) {
el.appendChild(this.controlTextEl_);
}
this.controlText(this.controlText_, el);
return this.controlTextEl_;
};
/**
* Controls text - both request and localize
*
* @param {String} text Text for element
* @param {Element=} el Element to set the title on
* @return {String}
* @method controlText
*/
ClickableComponent.prototype.controlText = function controlText(text) {
var el = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.el();
if (!text) {
return this.controlText_ || 'Need Text';
}
var localizedText = this.localize(text);
this.controlText_ = text;
this.controlTextEl_.innerHTML = localizedText;
el.setAttribute('title', localizedText);
return this;
};
/**
* Allows sub components to stack CSS class names
*
* @return {String}
* @method buildCSSClass
*/
ClickableComponent.prototype.buildCSSClass = function buildCSSClass() {
return 'vjs-control vjs-button ' + _Component.prototype.buildCSSClass.call(this);
};
/**
* Adds a child component inside this clickable-component
*
* @param {String|Component} child The class name or instance of a child to add
* @param {Object=} options Options, including options to be passed to children of the child.
* @return {Component} The child component (created by this process if a string was used)
* @method addChild
*/
ClickableComponent.prototype.addChild = function addChild(child) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
// TODO: Fix adding an actionable child to a ClickableComponent; currently
// it will cause issues with assistive technology (e.g. screen readers)
// which support ARIA, since an element with role="button" cannot have
// actionable child elements.
// let className = this.constructor.name;
// log.warn(`Adding a child to a ClickableComponent (${className}) can cause issues with assistive technology which supports ARIA, since an element with role="button" cannot have actionable child elements.`);
return _Component.prototype.addChild.call(this, child, options);
};
/**
* Enable the component element
*
* @return {Component}
* @method enable
*/
ClickableComponent.prototype.enable = function enable() {
this.removeClass('vjs-disabled');
this.el_.setAttribute('aria-disabled', 'false');
return this;
};
/**
* Disable the component element
*
* @return {Component}
* @method disable
*/
ClickableComponent.prototype.disable = function disable() {
this.addClass('vjs-disabled');
this.el_.setAttribute('aria-disabled', 'true');
return this;
};
/**
* Handle Click - Override with specific functionality for component
*
* @method handleClick
*/
ClickableComponent.prototype.handleClick = function handleClick() {};
/**
* Handle Focus - Add keyboard functionality to element
*
* @method handleFocus
*/
ClickableComponent.prototype.handleFocus = function handleFocus() {
Events.on(_document2['default'], 'keydown', Fn.bind(this, this.handleKeyPress));
};
/**
* Handle KeyPress (document level) - Trigger click when Space or Enter key is pressed
*
* @method handleKeyPress
*/
ClickableComponent.prototype.handleKeyPress = function handleKeyPress(event) {
// Support Space (32) or Enter (13) key operation to fire a click event
if (event.which === 32 || event.which === 13) {
event.preventDefault();
this.handleClick(event);
} else if (_Component.prototype.handleKeyPress) {
// Pass keypress handling up for unsupported keys
_Component.prototype.handleKeyPress.call(this, event);
}
};
/**
* Handle Blur - Remove keyboard triggers
*
* @method handleBlur
*/
ClickableComponent.prototype.handleBlur = function handleBlur() {
Events.off(_document2['default'], 'keydown', Fn.bind(this, this.handleKeyPress));
};
return ClickableComponent;
}(_component2['default']);
_component2['default'].registerComponent('ClickableComponent', ClickableComponent);
exports['default'] = ClickableComponent;
},{"136":136,"5":5,"80":80,"81":81,"82":82,"85":85,"92":92}],4:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _button = _dereq_(2);
var _button2 = _interopRequireDefault(_button);
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
/**
* The `CloseButton` component is a button which fires a "close" event
* when it is activated.
*
* @extends Button
* @class CloseButton
*/
var CloseButton = function (_Button) {
_inherits(CloseButton, _Button);
function CloseButton(player, options) {
_classCallCheck(this, CloseButton);
var _this = _possibleConstructorReturn(this, _Button.call(this, player, options));
_this.controlText(options && options.controlText || _this.localize('Close'));
return _this;
}
CloseButton.prototype.buildCSSClass = function buildCSSClass() {
return 'vjs-close-button ' + _Button.prototype.buildCSSClass.call(this);
};
CloseButton.prototype.handleClick = function handleClick() {
this.trigger({ type: 'close', bubbles: false });
};
return CloseButton;
}(_button2['default']);
_component2['default'].registerComponent('CloseButton', CloseButton);
exports['default'] = CloseButton;
},{"2":2,"5":5}],5:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _window = _dereq_(93);
var _window2 = _interopRequireDefault(_window);
var _dom = _dereq_(80);
var Dom = _interopRequireWildcard(_dom);
var _fn = _dereq_(82);
var Fn = _interopRequireWildcard(_fn);
var _guid = _dereq_(84);
var Guid = _interopRequireWildcard(_guid);
var _events = _dereq_(81);
var Events = _interopRequireWildcard(_events);
var _log = _dereq_(85);
var _log2 = _interopRequireDefault(_log);
var _toTitleCase = _dereq_(89);
var _toTitleCase2 = _interopRequireDefault(_toTitleCase);
var _mergeOptions = _dereq_(86);
var _mergeOptions2 = _interopRequireDefault(_mergeOptions);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } /**
* @file component.js
*
* Player Component - Base class for all UI objects
*/
/**
* Base UI Component class
* Components are embeddable UI objects that are represented by both a
* javascript object and an element in the DOM. They can be children of other
* components, and can have many children themselves.
* ```js
* // adding a button to the player
* var button = player.addChild('button');
* button.el(); // -> button element
* ```
* ```html
* <div class="video-js">
* <div class="vjs-button">Button</div>
* </div>
* ```
* Components are also event targets.
* ```js
* button.on('click', function() {
* console.log('Button Clicked!');
* });
* button.trigger('customevent');
* ```
*
* @param {Object} player Main Player
* @param {Object=} options Object of option names and values
* @param {Function=} ready Ready callback function
* @class Component
*/
var Component = function () {
function Component(player, options, ready) {
_classCallCheck(this, Component);
// The component might be the player itself and we can't pass `this` to super
if (!player && this.play) {
this.player_ = player = this; // eslint-disable-line
} else {
this.player_ = player;
}
// Make a copy of prototype.options_ to protect against overriding defaults
this.options_ = (0, _mergeOptions2['default'])({}, this.options_);
// Updated options with supplied options
options = this.options_ = (0, _mergeOptions2['default'])(this.options_, options);
// Get ID from options or options element if one is supplied
this.id_ = options.id || options.el && options.el.id;
// If there was no ID from the options, generate one
if (!this.id_) {
// Don't require the player ID function in the case of mock players
var id = player && player.id && player.id() || 'no_player';
this.id_ = id + '_component_' + Guid.newGUID();
}
this.name_ = options.name || null;
// Create element if one wasn't provided in options
if (options.el) {
this.el_ = options.el;
} else if (options.createEl !== false) {
this.el_ = this.createEl();
}
this.children_ = [];
this.childIndex_ = {};
this.childNameIndex_ = {};
// Add any child components in options
if (options.initChildren !== false) {
this.initChildren();
}
this.ready(ready);
// Don't want to trigger ready here or it will before init is actually
// finished for all children that run this constructor
if (options.reportTouchActivity !== false) {
this.enableTouchActivity();
}
}
/**
* Dispose of the component and all child components
*
* @method dispose
*/
Component.prototype.dispose = function dispose() {
this.trigger({ type: 'dispose', bubbles: false });
// Dispose all children.
if (this.children_) {
for (var i = this.children_.length - 1; i >= 0; i--) {
if (this.children_[i].dispose) {
this.children_[i].dispose();
}
}
}
// Delete child references
this.children_ = null;
this.childIndex_ = null;
this.childNameIndex_ = null;
// Remove all event listeners.
this.off();
// Remove element from DOM
if (this.el_.parentNode) {
this.el_.parentNode.removeChild(this.el_);
}
Dom.removeElData(this.el_);
this.el_ = null;
};
/**
* Return the component's player
*
* @return {Player}
* @method player
*/
Component.prototype.player = function player() {
return this.player_;
};
/**
* Deep merge of options objects
* Whenever a property is an object on both options objects
* the two properties will be merged using mergeOptions.
*
* ```js
* Parent.prototype.options_ = {
* optionSet: {
* 'childOne': { 'foo': 'bar', 'asdf': 'fdsa' },
* 'childTwo': {},
* 'childThree': {}
* }
* }
* newOptions = {
* optionSet: {
* 'childOne': { 'foo': 'baz', 'abc': '123' }
* 'childTwo': null,
* 'childFour': {}
* }
* }
*
* this.options(newOptions);
* ```
* RESULT
* ```js
* {
* optionSet: {
* 'childOne': { 'foo': 'baz', 'asdf': 'fdsa', 'abc': '123' },
* 'childTwo': null, // Disabled. Won't be initialized.
* 'childThree': {},
* 'childFour': {}
* }
* }
* ```
*
* @param {Object} obj Object of new option values
* @return {Object} A NEW object of this.options_ and obj merged
* @method options
*/
Component.prototype.options = function options(obj) {
_log2['default'].warn('this.options() has been deprecated and will be moved to the constructor in 6.0');
if (!obj) {
return this.options_;
}
this.options_ = (0, _mergeOptions2['default'])(this.options_, obj);
return this.options_;
};
/**
* Get the component's DOM element
* ```js
* var domEl = myComponent.el();
* ```
*
* @return {Element}
* @method el
*/
Component.prototype.el = function el() {
return this.el_;
};
/**
* Create the component's DOM element
*
* @param {String=} tagName Element's node type. e.g. 'div'
* @param {Object=} properties An object of properties that should be set
* @param {Object=} attributes An object of attributes that should be set
* @return {Element}
* @method createEl
*/
Component.prototype.createEl = function createEl(tagName, properties, attributes) {
return Dom.createEl(tagName, properties, attributes);
};
Component.prototype.localize = function localize(string) {
var code = this.player_.language && this.player_.language();
var languages = this.player_.languages && this.player_.languages();
if (!code || !languages) {
return string;
}
var language = languages[code];
if (language && language[string]) {
return language[string];
}
var primaryCode = code.split('-')[0];
var primaryLang = languages[primaryCode];
if (primaryLang && primaryLang[string]) {
return primaryLang[string];
}
return string;
};
/**
* Return the component's DOM element where children are inserted.
* Will either be the same as el() or a new element defined in createEl().
*
* @return {Element}
* @method contentEl
*/
Component.prototype.contentEl = function contentEl() {
return this.contentEl_ || this.el_;
};
/**
* Get the component's ID
* ```js
* var id = myComponent.id();
* ```
*
* @return {String}
* @method id
*/
Component.prototype.id = function id() {
return this.id_;
};
/**
* Get the component's name. The name is often used to reference the component.
* ```js
* var name = myComponent.name();
* ```
*
* @return {String}
* @method name
*/
Component.prototype.name = function name() {
return this.name_;
};
/**
* Get an array of all child components
* ```js
* var kids = myComponent.children();
* ```
*
* @return {Array} The children
* @method children
*/
Component.prototype.children = function children() {
return this.children_;
};
/**
* Returns a child component with the provided ID
*
* @return {Component}
* @method getChildById
*/
Component.prototype.getChildById = function getChildById(id) {
return this.childIndex_[id];
};
/**
* Returns a child component with the provided name
*
* @return {Component}
* @method getChild
*/
Component.prototype.getChild = function getChild(name) {
return this.childNameIndex_[name];
};
/**
* Adds a child component inside this component
* ```js
* myComponent.el();
* // -> <div class='my-component'></div>
* myComponent.children();
* // [empty array]
*
* var myButton = myComponent.addChild('MyButton');
* // -> <div class='my-component'><div class="my-button">myButton<div></div>
* // -> myButton === myComponent.children()[0];
* ```
* Pass in options for child constructors and options for children of the child
* ```js
* var myButton = myComponent.addChild('MyButton', {
* text: 'Press Me',
* buttonChildExample: {
* buttonChildOption: true
* }
* });
* ```
*
* @param {String|Component} child The class name or instance of a child to add
* @param {Object=} options Options, including options to be passed to children of the child.
* @param {Number} index into our children array to attempt to add the child
* @return {Component} The child component (created by this process if a string was used)
* @method addChild
*/
Component.prototype.addChild = function addChild(child) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.children_.length;
var component = void 0;
var componentName = void 0;
// If child is a string, create nt with options
if (typeof child === 'string') {
componentName = child;
// Options can also be specified as a boolean, so convert to an empty object if false.
if (!options) {
options = {};
}
// Same as above, but true is deprecated so show a warning.
if (options === true) {
_log2['default'].warn('Initializing a child component with `true` is deprecated. Children should be defined in an array when possible, but if necessary use an object instead of `true`.');
options = {};
}
// If no componentClass in options, assume componentClass is the name lowercased
// (e.g. playButton)
var componentClassName = options.componentClass || (0, _toTitleCase2['default'])(componentName);
// Set name through options
options.name = componentName;
// Create a new object & element for this controls set
// If there's no .player_, this is a player
var ComponentClass = Component.getComponent(componentClassName);
if (!ComponentClass) {
throw new Error('Component ' + componentClassName + ' does not exist');
}
// data stored directly on the videojs object may be
// misidentified as a component to retain
// backwards-compatibility with 4.x. check to make sure the
// component class can be instantiated.
if (typeof ComponentClass !== 'function') {
return null;
}
component = new ComponentClass(this.player_ || this, options);
// child is a component instance
} else {
component = child;
}
this.children_.splice(index, 0, component);
if (typeof component.id === 'function') {
this.childIndex_[component.id()] = component;
}
// If a name wasn't used to create the component, check if we can use the
// name function of the component
componentName = componentName || component.name && component.name();
if (componentName) {
this.childNameIndex_[componentName] = component;
}
// Add the UI object's element to the container div (box)
// Having an element is not required
if (typeof component.el === 'function' && component.el()) {
var childNodes = this.contentEl().children;
var refNode = childNodes[index] || null;
this.contentEl().insertBefore(component.el(), refNode);
}
// Return so it can stored on parent object if desired.
return component;
};
/**
* Remove a child component from this component's list of children, and the
* child component's element from this component's element
*
* @param {Component} component Component to remove
* @method removeChild
*/
Component.prototype.removeChild = function removeChild(component) {
if (typeof component === 'string') {
component = this.getChild(component);
}
if (!component || !this.children_) {
return;
}
var childFound = false;
for (var i = this.children_.length - 1; i >= 0; i--) {
if (this.children_[i] === component) {
childFound = true;
this.children_.splice(i, 1);
break;
}
}
if (!childFound) {
return;
}
this.childIndex_[component.id()] = null;
this.childNameIndex_[component.name()] = null;
var compEl = component.el();
if (compEl && compEl.parentNode === this.contentEl()) {
this.contentEl().removeChild(component.el());
}
};
/**
* Add and initialize default child components from options
* ```js
* // when an instance of MyComponent is created, all children in options
* // will be added to the instance by their name strings and options
* MyComponent.prototype.options_ = {
* children: [
* 'myChildComponent'
* ],
* myChildComponent: {
* myChildOption: true
* }
* };
*
* // Or when creating the component
* var myComp = new MyComponent(player, {
* children: [
* 'myChildComponent'
* ],
* myChildComponent: {
* myChildOption: true
* }
* });
* ```
* The children option can also be an array of
* child options objects (that also include a 'name' key).
* This can be used if you have two child components of the
* same type that need different options.
* ```js
* var myComp = new MyComponent(player, {
* children: [
* 'button',
* {
* name: 'button',
* someOtherOption: true
* },
* {
* name: 'button',
* someOtherOption: false
* }
* ]
* });
* ```
*
* @method initChildren
*/
Component.prototype.initChildren = function initChildren() {
var _this = this;
var children = this.options_.children;
if (children) {
(function () {
// `this` is `parent`
var parentOptions = _this.options_;
var handleAdd = function handleAdd(child) {
var name = child.name;
var opts = child.opts;
// Allow options for children to be set at the parent options
// e.g. videojs(id, { controlBar: false });
// instead of videojs(id, { children: { controlBar: false });
if (parentOptions[name] !== undefined) {
opts = parentOptions[name];
}
// Allow for disabling default components
// e.g. options['children']['posterImage'] = false
if (opts === false) {
return;
}
// Allow options to be passed as a simple boolean if no configuration
// is necessary.
if (opts === true) {
opts = {};
}
// We also want to pass the original player options to each component as well so they don't need to
// reach back into the player for options later.
opts.playerOptions = _this.options_.playerOptions;
// Create and add the child component.
// Add a direct reference to the child by name on the parent instance.
// If two of the same component are used, different names should be supplied
// for each
var newChild = _this.addChild(name, opts);
if (newChild) {
_this[name] = newChild;
}
};
// Allow for an array of children details to passed in the options
var workingChildren = void 0;
var Tech = Component.getComponent('Tech');
if (Array.isArray(children)) {
workingChildren = children;
} else {
workingChildren = Object.keys(children);
}
workingChildren
// children that are in this.options_ but also in workingChildren would
// give us extra children we do not want. So, we want to filter them out.
.concat(Object.keys(_this.options_).filter(function (child) {
return !workingChildren.some(function (wchild) {
if (typeof wchild === 'string') {
return child === wchild;
}
return child === wchild.name;
});
})).map(function (child) {
var name = void 0;
var opts = void 0;
if (typeof child === 'string') {
name = child;
opts = children[name] || _this.options_[name] || {};
} else {
name = child.name;
opts = child;
}
return { name: name, opts: opts };
}).filter(function (child) {
// we have to make sure that child.name isn't in the techOrder since
// techs are registerd as Components but can't aren't compatible
// See https://github.com/videojs/video.js/issues/2772
var c = Component.getComponent(child.opts.componentClass || (0, _toTitleCase2['default'])(child.name));
return c && !Tech.isTech(c);
}).forEach(handleAdd);
})();
}
};
/**
* Allows sub components to stack CSS class names
*
* @return {String} The constructed class name
* @method buildCSSClass
*/
Component.prototype.buildCSSClass = function buildCSSClass() {
// Child classes can include a function that does:
// return 'CLASS NAME' + this._super();
return '';
};
/**
* Add an event listener to this component's element
* ```js
* var myFunc = function() {
* var myComponent = this;
* // Do something when the event is fired
* };
*
* myComponent.on('eventType', myFunc);
* ```
* The context of myFunc will be myComponent unless previously bound.
* Alternatively, you can add a listener to another element or component.
* ```js
* myComponent.on(otherElement, 'eventName', myFunc);
* myComponent.on(otherComponent, 'eventName', myFunc);
* ```
* The benefit of using this over `VjsEvents.on(otherElement, 'eventName', myFunc)`
* and `otherComponent.on('eventName', myFunc)` is that this way the listeners
* will be automatically cleaned up when either component is disposed.
* It will also bind myComponent as the context of myFunc.
* **NOTE**: When using this on elements in the page other than window
* and document (both permanent), if you remove the element from the DOM
* you need to call `myComponent.trigger(el, 'dispose')` on it to clean up
* references to it and allow the browser to garbage collect it.
*
* @param {String|Component} first The event type or other component
* @param {Function|String} second The event handler or event type
* @param {Function} third The event handler
* @return {Component}
* @method on
*/
Component.prototype.on = function on(first, second, third) {
var _this2 = this;
if (typeof first === 'string' || Array.isArray(first)) {
Events.on(this.el_, first, Fn.bind(this, second));
// Targeting another component or element
} else {
(function () {
var target = first;
var type = second;
var fn = Fn.bind(_this2, third);
// When this component is disposed, remove the listener from the other component
var removeOnDispose = function removeOnDispose() {
return _this2.off(target, type, fn);
};
// Use the same function ID so we can remove it later it using the ID
// of the original listener
removeOnDispose.guid = fn.guid;
_this2.on('dispose', removeOnDispose);
// If the other component is disposed first we need to clean the reference
// to the other component in this component's removeOnDispose listener
// Otherwise we create a memory leak.
var cleanRemover = function cleanRemover() {
return _this2.off('dispose', removeOnDispose);
};
// Add the same function ID so we can easily remove it later
cleanRemover.guid = fn.guid;
// Check if this is a DOM node
if (first.nodeName) {
// Add the listener to the other element
Events.on(target, type, fn);
Events.on(target, 'dispose', cleanRemover);
// Should be a component
// Not using `instanceof Component` because it makes mock players difficult
} else if (typeof first.on === 'function') {
// Add the listener to the other component
target.on(type, fn);
target.on('dispose', cleanRemover);
}
})();
}
return this;
};
/**
* Remove an event listener from this component's element
* ```js
* myComponent.off('eventType', myFunc);
* ```
* If myFunc is excluded, ALL listeners for the event type will be removed.
* If eventType is excluded, ALL listeners will be removed from the component.
* Alternatively you can use `off` to remove listeners that were added to other
* elements or components using `myComponent.on(otherComponent...`.
* In this case both the event type and listener function are REQUIRED.
* ```js
* myComponent.off(otherElement, 'eventType', myFunc);
* myComponent.off(otherComponent, 'eventType', myFunc);
* ```
*
* @param {String=|Component} first The event type or other component
* @param {Function=|String} second The listener function or event type
* @param {Function=} third The listener for other component
* @return {Component}
* @method off
*/
Component.prototype.off = function off(first, second, third) {
if (!first || typeof first === 'string' || Array.isArray(first)) {
Events.off(this.el_, first, second);
} else {
var target = first;
var type = second;
// Ensure there's at least a guid, even if the function hasn't been used
var fn = Fn.bind(this, third);
// Remove the dispose listener on this component,
// which was given the same guid as the event listener
this.off('dispose', fn);
if (first.nodeName) {
// Remove the listener
Events.off(target, type, fn);
// Remove the listener for cleaning the dispose listener
Events.off(target, 'dispose', fn);
} else {
target.off(type, fn);
target.off('dispose', fn);
}
}
return this;
};
/**
* Add an event listener to be triggered only once and then removed
* ```js
* myComponent.one('eventName', myFunc);
* ```
* Alternatively you can add a listener to another element or component
* that will be triggered only once.
* ```js
* myComponent.one(otherElement, 'eventName', myFunc);
* myComponent.one(otherComponent, 'eventName', myFunc);
* ```
*
* @param {String|Component} first The event type or other component
* @param {Function|String} second The listener function or event type
* @param {Function=} third The listener function for other component
* @return {Component}
* @method one
*/
Component.prototype.one = function one(first, second, third) {
var _this3 = this,
_arguments = arguments;
if (typeof first === 'string' || Array.isArray(first)) {
Events.one(this.el_, first, Fn.bind(this, second));
} else {
(function () {
var target = first;
var type = second;
var fn = Fn.bind(_this3, third);
var newFunc = function newFunc() {
_this3.off(target, type, newFunc);
fn.apply(null, _arguments);
};
// Keep the same function ID so we can remove it later
newFunc.guid = fn.guid;
_this3.on(target, type, newFunc);
})();
}
return this;
};
/**
* Trigger an event on an element
* ```js
* myComponent.trigger('eventName');
* myComponent.trigger({'type':'eventName'});
* myComponent.trigger('eventName', {data: 'some data'});
* myComponent.trigger({'type':'eventName'}, {data: 'some data'});
* ```
*
* @param {Event|Object|String} event A string (the type) or an event object with a type attribute
* @param {Object} [hash] data hash to pass along with the event
* @return {Component} self
* @method trigger
*/
Component.prototype.trigger = function trigger(event, hash) {
Events.trigger(this.el_, event, hash);
return this;
};
/**
* Bind a listener to the component's ready state.
* Different from event listeners in that if the ready event has already happened
* it will trigger the function immediately.
*
* @param {Function} fn Ready listener
* @param {Boolean} sync Exec the listener synchronously if component is ready
* @return {Component}
* @method ready
*/
Component.prototype.ready = function ready(fn) {
var sync = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
if (fn) {
if (this.isReady_) {
if (sync) {
fn.call(this);
} else {
// Call the function asynchronously by default for consistency
this.setTimeout(fn, 1);
}
} else {
this.readyQueue_ = this.readyQueue_ || [];
this.readyQueue_.push(fn);
}
}
return this;
};
/**
* Trigger the ready listeners
*
* @return {Component}
* @method triggerReady
*/
Component.prototype.triggerReady = function triggerReady() {
this.isReady_ = true;
// Ensure ready is triggerd asynchronously
this.setTimeout(function () {
var readyQueue = this.readyQueue_;
// Reset Ready Queue
this.readyQueue_ = [];
if (readyQueue && readyQueue.length > 0) {
readyQueue.forEach(function (fn) {
fn.call(this);
}, this);
}
// Allow for using event listeners also
this.trigger('ready');
}, 1);
};
/**
* Finds a single DOM element matching `selector` within the component's
* `contentEl` or another custom context.
*
* @method $
* @param {String} selector
* A valid CSS selector, which will be passed to `querySelector`.
*
* @param {Element|String} [context=document]
* A DOM element within which to query. Can also be a selector
* string in which case the first matching element will be used
* as context. If missing (or no element matches selector), falls
* back to `document`.
*
* @return {Element|null}
*/
Component.prototype.$ = function $(selector, context) {
return Dom.$(selector, context || this.contentEl());
};
/**
* Finds a all DOM elements matching `selector` within the component's
* `contentEl` or another custom context.
*
* @method $$
* @param {String} selector
* A valid CSS selector, which will be passed to `querySelectorAll`.
*
* @param {Element|String} [context=document]
* A DOM element within which to query. Can also be a selector
* string in which case the first matching element will be used
* as context. If missing (or no element matches selector), falls
* back to `document`.
*
* @return {NodeList}
*/
Component.prototype.$$ = function $$(selector, context) {
return Dom.$$(selector, context || this.contentEl());
};
/**
* Check if a component's element has a CSS class name
*
* @param {String} classToCheck Classname to check
* @return {Component}
* @method hasClass
*/
Component.prototype.hasClass = function hasClass(classToCheck) {
return Dom.hasElClass(this.el_, classToCheck);
};
/**
* Add a CSS class name to the component's element
*
* @param {String} classToAdd Classname to add
* @return {Component}
* @method addClass
*/
Component.prototype.addClass = function addClass(classToAdd) {
Dom.addElClass(this.el_, classToAdd);
return this;
};
/**
* Remove a CSS class name from the component's element
*
* @param {String} classToRemove Classname to remove
* @return {Component}
* @method removeClass
*/
Component.prototype.removeClass = function removeClass(classToRemove) {
Dom.removeElClass(this.el_, classToRemove);
return this;
};
/**
* Add or remove a CSS class name from the component's element
*
* @param {String} classToToggle
* @param {Boolean|Function} [predicate]
* Can be a function that returns a Boolean. If `true`, the class
* will be added; if `false`, the class will be removed. If not
* given, the class will be added if not present and vice versa.
*
* @return {Component}
* @method toggleClass
*/
Component.prototype.toggleClass = function toggleClass(classToToggle, predicate) {
Dom.toggleElClass(this.el_, classToToggle, predicate);
return this;
};
/**
* Show the component element if hidden
*
* @return {Component}
* @method show
*/
Component.prototype.show = function show() {
this.removeClass('vjs-hidden');
return this;
};
/**
* Hide the component element if currently showing
*
* @return {Component}
* @method hide
*/
Component.prototype.hide = function hide() {
this.addClass('vjs-hidden');
return this;
};
/**
* Lock an item in its visible state
* To be used with fadeIn/fadeOut.
*
* @return {Component}
* @private
* @method lockShowing
*/
Component.prototype.lockShowing = function lockShowing() {
this.addClass('vjs-lock-showing');
return this;
};
/**
* Unlock an item to be hidden
* To be used with fadeIn/fadeOut.
*
* @return {Component}
* @private
* @method unlockShowing
*/
Component.prototype.unlockShowing = function unlockShowing() {
this.removeClass('vjs-lock-showing');
return this;
};
/**
* Set or get the width of the component (CSS values)
* Setting the video tag dimension values only works with values in pixels.
* Percent values will not work.
* Some percents can be used, but width()/height() will return the number + %,
* not the actual computed width/height.
*
* @param {Number|String=} num Optional width number
* @param {Boolean} skipListeners Skip the 'resize' event trigger
* @return {Component} This component, when setting the width
* @return {Number|String} The width, when getting
* @method width
*/
Component.prototype.width = function width(num, skipListeners) {
return this.dimension('width', num, skipListeners);
};
/**
* Get or set the height of the component (CSS values)
* Setting the video tag dimension values only works with values in pixels.
* Percent values will not work.
* Some percents can be used, but width()/height() will return the number + %,
* not the actual computed width/height.
*
* @param {Number|String=} num New component height
* @param {Boolean=} skipListeners Skip the resize event trigger
* @return {Component} This component, when setting the height
* @return {Number|String} The height, when getting
* @method height
*/
Component.prototype.height = function height(num, skipListeners) {
return this.dimension('height', num, skipListeners);
};
/**
* Set both width and height at the same time
*
* @param {Number|String} width Width of player
* @param {Number|String} height Height of player
* @return {Component} The component
* @method dimensions
*/
Component.prototype.dimensions = function dimensions(width, height) {
// Skip resize listeners on width for optimization
return this.width(width, true).height(height);
};
/**
* Get or set width or height
* This is the shared code for the width() and height() methods.
* All for an integer, integer + 'px' or integer + '%';
* Known issue: Hidden elements officially have a width of 0. We're defaulting
* to the style.width value and falling back to computedStyle which has the
* hidden element issue. Info, but probably not an efficient fix:
* http://www.foliotek.com/devblog/getting-the-width-of-a-hidden-element-with-jquery-using-width/
*
* @param {String} widthOrHeight 'width' or 'height'
* @param {Number|String=} num New dimension
* @param {Boolean=} skipListeners Skip resize event trigger
* @return {Component} The component if a dimension was set
* @return {Number|String} The dimension if nothing was set
* @private
* @method dimension
*/
Component.prototype.dimension = function dimension(widthOrHeight, num, skipListeners) {
if (num !== undefined) {
// Set to zero if null or literally NaN (NaN !== NaN)
if (num === null || num !== num) {
num = 0;
}
// Check if using css width/height (% or px) and adjust
if (('' + num).indexOf('%') !== -1 || ('' + num).indexOf('px') !== -1) {
this.el_.style[widthOrHeight] = num;
} else if (num === 'auto') {
this.el_.style[widthOrHeight] = '';
} else {
this.el_.style[widthOrHeight] = num + 'px';
}
// skipListeners allows us to avoid triggering the resize event when setting both width and height
if (!skipListeners) {
this.trigger('resize');
}
// Return component
return this;
}
// Not setting a value, so getting it
// Make sure element exists
if (!this.el_) {
return 0;
}
// Get dimension value from style
var val = this.el_.style[widthOrHeight];
var pxIndex = val.indexOf('px');
if (pxIndex !== -1) {
// Return the pixel value with no 'px'
return parseInt(val.slice(0, pxIndex), 10);
}
// No px so using % or no style was set, so falling back to offsetWidth/height
// If component has display:none, offset will return 0
// TODO: handle display:none and no dimension style using px
return parseInt(this.el_['offset' + (0, _toTitleCase2['default'])(widthOrHeight)], 10);
};
/**
* Get width or height of computed style
* @param {String} widthOrHeight 'width' or 'height'
* @return {Number|Boolean} The bolean false if nothing was set
* @method currentDimension
*/
Component.prototype.currentDimension = function currentDimension(widthOrHeight) {
var computedWidthOrHeight = 0;
if (widthOrHeight !== 'width' && widthOrHeight !== 'height') {
throw new Error('currentDimension only accepts width or height value');
}
if (typeof _window2['default'].getComputedStyle === 'function') {
var computedStyle = _window2['default'].getComputedStyle(this.el_);
computedWidthOrHeight = computedStyle.getPropertyValue(widthOrHeight) || computedStyle[widthOrHeight];
} else if (this.el_.currentStyle) {
// ie 8 doesn't support computed style, shim it
// return clientWidth or clientHeight instead for better accuracy
var rule = 'offset' + (0, _toTitleCase2['default'])(widthOrHeight);
computedWidthOrHeight = this.el_[rule];
}
// remove 'px' from variable and parse as integer
computedWidthOrHeight = parseFloat(computedWidthOrHeight);
return computedWidthOrHeight;
};
/**
* Get an object which contains width and height values of computed style
* @return {Object} The dimensions of element
* @method currentDimensions
*/
Component.prototype.currentDimensions = function currentDimensions() {
return {
width: this.currentDimension('width'),
height: this.currentDimension('height')
};
};
/**
* Get width of computed style
* @return {Integer}
* @method currentWidth
*/
Component.prototype.currentWidth = function currentWidth() {
return this.currentDimension('width');
};
/**
* Get height of computed style
* @return {Integer}
* @method currentHeight
*/
Component.prototype.currentHeight = function currentHeight() {
return this.currentDimension('height');
};
/**
* Emit 'tap' events when touch events are supported
* This is used to support toggling the controls through a tap on the video.
* We're requiring them to be enabled because otherwise every component would
* have this extra overhead unnecessarily, on mobile devices where extra
* overhead is especially bad.
*
* @private
* @method emitTapEvents
*/
Component.prototype.emitTapEvents = function emitTapEvents() {
// Track the start time so we can determine how long the touch lasted
var touchStart = 0;
var firstTouch = null;
// Maximum movement allowed during a touch event to still be considered a tap
// Other popular libs use anywhere from 2 (hammer.js) to 15, so 10 seems like a nice, round number.
var tapMovementThreshold = 10;
// The maximum length a touch can be while still being considered a tap
var touchTimeThreshold = 200;
var couldBeTap = void 0;
this.on('touchstart', function (event) {
// If more than one finger, don't consider treating this as a click
if (event.touches.length === 1) {
// Copy pageX/pageY from the object
firstTouch = {
pageX: event.touches[0].pageX,
pageY: event.touches[0].pageY
};
// Record start time so we can detect a tap vs. "touch and hold"
touchStart = new Date().getTime();
// Reset couldBeTap tracking
couldBeTap = true;
}
});
this.on('touchmove', function (event) {
// If more than one finger, don't consider treating this as a click
if (event.touches.length > 1) {
couldBeTap = false;
} else if (firstTouch) {
// Some devices will throw touchmoves for all but the slightest of taps.
// So, if we moved only a small distance, this could still be a tap
var xdiff = event.touches[0].pageX - firstTouch.pageX;
var ydiff = event.touches[0].pageY - firstTouch.pageY;
var touchDistance = Math.sqrt(xdiff * xdiff + ydiff * ydiff);
if (touchDistance > tapMovementThreshold) {
couldBeTap = false;
}
}
});
var noTap = function noTap() {
couldBeTap = false;
};
// TODO: Listen to the original target. http://youtu.be/DujfpXOKUp8?t=13m8s
this.on('touchleave', noTap);
this.on('touchcancel', noTap);
// When the touch ends, measure how long it took and trigger the appropriate
// event
this.on('touchend', function (event) {
firstTouch = null;
// Proceed only if the touchmove/leave/cancel event didn't happen
if (couldBeTap === true) {
// Measure how long the touch lasted
var touchTime = new Date().getTime() - touchStart;
// Make sure the touch was less than the threshold to be considered a tap
if (touchTime < touchTimeThreshold) {
// Don't let browser turn this into a click
event.preventDefault();
this.trigger('tap');
// It may be good to copy the touchend event object and change the
// type to tap, if the other event properties aren't exact after
// Events.fixEvent runs (e.g. event.target)
}
}
});
};
/**
* Report user touch activity when touch events occur
* User activity is used to determine when controls should show/hide. It's
* relatively simple when it comes to mouse events, because any mouse event
* should show the controls. So we capture mouse events that bubble up to the
* player and report activity when that happens.
* With touch events it isn't as easy. We can't rely on touch events at the
* player level, because a tap (touchstart + touchend) on the video itself on
* mobile devices is meant to turn controls off (and on). User activity is
* checked asynchronously, so what could happen is a tap event on the video
* turns the controls off, then the touchend event bubbles up to the player,
* which if it reported user activity, would turn the controls right back on.
* (We also don't want to completely block touch events from bubbling up)
* Also a touchmove, touch+hold, and anything other than a tap is not supposed
* to turn the controls back on on a mobile device.
* Here we're setting the default component behavior to report user activity
* whenever touch events happen, and this can be turned off by components that
* want touch events to act differently.
*
* @method enableTouchActivity
*/
Component.prototype.enableTouchActivity = function enableTouchActivity() {
// Don't continue if the root player doesn't support reporting user activity
if (!this.player() || !this.player().reportUserActivity) {
return;
}
// listener for reporting that the user is active
var report = Fn.bind(this.player(), this.player().reportUserActivity);
var touchHolding = void 0;
this.on('touchstart', function () {
report();
// For as long as the they are touching the device or have their mouse down,
// we consider them active even if they're not moving their finger or mouse.
// So we want to continue to update that they are active
this.clearInterval(touchHolding);
// report at the same interval as activityCheck
touchHolding = this.setInterval(report, 250);
});
var touchEnd = function touchEnd(event) {
report();
// stop the interval that maintains activity if the touch is holding
this.clearInterval(touchHolding);
};
this.on('touchmove', report);
this.on('touchend', touchEnd);
this.on('touchcancel', touchEnd);
};
/**
* Creates timeout and sets up disposal automatically.
*
* @param {Function} fn The function to run after the timeout.
* @param {Number} timeout Number of ms to delay before executing specified function.
* @return {Number} Returns the timeout ID
* @method setTimeout
*/
Component.prototype.setTimeout = function setTimeout(fn, timeout) {
fn = Fn.bind(this, fn);
// window.setTimeout would be preferable here, but due to some bizarre issue with Sinon and/or Phantomjs, we can't.
var timeoutId = _window2['default'].setTimeout(fn, timeout);
var disposeFn = function disposeFn() {
this.clearTimeout(timeoutId);
};
disposeFn.guid = 'vjs-timeout-' + timeoutId;
this.on('dispose', disposeFn);
return timeoutId;
};
/**
* Clears a timeout and removes the associated dispose listener
*
* @param {Number} timeoutId The id of the timeout to clear
* @return {Number} Returns the timeout ID
* @method clearTimeout
*/
Component.prototype.clearTimeout = function clearTimeout(timeoutId) {
_window2['default'].clearTimeout(timeoutId);
var disposeFn = function disposeFn() {};
disposeFn.guid = 'vjs-timeout-' + timeoutId;
this.off('dispose', disposeFn);
return timeoutId;
};
/**
* Creates an interval and sets up disposal automatically.
*
* @param {Function} fn The function to run every N seconds.
* @param {Number} interval Number of ms to delay before executing specified function.
* @return {Number} Returns the interval ID
* @method setInterval
*/
Component.prototype.setInterval = function setInterval(fn, interval) {
fn = Fn.bind(this, fn);
var intervalId = _window2['default'].setInterval(fn, interval);
var disposeFn = function disposeFn() {
this.clearInterval(intervalId);
};
disposeFn.guid = 'vjs-interval-' + intervalId;
this.on('dispose', disposeFn);
return intervalId;
};
/**
* Clears an interval and removes the associated dispose listener
*
* @param {Number} intervalId The id of the interval to clear
* @return {Number} Returns the interval ID
* @method clearInterval
*/
Component.prototype.clearInterval = function clearInterval(intervalId) {
_window2['default'].clearInterval(intervalId);
var disposeFn = function disposeFn() {};
disposeFn.guid = 'vjs-interval-' + intervalId;
this.off('dispose', disposeFn);
return intervalId;
};
/**
* Registers a component
*
* @param {String} name Name of the component to register
* @param {Object} comp The component to register
* @static
* @method registerComponent
*/
Component.registerComponent = function registerComponent(name, comp) {
if (!Component.components_) {
Component.components_ = {};
}
Component.components_[name] = comp;
return comp;
};
/**
* Gets a component by name
*
* @param {String} name Name of the component to get
* @return {Component}
* @static
* @method getComponent
*/
Component.getComponent = function getComponent(name) {
if (Component.components_ && Component.components_[name]) {
return Component.components_[name];
}
if (_window2['default'] && _window2['default'].videojs && _window2['default'].videojs[name]) {
_log2['default'].warn('The ' + name + ' component was added to the videojs object when it should be registered using videojs.registerComponent(name, component)');
return _window2['default'].videojs[name];
}
};
/**
* Sets up the constructor using the supplied init method
* or uses the init of the parent object
*
* @param {Object} props An object of properties
* @static
* @deprecated
* @method extend
*/
Component.extend = function extend(props) {
props = props || {};
_log2['default'].warn('Component.extend({}) has been deprecated, use videojs.extend(Component, {}) instead');
// Set up the constructor using the supplied init method
// or using the init of the parent object
// Make sure to check the unobfuscated version for external libs
var init = props.init || props.init || this.prototype.init || this.prototype.init || function () {};
// In Resig's simple class inheritance (previously used) the constructor
// is a function that calls `this.init.apply(arguments)`
// However that would prevent us from using `ParentObject.call(this);`
// in a Child constructor because the `this` in `this.init`
// would still refer to the Child and cause an infinite loop.
// We would instead have to do
// `ParentObject.prototype.init.apply(this, arguments);`
// Bleh. We're not creating a _super() function, so it's good to keep
// the parent constructor reference simple.
var subObj = function subObj() {
init.apply(this, arguments);
};
// Inherit from this object's prototype
subObj.prototype = Object.create(this.prototype);
// Reset the constructor property for subObj otherwise
// instances of subObj would have the constructor of the parent Object
subObj.prototype.constructor = subObj;
// Make the class extendable
subObj.extend = Component.extend;
// Extend subObj's prototype with functions and other properties from props
for (var name in props) {
if (props.hasOwnProperty(name)) {
subObj.prototype[name] = props[name];
}
}
return subObj;
};
return Component;
}();
Component.registerComponent('Component', Component);
exports['default'] = Component;
},{"80":80,"81":81,"82":82,"84":84,"85":85,"86":86,"89":89,"93":93}],6:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _trackButton = _dereq_(36);
var _trackButton2 = _interopRequireDefault(_trackButton);
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _audioTrackMenuItem = _dereq_(7);
var _audioTrackMenuItem2 = _interopRequireDefault(_audioTrackMenuItem);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file audio-track-button.js
*/
/**
* The base class for buttons that toggle specific text track types (e.g. subtitles)
*
* @param {Player|Object} player
* @param {Object=} options
* @extends TrackButton
* @class AudioTrackButton
*/
var AudioTrackButton = function (_TrackButton) {
_inherits(AudioTrackButton, _TrackButton);
function AudioTrackButton(player) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
_classCallCheck(this, AudioTrackButton);
options.tracks = player.audioTracks && player.audioTracks();
var _this = _possibleConstructorReturn(this, _TrackButton.call(this, player, options));
_this.el_.setAttribute('aria-label', 'Audio Menu');
return _this;
}
/**
* Allow sub components to stack CSS class names
*
* @return {String} The constructed class name
* @method buildCSSClass
*/
AudioTrackButton.prototype.buildCSSClass = function buildCSSClass() {
return 'vjs-audio-button ' + _TrackButton.prototype.buildCSSClass.call(this);
};
/**
* Create a menu item for each audio track
*
* @return {Array} Array of menu items
* @method createItems
*/
AudioTrackButton.prototype.createItems = function createItems() {
var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
var tracks = this.player_.audioTracks && this.player_.audioTracks();
if (!tracks) {
return items;
}
for (var i = 0; i < tracks.length; i++) {
var track = tracks[i];
items.push(new _audioTrackMenuItem2['default'](this.player_, {
track: track,
// MenuItem is selectable
selectable: true
}));
}
return items;
};
return AudioTrackButton;
}(_trackButton2['default']);
AudioTrackButton.prototype.controlText_ = 'Audio Track';
_component2['default'].registerComponent('AudioTrackButton', AudioTrackButton);
exports['default'] = AudioTrackButton;
},{"36":36,"5":5,"7":7}],7:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _menuItem = _dereq_(48);
var _menuItem2 = _interopRequireDefault(_menuItem);
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _fn = _dereq_(82);
var Fn = _interopRequireWildcard(_fn);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file audio-track-menu-item.js
*/
/**
* The audio track menu item
*
* @param {Player|Object} player
* @param {Object=} options
* @extends MenuItem
* @class AudioTrackMenuItem
*/
var AudioTrackMenuItem = function (_MenuItem) {
_inherits(AudioTrackMenuItem, _MenuItem);
function AudioTrackMenuItem(player, options) {
_classCallCheck(this, AudioTrackMenuItem);
var track = options.track;
var tracks = player.audioTracks();
// Modify options for parent MenuItem class's init.
options.label = track.label || track.language || 'Unknown';
options.selected = track.enabled;
var _this = _possibleConstructorReturn(this, _MenuItem.call(this, player, options));
_this.track = track;
if (tracks) {
(function () {
var changeHandler = Fn.bind(_this, _this.handleTracksChange);
tracks.addEventListener('change', changeHandler);
_this.on('dispose', function () {
tracks.removeEventListener('change', changeHandler);
});
})();
}
return _this;
}
/**
* Handle click on audio track
*
* @method handleClick
*/
AudioTrackMenuItem.prototype.handleClick = function handleClick(event) {
var tracks = this.player_.audioTracks();
_MenuItem.prototype.handleClick.call(this, event);
if (!tracks) {
return;
}
for (var i = 0; i < tracks.length; i++) {
var track = tracks[i];
track.enabled = track === this.track;
}
};
/**
* Handle audio track change
*
* @method handleTracksChange
*/
AudioTrackMenuItem.prototype.handleTracksChange = function handleTracksChange(event) {
this.selected(this.track.enabled);
};
return AudioTrackMenuItem;
}(_menuItem2['default']);
_component2['default'].registerComponent('AudioTrackMenuItem', AudioTrackMenuItem);
exports['default'] = AudioTrackMenuItem;
},{"48":48,"5":5,"82":82}],8:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
_dereq_(12);
_dereq_(32);
_dereq_(33);
_dereq_(35);
_dereq_(34);
_dereq_(10);
_dereq_(18);
_dereq_(9);
_dereq_(38);
_dereq_(40);
_dereq_(11);
_dereq_(25);
_dereq_(27);
_dereq_(29);
_dereq_(24);
_dereq_(6);
_dereq_(13);
_dereq_(21);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file control-bar.js
*/
// Required children
/**
* Container of main controls
*
* @extends Component
* @class ControlBar
*/
var ControlBar = function (_Component) {
_inherits(ControlBar, _Component);
function ControlBar() {
_classCallCheck(this, ControlBar);
return _possibleConstructorReturn(this, _Component.apply(this, arguments));
}
/**
* Create the component's DOM element
*
* @return {Element}
* @method createEl
*/
ControlBar.prototype.createEl = function createEl() {
return _Component.prototype.createEl.call(this, 'div', {
className: 'vjs-control-bar',
dir: 'ltr'
}, {
// The control bar is a group, so it can contain menuitems
role: 'group'
});
};
return ControlBar;
}(_component2['default']);
ControlBar.prototype.options_ = {
children: ['playToggle', 'volumeMenuButton', 'currentTimeDisplay', 'timeDivider', 'durationDisplay', 'progressControl', 'liveDisplay', 'remainingTimeDisplay', 'customControlSpacer', 'playbackRateMenuButton', 'chaptersButton', 'descriptionsButton', 'subtitlesButton', 'captionsButton', 'audioTrackButton', 'fullscreenToggle']
};
_component2['default'].registerComponent('ControlBar', ControlBar);
exports['default'] = ControlBar;
},{"10":10,"11":11,"12":12,"13":13,"18":18,"21":21,"24":24,"25":25,"27":27,"29":29,"32":32,"33":33,"34":34,"35":35,"38":38,"40":40,"5":5,"6":6,"9":9}],9:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _button = _dereq_(2);
var _button2 = _interopRequireDefault(_button);
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file fullscreen-toggle.js
*/
/**
* Toggle fullscreen video
*
* @extends Button
* @class FullscreenToggle
*/
var FullscreenToggle = function (_Button) {
_inherits(FullscreenToggle, _Button);
function FullscreenToggle(player, options) {
_classCallCheck(this, FullscreenToggle);
var _this = _possibleConstructorReturn(this, _Button.call(this, player, options));
_this.on(player, 'fullscreenchange', _this.handleFullscreenChange);
return _this;
}
/**
* Allow sub components to stack CSS class names
*
* @return {String} The constructed class name
* @method buildCSSClass
*/
FullscreenToggle.prototype.buildCSSClass = function buildCSSClass() {
return 'vjs-fullscreen-control ' + _Button.prototype.buildCSSClass.call(this);
};
/**
* Handles Fullscreenchange on the component and change control text accordingly
*
* @method handleFullscreenChange
*/
FullscreenToggle.prototype.handleFullscreenChange = function handleFullscreenChange() {
if (this.player_.isFullscreen()) {
this.controlText('Non-Fullscreen');
} else {
this.controlText('Fullscreen');
}
};
/**
* Handles click for full screen
*
* @method handleClick
*/
FullscreenToggle.prototype.handleClick = function handleClick() {
if (!this.player_.isFullscreen()) {
this.player_.requestFullscreen();
} else {
this.player_.exitFullscreen();
}
};
return FullscreenToggle;
}(_button2['default']);
FullscreenToggle.prototype.controlText_ = 'Fullscreen';
_component2['default'].registerComponent('FullscreenToggle', FullscreenToggle);
exports['default'] = FullscreenToggle;
},{"2":2,"5":5}],10:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _dom = _dereq_(80);
var Dom = _interopRequireWildcard(_dom);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file live-display.js
*/
/**
* Displays the live indicator
* TODO - Future make it click to snap to live
*
* @extends Component
* @class LiveDisplay
*/
var LiveDisplay = function (_Component) {
_inherits(LiveDisplay, _Component);
function LiveDisplay(player, options) {
_classCallCheck(this, LiveDisplay);
var _this = _possibleConstructorReturn(this, _Component.call(this, player, options));
_this.updateShowing();
_this.on(_this.player(), 'durationchange', _this.updateShowing);
return _this;
}
/**
* Create the component's DOM element
*
* @return {Element}
* @method createEl
*/
LiveDisplay.prototype.createEl = function createEl() {
var el = _Component.prototype.createEl.call(this, 'div', {
className: 'vjs-live-control vjs-control'
});
this.contentEl_ = Dom.createEl('div', {
className: 'vjs-live-display',
innerHTML: '<span class="vjs-control-text">' + this.localize('Stream Type') + '</span>' + this.localize('LIVE')
}, {
'aria-live': 'off'
});
el.appendChild(this.contentEl_);
return el;
};
LiveDisplay.prototype.updateShowing = function updateShowing() {
if (this.player().duration() === Infinity) {
this.show();
} else {
this.hide();
}
};
return LiveDisplay;
}(_component2['default']);
_component2['default'].registerComponent('LiveDisplay', LiveDisplay);
exports['default'] = LiveDisplay;
},{"5":5,"80":80}],11:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _button = _dereq_(2);
var _button2 = _interopRequireDefault(_button);
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _dom = _dereq_(80);
var Dom = _interopRequireWildcard(_dom);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file mute-toggle.js
*/
/**
* A button component for muting the audio
*
* @param {Player|Object} player
* @param {Object=} options
* @extends Button
* @class MuteToggle
*/
var MuteToggle = function (_Button) {
_inherits(MuteToggle, _Button);
function MuteToggle(player, options) {
_classCallCheck(this, MuteToggle);
var _this = _possibleConstructorReturn(this, _Button.call(this, player, options));
_this.on(player, 'volumechange', _this.update);
// hide mute toggle if the current tech doesn't support volume control
if (player.tech_ && player.tech_.featuresVolumeControl === false) {
_this.addClass('vjs-hidden');
}
_this.on(player, 'loadstart', function () {
// We need to update the button to account for a default muted state.
this.update();
if (player.tech_.featuresVolumeControl === false) {
this.addClass('vjs-hidden');
} else {
this.removeClass('vjs-hidden');
}
});
return _this;
}
/**
* Allow sub components to stack CSS class names
*
* @return {String} The constructed class name
* @method buildCSSClass
*/
MuteToggle.prototype.buildCSSClass = function buildCSSClass() {
return 'vjs-mute-control ' + _Button.prototype.buildCSSClass.call(this);
};
/**
* Handle click on mute
*
* @method handleClick
*/
MuteToggle.prototype.handleClick = function handleClick() {
this.player_.muted(this.player_.muted() ? false : true);
};
/**
* Update volume
*
* @method update
*/
MuteToggle.prototype.update = function update() {
var vol = this.player_.volume();
var level = 3;
if (vol === 0 || this.player_.muted()) {
level = 0;
} else if (vol < 0.33) {
level = 1;
} else if (vol < 0.67) {
level = 2;
}
// Don't rewrite the button text if the actual text doesn't change.
// This causes unnecessary and confusing information for screen reader users.
// This check is needed because this function gets called every time the volume level is changed.
var toMute = this.player_.muted() ? 'Unmute' : 'Mute';
if (this.controlText() !== toMute) {
this.controlText(toMute);
}
// TODO improve muted icon classes
for (var i = 0; i < 4; i++) {
Dom.removeElClass(this.el_, 'vjs-vol-' + i);
}
Dom.addElClass(this.el_, 'vjs-vol-' + level);
};
return MuteToggle;
}(_button2['default']);
MuteToggle.prototype.controlText_ = 'Mute';
_component2['default'].registerComponent('MuteToggle', MuteToggle);
exports['default'] = MuteToggle;
},{"2":2,"5":5,"80":80}],12:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _button = _dereq_(2);
var _button2 = _interopRequireDefault(_button);
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file play-toggle.js
*/
/**
* Button to toggle between play and pause
*
* @param {Player|Object} player
* @param {Object=} options
* @extends Button
* @class PlayToggle
*/
var PlayToggle = function (_Button) {
_inherits(PlayToggle, _Button);
function PlayToggle(player, options) {
_classCallCheck(this, PlayToggle);
var _this = _possibleConstructorReturn(this, _Button.call(this, player, options));
_this.on(player, 'play', _this.handlePlay);
_this.on(player, 'pause', _this.handlePause);
return _this;
}
/**
* Allow sub components to stack CSS class names
*
* @return {String} The constructed class name
* @method buildCSSClass
*/
PlayToggle.prototype.buildCSSClass = function buildCSSClass() {
return 'vjs-play-control ' + _Button.prototype.buildCSSClass.call(this);
};
/**
* Handle click to toggle between play and pause
*
* @method handleClick
*/
PlayToggle.prototype.handleClick = function handleClick() {
if (this.player_.paused()) {
this.player_.play();
} else {
this.player_.pause();
}
};
/**
* Add the vjs-playing class to the element so it can change appearance
*
* @method handlePlay
*/
PlayToggle.prototype.handlePlay = function handlePlay() {
this.removeClass('vjs-paused');
this.addClass('vjs-playing');
// change the button text to "Pause"
this.controlText('Pause');
};
/**
* Add the vjs-paused class to the element so it can change appearance
*
* @method handlePause
*/
PlayToggle.prototype.handlePause = function handlePause() {
this.removeClass('vjs-playing');
this.addClass('vjs-paused');
// change the button text to "Play"
this.controlText('Play');
};
return PlayToggle;
}(_button2['default']);
PlayToggle.prototype.controlText_ = 'Play';
_component2['default'].registerComponent('PlayToggle', PlayToggle);
exports['default'] = PlayToggle;
},{"2":2,"5":5}],13:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _menuButton = _dereq_(47);
var _menuButton2 = _interopRequireDefault(_menuButton);
var _menu = _dereq_(49);
var _menu2 = _interopRequireDefault(_menu);
var _playbackRateMenuItem = _dereq_(14);
var _playbackRateMenuItem2 = _interopRequireDefault(_playbackRateMenuItem);
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _dom = _dereq_(80);
var Dom = _interopRequireWildcard(_dom);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file playback-rate-menu-button.js
*/
/**
* The component for controlling the playback rate
*
* @param {Player|Object} player
* @param {Object=} options
* @extends MenuButton
* @class PlaybackRateMenuButton
*/
var PlaybackRateMenuButton = function (_MenuButton) {
_inherits(PlaybackRateMenuButton, _MenuButton);
function PlaybackRateMenuButton(player, options) {
_classCallCheck(this, PlaybackRateMenuButton);
var _this = _possibleConstructorReturn(this, _MenuButton.call(this, player, options));
_this.updateVisibility();
_this.updateLabel();
_this.on(player, 'loadstart', _this.updateVisibility);
_this.on(player, 'ratechange', _this.updateLabel);
return _this;
}
/**
* Create the component's DOM element
*
* @return {Element}
* @method createEl
*/
PlaybackRateMenuButton.prototype.createEl = function createEl() {
var el = _MenuButton.prototype.createEl.call(this);
this.labelEl_ = Dom.createEl('div', {
className: 'vjs-playback-rate-value',
innerHTML: 1.0
});
el.appendChild(this.labelEl_);
return el;
};
/**
* Allow sub components to stack CSS class names
*
* @return {String} The constructed class name
* @method buildCSSClass
*/
PlaybackRateMenuButton.prototype.buildCSSClass = function buildCSSClass() {
return 'vjs-playback-rate ' + _MenuButton.prototype.buildCSSClass.call(this);
};
/**
* Create the playback rate menu
*
* @return {Menu} Menu object populated with items
* @method createMenu
*/
PlaybackRateMenuButton.prototype.createMenu = function createMenu() {
var menu = new _menu2['default'](this.player());
var rates = this.playbackRates();
if (rates) {
for (var i = rates.length - 1; i >= 0; i--) {
menu.addChild(new _playbackRateMenuItem2['default'](this.player(), { rate: rates[i] + 'x' }));
}
}
return menu;
};
/**
* Updates ARIA accessibility attributes
*
* @method updateARIAAttributes
*/
PlaybackRateMenuButton.prototype.updateARIAAttributes = function updateARIAAttributes() {
// Current playback rate
this.el().setAttribute('aria-valuenow', this.player().playbackRate());
};
/**
* Handle menu item click
*
* @method handleClick
*/
PlaybackRateMenuButton.prototype.handleClick = function handleClick() {
// select next rate option
var currentRate = this.player().playbackRate();
var rates = this.playbackRates();
// this will select first one if the last one currently selected
var newRate = rates[0];
for (var i = 0; i < rates.length; i++) {
if (rates[i] > currentRate) {
newRate = rates[i];
break;
}
}
this.player().playbackRate(newRate);
};
/**
* Get possible playback rates
*
* @return {Array} Possible playback rates
* @method playbackRates
*/
PlaybackRateMenuButton.prototype.playbackRates = function playbackRates() {
return this.options_.playbackRates || this.options_.playerOptions && this.options_.playerOptions.playbackRates;
};
/**
* Get whether playback rates is supported by the tech
* and an array of playback rates exists
*
* @return {Boolean} Whether changing playback rate is supported
* @method playbackRateSupported
*/
PlaybackRateMenuButton.prototype.playbackRateSupported = function playbackRateSupported() {
return this.player().tech_ && this.player().tech_.featuresPlaybackRate && this.playbackRates() && this.playbackRates().length > 0;
};
/**
* Hide playback rate controls when they're no playback rate options to select
*
* @method updateVisibility
*/
PlaybackRateMenuButton.prototype.updateVisibility = function updateVisibility() {
if (this.playbackRateSupported()) {
this.removeClass('vjs-hidden');
} else {
this.addClass('vjs-hidden');
}
};
/**
* Update button label when rate changed
*
* @method updateLabel
*/
PlaybackRateMenuButton.prototype.updateLabel = function updateLabel() {
if (this.playbackRateSupported()) {
this.labelEl_.innerHTML = this.player().playbackRate() + 'x';
}
};
return PlaybackRateMenuButton;
}(_menuButton2['default']);
PlaybackRateMenuButton.prototype.controlText_ = 'Playback Rate';
_component2['default'].registerComponent('PlaybackRateMenuButton', PlaybackRateMenuButton);
exports['default'] = PlaybackRateMenuButton;
},{"14":14,"47":47,"49":49,"5":5,"80":80}],14:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _menuItem = _dereq_(48);
var _menuItem2 = _interopRequireDefault(_menuItem);
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file playback-rate-menu-item.js
*/
/**
* The specific menu item type for selecting a playback rate
*
* @param {Player|Object} player
* @param {Object=} options
* @extends MenuItem
* @class PlaybackRateMenuItem
*/
var PlaybackRateMenuItem = function (_MenuItem) {
_inherits(PlaybackRateMenuItem, _MenuItem);
function PlaybackRateMenuItem(player, options) {
_classCallCheck(this, PlaybackRateMenuItem);
var label = options.rate;
var rate = parseFloat(label, 10);
// Modify options for parent MenuItem class's init.
options.label = label;
options.selected = rate === 1;
var _this = _possibleConstructorReturn(this, _MenuItem.call(this, player, options));
_this.label = label;
_this.rate = rate;
_this.on(player, 'ratechange', _this.update);
return _this;
}
/**
* Handle click on menu item
*
* @method handleClick
*/
PlaybackRateMenuItem.prototype.handleClick = function handleClick() {
_MenuItem.prototype.handleClick.call(this);
this.player().playbackRate(this.rate);
};
/**
* Update playback rate with selected rate
*
* @method update
*/
PlaybackRateMenuItem.prototype.update = function update() {
this.selected(this.player().playbackRate() === this.rate);
};
return PlaybackRateMenuItem;
}(_menuItem2['default']);
PlaybackRateMenuItem.prototype.contentElType = 'button';
_component2['default'].registerComponent('PlaybackRateMenuItem', PlaybackRateMenuItem);
exports['default'] = PlaybackRateMenuItem;
},{"48":48,"5":5}],15:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _dom = _dereq_(80);
var Dom = _interopRequireWildcard(_dom);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file load-progress-bar.js
*/
/**
* Shows load progress
*
* @param {Player|Object} player
* @param {Object=} options
* @extends Component
* @class LoadProgressBar
*/
var LoadProgressBar = function (_Component) {
_inherits(LoadProgressBar, _Component);
function LoadProgressBar(player, options) {
_classCallCheck(this, LoadProgressBar);
var _this = _possibleConstructorReturn(this, _Component.call(this, player, options));
_this.partEls_ = [];
_this.on(player, 'progress', _this.update);
return _this;
}
/**
* Create the component's DOM element
*
* @return {Element}
* @method createEl
*/
LoadProgressBar.prototype.createEl = function createEl() {
return _Component.prototype.createEl.call(this, 'div', {
className: 'vjs-load-progress',
innerHTML: '<span class="vjs-control-text"><span>' + this.localize('Loaded') + '</span>: 0%</span>'
});
};
/**
* Update progress bar
*
* @method update
*/
LoadProgressBar.prototype.update = function update() {
var buffered = this.player_.buffered();
var duration = this.player_.duration();
var bufferedEnd = this.player_.bufferedEnd();
var children = this.partEls_;
// get the percent width of a time compared to the total end
var percentify = function percentify(time, end) {
// no NaN
var percent = time / end || 0;
return (percent >= 1 ? 1 : percent) * 100 + '%';
};
// update the width of the progress bar
this.el_.style.width = percentify(bufferedEnd, duration);
// add child elements to represent the individual buffered time ranges
for (var i = 0; i < buffered.length; i++) {
var start = buffered.start(i);
var end = buffered.end(i);
var part = children[i];
if (!part) {
part = this.el_.appendChild(Dom.createEl());
children[i] = part;
}
// set the percent based on the width of the progress bar (bufferedEnd)
part.style.left = percentify(start, bufferedEnd);
part.style.width = percentify(end - start, bufferedEnd);
}
// remove unused buffered range elements
for (var _i = children.length; _i > buffered.length; _i--) {
this.el_.removeChild(children[_i - 1]);
}
children.length = buffered.length;
};
return LoadProgressBar;
}(_component2['default']);
_component2['default'].registerComponent('LoadProgressBar', LoadProgressBar);
exports['default'] = LoadProgressBar;
},{"5":5,"80":80}],16:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _window = _dereq_(93);
var _window2 = _interopRequireDefault(_window);
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _dom = _dereq_(80);
var Dom = _interopRequireWildcard(_dom);
var _fn = _dereq_(82);
var Fn = _interopRequireWildcard(_fn);
var _formatTime = _dereq_(83);
var _formatTime2 = _interopRequireDefault(_formatTime);
var _throttle = _dereq_(98);
var _throttle2 = _interopRequireDefault(_throttle);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file mouse-time-display.js
*/
/**
* The Mouse Time Display component shows the time you will seek to
* when hovering over the progress bar
*
* @param {Player|Object} player
* @param {Object=} options
* @extends Component
* @class MouseTimeDisplay
*/
var MouseTimeDisplay = function (_Component) {
_inherits(MouseTimeDisplay, _Component);
function MouseTimeDisplay(player, options) {
_classCallCheck(this, MouseTimeDisplay);
var _this = _possibleConstructorReturn(this, _Component.call(this, player, options));
if (options.playerOptions && options.playerOptions.controlBar && options.playerOptions.controlBar.progressControl && options.playerOptions.controlBar.progressControl.keepTooltipsInside) {
_this.keepTooltipsInside = options.playerOptions.controlBar.progressControl.keepTooltipsInside;
}
if (_this.keepTooltipsInside) {
_this.tooltip = Dom.createEl('div', { className: 'vjs-time-tooltip' });
_this.el().appendChild(_this.tooltip);
_this.addClass('vjs-keep-tooltips-inside');
}
_this.update(0, 0);
player.on('ready', function () {
_this.on(player.controlBar.progressControl.el(), 'mousemove', (0, _throttle2['default'])(Fn.bind(_this, _this.handleMouseMove), 25));
});
return _this;
}
/**
* Create the component's DOM element
*
* @return {Element}
* @method createEl
*/
MouseTimeDisplay.prototype.createEl = function createEl() {
return _Component.prototype.createEl.call(this, 'div', {
className: 'vjs-mouse-display'
});
};
MouseTimeDisplay.prototype.handleMouseMove = function handleMouseMove(event) {
var duration = this.player_.duration();
var newTime = this.calculateDistance(event) * duration;
var position = event.pageX - Dom.findElPosition(this.el().parentNode).left;
this.update(newTime, position);
};
MouseTimeDisplay.prototype.update = function update(newTime, position) {
var time = (0, _formatTime2['default'])(newTime, this.player_.duration());
this.el().style.left = position + 'px';
this.el().setAttribute('data-current-time', time);
if (this.keepTooltipsInside) {
var clampedPosition = this.clampPosition_(position);
var difference = position - clampedPosition + 1;
var tooltipWidth = parseFloat(_window2['default'].getComputedStyle(this.tooltip).width);
var tooltipWidthHalf = tooltipWidth / 2;
this.tooltip.innerHTML = time;
this.tooltip.style.right = '-' + (tooltipWidthHalf - difference) + 'px';
}
};
MouseTimeDisplay.prototype.calculateDistance = function calculateDistance(event) {
return Dom.getPointerPosition(this.el().parentNode, event).x;
};
/**
* This takes in a horizontal position for the bar and returns a clamped position.
* Clamped position means that it will keep the position greater than half the width
* of the tooltip and smaller than the player width minus half the width o the tooltip.
* It will only clamp the position if `keepTooltipsInside` option is set.
*
* @param {Number} position the position the bar wants to be
* @return {Number} newPosition the (potentially) clamped position
* @method clampPosition_
*/
MouseTimeDisplay.prototype.clampPosition_ = function clampPosition_(position) {
if (!this.keepTooltipsInside) {
return position;
}
var playerWidth = parseFloat(_window2['default'].getComputedStyle(this.player().el()).width);
var tooltipWidth = parseFloat(_window2['default'].getComputedStyle(this.tooltip).width);
var tooltipWidthHalf = tooltipWidth / 2;
var actualPosition = position;
if (position < tooltipWidthHalf) {
actualPosition = Math.ceil(tooltipWidthHalf);
} else if (position > playerWidth - tooltipWidthHalf) {
actualPosition = Math.floor(playerWidth - tooltipWidthHalf);
}
return actualPosition;
};
return MouseTimeDisplay;
}(_component2['default']);
_component2['default'].registerComponent('MouseTimeDisplay', MouseTimeDisplay);
exports['default'] = MouseTimeDisplay;
},{"5":5,"80":80,"82":82,"83":83,"93":93,"98":98}],17:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _fn = _dereq_(82);
var Fn = _interopRequireWildcard(_fn);
var _formatTime = _dereq_(83);
var _formatTime2 = _interopRequireDefault(_formatTime);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file play-progress-bar.js
*/
/**
* Shows play progress
*
* @param {Player|Object} player
* @param {Object=} options
* @extends Component
* @class PlayProgressBar
*/
var PlayProgressBar = function (_Component) {
_inherits(PlayProgressBar, _Component);
function PlayProgressBar(player, options) {
_classCallCheck(this, PlayProgressBar);
var _this = _possibleConstructorReturn(this, _Component.call(this, player, options));
_this.updateDataAttr();
_this.on(player, 'timeupdate', _this.updateDataAttr);
player.ready(Fn.bind(_this, _this.updateDataAttr));
if (options.playerOptions && options.playerOptions.controlBar && options.playerOptions.controlBar.progressControl && options.playerOptions.controlBar.progressControl.keepTooltipsInside) {
_this.keepTooltipsInside = options.playerOptions.controlBar.progressControl.keepTooltipsInside;
}
if (_this.keepTooltipsInside) {
_this.addClass('vjs-keep-tooltips-inside');
}
return _this;
}
/**
* Create the component's DOM element
*
* @return {Element}
* @method createEl
*/
PlayProgressBar.prototype.createEl = function createEl() {
return _Component.prototype.createEl.call(this, 'div', {
className: 'vjs-play-progress vjs-slider-bar',
innerHTML: '<span class="vjs-control-text"><span>' + this.localize('Progress') + '</span>: 0%</span>'
});
};
PlayProgressBar.prototype.updateDataAttr = function updateDataAttr() {
var time = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime();
this.el_.setAttribute('data-current-time', (0, _formatTime2['default'])(time, this.player_.duration()));
};
return PlayProgressBar;
}(_component2['default']);
_component2['default'].registerComponent('PlayProgressBar', PlayProgressBar);
exports['default'] = PlayProgressBar;
},{"5":5,"82":82,"83":83}],18:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
_dereq_(19);
_dereq_(16);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file progress-control.js
*/
/**
* The Progress Control component contains the seek bar, load progress,
* and play progress
*
* @param {Player|Object} player
* @param {Object=} options
* @extends Component
* @class ProgressControl
*/
var ProgressControl = function (_Component) {
_inherits(ProgressControl, _Component);
function ProgressControl() {
_classCallCheck(this, ProgressControl);
return _possibleConstructorReturn(this, _Component.apply(this, arguments));
}
/**
* Create the component's DOM element
*
* @return {Element}
* @method createEl
*/
ProgressControl.prototype.createEl = function createEl() {
return _Component.prototype.createEl.call(this, 'div', {
className: 'vjs-progress-control vjs-control'
});
};
return ProgressControl;
}(_component2['default']);
ProgressControl.prototype.options_ = {
children: ['seekBar']
};
_component2['default'].registerComponent('ProgressControl', ProgressControl);
exports['default'] = ProgressControl;
},{"16":16,"19":19,"5":5}],19:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _window = _dereq_(93);
var _window2 = _interopRequireDefault(_window);
var _slider = _dereq_(57);
var _slider2 = _interopRequireDefault(_slider);
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _fn = _dereq_(82);
var Fn = _interopRequireWildcard(_fn);
var _formatTime = _dereq_(83);
var _formatTime2 = _interopRequireDefault(_formatTime);
_dereq_(15);
_dereq_(17);
_dereq_(20);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file seek-bar.js
*/
/**
* Seek Bar and holder for the progress bars
*
* @param {Player|Object} player
* @param {Object=} options
* @extends Slider
* @class SeekBar
*/
var SeekBar = function (_Slider) {
_inherits(SeekBar, _Slider);
function SeekBar(player, options) {
_classCallCheck(this, SeekBar);
var _this = _possibleConstructorReturn(this, _Slider.call(this, player, options));
_this.on(player, 'timeupdate', _this.updateProgress);
_this.on(player, 'ended', _this.updateProgress);
player.ready(Fn.bind(_this, _this.updateProgress));
if (options.playerOptions && options.playerOptions.controlBar && options.playerOptions.controlBar.progressControl && options.playerOptions.controlBar.progressControl.keepTooltipsInside) {
_this.keepTooltipsInside = options.playerOptions.controlBar.progressControl.keepTooltipsInside;
}
if (_this.keepTooltipsInside) {
_this.tooltipProgressBar = _this.addChild('TooltipProgressBar');
}
return _this;
}
/**
* Create the component's DOM element
*
* @return {Element}
* @method createEl
*/
SeekBar.prototype.createEl = function createEl() {
return _Slider.prototype.createEl.call(this, 'div', {
className: 'vjs-progress-holder'
}, {
'aria-label': 'progress bar'
});
};
/**
* Update ARIA accessibility attributes
*
* @method updateARIAAttributes
*/
SeekBar.prototype.updateProgress = function updateProgress() {
this.updateAriaAttributes(this.el_);
if (this.keepTooltipsInside) {
this.updateAriaAttributes(this.tooltipProgressBar.el_);
this.tooltipProgressBar.el_.style.width = this.bar.el_.style.width;
var playerWidth = parseFloat(_window2['default'].getComputedStyle(this.player().el()).width);
var tooltipWidth = parseFloat(_window2['default'].getComputedStyle(this.tooltipProgressBar.tooltip).width);
var tooltipStyle = this.tooltipProgressBar.el().style;
tooltipStyle.maxWidth = Math.floor(playerWidth - tooltipWidth / 2) + 'px';
tooltipStyle.minWidth = Math.ceil(tooltipWidth / 2) + 'px';
tooltipStyle.right = '-' + tooltipWidth / 2 + 'px';
}
};
SeekBar.prototype.updateAriaAttributes = function updateAriaAttributes(el) {
// Allows for smooth scrubbing, when player can't keep up.
var time = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime();
// machine readable value of progress bar (percentage complete)
el.setAttribute('aria-valuenow', (this.getPercent() * 100).toFixed(2));
// human readable value of progress bar (time complete)
el.setAttribute('aria-valuetext', (0, _formatTime2['default'])(time, this.player_.duration()));
};
/**
* Get percentage of video played
*
* @return {Number} Percentage played
* @method getPercent
*/
SeekBar.prototype.getPercent = function getPercent() {
var percent = this.player_.currentTime() / this.player_.duration();
return percent >= 1 ? 1 : percent;
};
/**
* Handle mouse down on seek bar
*
* @method handleMouseDown
*/
SeekBar.prototype.handleMouseDown = function handleMouseDown(event) {
_Slider.prototype.handleMouseDown.call(this, event);
this.player_.scrubbing(true);
this.videoWasPlaying = !this.player_.paused();
this.player_.pause();
};
/**
* Handle mouse move on seek bar
*
* @method handleMouseMove
*/
SeekBar.prototype.handleMouseMove = function handleMouseMove(event) {
var newTime = this.calculateDistance(event) * this.player_.duration();
// Don't let video end while scrubbing.
if (newTime === this.player_.duration()) {
newTime = newTime - 0.1;
}
// Set new time (tell player to seek to new time)
this.player_.currentTime(newTime);
};
/**
* Handle mouse up on seek bar
*
* @method handleMouseUp
*/
SeekBar.prototype.handleMouseUp = function handleMouseUp(event) {
_Slider.prototype.handleMouseUp.call(this, event);
this.player_.scrubbing(false);
if (this.videoWasPlaying) {
this.player_.play();
}
};
/**
* Move more quickly fast forward for keyboard-only users
*
* @method stepForward
*/
SeekBar.prototype.stepForward = function stepForward() {
// more quickly fast forward for keyboard-only users
this.player_.currentTime(this.player_.currentTime() + 5);
};
/**
* Move more quickly rewind for keyboard-only users
*
* @method stepBack
*/
SeekBar.prototype.stepBack = function stepBack() {
// more quickly rewind for keyboard-only users
this.player_.currentTime(this.player_.currentTime() - 5);
};
return SeekBar;
}(_slider2['default']);
SeekBar.prototype.options_ = {
children: ['loadProgressBar', 'mouseTimeDisplay', 'playProgressBar'],
barName: 'playProgressBar'
};
SeekBar.prototype.playerEvent = 'timeupdate';
_component2['default'].registerComponent('SeekBar', SeekBar);
exports['default'] = SeekBar;
},{"15":15,"17":17,"20":20,"5":5,"57":57,"82":82,"83":83,"93":93}],20:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _fn = _dereq_(82);
var Fn = _interopRequireWildcard(_fn);
var _formatTime = _dereq_(83);
var _formatTime2 = _interopRequireDefault(_formatTime);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file play-progress-bar.js
*/
/**
* Shows play progress
*
* @param {Player|Object} player
* @param {Object=} options
* @extends Component
* @class PlayProgressBar
*/
var TooltipProgressBar = function (_Component) {
_inherits(TooltipProgressBar, _Component);
function TooltipProgressBar(player, options) {
_classCallCheck(this, TooltipProgressBar);
var _this = _possibleConstructorReturn(this, _Component.call(this, player, options));
_this.updateDataAttr();
_this.on(player, 'timeupdate', _this.updateDataAttr);
player.ready(Fn.bind(_this, _this.updateDataAttr));
return _this;
}
/**
* Create the component's DOM element
*
* @return {Element}
* @method createEl
*/
TooltipProgressBar.prototype.createEl = function createEl() {
var el = _Component.prototype.createEl.call(this, 'div', {
className: 'vjs-tooltip-progress-bar vjs-slider-bar',
innerHTML: '<div class="vjs-time-tooltip"></div>\n <span class="vjs-control-text"><span>' + this.localize('Progress') + '</span>: 0%</span>'
});
this.tooltip = el.querySelector('.vjs-time-tooltip');
return el;
};
TooltipProgressBar.prototype.updateDataAttr = function updateDataAttr() {
var time = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime();
var formattedTime = (0, _formatTime2['default'])(time, this.player_.duration());
this.el_.setAttribute('data-current-time', formattedTime);
this.tooltip.innerHTML = formattedTime;
};
return TooltipProgressBar;
}(_component2['default']);
_component2['default'].registerComponent('TooltipProgressBar', TooltipProgressBar);
exports['default'] = TooltipProgressBar;
},{"5":5,"82":82,"83":83}],21:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _spacer = _dereq_(22);
var _spacer2 = _interopRequireDefault(_spacer);
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file custom-control-spacer.js
*/
/**
* Spacer specifically meant to be used as an insertion point for new plugins, etc.
*
* @extends Spacer
* @class CustomControlSpacer
*/
var CustomControlSpacer = function (_Spacer) {
_inherits(CustomControlSpacer, _Spacer);
function CustomControlSpacer() {
_classCallCheck(this, CustomControlSpacer);
return _possibleConstructorReturn(this, _Spacer.apply(this, arguments));
}
/**
* Allow sub components to stack CSS class names
*
* @return {String} The constructed class name
* @method buildCSSClass
*/
CustomControlSpacer.prototype.buildCSSClass = function buildCSSClass() {
return 'vjs-custom-control-spacer ' + _Spacer.prototype.buildCSSClass.call(this);
};
/**
* Create the component's DOM element
*
* @return {Element}
* @method createEl
*/
CustomControlSpacer.prototype.createEl = function createEl() {
var el = _Spacer.prototype.createEl.call(this, {
className: this.buildCSSClass()
});
// No-flex/table-cell mode requires there be some content
// in the cell to fill the remaining space of the table.
el.innerHTML = ' ';
return el;
};
return CustomControlSpacer;
}(_spacer2['default']);
_component2['default'].registerComponent('CustomControlSpacer', CustomControlSpacer);
exports['default'] = CustomControlSpacer;
},{"22":22,"5":5}],22:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file spacer.js
*/
/**
* Just an empty spacer element that can be used as an append point for plugins, etc.
* Also can be used to create space between elements when necessary.
*
* @extends Component
* @class Spacer
*/
var Spacer = function (_Component) {
_inherits(Spacer, _Component);
function Spacer() {
_classCallCheck(this, Spacer);
return _possibleConstructorReturn(this, _Component.apply(this, arguments));
}
/**
* Allow sub components to stack CSS class names
*
* @return {String} The constructed class name
* @method buildCSSClass
*/
Spacer.prototype.buildCSSClass = function buildCSSClass() {
return 'vjs-spacer ' + _Component.prototype.buildCSSClass.call(this);
};
/**
* Create the component's DOM element
*
* @return {Element}
* @method createEl
*/
Spacer.prototype.createEl = function createEl() {
return _Component.prototype.createEl.call(this, 'div', {
className: this.buildCSSClass()
});
};
return Spacer;
}(_component2['default']);
_component2['default'].registerComponent('Spacer', Spacer);
exports['default'] = Spacer;
},{"5":5}],23:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _textTrackMenuItem = _dereq_(31);
var _textTrackMenuItem2 = _interopRequireDefault(_textTrackMenuItem);
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file caption-settings-menu-item.js
*/
/**
* The menu item for caption track settings menu
*
* @param {Player|Object} player
* @param {Object=} options
* @extends TextTrackMenuItem
* @class CaptionSettingsMenuItem
*/
var CaptionSettingsMenuItem = function (_TextTrackMenuItem) {
_inherits(CaptionSettingsMenuItem, _TextTrackMenuItem);
function CaptionSettingsMenuItem(player, options) {
_classCallCheck(this, CaptionSettingsMenuItem);
options.track = {
player: player,
kind: options.kind,
label: options.kind + ' settings',
selectable: false,
'default': false,
mode: 'disabled'
};
// CaptionSettingsMenuItem has no concept of 'selected'
options.selectable = false;
var _this = _possibleConstructorReturn(this, _TextTrackMenuItem.call(this, player, options));
_this.addClass('vjs-texttrack-settings');
_this.controlText(', opens ' + options.kind + ' settings dialog');
return _this;
}
/**
* Handle click on menu item
*
* @method handleClick
*/
CaptionSettingsMenuItem.prototype.handleClick = function handleClick() {
this.player().getChild('textTrackSettings').show();
this.player().getChild('textTrackSettings').el_.focus();
};
return CaptionSettingsMenuItem;
}(_textTrackMenuItem2['default']);
_component2['default'].registerComponent('CaptionSettingsMenuItem', CaptionSettingsMenuItem);
exports['default'] = CaptionSettingsMenuItem;
},{"31":31,"5":5}],24:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _textTrackButton = _dereq_(30);
var _textTrackButton2 = _interopRequireDefault(_textTrackButton);
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _captionSettingsMenuItem = _dereq_(23);
var _captionSettingsMenuItem2 = _interopRequireDefault(_captionSettingsMenuItem);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file captions-button.js
*/
/**
* The button component for toggling and selecting captions
*
* @param {Object} player Player object
* @param {Object=} options Object of option names and values
* @param {Function=} ready Ready callback function
* @extends TextTrackButton
* @class CaptionsButton
*/
var CaptionsButton = function (_TextTrackButton) {
_inherits(CaptionsButton, _TextTrackButton);
function CaptionsButton(player, options, ready) {
_classCallCheck(this, CaptionsButton);
var _this = _possibleConstructorReturn(this, _TextTrackButton.call(this, player, options, ready));
_this.el_.setAttribute('aria-label', 'Captions Menu');
return _this;
}
/**
* Allow sub components to stack CSS class names
*
* @return {String} The constructed class name
* @method buildCSSClass
*/
CaptionsButton.prototype.buildCSSClass = function buildCSSClass() {
return 'vjs-captions-button ' + _TextTrackButton.prototype.buildCSSClass.call(this);
};
/**
* Update caption menu items
*
* @method update
*/
CaptionsButton.prototype.update = function update() {
var threshold = 2;
_TextTrackButton.prototype.update.call(this);
// if native, then threshold is 1 because no settings button
if (this.player().tech_ && this.player().tech_.featuresNativeTextTracks) {
threshold = 1;
}
if (this.items && this.items.length > threshold) {
this.show();
} else {
this.hide();
}
};
/**
* Create caption menu items
*
* @return {Array} Array of menu items
* @method createItems
*/
CaptionsButton.prototype.createItems = function createItems() {
var items = [];
if (!(this.player().tech_ && this.player().tech_.featuresNativeTextTracks)) {
items.push(new _captionSettingsMenuItem2['default'](this.player_, { kind: this.kind_ }));
}
return _TextTrackButton.prototype.createItems.call(this, items);
};
return CaptionsButton;
}(_textTrackButton2['default']);
CaptionsButton.prototype.kind_ = 'captions';
CaptionsButton.prototype.controlText_ = 'Captions';
_component2['default'].registerComponent('CaptionsButton', CaptionsButton);
exports['default'] = CaptionsButton;
},{"23":23,"30":30,"5":5}],25:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _textTrackButton = _dereq_(30);
var _textTrackButton2 = _interopRequireDefault(_textTrackButton);
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _textTrackMenuItem = _dereq_(31);
var _textTrackMenuItem2 = _interopRequireDefault(_textTrackMenuItem);
var _chaptersTrackMenuItem = _dereq_(26);
var _chaptersTrackMenuItem2 = _interopRequireDefault(_chaptersTrackMenuItem);
var _menu = _dereq_(49);
var _menu2 = _interopRequireDefault(_menu);
var _dom = _dereq_(80);
var Dom = _interopRequireWildcard(_dom);
var _toTitleCase = _dereq_(89);
var _toTitleCase2 = _interopRequireDefault(_toTitleCase);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file chapters-button.js
*/
/**
* The button component for toggling and selecting chapters
* Chapters act much differently than other text tracks
* Cues are navigation vs. other tracks of alternative languages
*
* @param {Object} player Player object
* @param {Object=} options Object of option names and values
* @param {Function=} ready Ready callback function
* @extends TextTrackButton
* @class ChaptersButton
*/
var ChaptersButton = function (_TextTrackButton) {
_inherits(ChaptersButton, _TextTrackButton);
function ChaptersButton(player, options, ready) {
_classCallCheck(this, ChaptersButton);
var _this = _possibleConstructorReturn(this, _TextTrackButton.call(this, player, options, ready));
_this.el_.setAttribute('aria-label', 'Chapters Menu');
return _this;
}
/**
* Allow sub components to stack CSS class names
*
* @return {String} The constructed class name
* @method buildCSSClass
*/
ChaptersButton.prototype.buildCSSClass = function buildCSSClass() {
return 'vjs-chapters-button ' + _TextTrackButton.prototype.buildCSSClass.call(this);
};
/**
* Create a menu item for each text track
*
* @return {Array} Array of menu items
* @method createItems
*/
ChaptersButton.prototype.createItems = function createItems() {
var items = [];
var tracks = this.player_.textTracks();
if (!tracks) {
return items;
}
for (var i = 0; i < tracks.length; i++) {
var track = tracks[i];
if (track.kind === this.kind_) {
items.push(new _textTrackMenuItem2['default'](this.player_, { track: track }));
}
}
return items;
};
/**
* Create menu from chapter buttons
*
* @return {Menu} Menu of chapter buttons
* @method createMenu
*/
ChaptersButton.prototype.createMenu = function createMenu() {
var _this2 = this;
var tracks = this.player_.textTracks() || [];
var chaptersTrack = void 0;
var items = this.items || [];
for (var i = tracks.length - 1; i >= 0; i--) {
// We will always choose the last track as our chaptersTrack
var track = tracks[i];
if (track.kind === this.kind_) {
chaptersTrack = track;
break;
}
}
var menu = this.menu;
if (menu === undefined) {
menu = new _menu2['default'](this.player_);
var title = Dom.createEl('li', {
className: 'vjs-menu-title',
innerHTML: (0, _toTitleCase2['default'])(this.kind_),
tabIndex: -1
});
menu.children_.unshift(title);
Dom.insertElFirst(title, menu.contentEl());
} else {
// We will empty out the menu children each time because we want a
// fresh new menu child list each time
items.forEach(function (item) {
return menu.removeChild(item);
});
// Empty out the ChaptersButton menu items because we no longer need them
items = [];
}
if (chaptersTrack && (chaptersTrack.cues === null || chaptersTrack.cues === undefined)) {
chaptersTrack.mode = 'hidden';
var remoteTextTrackEl = this.player_.remoteTextTrackEls().getTrackElementByTrack_(chaptersTrack);
if (remoteTextTrackEl) {
remoteTextTrackEl.addEventListener('load', function (event) {
return _this2.update();
});
}
}
if (chaptersTrack && chaptersTrack.cues && chaptersTrack.cues.length > 0) {
var cues = chaptersTrack.cues;
for (var _i = 0, l = cues.length; _i < l; _i++) {
var cue = cues[_i];
var mi = new _chaptersTrackMenuItem2['default'](this.player_, {
cue: cue,
track: chaptersTrack
});
items.push(mi);
menu.addChild(mi);
}
}
if (items.length > 0) {
this.show();
}
// Assigning the value of items back to this.items for next iteration
this.items = items;
return menu;
};
return ChaptersButton;
}(_textTrackButton2['default']);
ChaptersButton.prototype.kind_ = 'chapters';
ChaptersButton.prototype.controlText_ = 'Chapters';
_component2['default'].registerComponent('ChaptersButton', ChaptersButton);
exports['default'] = ChaptersButton;
},{"26":26,"30":30,"31":31,"49":49,"5":5,"80":80,"89":89}],26:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _menuItem = _dereq_(48);
var _menuItem2 = _interopRequireDefault(_menuItem);
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _fn = _dereq_(82);
var Fn = _interopRequireWildcard(_fn);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file chapters-track-menu-item.js
*/
/**
* The chapter track menu item
*
* @param {Player|Object} player
* @param {Object=} options
* @extends MenuItem
* @class ChaptersTrackMenuItem
*/
var ChaptersTrackMenuItem = function (_MenuItem) {
_inherits(ChaptersTrackMenuItem, _MenuItem);
function ChaptersTrackMenuItem(player, options) {
_classCallCheck(this, ChaptersTrackMenuItem);
var track = options.track;
var cue = options.cue;
var currentTime = player.currentTime();
// Modify options for parent MenuItem class's init.
options.label = cue.text;
options.selected = cue.startTime <= currentTime && currentTime < cue.endTime;
var _this = _possibleConstructorReturn(this, _MenuItem.call(this, player, options));
_this.track = track;
_this.cue = cue;
track.addEventListener('cuechange', Fn.bind(_this, _this.update));
return _this;
}
/**
* Handle click on menu item
*
* @method handleClick
*/
ChaptersTrackMenuItem.prototype.handleClick = function handleClick() {
_MenuItem.prototype.handleClick.call(this);
this.player_.currentTime(this.cue.startTime);
this.update(this.cue.startTime);
};
/**
* Update chapter menu item
*
* @method update
*/
ChaptersTrackMenuItem.prototype.update = function update() {
var cue = this.cue;
var currentTime = this.player_.currentTime();
// vjs.log(currentTime, cue.startTime);
this.selected(cue.startTime <= currentTime && currentTime < cue.endTime);
};
return ChaptersTrackMenuItem;
}(_menuItem2['default']);
_component2['default'].registerComponent('ChaptersTrackMenuItem', ChaptersTrackMenuItem);
exports['default'] = ChaptersTrackMenuItem;
},{"48":48,"5":5,"82":82}],27:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _textTrackButton = _dereq_(30);
var _textTrackButton2 = _interopRequireDefault(_textTrackButton);
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _fn = _dereq_(82);
var Fn = _interopRequireWildcard(_fn);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file descriptions-button.js
*/
/**
* The button component for toggling and selecting descriptions
*
* @param {Object} player Player object
* @param {Object=} options Object of option names and values
* @param {Function=} ready Ready callback function
* @extends TextTrackButton
* @class DescriptionsButton
*/
var DescriptionsButton = function (_TextTrackButton) {
_inherits(DescriptionsButton, _TextTrackButton);
function DescriptionsButton(player, options, ready) {
_classCallCheck(this, DescriptionsButton);
var _this = _possibleConstructorReturn(this, _TextTrackButton.call(this, player, options, ready));
_this.el_.setAttribute('aria-label', 'Descriptions Menu');
var tracks = player.textTracks();
if (tracks) {
(function () {
var changeHandler = Fn.bind(_this, _this.handleTracksChange);
tracks.addEventListener('change', changeHandler);
_this.on('dispose', function () {
tracks.removeEventListener('change', changeHandler);
});
})();
}
return _this;
}
/**
* Handle text track change
*
* @method handleTracksChange
*/
DescriptionsButton.prototype.handleTracksChange = function handleTracksChange(event) {
var tracks = this.player().textTracks();
var disabled = false;
// Check whether a track of a different kind is showing
for (var i = 0, l = tracks.length; i < l; i++) {
var track = tracks[i];
if (track.kind !== this.kind_ && track.mode === 'showing') {
disabled = true;
break;
}
}
// If another track is showing, disable this menu button
if (disabled) {
this.disable();
} else {
this.enable();
}
};
/**
* Allow sub components to stack CSS class names
*
* @return {String} The constructed class name
* @method buildCSSClass
*/
DescriptionsButton.prototype.buildCSSClass = function buildCSSClass() {
return 'vjs-descriptions-button ' + _TextTrackButton.prototype.buildCSSClass.call(this);
};
return DescriptionsButton;
}(_textTrackButton2['default']);
DescriptionsButton.prototype.kind_ = 'descriptions';
DescriptionsButton.prototype.controlText_ = 'Descriptions';
_component2['default'].registerComponent('DescriptionsButton', DescriptionsButton);
exports['default'] = DescriptionsButton;
},{"30":30,"5":5,"82":82}],28:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _textTrackMenuItem = _dereq_(31);
var _textTrackMenuItem2 = _interopRequireDefault(_textTrackMenuItem);
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file off-text-track-menu-item.js
*/
/**
* A special menu item for turning of a specific type of text track
*
* @param {Player|Object} player
* @param {Object=} options
* @extends TextTrackMenuItem
* @class OffTextTrackMenuItem
*/
var OffTextTrackMenuItem = function (_TextTrackMenuItem) {
_inherits(OffTextTrackMenuItem, _TextTrackMenuItem);
function OffTextTrackMenuItem(player, options) {
_classCallCheck(this, OffTextTrackMenuItem);
// Create pseudo track info
// Requires options['kind']
options.track = {
player: player,
kind: options.kind,
label: options.kind + ' off',
'default': false,
mode: 'disabled'
};
// MenuItem is selectable
options.selectable = true;
var _this = _possibleConstructorReturn(this, _TextTrackMenuItem.call(this, player, options));
_this.selected(true);
return _this;
}
/**
* Handle text track change
*
* @param {Object} event Event object
* @method handleTracksChange
*/
OffTextTrackMenuItem.prototype.handleTracksChange = function handleTracksChange(event) {
var tracks = this.player().textTracks();
var selected = true;
for (var i = 0, l = tracks.length; i < l; i++) {
var track = tracks[i];
if (track.kind === this.track.kind && track.mode === 'showing') {
selected = false;
break;
}
}
this.selected(selected);
};
return OffTextTrackMenuItem;
}(_textTrackMenuItem2['default']);
_component2['default'].registerComponent('OffTextTrackMenuItem', OffTextTrackMenuItem);
exports['default'] = OffTextTrackMenuItem;
},{"31":31,"5":5}],29:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _textTrackButton = _dereq_(30);
var _textTrackButton2 = _interopRequireDefault(_textTrackButton);
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file subtitles-button.js
*/
/**
* The button component for toggling and selecting subtitles
*
* @param {Object} player Player object
* @param {Object=} options Object of option names and values
* @param {Function=} ready Ready callback function
* @extends TextTrackButton
* @class SubtitlesButton
*/
var SubtitlesButton = function (_TextTrackButton) {
_inherits(SubtitlesButton, _TextTrackButton);
function SubtitlesButton(player, options, ready) {
_classCallCheck(this, SubtitlesButton);
var _this = _possibleConstructorReturn(this, _TextTrackButton.call(this, player, options, ready));
_this.el_.setAttribute('aria-label', 'Subtitles Menu');
return _this;
}
/**
* Allow sub components to stack CSS class names
*
* @return {String} The constructed class name
* @method buildCSSClass
*/
SubtitlesButton.prototype.buildCSSClass = function buildCSSClass() {
return 'vjs-subtitles-button ' + _TextTrackButton.prototype.buildCSSClass.call(this);
};
return SubtitlesButton;
}(_textTrackButton2['default']);
SubtitlesButton.prototype.kind_ = 'subtitles';
SubtitlesButton.prototype.controlText_ = 'Subtitles';
_component2['default'].registerComponent('SubtitlesButton', SubtitlesButton);
exports['default'] = SubtitlesButton;
},{"30":30,"5":5}],30:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _trackButton = _dereq_(36);
var _trackButton2 = _interopRequireDefault(_trackButton);
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _textTrackMenuItem = _dereq_(31);
var _textTrackMenuItem2 = _interopRequireDefault(_textTrackMenuItem);
var _offTextTrackMenuItem = _dereq_(28);
var _offTextTrackMenuItem2 = _interopRequireDefault(_offTextTrackMenuItem);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file text-track-button.js
*/
/**
* The base class for buttons that toggle specific text track types (e.g. subtitles)
*
* @param {Player|Object} player
* @param {Object=} options
* @extends MenuButton
* @class TextTrackButton
*/
var TextTrackButton = function (_TrackButton) {
_inherits(TextTrackButton, _TrackButton);
function TextTrackButton(player) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
_classCallCheck(this, TextTrackButton);
options.tracks = player.textTracks();
return _possibleConstructorReturn(this, _TrackButton.call(this, player, options));
}
/**
* Create a menu item for each text track
*
* @return {Array} Array of menu items
* @method createItems
*/
TextTrackButton.prototype.createItems = function createItems() {
var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
// Add an OFF menu item to turn all tracks off
items.push(new _offTextTrackMenuItem2['default'](this.player_, { kind: this.kind_ }));
var tracks = this.player_.textTracks();
if (!tracks) {
return items;
}
for (var i = 0; i < tracks.length; i++) {
var track = tracks[i];
// only add tracks that are of the appropriate kind and have a label
if (track.kind === this.kind_) {
items.push(new _textTrackMenuItem2['default'](this.player_, {
track: track,
// MenuItem is selectable
selectable: true
}));
}
}
return items;
};
return TextTrackButton;
}(_trackButton2['default']);
_component2['default'].registerComponent('TextTrackButton', TextTrackButton);
exports['default'] = TextTrackButton;
},{"28":28,"31":31,"36":36,"5":5}],31:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _menuItem = _dereq_(48);
var _menuItem2 = _interopRequireDefault(_menuItem);
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _fn = _dereq_(82);
var Fn = _interopRequireWildcard(_fn);
var _window = _dereq_(93);
var _window2 = _interopRequireDefault(_window);
var _document = _dereq_(92);
var _document2 = _interopRequireDefault(_document);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file text-track-menu-item.js
*/
/**
* The specific menu item type for selecting a language within a text track kind
*
* @param {Player|Object} player
* @param {Object=} options
* @extends MenuItem
* @class TextTrackMenuItem
*/
var TextTrackMenuItem = function (_MenuItem) {
_inherits(TextTrackMenuItem, _MenuItem);
function TextTrackMenuItem(player, options) {
_classCallCheck(this, TextTrackMenuItem);
var track = options.track;
var tracks = player.textTracks();
// Modify options for parent MenuItem class's init.
options.label = track.label || track.language || 'Unknown';
options.selected = track['default'] || track.mode === 'showing';
var _this = _possibleConstructorReturn(this, _MenuItem.call(this, player, options));
_this.track = track;
if (tracks) {
(function () {
var changeHandler = Fn.bind(_this, _this.handleTracksChange);
tracks.addEventListener('change', changeHandler);
_this.on('dispose', function () {
tracks.removeEventListener('change', changeHandler);
});
})();
}
// iOS7 doesn't dispatch change events to TextTrackLists when an
// associated track's mode changes. Without something like
// Object.observe() (also not present on iOS7), it's not
// possible to detect changes to the mode attribute and polyfill
// the change event. As a poor substitute, we manually dispatch
// change events whenever the controls modify the mode.
if (tracks && tracks.onchange === undefined) {
(function () {
var event = void 0;
_this.on(['tap', 'click'], function () {
if (_typeof(_window2['default'].Event) !== 'object') {
// Android 2.3 throws an Illegal Constructor error for window.Event
try {
event = new _window2['default'].Event('change');
} catch (err) {
// continue regardless of error
}
}
if (!event) {
event = _document2['default'].createEvent('Event');
event.initEvent('change', true, true);
}
tracks.dispatchEvent(event);
});
})();
}
return _this;
}
/**
* Handle click on text track
*
* @method handleClick
*/
TextTrackMenuItem.prototype.handleClick = function handleClick(event) {
var kind = this.track.kind;
var tracks = this.player_.textTracks();
_MenuItem.prototype.handleClick.call(this, event);
if (!tracks) {
return;
}
for (var i = 0; i < tracks.length; i++) {
var track = tracks[i];
if (track.kind !== kind) {
continue;
}
if (track === this.track) {
track.mode = 'showing';
} else {
track.mode = 'disabled';
}
}
};
/**
* Handle text track change
*
* @method handleTracksChange
*/
TextTrackMenuItem.prototype.handleTracksChange = function handleTracksChange(event) {
this.selected(this.track.mode === 'showing');
};
return TextTrackMenuItem;
}(_menuItem2['default']);
_component2['default'].registerComponent('TextTrackMenuItem', TextTrackMenuItem);
exports['default'] = TextTrackMenuItem;
},{"48":48,"5":5,"82":82,"92":92,"93":93}],32:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _dom = _dereq_(80);
var Dom = _interopRequireWildcard(_dom);
var _formatTime = _dereq_(83);
var _formatTime2 = _interopRequireDefault(_formatTime);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file current-time-display.js
*/
/**
* Displays the current time
*
* @param {Player|Object} player
* @param {Object=} options
* @extends Component
* @class CurrentTimeDisplay
*/
var CurrentTimeDisplay = function (_Component) {
_inherits(CurrentTimeDisplay, _Component);
function CurrentTimeDisplay(player, options) {
_classCallCheck(this, CurrentTimeDisplay);
var _this = _possibleConstructorReturn(this, _Component.call(this, player, options));
_this.on(player, 'timeupdate', _this.updateContent);
return _this;
}
/**
* Create the component's DOM element
*
* @return {Element}
* @method createEl
*/
CurrentTimeDisplay.prototype.createEl = function createEl() {
var el = _Component.prototype.createEl.call(this, 'div', {
className: 'vjs-current-time vjs-time-control vjs-control'
});
this.contentEl_ = Dom.createEl('div', {
className: 'vjs-current-time-display',
// label the current time for screen reader users
innerHTML: '<span class="vjs-control-text">Current Time </span>' + '0:00'
}, {
// tell screen readers not to automatically read the time as it changes
'aria-live': 'off'
});
el.appendChild(this.contentEl_);
return el;
};
/**
* Update current time display
*
* @method updateContent
*/
CurrentTimeDisplay.prototype.updateContent = function updateContent() {
// Allows for smooth scrubbing, when player can't keep up.
var time = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime();
var localizedText = this.localize('Current Time');
var formattedTime = (0, _formatTime2['default'])(time, this.player_.duration());
if (formattedTime !== this.formattedTime_) {
this.formattedTime_ = formattedTime;
this.contentEl_.innerHTML = '<span class="vjs-control-text">' + localizedText + '</span> ' + formattedTime;
}
};
return CurrentTimeDisplay;
}(_component2['default']);
_component2['default'].registerComponent('CurrentTimeDisplay', CurrentTimeDisplay);
exports['default'] = CurrentTimeDisplay;
},{"5":5,"80":80,"83":83}],33:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _dom = _dereq_(80);
var Dom = _interopRequireWildcard(_dom);
var _formatTime = _dereq_(83);
var _formatTime2 = _interopRequireDefault(_formatTime);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file duration-display.js
*/
/**
* Displays the duration
*
* @param {Player|Object} player
* @param {Object=} options
* @extends Component
* @class DurationDisplay
*/
var DurationDisplay = function (_Component) {
_inherits(DurationDisplay, _Component);
function DurationDisplay(player, options) {
_classCallCheck(this, DurationDisplay);
var _this = _possibleConstructorReturn(this, _Component.call(this, player, options));
_this.on(player, 'durationchange', _this.updateContent);
return _this;
}
/**
* Create the component's DOM element
*
* @return {Element}
* @method createEl
*/
DurationDisplay.prototype.createEl = function createEl() {
var el = _Component.prototype.createEl.call(this, 'div', {
className: 'vjs-duration vjs-time-control vjs-control'
});
this.contentEl_ = Dom.createEl('div', {
className: 'vjs-duration-display',
// label the duration time for screen reader users
innerHTML: '<span class="vjs-control-text">' + this.localize('Duration Time') + '</span> 0:00'
}, {
// tell screen readers not to automatically read the time as it changes
'aria-live': 'off'
});
el.appendChild(this.contentEl_);
return el;
};
/**
* Update duration time display
*
* @method updateContent
*/
DurationDisplay.prototype.updateContent = function updateContent() {
var duration = this.player_.duration();
if (duration && this.duration_ !== duration) {
this.duration_ = duration;
var localizedText = this.localize('Duration Time');
var formattedTime = (0, _formatTime2['default'])(duration);
// label the duration time for screen reader users
this.contentEl_.innerHTML = '<span class="vjs-control-text">' + localizedText + '</span> ' + formattedTime;
}
};
return DurationDisplay;
}(_component2['default']);
_component2['default'].registerComponent('DurationDisplay', DurationDisplay);
exports['default'] = DurationDisplay;
},{"5":5,"80":80,"83":83}],34:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _dom = _dereq_(80);
var Dom = _interopRequireWildcard(_dom);
var _formatTime = _dereq_(83);
var _formatTime2 = _interopRequireDefault(_formatTime);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file remaining-time-display.js
*/
/**
* Displays the time left in the video
*
* @param {Player|Object} player
* @param {Object=} options
* @extends Component
* @class RemainingTimeDisplay
*/
var RemainingTimeDisplay = function (_Component) {
_inherits(RemainingTimeDisplay, _Component);
function RemainingTimeDisplay(player, options) {
_classCallCheck(this, RemainingTimeDisplay);
var _this = _possibleConstructorReturn(this, _Component.call(this, player, options));
_this.on(player, 'timeupdate', _this.updateContent);
_this.on(player, 'durationchange', _this.updateContent);
return _this;
}
/**
* Create the component's DOM element
*
* @return {Element}
* @method createEl
*/
RemainingTimeDisplay.prototype.createEl = function createEl() {
var el = _Component.prototype.createEl.call(this, 'div', {
className: 'vjs-remaining-time vjs-time-control vjs-control'
});
this.contentEl_ = Dom.createEl('div', {
className: 'vjs-remaining-time-display',
// label the remaining time for screen reader users
innerHTML: '<span class="vjs-control-text">' + this.localize('Remaining Time') + '</span> -0:00'
}, {
// tell screen readers not to automatically read the time as it changes
'aria-live': 'off'
});
el.appendChild(this.contentEl_);
return el;
};
/**
* Update remaining time display
*
* @method updateContent
*/
RemainingTimeDisplay.prototype.updateContent = function updateContent() {
if (this.player_.duration()) {
var localizedText = this.localize('Remaining Time');
var formattedTime = (0, _formatTime2['default'])(this.player_.remainingTime());
if (formattedTime !== this.formattedTime_) {
this.formattedTime_ = formattedTime;
this.contentEl_.innerHTML = '<span class="vjs-control-text">' + localizedText + '</span> -' + formattedTime;
}
}
// Allows for smooth scrubbing, when player can't keep up.
// var time = (this.player_.scrubbing()) ? this.player_.getCache().currentTime : this.player_.currentTime();
// this.contentEl_.innerHTML = vjs.formatTime(time, this.player_.duration());
};
return RemainingTimeDisplay;
}(_component2['default']);
_component2['default'].registerComponent('RemainingTimeDisplay', RemainingTimeDisplay);
exports['default'] = RemainingTimeDisplay;
},{"5":5,"80":80,"83":83}],35:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file time-divider.js
*/
/**
* The separator between the current time and duration.
* Can be hidden if it's not needed in the design.
*
* @param {Player|Object} player
* @param {Object=} options
* @extends Component
* @class TimeDivider
*/
var TimeDivider = function (_Component) {
_inherits(TimeDivider, _Component);
function TimeDivider() {
_classCallCheck(this, TimeDivider);
return _possibleConstructorReturn(this, _Component.apply(this, arguments));
}
/**
* Create the component's DOM element
*
* @return {Element}
* @method createEl
*/
TimeDivider.prototype.createEl = function createEl() {
return _Component.prototype.createEl.call(this, 'div', {
className: 'vjs-time-control vjs-time-divider',
innerHTML: '<div><span>/</span></div>'
});
};
return TimeDivider;
}(_component2['default']);
_component2['default'].registerComponent('TimeDivider', TimeDivider);
exports['default'] = TimeDivider;
},{"5":5}],36:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _menuButton = _dereq_(47);
var _menuButton2 = _interopRequireDefault(_menuButton);
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _fn = _dereq_(82);
var Fn = _interopRequireWildcard(_fn);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file track-button.js
*/
/**
* The base class for buttons that toggle specific text track types (e.g. subtitles)
*
* @param {Player|Object} player
* @param {Object=} options
* @extends MenuButton
* @class TrackButton
*/
var TrackButton = function (_MenuButton) {
_inherits(TrackButton, _MenuButton);
function TrackButton(player, options) {
_classCallCheck(this, TrackButton);
var tracks = options.tracks;
var _this = _possibleConstructorReturn(this, _MenuButton.call(this, player, options));
if (_this.items.length <= 1) {
_this.hide();
}
if (!tracks) {
return _possibleConstructorReturn(_this);
}
var updateHandler = Fn.bind(_this, _this.update);
tracks.addEventListener('removetrack', updateHandler);
tracks.addEventListener('addtrack', updateHandler);
_this.player_.on('dispose', function () {
tracks.removeEventListener('removetrack', updateHandler);
tracks.removeEventListener('addtrack', updateHandler);
});
return _this;
}
return TrackButton;
}(_menuButton2['default']);
_component2['default'].registerComponent('TrackButton', TrackButton);
exports['default'] = TrackButton;
},{"47":47,"5":5,"82":82}],37:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _slider = _dereq_(57);
var _slider2 = _interopRequireDefault(_slider);
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _fn = _dereq_(82);
var Fn = _interopRequireWildcard(_fn);
_dereq_(39);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file volume-bar.js
*/
// Required children
/**
* The bar that contains the volume level and can be clicked on to adjust the level
*
* @param {Player|Object} player
* @param {Object=} options
* @extends Slider
* @class VolumeBar
*/
var VolumeBar = function (_Slider) {
_inherits(VolumeBar, _Slider);
function VolumeBar(player, options) {
_classCallCheck(this, VolumeBar);
var _this = _possibleConstructorReturn(this, _Slider.call(this, player, options));
_this.on(player, 'volumechange', _this.updateARIAAttributes);
player.ready(Fn.bind(_this, _this.updateARIAAttributes));
return _this;
}
/**
* Create the component's DOM element
*
* @return {Element}
* @method createEl
*/
VolumeBar.prototype.createEl = function createEl() {
return _Slider.prototype.createEl.call(this, 'div', {
className: 'vjs-volume-bar vjs-slider-bar'
}, {
'aria-label': 'volume level'
});
};
/**
* Handle mouse move on volume bar
*
* @method handleMouseMove
*/
VolumeBar.prototype.handleMouseMove = function handleMouseMove(event) {
this.checkMuted();
this.player_.volume(this.calculateDistance(event));
};
VolumeBar.prototype.checkMuted = function checkMuted() {
if (this.player_.muted()) {
this.player_.muted(false);
}
};
/**
* Get percent of volume level
*
* @retun {Number} Volume level percent
* @method getPercent
*/
VolumeBar.prototype.getPercent = function getPercent() {
if (this.player_.muted()) {
return 0;
}
return this.player_.volume();
};
/**
* Increase volume level for keyboard users
*
* @method stepForward
*/
VolumeBar.prototype.stepForward = function stepForward() {
this.checkMuted();
this.player_.volume(this.player_.volume() + 0.1);
};
/**
* Decrease volume level for keyboard users
*
* @method stepBack
*/
VolumeBar.prototype.stepBack = function stepBack() {
this.checkMuted();
this.player_.volume(this.player_.volume() - 0.1);
};
/**
* Update ARIA accessibility attributes
*
* @method updateARIAAttributes
*/
VolumeBar.prototype.updateARIAAttributes = function updateARIAAttributes() {
// Current value of volume bar as a percentage
var volume = (this.player_.volume() * 100).toFixed(2);
this.el_.setAttribute('aria-valuenow', volume);
this.el_.setAttribute('aria-valuetext', volume + '%');
};
return VolumeBar;
}(_slider2['default']);
VolumeBar.prototype.options_ = {
children: ['volumeLevel'],
barName: 'volumeLevel'
};
VolumeBar.prototype.playerEvent = 'volumechange';
_component2['default'].registerComponent('VolumeBar', VolumeBar);
exports['default'] = VolumeBar;
},{"39":39,"5":5,"57":57,"82":82}],38:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
_dereq_(37);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file volume-control.js
*/
// Required children
/**
* The component for controlling the volume level
*
* @param {Player|Object} player
* @param {Object=} options
* @extends Component
* @class VolumeControl
*/
var VolumeControl = function (_Component) {
_inherits(VolumeControl, _Component);
function VolumeControl(player, options) {
_classCallCheck(this, VolumeControl);
// hide volume controls when they're not supported by the current tech
var _this = _possibleConstructorReturn(this, _Component.call(this, player, options));
if (player.tech_ && player.tech_.featuresVolumeControl === false) {
_this.addClass('vjs-hidden');
}
_this.on(player, 'loadstart', function () {
if (player.tech_.featuresVolumeControl === false) {
this.addClass('vjs-hidden');
} else {
this.removeClass('vjs-hidden');
}
});
return _this;
}
/**
* Create the component's DOM element
*
* @return {Element}
* @method createEl
*/
VolumeControl.prototype.createEl = function createEl() {
return _Component.prototype.createEl.call(this, 'div', {
className: 'vjs-volume-control vjs-control'
});
};
return VolumeControl;
}(_component2['default']);
VolumeControl.prototype.options_ = {
children: ['volumeBar']
};
_component2['default'].registerComponent('VolumeControl', VolumeControl);
exports['default'] = VolumeControl;
},{"37":37,"5":5}],39:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file volume-level.js
*/
/**
* Shows volume level
*
* @param {Player|Object} player
* @param {Object=} options
* @extends Component
* @class VolumeLevel
*/
var VolumeLevel = function (_Component) {
_inherits(VolumeLevel, _Component);
function VolumeLevel() {
_classCallCheck(this, VolumeLevel);
return _possibleConstructorReturn(this, _Component.apply(this, arguments));
}
/**
* Create the component's DOM element
*
* @return {Element}
* @method createEl
*/
VolumeLevel.prototype.createEl = function createEl() {
return _Component.prototype.createEl.call(this, 'div', {
className: 'vjs-volume-level',
innerHTML: '<span class="vjs-control-text"></span>'
});
};
return VolumeLevel;
}(_component2['default']);
_component2['default'].registerComponent('VolumeLevel', VolumeLevel);
exports['default'] = VolumeLevel;
},{"5":5}],40:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _fn = _dereq_(82);
var Fn = _interopRequireWildcard(_fn);
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _popup = _dereq_(54);
var _popup2 = _interopRequireDefault(_popup);
var _popupButton = _dereq_(53);
var _popupButton2 = _interopRequireDefault(_popupButton);
var _muteToggle = _dereq_(11);
var _muteToggle2 = _interopRequireDefault(_muteToggle);
var _volumeBar = _dereq_(37);
var _volumeBar2 = _interopRequireDefault(_volumeBar);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file volume-menu-button.js
*/
/**
* Button for volume popup
*
* @param {Player|Object} player
* @param {Object=} options
* @extends PopupButton
* @class VolumeMenuButton
*/
var VolumeMenuButton = function (_PopupButton) {
_inherits(VolumeMenuButton, _PopupButton);
function VolumeMenuButton(player) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
_classCallCheck(this, VolumeMenuButton);
// Default to inline
if (options.inline === undefined) {
options.inline = true;
}
// If the vertical option isn't passed at all, default to true.
if (options.vertical === undefined) {
// If an inline volumeMenuButton is used, we should default to using
// a horizontal slider for obvious reasons.
if (options.inline) {
options.vertical = false;
} else {
options.vertical = true;
}
}
// The vertical option needs to be set on the volumeBar as well,
// since that will need to be passed along to the VolumeBar constructor
options.volumeBar = options.volumeBar || {};
options.volumeBar.vertical = !!options.vertical;
// Same listeners as MuteToggle
var _this = _possibleConstructorReturn(this, _PopupButton.call(this, player, options));
_this.on(player, 'volumechange', _this.volumeUpdate);
_this.on(player, 'loadstart', _this.volumeUpdate);
// hide mute toggle if the current tech doesn't support volume control
function updateVisibility() {
if (player.tech_ && player.tech_.featuresVolumeControl === false) {
this.addClass('vjs-hidden');
} else {
this.removeClass('vjs-hidden');
}
}
updateVisibility.call(_this);
_this.on(player, 'loadstart', updateVisibility);
_this.on(_this.volumeBar, ['slideractive', 'focus'], function () {
this.addClass('vjs-slider-active');
});
_this.on(_this.volumeBar, ['sliderinactive', 'blur'], function () {
this.removeClass('vjs-slider-active');
});
_this.on(_this.volumeBar, ['focus'], function () {
this.addClass('vjs-lock-showing');
});
_this.on(_this.volumeBar, ['blur'], function () {
this.removeClass('vjs-lock-showing');
});
return _this;
}
/**
* Allow sub components to stack CSS class names
*
* @return {String} The constructed class name
* @method buildCSSClass
*/
VolumeMenuButton.prototype.buildCSSClass = function buildCSSClass() {
var orientationClass = '';
if (this.options_.vertical) {
orientationClass = 'vjs-volume-menu-button-vertical';
} else {
orientationClass = 'vjs-volume-menu-button-horizontal';
}
return 'vjs-volume-menu-button ' + _PopupButton.prototype.buildCSSClass.call(this) + ' ' + orientationClass;
};
/**
* Allow sub components to stack CSS class names
*
* @return {Popup} The volume popup button
* @method createPopup
*/
VolumeMenuButton.prototype.createPopup = function createPopup() {
var popup = new _popup2['default'](this.player_, {
contentElType: 'div'
});
var vb = new _volumeBar2['default'](this.player_, this.options_.volumeBar);
popup.addChild(vb);
this.menuContent = popup;
this.volumeBar = vb;
this.attachVolumeBarEvents();
return popup;
};
/**
* Handle click on volume popup and calls super
*
* @method handleClick
*/
VolumeMenuButton.prototype.handleClick = function handleClick() {
_muteToggle2['default'].prototype.handleClick.call(this);
_PopupButton.prototype.handleClick.call(this);
};
VolumeMenuButton.prototype.attachVolumeBarEvents = function attachVolumeBarEvents() {
this.menuContent.on(['mousedown', 'touchdown'], Fn.bind(this, this.handleMouseDown));
};
VolumeMenuButton.prototype.handleMouseDown = function handleMouseDown(event) {
this.on(['mousemove', 'touchmove'], Fn.bind(this.volumeBar, this.volumeBar.handleMouseMove));
this.on(this.el_.ownerDocument, ['mouseup', 'touchend'], this.handleMouseUp);
};
VolumeMenuButton.prototype.handleMouseUp = function handleMouseUp(event) {
this.off(['mousemove', 'touchmove'], Fn.bind(this.volumeBar, this.volumeBar.handleMouseMove));
};
return VolumeMenuButton;
}(_popupButton2['default']);
VolumeMenuButton.prototype.volumeUpdate = _muteToggle2['default'].prototype.update;
VolumeMenuButton.prototype.controlText_ = 'Mute';
_component2['default'].registerComponent('VolumeMenuButton', VolumeMenuButton);
exports['default'] = VolumeMenuButton;
},{"11":11,"37":37,"5":5,"53":53,"54":54,"82":82}],41:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _modalDialog = _dereq_(50);
var _modalDialog2 = _interopRequireDefault(_modalDialog);
var _mergeOptions = _dereq_(86);
var _mergeOptions2 = _interopRequireDefault(_mergeOptions);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file error-display.js
*/
/**
* Display that an error has occurred making the video unplayable.
*
* @extends ModalDialog
* @class ErrorDisplay
*/
var ErrorDisplay = function (_ModalDialog) {
_inherits(ErrorDisplay, _ModalDialog);
/**
* Constructor for error display modal.
*
* @param {Player} player
* @param {Object} [options]
*/
function ErrorDisplay(player, options) {
_classCallCheck(this, ErrorDisplay);
var _this = _possibleConstructorReturn(this, _ModalDialog.call(this, player, options));
_this.on(player, 'error', _this.open);
return _this;
}
/**
* Include the old class for backward-compatibility.
*
* This can be removed in 6.0.
*
* @method buildCSSClass
* @deprecated
* @return {String}
*/
ErrorDisplay.prototype.buildCSSClass = function buildCSSClass() {
return 'vjs-error-display ' + _ModalDialog.prototype.buildCSSClass.call(this);
};
/**
* Generates the modal content based on the player error.
*
* @return {String|Null}
*/
ErrorDisplay.prototype.content = function content() {
var error = this.player().error();
return error ? this.localize(error.message) : '';
};
return ErrorDisplay;
}(_modalDialog2['default']);
ErrorDisplay.prototype.options_ = (0, _mergeOptions2['default'])(_modalDialog2['default'].prototype.options_, {
fillAlways: true,
temporary: false,
uncloseable: true
});
_component2['default'].registerComponent('ErrorDisplay', ErrorDisplay);
exports['default'] = ErrorDisplay;
},{"5":5,"50":50,"86":86}],42:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _events = _dereq_(81);
var Events = _interopRequireWildcard(_events);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
var EventTarget = function EventTarget() {}; /**
* @file event-target.js
*/
EventTarget.prototype.allowedEvents_ = {};
EventTarget.prototype.on = function (type, fn) {
// Remove the addEventListener alias before calling Events.on
// so we don't get into an infinite type loop
var ael = this.addEventListener;
this.addEventListener = function () {};
Events.on(this, type, fn);
this.addEventListener = ael;
};
EventTarget.prototype.addEventListener = EventTarget.prototype.on;
EventTarget.prototype.off = function (type, fn) {
Events.off(this, type, fn);
};
EventTarget.prototype.removeEventListener = EventTarget.prototype.off;
EventTarget.prototype.one = function (type, fn) {
// Remove the addEventListener alias before calling Events.on
// so we don't get into an infinite type loop
var ael = this.addEventListener;
this.addEventListener = function () {};
Events.one(this, type, fn);
this.addEventListener = ael;
};
EventTarget.prototype.trigger = function (event) {
var type = event.type || event;
if (typeof event === 'string') {
event = { type: type };
}
event = Events.fixEvent(event);
if (this.allowedEvents_[type] && this['on' + type]) {
this['on' + type](event);
}
Events.trigger(this, event);
};
// The standard DOM EventTarget.dispatchEvent() is aliased to trigger()
EventTarget.prototype.dispatchEvent = EventTarget.prototype.trigger;
exports['default'] = EventTarget;
},{"81":81}],43:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _log = _dereq_(85);
var _log2 = _interopRequireDefault(_log);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
/*
* @file extend.js
*
* A combination of node inherits and babel's inherits (after transpile).
* Both work the same but node adds `super_` to the subClass
* and Bable adds the superClass as __proto__. Both seem useful.
*/
var _inherits = function _inherits(subClass, superClass) {
if (typeof superClass !== 'function' && superClass !== null) {
throw new TypeError('Super expression must either be null or a function, not ' + (typeof superClass === 'undefined' ? 'undefined' : _typeof(superClass)));
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: false,
writable: true,
configurable: true
}
});
if (superClass) {
// node
subClass.super_ = superClass;
}
};
/*
* Function for subclassing using the same inheritance that
* videojs uses internally
* ```js
* var Button = videojs.getComponent('Button');
* ```
* ```js
* var MyButton = videojs.extend(Button, {
* constructor: function(player, options) {
* Button.call(this, player, options);
* },
* onClick: function() {
* // doSomething
* }
* });
* ```
*/
var extendFn = function extendFn(superClass) {
var subClassMethods = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var subClass = function subClass() {
superClass.apply(this, arguments);
};
var methods = {};
if ((typeof subClassMethods === 'undefined' ? 'undefined' : _typeof(subClassMethods)) === 'object') {
if (typeof subClassMethods.init === 'function') {
_log2['default'].warn('Constructor logic via init() is deprecated; please use constructor() instead.');
subClassMethods.constructor = subClassMethods.init;
}
if (subClassMethods.constructor !== Object.prototype.constructor) {
subClass = subClassMethods.constructor;
}
methods = subClassMethods;
} else if (typeof subClassMethods === 'function') {
subClass = subClassMethods;
}
_inherits(subClass, superClass);
// Extend subObj's prototype with functions and other properties from props
for (var name in methods) {
if (methods.hasOwnProperty(name)) {
subClass.prototype[name] = methods[name];
}
}
return subClass;
};
exports['default'] = extendFn;
},{"85":85}],44:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _document = _dereq_(92);
var _document2 = _interopRequireDefault(_document);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
/*
* Store the browser-specific methods for the fullscreen API
* @type {Object|undefined}
* @private
*/
var FullscreenApi = {};
// browser API methods
// map approach from Screenful.js - https://github.com/sindresorhus/screenfull.js
/**
* @file fullscreen-api.js
*/
var apiMap = [
// Spec: https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html
['requestFullscreen', 'exitFullscreen', 'fullscreenElement', 'fullscreenEnabled', 'fullscreenchange', 'fullscreenerror'],
// WebKit
['webkitRequestFullscreen', 'webkitExitFullscreen', 'webkitFullscreenElement', 'webkitFullscreenEnabled', 'webkitfullscreenchange', 'webkitfullscreenerror'],
// Old WebKit (Safari 5.1)
['webkitRequestFullScreen', 'webkitCancelFullScreen', 'webkitCurrentFullScreenElement', 'webkitCancelFullScreen', 'webkitfullscreenchange', 'webkitfullscreenerror'],
// Mozilla
['mozRequestFullScreen', 'mozCancelFullScreen', 'mozFullScreenElement', 'mozFullScreenEnabled', 'mozfullscreenchange', 'mozfullscreenerror'],
// Microsoft
['msRequestFullscreen', 'msExitFullscreen', 'msFullscreenElement', 'msFullscreenEnabled', 'MSFullscreenChange', 'MSFullscreenError']];
var specApi = apiMap[0];
var browserApi = void 0;
// determine the supported set of functions
for (var i = 0; i < apiMap.length; i++) {
// check for exitFullscreen function
if (apiMap[i][1] in _document2['default']) {
browserApi = apiMap[i];
break;
}
}
// map the browser API names to the spec API names
if (browserApi) {
for (var _i = 0; _i < browserApi.length; _i++) {
FullscreenApi[specApi[_i]] = browserApi[_i];
}
}
exports['default'] = FullscreenApi;
},{"92":92}],45:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file loading-spinner.js
*/
/* Loading Spinner
================================================================================ */
/**
* Loading spinner for waiting events
*
* @extends Component
* @class LoadingSpinner
*/
var LoadingSpinner = function (_Component) {
_inherits(LoadingSpinner, _Component);
function LoadingSpinner() {
_classCallCheck(this, LoadingSpinner);
return _possibleConstructorReturn(this, _Component.apply(this, arguments));
}
/**
* Create the component's DOM element
*
* @method createEl
*/
LoadingSpinner.prototype.createEl = function createEl() {
return _Component.prototype.createEl.call(this, 'div', {
className: 'vjs-loading-spinner',
dir: 'ltr'
});
};
return LoadingSpinner;
}(_component2['default']);
_component2['default'].registerComponent('LoadingSpinner', LoadingSpinner);
exports['default'] = LoadingSpinner;
},{"5":5}],46:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; /**
* @file media-error.js
*/
var _object = _dereq_(136);
var _object2 = _interopRequireDefault(_object);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
/*
* Custom MediaError class which mimics the standard HTML5 MediaError class.
*
* @param {Number|String|Object|MediaError} value
* This can be of multiple types:
* - Number: should be a standard error code
* - String: an error message (the code will be 0)
* - Object: arbitrary properties
* - MediaError (native): used to populate a video.js MediaError object
* - MediaError (video.js): will return itself if it's already a
* video.js MediaError object.
*/
function MediaError(value) {
// Allow redundant calls to this constructor to avoid having `instanceof`
// checks peppered around the code.
if (value instanceof MediaError) {
return value;
}
if (typeof value === 'number') {
this.code = value;
} else if (typeof value === 'string') {
// default code is zero, so this is a custom error
this.message = value;
} else if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object') {
// We assign the `code` property manually because native MediaError objects
// do not expose it as an own/enumerable property of the object.
if (typeof value.code === 'number') {
this.code = value.code;
}
(0, _object2['default'])(this, value);
}
if (!this.message) {
this.message = MediaError.defaultMessages[this.code] || '';
}
}
/*
* The error code that refers two one of the defined
* MediaError types
*
* @type {Number}
*/
MediaError.prototype.code = 0;
/*
* An optional message to be shown with the error.
* Message is not part of the HTML5 video spec
* but allows for more informative custom errors.
*
* @type {String}
*/
MediaError.prototype.message = '';
/*
* An optional status code that can be set by plugins
* to allow even more detail about the error.
* For example the HLS plugin might provide the specific
* HTTP status code that was returned when the error
* occurred, then allowing a custom error overlay
* to display more information.
*
* @type {Array}
*/
MediaError.prototype.status = null;
// These errors are indexed by the W3C standard numeric value. The order
// should not be changed!
MediaError.errorTypes = ['MEDIA_ERR_CUSTOM', 'MEDIA_ERR_ABORTED', 'MEDIA_ERR_NETWORK', 'MEDIA_ERR_DECODE', 'MEDIA_ERR_SRC_NOT_SUPPORTED', 'MEDIA_ERR_ENCRYPTED'];
MediaError.defaultMessages = {
1: 'You aborted the media playback',
2: 'A network error caused the media download to fail part-way.',
3: 'The media playback was aborted due to a corruption problem or because the media used features your browser did not support.',
4: 'The media could not be loaded, either because the server or network failed or because the format is not supported.',
5: 'The media is encrypted and we do not have the keys to decrypt it.'
};
// Add types as properties on MediaError
// e.g. MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED = 4;
for (var errNum = 0; errNum < MediaError.errorTypes.length; errNum++) {
MediaError[MediaError.errorTypes[errNum]] = errNum;
// values should be accessible on both the class and instance
MediaError.prototype[MediaError.errorTypes[errNum]] = errNum;
}
exports['default'] = MediaError;
},{"136":136}],47:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _clickableComponent = _dereq_(3);
var _clickableComponent2 = _interopRequireDefault(_clickableComponent);
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _menu = _dereq_(49);
var _menu2 = _interopRequireDefault(_menu);
var _dom = _dereq_(80);
var Dom = _interopRequireWildcard(_dom);
var _fn = _dereq_(82);
var Fn = _interopRequireWildcard(_fn);
var _toTitleCase = _dereq_(89);
var _toTitleCase2 = _interopRequireDefault(_toTitleCase);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file menu-button.js
*/
/**
* A button class with a popup menu
*
* @param {Player|Object} player
* @param {Object=} options
* @extends Button
* @class MenuButton
*/
var MenuButton = function (_ClickableComponent) {
_inherits(MenuButton, _ClickableComponent);
function MenuButton(player) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
_classCallCheck(this, MenuButton);
var _this = _possibleConstructorReturn(this, _ClickableComponent.call(this, player, options));
_this.update();
_this.enabled_ = true;
_this.el_.setAttribute('aria-haspopup', 'true');
_this.el_.setAttribute('role', 'menuitem');
_this.on('keydown', _this.handleSubmenuKeyPress);
return _this;
}
/**
* Update menu
*
* @method update
*/
MenuButton.prototype.update = function update() {
var menu = this.createMenu();
if (this.menu) {
this.removeChild(this.menu);
}
this.menu = menu;
this.addChild(menu);
/**
* Track the state of the menu button
*
* @type {Boolean}
* @private
*/
this.buttonPressed_ = false;
this.el_.setAttribute('aria-expanded', 'false');
if (this.items && this.items.length === 0) {
this.hide();
} else if (this.items && this.items.length > 1) {
this.show();
}
};
/**
* Create menu
*
* @return {Menu} The constructed menu
* @method createMenu
*/
MenuButton.prototype.createMenu = function createMenu() {
var menu = new _menu2['default'](this.player_);
// Add a title list item to the top
if (this.options_.title) {
var title = Dom.createEl('li', {
className: 'vjs-menu-title',
innerHTML: (0, _toTitleCase2['default'])(this.options_.title),
tabIndex: -1
});
menu.children_.unshift(title);
Dom.insertElFirst(title, menu.contentEl());
}
this.items = this.createItems();
if (this.items) {
// Add menu items to the menu
for (var i = 0; i < this.items.length; i++) {
menu.addItem(this.items[i]);
}
}
return menu;
};
/**
* Create the list of menu items. Specific to each subclass.
*
* @method createItems
*/
MenuButton.prototype.createItems = function createItems() {};
/**
* Create the component's DOM element
*
* @return {Element}
* @method createEl
*/
MenuButton.prototype.createEl = function createEl() {
return _ClickableComponent.prototype.createEl.call(this, 'div', {
className: this.buildCSSClass()
});
};
/**
* Allow sub components to stack CSS class names
*
* @return {String} The constructed class name
* @method buildCSSClass
*/
MenuButton.prototype.buildCSSClass = function buildCSSClass() {
var menuButtonClass = 'vjs-menu-button';
// If the inline option is passed, we want to use different styles altogether.
if (this.options_.inline === true) {
menuButtonClass += '-inline';
} else {
menuButtonClass += '-popup';
}
return 'vjs-menu-button ' + menuButtonClass + ' ' + _ClickableComponent.prototype.buildCSSClass.call(this);
};
/**
* When you click the button it adds focus, which
* will show the menu indefinitely.
* So we'll remove focus when the mouse leaves the button.
* Focus is needed for tab navigation.
* Allow sub components to stack CSS class names
*
* @method handleClick
*/
MenuButton.prototype.handleClick = function handleClick() {
this.one(this.menu.contentEl(), 'mouseleave', Fn.bind(this, function (e) {
this.unpressButton();
this.el_.blur();
}));
if (this.buttonPressed_) {
this.unpressButton();
} else {
this.pressButton();
}
};
/**
* Handle key press on menu
*
* @param {Object} event Key press event
* @method handleKeyPress
*/
MenuButton.prototype.handleKeyPress = function handleKeyPress(event) {
// Escape (27) key or Tab (9) key unpress the 'button'
if (event.which === 27 || event.which === 9) {
if (this.buttonPressed_) {
this.unpressButton();
}
// Don't preventDefault for Tab key - we still want to lose focus
if (event.which !== 9) {
event.preventDefault();
}
// Up (38) key or Down (40) key press the 'button'
} else if (event.which === 38 || event.which === 40) {
if (!this.buttonPressed_) {
this.pressButton();
event.preventDefault();
}
} else {
_ClickableComponent.prototype.handleKeyPress.call(this, event);
}
};
/**
* Handle key press on submenu
*
* @param {Object} event Key press event
* @method handleSubmenuKeyPress
*/
MenuButton.prototype.handleSubmenuKeyPress = function handleSubmenuKeyPress(event) {
// Escape (27) key or Tab (9) key unpress the 'button'
if (event.which === 27 || event.which === 9) {
if (this.buttonPressed_) {
this.unpressButton();
}
// Don't preventDefault for Tab key - we still want to lose focus
if (event.which !== 9) {
event.preventDefault();
}
}
};
/**
* Makes changes based on button pressed
*
* @method pressButton
*/
MenuButton.prototype.pressButton = function pressButton() {
if (this.enabled_) {
this.buttonPressed_ = true;
this.menu.lockShowing();
this.el_.setAttribute('aria-expanded', 'true');
// set the focus into the submenu
this.menu.focus();
}
};
/**
* Makes changes based on button unpressed
*
* @method unpressButton
*/
MenuButton.prototype.unpressButton = function unpressButton() {
if (this.enabled_) {
this.buttonPressed_ = false;
this.menu.unlockShowing();
this.el_.setAttribute('aria-expanded', 'false');
// Set focus back to this menu button
this.el_.focus();
}
};
/**
* Disable the menu button
*
* @return {Component}
* @method disable
*/
MenuButton.prototype.disable = function disable() {
// Unpress, but don't force focus on this button
this.buttonPressed_ = false;
this.menu.unlockShowing();
this.el_.setAttribute('aria-expanded', 'false');
this.enabled_ = false;
return _ClickableComponent.prototype.disable.call(this);
};
/**
* Enable the menu button
*
* @return {Component}
* @method disable
*/
MenuButton.prototype.enable = function enable() {
this.enabled_ = true;
return _ClickableComponent.prototype.enable.call(this);
};
return MenuButton;
}(_clickableComponent2['default']);
_component2['default'].registerComponent('MenuButton', MenuButton);
exports['default'] = MenuButton;
},{"3":3,"49":49,"5":5,"80":80,"82":82,"89":89}],48:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _clickableComponent = _dereq_(3);
var _clickableComponent2 = _interopRequireDefault(_clickableComponent);
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _object = _dereq_(136);
var _object2 = _interopRequireDefault(_object);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file menu-item.js
*/
/**
* The component for a menu item. `<li>`
*
* @param {Player|Object} player
* @param {Object=} options
* @extends Button
* @class MenuItem
*/
var MenuItem = function (_ClickableComponent) {
_inherits(MenuItem, _ClickableComponent);
function MenuItem(player, options) {
_classCallCheck(this, MenuItem);
var _this = _possibleConstructorReturn(this, _ClickableComponent.call(this, player, options));
_this.selectable = options.selectable;
_this.selected(options.selected);
if (_this.selectable) {
// TODO: May need to be either menuitemcheckbox or menuitemradio,
// and may need logical grouping of menu items.
_this.el_.setAttribute('role', 'menuitemcheckbox');
} else {
_this.el_.setAttribute('role', 'menuitem');
}
return _this;
}
/**
* Create the component's DOM element
*
* @param {String=} type Desc
* @param {Object=} props Desc
* @return {Element}
* @method createEl
*/
MenuItem.prototype.createEl = function createEl(type, props, attrs) {
return _ClickableComponent.prototype.createEl.call(this, 'li', (0, _object2['default'])({
className: 'vjs-menu-item',
innerHTML: this.localize(this.options_.label),
tabIndex: -1
}, props), attrs);
};
/**
* Handle a click on the menu item, and set it to selected
*
* @method handleClick
*/
MenuItem.prototype.handleClick = function handleClick() {
this.selected(true);
};
/**
* Set this menu item as selected or not
*
* @param {Boolean} selected
* @method selected
*/
MenuItem.prototype.selected = function selected(_selected) {
if (this.selectable) {
if (_selected) {
this.addClass('vjs-selected');
this.el_.setAttribute('aria-checked', 'true');
// aria-checked isn't fully supported by browsers/screen readers,
// so indicate selected state to screen reader in the control text.
this.controlText(', selected');
} else {
this.removeClass('vjs-selected');
this.el_.setAttribute('aria-checked', 'false');
// Indicate un-selected state to screen reader
// Note that a space clears out the selected state text
this.controlText(' ');
}
}
};
return MenuItem;
}(_clickableComponent2['default']);
_component2['default'].registerComponent('MenuItem', MenuItem);
exports['default'] = MenuItem;
},{"136":136,"3":3,"5":5}],49:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _dom = _dereq_(80);
var Dom = _interopRequireWildcard(_dom);
var _fn = _dereq_(82);
var Fn = _interopRequireWildcard(_fn);
var _events = _dereq_(81);
var Events = _interopRequireWildcard(_events);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file menu.js
*/
/**
* The Menu component is used to build pop up menus, including subtitle and
* captions selection menus.
*
* @extends Component
* @class Menu
*/
var Menu = function (_Component) {
_inherits(Menu, _Component);
function Menu(player, options) {
_classCallCheck(this, Menu);
var _this = _possibleConstructorReturn(this, _Component.call(this, player, options));
_this.focusedChild_ = -1;
_this.on('keydown', _this.handleKeyPress);
return _this;
}
/**
* Add a menu item to the menu
*
* @param {Object|String} component Component or component type to add
* @method addItem
*/
Menu.prototype.addItem = function addItem(component) {
this.addChild(component);
component.on('click', Fn.bind(this, function () {
this.unlockShowing();
// TODO: Need to set keyboard focus back to the menuButton
}));
};
/**
* Create the component's DOM element
*
* @return {Element}
* @method createEl
*/
Menu.prototype.createEl = function createEl() {
var contentElType = this.options_.contentElType || 'ul';
this.contentEl_ = Dom.createEl(contentElType, {
className: 'vjs-menu-content'
});
this.contentEl_.setAttribute('role', 'menu');
var el = _Component.prototype.createEl.call(this, 'div', {
append: this.contentEl_,
className: 'vjs-menu'
});
el.setAttribute('role', 'presentation');
el.appendChild(this.contentEl_);
// Prevent clicks from bubbling up. Needed for Menu Buttons,
// where a click on the parent is significant
Events.on(el, 'click', function (event) {
event.preventDefault();
event.stopImmediatePropagation();
});
return el;
};
/**
* Handle key press for menu
*
* @param {Object} event Event object
* @method handleKeyPress
*/
Menu.prototype.handleKeyPress = function handleKeyPress(event) {
// Left and Down Arrows
if (event.which === 37 || event.which === 40) {
event.preventDefault();
this.stepForward();
// Up and Right Arrows
} else if (event.which === 38 || event.which === 39) {
event.preventDefault();
this.stepBack();
}
};
/**
* Move to next (lower) menu item for keyboard users
*
* @method stepForward
*/
Menu.prototype.stepForward = function stepForward() {
var stepChild = 0;
if (this.focusedChild_ !== undefined) {
stepChild = this.focusedChild_ + 1;
}
this.focus(stepChild);
};
/**
* Move to previous (higher) menu item for keyboard users
*
* @method stepBack
*/
Menu.prototype.stepBack = function stepBack() {
var stepChild = 0;
if (this.focusedChild_ !== undefined) {
stepChild = this.focusedChild_ - 1;
}
this.focus(stepChild);
};
/**
* Set focus on a menu item in the menu
*
* @param {Object|String} item Index of child item set focus on
* @method focus
*/
Menu.prototype.focus = function focus() {
var item = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
var children = this.children().slice();
var haveTitle = children.length && children[0].className && /vjs-menu-title/.test(children[0].className);
if (haveTitle) {
children.shift();
}
if (children.length > 0) {
if (item < 0) {
item = 0;
} else if (item >= children.length) {
item = children.length - 1;
}
this.focusedChild_ = item;
children[item].el_.focus();
}
};
return Menu;
}(_component2['default']);
_component2['default'].registerComponent('Menu', Menu);
exports['default'] = Menu;
},{"5":5,"80":80,"81":81,"82":82}],50:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _dom = _dereq_(80);
var Dom = _interopRequireWildcard(_dom);
var _fn = _dereq_(82);
var Fn = _interopRequireWildcard(_fn);
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file modal-dialog.js
*/
var MODAL_CLASS_NAME = 'vjs-modal-dialog';
var ESC = 27;
/**
* The `ModalDialog` displays over the video and its controls, which blocks
* interaction with the player until it is closed.
*
* Modal dialogs include a "Close" button and will close when that button
* is activated - or when ESC is pressed anywhere.
*
* @extends Component
* @class ModalDialog
*/
var ModalDialog = function (_Component) {
_inherits(ModalDialog, _Component);
/**
* Constructor for modals.
*
* @param {Player} player
* @param {Object} [options]
* @param {Mixed} [options.content=undefined]
* Provide customized content for this modal.
*
* @param {String} [options.description]
* A text description for the modal, primarily for accessibility.
*
* @param {Boolean} [options.fillAlways=false]
* Normally, modals are automatically filled only the first time
* they open. This tells the modal to refresh its content
* every time it opens.
*
* @param {String} [options.label]
* A text label for the modal, primarily for accessibility.
*
* @param {Boolean} [options.temporary=true]
* If `true`, the modal can only be opened once; it will be
* disposed as soon as it's closed.
*
* @param {Boolean} [options.uncloseable=false]
* If `true`, the user will not be able to close the modal
* through the UI in the normal ways. Programmatic closing is
* still possible.
*
*/
function ModalDialog(player, options) {
_classCallCheck(this, ModalDialog);
var _this = _possibleConstructorReturn(this, _Component.call(this, player, options));
_this.opened_ = _this.hasBeenOpened_ = _this.hasBeenFilled_ = false;
_this.closeable(!_this.options_.uncloseable);
_this.content(_this.options_.content);
// Make sure the contentEl is defined AFTER any children are initialized
// because we only want the contents of the modal in the contentEl
// (not the UI elements like the close button).
_this.contentEl_ = Dom.createEl('div', {
className: MODAL_CLASS_NAME + '-content'
}, {
role: 'document'
});
_this.descEl_ = Dom.createEl('p', {
className: MODAL_CLASS_NAME + '-description vjs-offscreen',
id: _this.el().getAttribute('aria-describedby')
});
Dom.textContent(_this.descEl_, _this.description());
_this.el_.appendChild(_this.descEl_);
_this.el_.appendChild(_this.contentEl_);
return _this;
}
/**
* Create the modal's DOM element
*
* @method createEl
* @return {Element}
*/
ModalDialog.prototype.createEl = function createEl() {
return _Component.prototype.createEl.call(this, 'div', {
className: this.buildCSSClass(),
tabIndex: -1
}, {
'aria-describedby': this.id() + '_description',
'aria-hidden': 'true',
'aria-label': this.label(),
'role': 'dialog'
});
};
/**
* Build the modal's CSS class.
*
* @method buildCSSClass
* @return {String}
*/
ModalDialog.prototype.buildCSSClass = function buildCSSClass() {
return MODAL_CLASS_NAME + ' vjs-hidden ' + _Component.prototype.buildCSSClass.call(this);
};
/**
* Handles key presses on the document, looking for ESC, which closes
* the modal.
*
* @method handleKeyPress
* @param {Event} e
*/
ModalDialog.prototype.handleKeyPress = function handleKeyPress(e) {
if (e.which === ESC && this.closeable()) {
this.close();
}
};
/**
* Returns the label string for this modal. Primarily used for accessibility.
*
* @return {String}
*/
ModalDialog.prototype.label = function label() {
return this.options_.label || this.localize('Modal Window');
};
/**
* Returns the description string for this modal. Primarily used for
* accessibility.
*
* @return {String}
*/
ModalDialog.prototype.description = function description() {
var desc = this.options_.description || this.localize('This is a modal window.');
// Append a universal closeability message if the modal is closeable.
if (this.closeable()) {
desc += ' ' + this.localize('This modal can be closed by pressing the Escape key or activating the close button.');
}
return desc;
};
/**
* Opens the modal.
*
* @method open
* @return {ModalDialog}
*/
ModalDialog.prototype.open = function open() {
if (!this.opened_) {
var player = this.player();
this.trigger('beforemodalopen');
this.opened_ = true;
// Fill content if the modal has never opened before and
// never been filled.
if (this.options_.fillAlways || !this.hasBeenOpened_ && !this.hasBeenFilled_) {
this.fill();
}
// If the player was playing, pause it and take note of its previously
// playing state.
this.wasPlaying_ = !player.paused();
if (this.wasPlaying_) {
player.pause();
}
if (this.closeable()) {
this.on(this.el_.ownerDocument, 'keydown', Fn.bind(this, this.handleKeyPress));
}
player.controls(false);
this.show();
this.el().setAttribute('aria-hidden', 'false');
this.trigger('modalopen');
this.hasBeenOpened_ = true;
}
return this;
};
/**
* Whether or not the modal is opened currently.
*
* @method opened
* @param {Boolean} [value]
* If given, it will open (`true`) or close (`false`) the modal.
*
* @return {Boolean}
*/
ModalDialog.prototype.opened = function opened(value) {
if (typeof value === 'boolean') {
this[value ? 'open' : 'close']();
}
return this.opened_;
};
/**
* Closes the modal.
*
* @method close
* @return {ModalDialog}
*/
ModalDialog.prototype.close = function close() {
if (this.opened_) {
var player = this.player();
this.trigger('beforemodalclose');
this.opened_ = false;
if (this.wasPlaying_) {
player.play();
}
if (this.closeable()) {
this.off(this.el_.ownerDocument, 'keydown', Fn.bind(this, this.handleKeyPress));
}
player.controls(true);
this.hide();
this.el().setAttribute('aria-hidden', 'true');
this.trigger('modalclose');
if (this.options_.temporary) {
this.dispose();
}
}
return this;
};
/**
* Whether or not the modal is closeable via the UI.
*
* @method closeable
* @param {Boolean} [value]
* If given as a Boolean, it will set the `closeable` option.
*
* @return {Boolean}
*/
ModalDialog.prototype.closeable = function closeable(value) {
if (typeof value === 'boolean') {
var closeable = this.closeable_ = !!value;
var close = this.getChild('closeButton');
// If this is being made closeable and has no close button, add one.
if (closeable && !close) {
// The close button should be a child of the modal - not its
// content element, so temporarily change the content element.
var temp = this.contentEl_;
this.contentEl_ = this.el_;
close = this.addChild('closeButton', { controlText: 'Close Modal Dialog' });
this.contentEl_ = temp;
this.on(close, 'close', this.close);
}
// If this is being made uncloseable and has a close button, remove it.
if (!closeable && close) {
this.off(close, 'close', this.close);
this.removeChild(close);
close.dispose();
}
}
return this.closeable_;
};
/**
* Fill the modal's content element with the modal's "content" option.
*
* The content element will be emptied before this change takes place.
*
* @method fill
* @return {ModalDialog}
*/
ModalDialog.prototype.fill = function fill() {
return this.fillWith(this.content());
};
/**
* Fill the modal's content element with arbitrary content.
*
* The content element will be emptied before this change takes place.
*
* @method fillWith
* @param {Mixed} [content]
* The same rules apply to this as apply to the `content` option.
*
* @return {ModalDialog}
*/
ModalDialog.prototype.fillWith = function fillWith(content) {
var contentEl = this.contentEl();
var parentEl = contentEl.parentNode;
var nextSiblingEl = contentEl.nextSibling;
this.trigger('beforemodalfill');
this.hasBeenFilled_ = true;
// Detach the content element from the DOM before performing
// manipulation to avoid modifying the live DOM multiple times.
parentEl.removeChild(contentEl);
this.empty();
Dom.insertContent(contentEl, content);
this.trigger('modalfill');
// Re-inject the re-filled content element.
if (nextSiblingEl) {
parentEl.insertBefore(contentEl, nextSiblingEl);
} else {
parentEl.appendChild(contentEl);
}
return this;
};
/**
* Empties the content element.
*
* This happens automatically anytime the modal is filled.
*
* @method empty
* @return {ModalDialog}
*/
ModalDialog.prototype.empty = function empty() {
this.trigger('beforemodalempty');
Dom.emptyEl(this.contentEl());
this.trigger('modalempty');
return this;
};
/**
* Gets or sets the modal content, which gets normalized before being
* rendered into the DOM.
*
* This does not update the DOM or fill the modal, but it is called during
* that process.
*
* @method content
* @param {Mixed} [value]
* If defined, sets the internal content value to be used on the
* next call(s) to `fill`. This value is normalized before being
* inserted. To "clear" the internal content value, pass `null`.
*
* @return {Mixed}
*/
ModalDialog.prototype.content = function content(value) {
if (typeof value !== 'undefined') {
this.content_ = value;
}
return this.content_;
};
return ModalDialog;
}(_component2['default']);
/*
* Modal dialog default options.
*
* @type {Object}
* @private
*/
ModalDialog.prototype.options_ = {
temporary: true
};
_component2['default'].registerComponent('ModalDialog', ModalDialog);
exports['default'] = ModalDialog;
},{"5":5,"80":80,"82":82}],51:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _document = _dereq_(92);
var _document2 = _interopRequireDefault(_document);
var _window = _dereq_(93);
var _window2 = _interopRequireDefault(_window);
var _events = _dereq_(81);
var Events = _interopRequireWildcard(_events);
var _dom = _dereq_(80);
var Dom = _interopRequireWildcard(_dom);
var _fn = _dereq_(82);
var Fn = _interopRequireWildcard(_fn);
var _guid = _dereq_(84);
var Guid = _interopRequireWildcard(_guid);
var _browser = _dereq_(78);
var browser = _interopRequireWildcard(_browser);
var _log = _dereq_(85);
var _log2 = _interopRequireDefault(_log);
var _toTitleCase = _dereq_(89);
var _toTitleCase2 = _interopRequireDefault(_toTitleCase);
var _timeRanges = _dereq_(88);
var _buffer = _dereq_(79);
var _stylesheet = _dereq_(87);
var stylesheet = _interopRequireWildcard(_stylesheet);
var _fullscreenApi = _dereq_(44);
var _fullscreenApi2 = _interopRequireDefault(_fullscreenApi);
var _mediaError = _dereq_(46);
var _mediaError2 = _interopRequireDefault(_mediaError);
var _tuple = _dereq_(145);
var _tuple2 = _interopRequireDefault(_tuple);
var _object = _dereq_(136);
var _object2 = _interopRequireDefault(_object);
var _mergeOptions = _dereq_(86);
var _mergeOptions2 = _interopRequireDefault(_mergeOptions);
var _textTrackListConverter = _dereq_(69);
var _textTrackListConverter2 = _interopRequireDefault(_textTrackListConverter);
var _modalDialog = _dereq_(50);
var _modalDialog2 = _interopRequireDefault(_modalDialog);
var _tech = _dereq_(62);
var _tech2 = _interopRequireDefault(_tech);
var _audioTrackList = _dereq_(63);
var _audioTrackList2 = _interopRequireDefault(_audioTrackList);
var _videoTrackList = _dereq_(76);
var _videoTrackList2 = _interopRequireDefault(_videoTrackList);
_dereq_(61);
_dereq_(59);
_dereq_(55);
_dereq_(68);
_dereq_(45);
_dereq_(1);
_dereq_(4);
_dereq_(8);
_dereq_(41);
_dereq_(71);
_dereq_(60);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file player.js
*/
// Subclasses Component
// The following imports are used only to ensure that the corresponding modules
// are always included in the video.js package. Importing the modules will
// execute them and they will register themselves with video.js.
// Import Html5 tech, at least for disposing the original video tag.
var TECH_EVENTS_RETRIGGER = [
/**
* Fired while the user agent is downloading media data
*
* @private
* @method Player.prototype.handleTechProgress_
*/
'progress',
/**
* Fires when the loading of an audio/video is aborted
*
* @private
* @method Player.prototype.handleTechAbort_
*/
'abort',
/**
* Fires when the browser is intentionally not getting media data
*
* @private
* @method Player.prototype.handleTechSuspend_
*/
'suspend',
/**
* Fires when the current playlist is empty
*
* @private
* @method Player.prototype.handleTechEmptied_
*/
'emptied',
/**
* Fires when the browser is trying to get media data, but data is not available
*
* @private
* @method Player.prototype.handleTechStalled_
*/
'stalled',
/**
* Fires when the browser has loaded meta data for the audio/video
*
* @private
* @method Player.prototype.handleTechLoadedmetadata_
*/
'loadedmetadata',
/**
* Fires when the browser has loaded the current frame of the audio/video
*
* @private
* @method Player.prototype.handleTechLoaddeddata_
*/
'loadeddata',
/**
* Fires when the current playback position has changed
*
* @private
* @method Player.prototype.handleTechTimeUpdate_
*/
'timeupdate',
/**
* Fires when the playing speed of the audio/video is changed
*
* @private
* @method Player.prototype.handleTechRatechange_
*/
'ratechange',
/**
* Fires when the volume has been changed
*
* @private
* @method Player.prototype.handleTechVolumechange_
*/
'volumechange',
/**
* Fires when the text track has been changed
*
* @private
* @method Player.prototype.handleTechTexttrackchange_
*/
'texttrackchange'];
/**
* An instance of the `Player` class is created when any of the Video.js setup methods are used to initialize a video.
* ```js
* var myPlayer = videojs('example_video_1');
* ```
* In the following example, the `data-setup` attribute tells the Video.js library to create a player instance when the library is ready.
* ```html
* <video id="example_video_1" data-setup='{}' controls>
* <source src="my-source.mp4" type="video/mp4">
* </video>
* ```
* After an instance has been created it can be accessed globally using `Video('example_video_1')`.
*
* @param {Element} tag The original video tag used for configuring options
* @param {Object=} options Object of option names and values
* @param {Function=} ready Ready callback function
* @class Player
*/
var Player = function (_Component) {
_inherits(Player, _Component);
function Player(tag, options, ready) {
_classCallCheck(this, Player);
// Make sure tag ID exists
tag.id = tag.id || 'vjs_video_' + Guid.newGUID();
// Set Options
// The options argument overrides options set in the video tag
// which overrides globally set options.
// This latter part coincides with the load order
// (tag must exist before Player)
options = (0, _object2['default'])(Player.getTagSettings(tag), options);
// Delay the initialization of children because we need to set up
// player properties first, and can't use `this` before `super()`
options.initChildren = false;
// Same with creating the element
options.createEl = false;
// we don't want the player to report touch activity on itself
// see enableTouchActivity in Component
options.reportTouchActivity = false;
// If language is not set, get the closest lang attribute
if (!options.language) {
if (typeof tag.closest === 'function') {
var closest = tag.closest('[lang]');
if (closest) {
options.language = closest.getAttribute('lang');
}
} else {
var element = tag;
while (element && element.nodeType === 1) {
if (Dom.getElAttributes(element).hasOwnProperty('lang')) {
options.language = element.getAttribute('lang');
break;
}
element = element.parentNode;
}
}
}
// Run base component initializing with new options
// if the global option object was accidentally blown away by
// someone, bail early with an informative error
var _this = _possibleConstructorReturn(this, _Component.call(this, null, options, ready));
if (!_this.options_ || !_this.options_.techOrder || !_this.options_.techOrder.length) {
throw new Error('No techOrder specified. Did you overwrite ' + 'videojs.options instead of just changing the ' + 'properties you want to override?');
}
// Store the original tag used to set options
_this.tag = tag;
// Store the tag attributes used to restore html5 element
_this.tagAttributes = tag && Dom.getElAttributes(tag);
// Update current language
_this.language(_this.options_.language);
// Update Supported Languages
if (options.languages) {
(function () {
// Normalise player option languages to lowercase
var languagesToLower = {};
Object.getOwnPropertyNames(options.languages).forEach(function (name) {
languagesToLower[name.toLowerCase()] = options.languages[name];
});
_this.languages_ = languagesToLower;
})();
} else {
_this.languages_ = Player.prototype.options_.languages;
}
// Cache for video property values.
_this.cache_ = {};
// Set poster
_this.poster_ = options.poster || '';
// Set controls
_this.controls_ = !!options.controls;
// Original tag settings stored in options
// now remove immediately so native controls don't flash.
// May be turned back on by HTML5 tech if nativeControlsForTouch is true
tag.controls = false;
/*
* Store the internal state of scrubbing
*
* @private
* @return {Boolean} True if the user is scrubbing
*/
_this.scrubbing_ = false;
_this.el_ = _this.createEl();
// We also want to pass the original player options to each component and plugin
// as well so they don't need to reach back into the player for options later.
// We also need to do another copy of this.options_ so we don't end up with
// an infinite loop.
var playerOptionsCopy = (0, _mergeOptions2['default'])(_this.options_);
// Load plugins
if (options.plugins) {
(function () {
var plugins = options.plugins;
Object.getOwnPropertyNames(plugins).forEach(function (name) {
if (typeof this[name] === 'function') {
this[name](plugins[name]);
} else {
_log2['default'].error('Unable to find plugin:', name);
}
}, _this);
})();
}
_this.options_.playerOptions = playerOptionsCopy;
_this.initChildren();
// Set isAudio based on whether or not an audio tag was used
_this.isAudio(tag.nodeName.toLowerCase() === 'audio');
// Update controls className. Can't do this when the controls are initially
// set because the element doesn't exist yet.
if (_this.controls()) {
_this.addClass('vjs-controls-enabled');
} else {
_this.addClass('vjs-controls-disabled');
}
// Set ARIA label and region role depending on player type
_this.el_.setAttribute('role', 'region');
if (_this.isAudio()) {
_this.el_.setAttribute('aria-label', 'audio player');
} else {
_this.el_.setAttribute('aria-label', 'video player');
}
if (_this.isAudio()) {
_this.addClass('vjs-audio');
}
if (_this.flexNotSupported_()) {
_this.addClass('vjs-no-flex');
}
// TODO: Make this smarter. Toggle user state between touching/mousing
// using events, since devices can have both touch and mouse events.
// if (browser.TOUCH_ENABLED) {
// this.addClass('vjs-touch-enabled');
// }
// iOS Safari has broken hover handling
if (!browser.IS_IOS) {
_this.addClass('vjs-workinghover');
}
// Make player easily findable by ID
Player.players[_this.id_] = _this;
// When the player is first initialized, trigger activity so components
// like the control bar show themselves if needed
_this.userActive(true);
_this.reportUserActivity();
_this.listenForUserActivity_();
_this.on('fullscreenchange', _this.handleFullscreenChange_);
_this.on('stageclick', _this.handleStageClick_);
return _this;
}
/**
* Destroys the video player and does any necessary cleanup
* ```js
* myPlayer.dispose();
* ```
* This is especially helpful if you are dynamically adding and removing videos
* to/from the DOM.
*/
Player.prototype.dispose = function dispose() {
this.trigger('dispose');
// prevent dispose from being called twice
this.off('dispose');
if (this.styleEl_ && this.styleEl_.parentNode) {
this.styleEl_.parentNode.removeChild(this.styleEl_);
}
// Kill reference to this player
Player.players[this.id_] = null;
if (this.tag && this.tag.player) {
this.tag.player = null;
}
if (this.el_ && this.el_.player) {
this.el_.player = null;
}
if (this.tech_) {
this.tech_.dispose();
}
_Component.prototype.dispose.call(this);
};
/**
* Create the component's DOM element
*
* @return {Element}
*/
Player.prototype.createEl = function createEl() {
var el = this.el_ = _Component.prototype.createEl.call(this, 'div');
var tag = this.tag;
// Remove width/height attrs from tag so CSS can make it 100% width/height
tag.removeAttribute('width');
tag.removeAttribute('height');
// Copy over all the attributes from the tag, including ID and class
// ID will now reference player box, not the video tag
var attrs = Dom.getElAttributes(tag);
Object.getOwnPropertyNames(attrs).forEach(function (attr) {
// workaround so we don't totally break IE7
// http://stackoverflow.com/questions/3653444/css-styles-not-applied-on-dynamic-elements-in-internet-explorer-7
if (attr === 'class') {
el.className = attrs[attr];
} else {
el.setAttribute(attr, attrs[attr]);
}
});
// Update tag id/class for use as HTML5 playback tech
// Might think we should do this after embedding in container so .vjs-tech class
// doesn't flash 100% width/height, but class only applies with .video-js parent
tag.playerId = tag.id;
tag.id += '_html5_api';
tag.className = 'vjs-tech';
// Make player findable on elements
tag.player = el.player = this;
// Default state of video is paused
this.addClass('vjs-paused');
// Add a style element in the player that we'll use to set the width/height
// of the player in a way that's still overrideable by CSS, just like the
// video element
if (_window2['default'].VIDEOJS_NO_DYNAMIC_STYLE !== true) {
this.styleEl_ = stylesheet.createStyleElement('vjs-styles-dimensions');
var defaultsStyleEl = Dom.$('.vjs-styles-defaults');
var head = Dom.$('head');
head.insertBefore(this.styleEl_, defaultsStyleEl ? defaultsStyleEl.nextSibling : head.firstChild);
}
// Pass in the width/height/aspectRatio options which will update the style el
this.width(this.options_.width);
this.height(this.options_.height);
this.fluid(this.options_.fluid);
this.aspectRatio(this.options_.aspectRatio);
// Hide any links within the video/audio tag, because IE doesn't hide them completely.
var links = tag.getElementsByTagName('a');
for (var i = 0; i < links.length; i++) {
var linkEl = links.item(i);
Dom.addElClass(linkEl, 'vjs-hidden');
linkEl.setAttribute('hidden', 'hidden');
}
// insertElFirst seems to cause the networkState to flicker from 3 to 2, so
// keep track of the original for later so we can know if the source originally failed
tag.initNetworkState_ = tag.networkState;
// Wrap video tag in div (el/box) container
if (tag.parentNode) {
tag.parentNode.insertBefore(el, tag);
}
// insert the tag as the first child of the player element
// then manually add it to the children array so that this.addChild
// will work properly for other components
//
// Breaks iPhone, fixed in HTML5 setup.
Dom.insertElFirst(tag, el);
this.children_.unshift(tag);
this.el_ = el;
return el;
};
/**
* Get/set player width
*
* @param {Number=} value Value for width
* @return {Number} Width when getting
*/
Player.prototype.width = function width(value) {
return this.dimension('width', value);
};
/**
* Get/set player height
*
* @param {Number=} value Value for height
* @return {Number} Height when getting
*/
Player.prototype.height = function height(value) {
return this.dimension('height', value);
};
/**
* Get/set dimension for player
*
* @param {String} dimension Either width or height
* @param {Number=} value Value for dimension
* @return {Component}
*/
Player.prototype.dimension = function dimension(_dimension, value) {
var privDimension = _dimension + '_';
if (value === undefined) {
return this[privDimension] || 0;
}
if (value === '') {
// If an empty string is given, reset the dimension to be automatic
this[privDimension] = undefined;
} else {
var parsedVal = parseFloat(value);
if (isNaN(parsedVal)) {
_log2['default'].error('Improper value "' + value + '" supplied for for ' + _dimension);
return this;
}
this[privDimension] = parsedVal;
}
this.updateStyleEl_();
return this;
};
/**
* Add/remove the vjs-fluid class
*
* @param {Boolean} bool Value of true adds the class, value of false removes the class
*/
Player.prototype.fluid = function fluid(bool) {
if (bool === undefined) {
return !!this.fluid_;
}
this.fluid_ = !!bool;
if (bool) {
this.addClass('vjs-fluid');
} else {
this.removeClass('vjs-fluid');
}
};
/**
* Get/Set the aspect ratio
*
* @param {String=} ratio Aspect ratio for player
* @return aspectRatio
*/
Player.prototype.aspectRatio = function aspectRatio(ratio) {
if (ratio === undefined) {
return this.aspectRatio_;
}
// Check for width:height format
if (!/^\d+\:\d+$/.test(ratio)) {
throw new Error('Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.');
}
this.aspectRatio_ = ratio;
// We're assuming if you set an aspect ratio you want fluid mode,
// because in fixed mode you could calculate width and height yourself.
this.fluid(true);
this.updateStyleEl_();
};
/**
* Update styles of the player element (height, width and aspect ratio)
*/
Player.prototype.updateStyleEl_ = function updateStyleEl_() {
if (_window2['default'].VIDEOJS_NO_DYNAMIC_STYLE === true) {
var _width = typeof this.width_ === 'number' ? this.width_ : this.options_.width;
var _height = typeof this.height_ === 'number' ? this.height_ : this.options_.height;
var techEl = this.tech_ && this.tech_.el();
if (techEl) {
if (_width >= 0) {
techEl.width = _width;
}
if (_height >= 0) {
techEl.height = _height;
}
}
return;
}
var width = void 0;
var height = void 0;
var aspectRatio = void 0;
var idClass = void 0;
// The aspect ratio is either used directly or to calculate width and height.
if (this.aspectRatio_ !== undefined && this.aspectRatio_ !== 'auto') {
// Use any aspectRatio that's been specifically set
aspectRatio = this.aspectRatio_;
} else if (this.videoWidth()) {
// Otherwise try to get the aspect ratio from the video metadata
aspectRatio = this.videoWidth() + ':' + this.videoHeight();
} else {
// Or use a default. The video element's is 2:1, but 16:9 is more common.
aspectRatio = '16:9';
}
// Get the ratio as a decimal we can use to calculate dimensions
var ratioParts = aspectRatio.split(':');
var ratioMultiplier = ratioParts[1] / ratioParts[0];
if (this.width_ !== undefined) {
// Use any width that's been specifically set
width = this.width_;
} else if (this.height_ !== undefined) {
// Or calulate the width from the aspect ratio if a height has been set
width = this.height_ / ratioMultiplier;
} else {
// Or use the video's metadata, or use the video el's default of 300
width = this.videoWidth() || 300;
}
if (this.height_ !== undefined) {
// Use any height that's been specifically set
height = this.height_;
} else {
// Otherwise calculate the height from the ratio and the width
height = width * ratioMultiplier;
}
// Ensure the CSS class is valid by starting with an alpha character
if (/^[^a-zA-Z]/.test(this.id())) {
idClass = 'dimensions-' + this.id();
} else {
idClass = this.id() + '-dimensions';
}
// Ensure the right class is still on the player for the style element
this.addClass(idClass);
stylesheet.setTextContent(this.styleEl_, '\n .' + idClass + ' {\n width: ' + width + 'px;\n height: ' + height + 'px;\n }\n\n .' + idClass + '.vjs-fluid {\n padding-top: ' + ratioMultiplier * 100 + '%;\n }\n ');
};
/**
* Load the Media Playback Technology (tech)
* Load/Create an instance of playback technology including element and API methods
* And append playback element in player div.
*
* @param {String} techName Name of the playback technology
* @param {String} source Video source
* @private
*/
Player.prototype.loadTech_ = function loadTech_(techName, source) {
var _this2 = this;
// Pause and remove current playback technology
if (this.tech_) {
this.unloadTech_();
}
// get rid of the HTML5 video tag as soon as we are using another tech
if (techName !== 'Html5' && this.tag) {
_tech2['default'].getTech('Html5').disposeMediaElement(this.tag);
this.tag.player = null;
this.tag = null;
}
this.techName_ = techName;
// Turn off API access because we're loading a new tech that might load asynchronously
this.isReady_ = false;
// Grab tech-specific options from player options and add source and parent element to use.
var techOptions = (0, _object2['default'])({
source: source,
'nativeControlsForTouch': this.options_.nativeControlsForTouch,
'playerId': this.id(),
'techId': this.id() + '_' + techName + '_api',
'videoTracks': this.videoTracks_,
'textTracks': this.textTracks_,
'audioTracks': this.audioTracks_,
'autoplay': this.options_.autoplay,
'preload': this.options_.preload,
'loop': this.options_.loop,
'muted': this.options_.muted,
'poster': this.poster(),
'language': this.language(),
'vtt.js': this.options_['vtt.js']
}, this.options_[techName.toLowerCase()]);
if (this.tag) {
techOptions.tag = this.tag;
}
if (source) {
this.currentType_ = source.type;
if (source.src === this.cache_.src && this.cache_.currentTime > 0) {
techOptions.startTime = this.cache_.currentTime;
}
this.cache_.src = source.src;
}
// Initialize tech instance
var TechComponent = _tech2['default'].getTech(techName);
// Support old behavior of techs being registered as components.
// Remove once that deprecated behavior is removed.
if (!TechComponent) {
TechComponent = _component2['default'].getComponent(techName);
}
this.tech_ = new TechComponent(techOptions);
// player.triggerReady is always async, so don't need this to be async
this.tech_.ready(Fn.bind(this, this.handleTechReady_), true);
_textTrackListConverter2['default'].jsonToTextTracks(this.textTracksJson_ || [], this.tech_);
// Listen to all HTML5-defined events and trigger them on the player
TECH_EVENTS_RETRIGGER.forEach(function (event) {
_this2.on(_this2.tech_, event, _this2['handleTech' + (0, _toTitleCase2['default'])(event) + '_']);
});
this.on(this.tech_, 'loadstart', this.handleTechLoadStart_);
this.on(this.tech_, 'waiting', this.handleTechWaiting_);
this.on(this.tech_, 'canplay', this.handleTechCanPlay_);
this.on(this.tech_, 'canplaythrough', this.handleTechCanPlayThrough_);
this.on(this.tech_, 'playing', this.handleTechPlaying_);
this.on(this.tech_, 'ended', this.handleTechEnded_);
this.on(this.tech_, 'seeking', this.handleTechSeeking_);
this.on(this.tech_, 'seeked', this.handleTechSeeked_);
this.on(this.tech_, 'play', this.handleTechPlay_);
this.on(this.tech_, 'firstplay', this.handleTechFirstPlay_);
this.on(this.tech_, 'pause', this.handleTechPause_);
this.on(this.tech_, 'durationchange', this.handleTechDurationChange_);
this.on(this.tech_, 'fullscreenchange', this.handleTechFullscreenChange_);
this.on(this.tech_, 'error', this.handleTechError_);
this.on(this.tech_, 'loadedmetadata', this.updateStyleEl_);
this.on(this.tech_, 'posterchange', this.handleTechPosterChange_);
this.on(this.tech_, 'textdata', this.handleTechTextData_);
this.usingNativeControls(this.techGet_('controls'));
if (this.controls() && !this.usingNativeControls()) {
this.addTechControlsListeners_();
}
// Add the tech element in the DOM if it was not already there
// Make sure to not insert the original video element if using Html5
if (this.tech_.el().parentNode !== this.el() && (techName !== 'Html5' || !this.tag)) {
Dom.insertElFirst(this.tech_.el(), this.el());
}
// Get rid of the original video tag reference after the first tech is loaded
if (this.tag) {
this.tag.player = null;
this.tag = null;
}
};
/**
* Unload playback technology
*
* @private
*/
Player.prototype.unloadTech_ = function unloadTech_() {
// Save the current text tracks so that we can reuse the same text tracks with the next tech
this.videoTracks_ = this.videoTracks();
this.textTracks_ = this.textTracks();
this.audioTracks_ = this.audioTracks();
this.textTracksJson_ = _textTrackListConverter2['default'].textTracksToJson(this.tech_);
this.isReady_ = false;
this.tech_.dispose();
this.tech_ = false;
};
/**
* Return a reference to the current tech.
* It will only return a reference to the tech if given an object with the
* `IWillNotUseThisInPlugins` property on it. This is try and prevent misuse
* of techs by plugins.
*
* @param {Object}
* @return {Object} The Tech
*/
Player.prototype.tech = function tech(safety) {
if (safety && safety.IWillNotUseThisInPlugins) {
return this.tech_;
}
var errorText = '\n Please make sure that you are not using this inside of a plugin.\n To disable this alert and error, please pass in an object with\n `IWillNotUseThisInPlugins` to the `tech` method. See\n https://github.com/videojs/video.js/issues/2617 for more info.\n ';
_window2['default'].alert(errorText);
throw new Error(errorText);
};
/**
* Set up click and touch listeners for the playback element
*
* On desktops, a click on the video itself will toggle playback,
* on a mobile device a click on the video toggles controls.
* (toggling controls is done by toggling the user state between active and
* inactive)
* A tap can signal that a user has become active, or has become inactive
* e.g. a quick tap on an iPhone movie should reveal the controls. Another
* quick tap should hide them again (signaling the user is in an inactive
* viewing state)
* In addition to this, we still want the user to be considered inactive after
* a few seconds of inactivity.
* Note: the only part of iOS interaction we can't mimic with this setup
* is a touch and hold on the video element counting as activity in order to
* keep the controls showing, but that shouldn't be an issue. A touch and hold
* on any controls will still keep the user active
*
* @private
*/
Player.prototype.addTechControlsListeners_ = function addTechControlsListeners_() {
// Make sure to remove all the previous listeners in case we are called multiple times.
this.removeTechControlsListeners_();
// Some browsers (Chrome & IE) don't trigger a click on a flash swf, but do
// trigger mousedown/up.
// http://stackoverflow.com/questions/1444562/javascript-onclick-event-over-flash-object
// Any touch events are set to block the mousedown event from happening
this.on(this.tech_, 'mousedown', this.handleTechClick_);
// If the controls were hidden we don't want that to change without a tap event
// so we'll check if the controls were already showing before reporting user
// activity
this.on(this.tech_, 'touchstart', this.handleTechTouchStart_);
this.on(this.tech_, 'touchmove', this.handleTechTouchMove_);
this.on(this.tech_, 'touchend', this.handleTechTouchEnd_);
// The tap listener needs to come after the touchend listener because the tap
// listener cancels out any reportedUserActivity when setting userActive(false)
this.on(this.tech_, 'tap', this.handleTechTap_);
};
/**
* Remove the listeners used for click and tap controls. This is needed for
* toggling to controls disabled, where a tap/touch should do nothing.
*
* @private
*/
Player.prototype.removeTechControlsListeners_ = function removeTechControlsListeners_() {
// We don't want to just use `this.off()` because there might be other needed
// listeners added by techs that extend this.
this.off(this.tech_, 'tap', this.handleTechTap_);
this.off(this.tech_, 'touchstart', this.handleTechTouchStart_);
this.off(this.tech_, 'touchmove', this.handleTechTouchMove_);
this.off(this.tech_, 'touchend', this.handleTechTouchEnd_);
this.off(this.tech_, 'mousedown', this.handleTechClick_);
};
/**
* Player waits for the tech to be ready
*
* @private
*/
Player.prototype.handleTechReady_ = function handleTechReady_() {
this.triggerReady();
// Keep the same volume as before
if (this.cache_.volume) {
this.techCall_('setVolume', this.cache_.volume);
}
// Look if the tech found a higher resolution poster while loading
this.handleTechPosterChange_();
// Update the duration if available
this.handleTechDurationChange_();
// Chrome and Safari both have issues with autoplay.
// In Safari (5.1.1), when we move the video element into the container div, autoplay doesn't work.
// In Chrome (15), if you have autoplay + a poster + no controls, the video gets hidden (but audio plays)
// This fixes both issues. Need to wait for API, so it updates displays correctly
if ((this.src() || this.currentSrc()) && this.tag && this.options_.autoplay && this.paused()) {
try {
// Chrome Fix. Fixed in Chrome v16.
delete this.tag.poster;
} catch (e) {
(0, _log2['default'])('deleting tag.poster throws in some browsers', e);
}
this.play();
}
};
/**
* Fired when the user agent begins looking for media data
*
* @event loadstart
* @private
*/
Player.prototype.handleTechLoadStart_ = function handleTechLoadStart_() {
// TODO: Update to use `emptied` event instead. See #1277.
this.removeClass('vjs-ended');
// reset the error state
this.error(null);
// If it's already playing we want to trigger a firstplay event now.
// The firstplay event relies on both the play and loadstart events
// which can happen in any order for a new source
if (!this.paused()) {
this.trigger('loadstart');
this.trigger('firstplay');
} else {
// reset the hasStarted state
this.hasStarted(false);
this.trigger('loadstart');
}
};
/**
* Add/remove the vjs-has-started class
*
* @param {Boolean} hasStarted The value of true adds the class the value of false remove the class
* @return {Boolean} Boolean value if has started
* @private
*/
Player.prototype.hasStarted = function hasStarted(_hasStarted) {
if (_hasStarted !== undefined) {
// only update if this is a new value
if (this.hasStarted_ !== _hasStarted) {
this.hasStarted_ = _hasStarted;
if (_hasStarted) {
this.addClass('vjs-has-started');
// trigger the firstplay event if this newly has played
this.trigger('firstplay');
} else {
this.removeClass('vjs-has-started');
}
}
return this;
}
return !!this.hasStarted_;
};
/**
* Fired whenever the media begins or resumes playback
*
* @private
*/
Player.prototype.handleTechPlay_ = function handleTechPlay_() {
this.removeClass('vjs-ended');
this.removeClass('vjs-paused');
this.addClass('vjs-playing');
// hide the poster when the user hits play
// https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-play
this.hasStarted(true);
this.trigger('play');
};
/**
* Fired whenever the media begins waiting
*
* @private
*/
Player.prototype.handleTechWaiting_ = function handleTechWaiting_() {
var _this3 = this;
this.addClass('vjs-waiting');
this.trigger('waiting');
this.one('timeupdate', function () {
return _this3.removeClass('vjs-waiting');
});
};
/**
* A handler for events that signal that waiting has ended
* which is not consistent between browsers. See #1351
*
* @private
*/
Player.prototype.handleTechCanPlay_ = function handleTechCanPlay_() {
this.removeClass('vjs-waiting');
this.trigger('canplay');
};
/**
* A handler for events that signal that waiting has ended
* which is not consistent between browsers. See #1351
*
* @private
*/
Player.prototype.handleTechCanPlayThrough_ = function handleTechCanPlayThrough_() {
this.removeClass('vjs-waiting');
this.trigger('canplaythrough');
};
/**
* A handler for events that signal that waiting has ended
* which is not consistent between browsers. See #1351
*
* @private
*/
Player.prototype.handleTechPlaying_ = function handleTechPlaying_() {
this.removeClass('vjs-waiting');
this.trigger('playing');
};
/**
* Fired whenever the player is jumping to a new time
*
* @private
*/
Player.prototype.handleTechSeeking_ = function handleTechSeeking_() {
this.addClass('vjs-seeking');
this.trigger('seeking');
};
/**
* Fired when the player has finished jumping to a new time
*
* @private
*/
Player.prototype.handleTechSeeked_ = function handleTechSeeked_() {
this.removeClass('vjs-seeking');
this.trigger('seeked');
};
/**
* Fired the first time a video is played
* Not part of the HLS spec, and we're not sure if this is the best
* implementation yet, so use sparingly. If you don't have a reason to
* prevent playback, use `myPlayer.one('play');` instead.
*
* @private
*/
Player.prototype.handleTechFirstPlay_ = function handleTechFirstPlay_() {
// If the first starttime attribute is specified
// then we will start at the given offset in seconds
if (this.options_.starttime) {
this.currentTime(this.options_.starttime);
}
this.addClass('vjs-has-started');
this.trigger('firstplay');
};
/**
* Fired whenever the media has been paused
*
* @private
*/
Player.prototype.handleTechPause_ = function handleTechPause_() {
this.removeClass('vjs-playing');
this.addClass('vjs-paused');
this.trigger('pause');
};
/**
* Fired when the end of the media resource is reached (currentTime == duration)
*
* @event ended
* @private
*/
Player.prototype.handleTechEnded_ = function handleTechEnded_() {
this.addClass('vjs-ended');
if (this.options_.loop) {
this.currentTime(0);
this.play();
} else if (!this.paused()) {
this.pause();
}
this.trigger('ended');
};
/**
* Fired when the duration of the media resource is first known or changed
*
* @private
*/
Player.prototype.handleTechDurationChange_ = function handleTechDurationChange_() {
this.duration(this.techGet_('duration'));
};
/**
* Handle a click on the media element to play/pause
*
* @param {Object=} event Event object
* @private
*/
Player.prototype.handleTechClick_ = function handleTechClick_(event) {
// We're using mousedown to detect clicks thanks to Flash, but mousedown
// will also be triggered with right-clicks, so we need to prevent that
if (event.button !== 0) {
return;
}
// When controls are disabled a click should not toggle playback because
// the click is considered a control
if (this.controls()) {
if (this.paused()) {
this.play();
} else {
this.pause();
}
}
};
/**
* Handle a tap on the media element. It will toggle the user
* activity state, which hides and shows the controls.
*
* @private
*/
Player.prototype.handleTechTap_ = function handleTechTap_() {
this.userActive(!this.userActive());
};
/**
* Handle touch to start
*
* @private
*/
Player.prototype.handleTechTouchStart_ = function handleTechTouchStart_() {
this.userWasActive = this.userActive();
};
/**
* Handle touch to move
*
* @private
*/
Player.prototype.handleTechTouchMove_ = function handleTechTouchMove_() {
if (this.userWasActive) {
this.reportUserActivity();
}
};
/**
* Handle touch to end
*
* @private
*/
Player.prototype.handleTechTouchEnd_ = function handleTechTouchEnd_(event) {
// Stop the mouse events from also happening
event.preventDefault();
};
/**
* Fired when the player switches in or out of fullscreen mode
*
* @private
*/
Player.prototype.handleFullscreenChange_ = function handleFullscreenChange_() {
if (this.isFullscreen()) {
this.addClass('vjs-fullscreen');
} else {
this.removeClass('vjs-fullscreen');
}
};
/**
* native click events on the SWF aren't triggered on IE11, Win8.1RT
* use stageclick events triggered from inside the SWF instead
*
* @private
*/
Player.prototype.handleStageClick_ = function handleStageClick_() {
this.reportUserActivity();
};
/**
* Handle Tech Fullscreen Change
*
* @private
*/
Player.prototype.handleTechFullscreenChange_ = function handleTechFullscreenChange_(event, data) {
if (data) {
this.isFullscreen(data.isFullscreen);
}
this.trigger('fullscreenchange');
};
/**
* Fires when an error occurred during the loading of an audio/video
*
* @private
*/
Player.prototype.handleTechError_ = function handleTechError_() {
var error = this.tech_.error();
this.error(error);
};
Player.prototype.handleTechTextData_ = function handleTechTextData_() {
var data = null;
if (arguments.length > 1) {
data = arguments[1];
}
this.trigger('textdata', data);
};
/**
* Get object for cached values.
*
* @return {Object}
*/
Player.prototype.getCache = function getCache() {
return this.cache_;
};
/**
* Pass values to the playback tech
*
* @param {String=} method Method
* @param {Object=} arg Argument
* @private
*/
Player.prototype.techCall_ = function techCall_(method, arg) {
// If it's not ready yet, call method when it is
if (this.tech_ && !this.tech_.isReady_) {
this.tech_.ready(function () {
this[method](arg);
}, true);
// Otherwise call method now
} else {
try {
if (this.tech_) {
this.tech_[method](arg);
}
} catch (e) {
(0, _log2['default'])(e);
throw e;
}
}
};
/**
* Get calls can't wait for the tech, and sometimes don't need to.
*
* @param {String} method Tech method
* @return {Method}
* @private
*/
Player.prototype.techGet_ = function techGet_(method) {
if (this.tech_ && this.tech_.isReady_) {
// Flash likes to die and reload when you hide or reposition it.
// In these cases the object methods go away and we get errors.
// When that happens we'll catch the errors and inform tech that it's not ready any more.
try {
return this.tech_[method]();
} catch (e) {
// When building additional tech libs, an expected method may not be defined yet
if (this.tech_[method] === undefined) {
(0, _log2['default'])('Video.js: ' + method + ' method not defined for ' + this.techName_ + ' playback technology.', e);
// When a method isn't available on the object it throws a TypeError
} else if (e.name === 'TypeError') {
(0, _log2['default'])('Video.js: ' + method + ' unavailable on ' + this.techName_ + ' playback technology element.', e);
this.tech_.isReady_ = false;
} else {
(0, _log2['default'])(e);
}
throw e;
}
}
return;
};
/**
* start media playback
* ```js
* myPlayer.play();
* ```
*
* @return {Player} self
*/
Player.prototype.play = function play() {
// Only calls the tech's play if we already have a src loaded
if (this.src() || this.currentSrc()) {
this.techCall_('play');
} else {
this.tech_.one('loadstart', function () {
this.play();
});
}
return this;
};
/**
* Pause the video playback
* ```js
* myPlayer.pause();
* ```
*
* @return {Player} self
*/
Player.prototype.pause = function pause() {
this.techCall_('pause');
return this;
};
/**
* Check if the player is paused
* ```js
* var isPaused = myPlayer.paused();
* var isPlaying = !myPlayer.paused();
* ```
*
* @return {Boolean} false if the media is currently playing, or true otherwise
*/
Player.prototype.paused = function paused() {
// The initial state of paused should be true (in Safari it's actually false)
return this.techGet_('paused') === false ? false : true;
};
/**
* Returns whether or not the user is "scrubbing". Scrubbing is when the user
* has clicked the progress bar handle and is dragging it along the progress bar.
*
* @param {Boolean} isScrubbing True/false the user is scrubbing
* @return {Boolean} The scrubbing status when getting
* @return {Object} The player when setting
*/
Player.prototype.scrubbing = function scrubbing(isScrubbing) {
if (isScrubbing !== undefined) {
this.scrubbing_ = !!isScrubbing;
if (isScrubbing) {
this.addClass('vjs-scrubbing');
} else {
this.removeClass('vjs-scrubbing');
}
return this;
}
return this.scrubbing_;
};
/**
* Get or set the current time (in seconds)
* ```js
* // get
* var whereYouAt = myPlayer.currentTime();
* // set
* myPlayer.currentTime(120); // 2 minutes into the video
* ```
*
* @param {Number|String=} seconds The time to seek to
* @return {Number} The time in seconds, when not setting
* @return {Player} self, when the current time is set
*/
Player.prototype.currentTime = function currentTime(seconds) {
if (seconds !== undefined) {
this.techCall_('setCurrentTime', seconds);
return this;
}
// cache last currentTime and return. default to 0 seconds
//
// Caching the currentTime is meant to prevent a massive amount of reads on the tech's
// currentTime when scrubbing, but may not provide much performance benefit afterall.
// Should be tested. Also something has to read the actual current time or the cache will
// never get updated.
this.cache_.currentTime = this.techGet_('currentTime') || 0;
return this.cache_.currentTime;
};
/**
* Normally gets the length in time of the video in seconds;
* in all but the rarest use cases an argument will NOT be passed to the method
* ```js
* var lengthOfVideo = myPlayer.duration();
* ```
* **NOTE**: The video must have started loading before the duration can be
* known, and in the case of Flash, may not be known until the video starts
* playing.
*
* @param {Number} seconds Duration when setting
* @return {Number} The duration of the video in seconds when getting
*/
Player.prototype.duration = function duration(seconds) {
if (seconds === undefined) {
return this.cache_.duration || 0;
}
seconds = parseFloat(seconds) || 0;
// Standardize on Inifity for signaling video is live
if (seconds < 0) {
seconds = Infinity;
}
if (seconds !== this.cache_.duration) {
// Cache the last set value for optimized scrubbing (esp. Flash)
this.cache_.duration = seconds;
if (seconds === Infinity) {
this.addClass('vjs-live');
} else {
this.removeClass('vjs-live');
}
this.trigger('durationchange');
}
return this;
};
/**
* Calculates how much time is left.
* ```js
* var timeLeft = myPlayer.remainingTime();
* ```
* Not a native video element function, but useful
*
* @return {Number} The time remaining in seconds
*/
Player.prototype.remainingTime = function remainingTime() {
return this.duration() - this.currentTime();
};
// http://dev.w3.org/html5/spec/video.html#dom-media-buffered
// Buffered returns a timerange object.
// Kind of like an array of portions of the video that have been downloaded.
/**
* Get a TimeRange object with the times of the video that have been downloaded
* If you just want the percent of the video that's been downloaded,
* use bufferedPercent.
* ```js
* // Number of different ranges of time have been buffered. Usually 1.
* numberOfRanges = bufferedTimeRange.length,
* // Time in seconds when the first range starts. Usually 0.
* firstRangeStart = bufferedTimeRange.start(0),
* // Time in seconds when the first range ends
* firstRangeEnd = bufferedTimeRange.end(0),
* // Length in seconds of the first time range
* firstRangeLength = firstRangeEnd - firstRangeStart;
* ```
*
* @return {Object} A mock TimeRange object (following HTML spec)
*/
Player.prototype.buffered = function buffered() {
var buffered = this.techGet_('buffered');
if (!buffered || !buffered.length) {
buffered = (0, _timeRanges.createTimeRange)(0, 0);
}
return buffered;
};
/**
* Get the percent (as a decimal) of the video that's been downloaded
* ```js
* var howMuchIsDownloaded = myPlayer.bufferedPercent();
* ```
* 0 means none, 1 means all.
* (This method isn't in the HTML5 spec, but it's very convenient)
*
* @return {Number} A decimal between 0 and 1 representing the percent
*/
Player.prototype.bufferedPercent = function bufferedPercent() {
return (0, _buffer.bufferedPercent)(this.buffered(), this.duration());
};
/**
* Get the ending time of the last buffered time range
* This is used in the progress bar to encapsulate all time ranges.
*
* @return {Number} The end of the last buffered time range
*/
Player.prototype.bufferedEnd = function bufferedEnd() {
var buffered = this.buffered();
var duration = this.duration();
var end = buffered.end(buffered.length - 1);
if (end > duration) {
end = duration;
}
return end;
};
/**
* Get or set the current volume of the media
* ```js
* // get
* var howLoudIsIt = myPlayer.volume();
* // set
* myPlayer.volume(0.5); // Set volume to half
* ```
* 0 is off (muted), 1.0 is all the way up, 0.5 is half way.
*
* @param {Number} percentAsDecimal The new volume as a decimal percent
* @return {Number} The current volume when getting
* @return {Player} self when setting
*/
Player.prototype.volume = function volume(percentAsDecimal) {
var vol = void 0;
if (percentAsDecimal !== undefined) {
// Force value to between 0 and 1
vol = Math.max(0, Math.min(1, parseFloat(percentAsDecimal)));
this.cache_.volume = vol;
this.techCall_('setVolume', vol);
return this;
}
// Default to 1 when returning current volume.
vol = parseFloat(this.techGet_('volume'));
return isNaN(vol) ? 1 : vol;
};
/**
* Get the current muted state, or turn mute on or off
* ```js
* // get
* var isVolumeMuted = myPlayer.muted();
* // set
* myPlayer.muted(true); // mute the volume
* ```
*
* @param {Boolean=} muted True to mute, false to unmute
* @return {Boolean} True if mute is on, false if not when getting
* @return {Player} self when setting mute
*/
Player.prototype.muted = function muted(_muted) {
if (_muted !== undefined) {
this.techCall_('setMuted', _muted);
return this;
}
return this.techGet_('muted') || false;
};
// Check if current tech can support native fullscreen
// (e.g. with built in controls like iOS, so not our flash swf)
/**
* Check to see if fullscreen is supported
*
* @return {Boolean}
*/
Player.prototype.supportsFullScreen = function supportsFullScreen() {
return this.techGet_('supportsFullScreen') || false;
};
/**
* Check if the player is in fullscreen mode
* ```js
* // get
* var fullscreenOrNot = myPlayer.isFullscreen();
* // set
* myPlayer.isFullscreen(true); // tell the player it's in fullscreen
* ```
* NOTE: As of the latest HTML5 spec, isFullscreen is no longer an official
* property and instead document.fullscreenElement is used. But isFullscreen is
* still a valuable property for internal player workings.
*
* @param {Boolean=} isFS Update the player's fullscreen state
* @return {Boolean} true if fullscreen false if not when getting
* @return {Player} self when setting
*/
Player.prototype.isFullscreen = function isFullscreen(isFS) {
if (isFS !== undefined) {
this.isFullscreen_ = !!isFS;
return this;
}
return !!this.isFullscreen_;
};
/**
* Increase the size of the video to full screen
* ```js
* myPlayer.requestFullscreen();
* ```
* In some browsers, full screen is not supported natively, so it enters
* "full window mode", where the video fills the browser window.
* In browsers and devices that support native full screen, sometimes the
* browser's default controls will be shown, and not the Video.js custom skin.
* This includes most mobile devices (iOS, Android) and older versions of
* Safari.
*
* @return {Player} self
*/
Player.prototype.requestFullscreen = function requestFullscreen() {
var fsApi = _fullscreenApi2['default'];
this.isFullscreen(true);
if (fsApi.requestFullscreen) {
// the browser supports going fullscreen at the element level so we can
// take the controls fullscreen as well as the video
// Trigger fullscreenchange event after change
// We have to specifically add this each time, and remove
// when canceling fullscreen. Otherwise if there's multiple
// players on a page, they would all be reacting to the same fullscreen
// events
Events.on(_document2['default'], fsApi.fullscreenchange, Fn.bind(this, function documentFullscreenChange(e) {
this.isFullscreen(_document2['default'][fsApi.fullscreenElement]);
// If cancelling fullscreen, remove event listener.
if (this.isFullscreen() === false) {
Events.off(_document2['default'], fsApi.fullscreenchange, documentFullscreenChange);
}
this.trigger('fullscreenchange');
}));
this.el_[fsApi.requestFullscreen]();
} else if (this.tech_.supportsFullScreen()) {
// we can't take the video.js controls fullscreen but we can go fullscreen
// with native controls
this.techCall_('enterFullScreen');
} else {
// fullscreen isn't supported so we'll just stretch the video element to
// fill the viewport
this.enterFullWindow();
this.trigger('fullscreenchange');
}
return this;
};
/**
* Return the video to its normal size after having been in full screen mode
* ```js
* myPlayer.exitFullscreen();
* ```
*
* @return {Player} self
*/
Player.prototype.exitFullscreen = function exitFullscreen() {
var fsApi = _fullscreenApi2['default'];
this.isFullscreen(false);
// Check for browser element fullscreen support
if (fsApi.requestFullscreen) {
_document2['default'][fsApi.exitFullscreen]();
} else if (this.tech_.supportsFullScreen()) {
this.techCall_('exitFullScreen');
} else {
this.exitFullWindow();
this.trigger('fullscreenchange');
}
return this;
};
/**
* When fullscreen isn't supported we can stretch the video container to as wide as the browser will let us.
*/
Player.prototype.enterFullWindow = function enterFullWindow() {
this.isFullWindow = true;
// Storing original doc overflow value to return to when fullscreen is off
this.docOrigOverflow = _document2['default'].documentElement.style.overflow;
// Add listener for esc key to exit fullscreen
Events.on(_document2['default'], 'keydown', Fn.bind(this, this.fullWindowOnEscKey));
// Hide any scroll bars
_document2['default'].documentElement.style.overflow = 'hidden';
// Apply fullscreen styles
Dom.addElClass(_document2['default'].body, 'vjs-full-window');
this.trigger('enterFullWindow');
};
/**
* Check for call to either exit full window or full screen on ESC key
*
* @param {String} event Event to check for key press
*/
Player.prototype.fullWindowOnEscKey = function fullWindowOnEscKey(event) {
if (event.keyCode === 27) {
if (this.isFullscreen() === true) {
this.exitFullscreen();
} else {
this.exitFullWindow();
}
}
};
/**
* Exit full window
*/
Player.prototype.exitFullWindow = function exitFullWindow() {
this.isFullWindow = false;
Events.off(_document2['default'], 'keydown', this.fullWindowOnEscKey);
// Unhide scroll bars.
_document2['default'].documentElement.style.overflow = this.docOrigOverflow;
// Remove fullscreen styles
Dom.removeElClass(_document2['default'].body, 'vjs-full-window');
// Resize the box, controller, and poster to original sizes
// this.positionAll();
this.trigger('exitFullWindow');
};
/**
* Check whether the player can play a given mimetype
*
* @param {String} type The mimetype to check
* @return {String} 'probably', 'maybe', or '' (empty string)
*/
Player.prototype.canPlayType = function canPlayType(type) {
var can = void 0;
// Loop through each playback technology in the options order
for (var i = 0, j = this.options_.techOrder; i < j.length; i++) {
var techName = (0, _toTitleCase2['default'])(j[i]);
var tech = _tech2['default'].getTech(techName);
// Support old behavior of techs being registered as components.
// Remove once that deprecated behavior is removed.
if (!tech) {
tech = _component2['default'].getComponent(techName);
}
// Check if the current tech is defined before continuing
if (!tech) {
_log2['default'].error('The "' + techName + '" tech is undefined. Skipped browser support check for that tech.');
continue;
}
// Check if the browser supports this technology
if (tech.isSupported()) {
can = tech.canPlayType(type);
if (can) {
return can;
}
}
}
return '';
};
/**
* Select source based on tech-order or source-order
* Uses source-order selection if `options.sourceOrder` is truthy. Otherwise,
* defaults to tech-order selection
*
* @param {Array} sources The sources for a media asset
* @return {Object|Boolean} Object of source and tech order, otherwise false
*/
Player.prototype.selectSource = function selectSource(sources) {
var _this4 = this;
// Get only the techs specified in `techOrder` that exist and are supported by the
// current platform
var techs = this.options_.techOrder.map(_toTitleCase2['default']).map(function (techName) {
// `Component.getComponent(...)` is for support of old behavior of techs
// being registered as components.
// Remove once that deprecated behavior is removed.
return [techName, _tech2['default'].getTech(techName) || _component2['default'].getComponent(techName)];
}).filter(function (_ref) {
var techName = _ref[0];
var tech = _ref[1];
// Check if the current tech is defined before continuing
if (tech) {
// Check if the browser supports this technology
return tech.isSupported();
}
_log2['default'].error('The "' + techName + '" tech is undefined. Skipped browser support check for that tech.');
return false;
});
// Iterate over each `innerArray` element once per `outerArray` element and execute
// `tester` with both. If `tester` returns a non-falsy value, exit early and return
// that value.
var findFirstPassingTechSourcePair = function findFirstPassingTechSourcePair(outerArray, innerArray, tester) {
var found = void 0;
outerArray.some(function (outerChoice) {
return innerArray.some(function (innerChoice) {
found = tester(outerChoice, innerChoice);
if (found) {
return true;
}
});
});
return found;
};
var foundSourceAndTech = void 0;
var flip = function flip(fn) {
return function (a, b) {
return fn(b, a);
};
};
var finder = function finder(_ref2, source) {
var techName = _ref2[0];
var tech = _ref2[1];
if (tech.canPlaySource(source, _this4.options_[techName.toLowerCase()])) {
return { source: source, tech: techName };
}
};
// Depending on the truthiness of `options.sourceOrder`, we swap the order of techs and sources
// to select from them based on their priority.
if (this.options_.sourceOrder) {
// Source-first ordering
foundSourceAndTech = findFirstPassingTechSourcePair(sources, techs, flip(finder));
} else {
// Tech-first ordering
foundSourceAndTech = findFirstPassingTechSourcePair(techs, sources, finder);
}
return foundSourceAndTech || false;
};
/**
* The source function updates the video source
* There are three types of variables you can pass as the argument.
* **URL String**: A URL to the the video file. Use this method if you are sure
* the current playback technology (HTML5/Flash) can support the source you
* provide. Currently only MP4 files can be used in both HTML5 and Flash.
* ```js
* myPlayer.src("http://www.example.com/path/to/video.mp4");
* ```
* **Source Object (or element):* * A javascript object containing information
* about the source file. Use this method if you want the player to determine if
* it can support the file using the type information.
* ```js
* myPlayer.src({ type: "video/mp4", src: "http://www.example.com/path/to/video.mp4" });
* ```
* **Array of Source Objects:* * To provide multiple versions of the source so
* that it can be played using HTML5 across browsers you can use an array of
* source objects. Video.js will detect which version is supported and load that
* file.
* ```js
* myPlayer.src([
* { type: "video/mp4", src: "http://www.example.com/path/to/video.mp4" },
* { type: "video/webm", src: "http://www.example.com/path/to/video.webm" },
* { type: "video/ogg", src: "http://www.example.com/path/to/video.ogv" }
* ]);
* ```
*
* @param {String|Object|Array=} source The source URL, object, or array of sources
* @return {String} The current video source when getting
* @return {String} The player when setting
*/
Player.prototype.src = function src(source) {
if (source === undefined) {
return this.techGet_('src');
}
var currentTech = _tech2['default'].getTech(this.techName_);
// Support old behavior of techs being registered as components.
// Remove once that deprecated behavior is removed.
if (!currentTech) {
currentTech = _component2['default'].getComponent(this.techName_);
}
// case: Array of source objects to choose from and pick the best to play
if (Array.isArray(source)) {
this.sourceList_(source);
// case: URL String (http://myvideo...)
} else if (typeof source === 'string') {
// create a source object from the string
this.src({ src: source });
// case: Source object { src: '', type: '' ... }
} else if (source instanceof Object) {
// check if the source has a type and the loaded tech cannot play the source
// if there's no type we'll just try the current tech
if (source.type && !currentTech.canPlaySource(source, this.options_[this.techName_.toLowerCase()])) {
// create a source list with the current source and send through
// the tech loop to check for a compatible technology
this.sourceList_([source]);
} else {
this.cache_.src = source.src;
this.currentType_ = source.type || '';
// wait until the tech is ready to set the source
this.ready(function () {
// The setSource tech method was added with source handlers
// so older techs won't support it
// We need to check the direct prototype for the case where subclasses
// of the tech do not support source handlers
if (currentTech.prototype.hasOwnProperty('setSource')) {
this.techCall_('setSource', source);
} else {
this.techCall_('src', source.src);
}
if (this.options_.preload === 'auto') {
this.load();
}
if (this.options_.autoplay) {
this.play();
}
// Set the source synchronously if possible (#2326)
}, true);
}
}
return this;
};
/**
* Handle an array of source objects
*
* @param {Array} sources Array of source objects
* @private
*/
Player.prototype.sourceList_ = function sourceList_(sources) {
var sourceTech = this.selectSource(sources);
if (sourceTech) {
if (sourceTech.tech === this.techName_) {
// if this technology is already loaded, set the source
this.src(sourceTech.source);
} else {
// load this technology with the chosen source
this.loadTech_(sourceTech.tech, sourceTech.source);
}
} else {
// We need to wrap this in a timeout to give folks a chance to add error event handlers
this.setTimeout(function () {
this.error({ code: 4, message: this.localize(this.options_.notSupportedMessage) });
}, 0);
// we could not find an appropriate tech, but let's still notify the delegate that this is it
// this needs a better comment about why this is needed
this.triggerReady();
}
};
/**
* Begin loading the src data.
*
* @return {Player} Returns the player
*/
Player.prototype.load = function load() {
this.techCall_('load');
return this;
};
/**
* Reset the player. Loads the first tech in the techOrder,
* and calls `reset` on the tech`.
*
* @return {Player} Returns the player
*/
Player.prototype.reset = function reset() {
this.loadTech_((0, _toTitleCase2['default'])(this.options_.techOrder[0]), null);
this.techCall_('reset');
return this;
};
/**
* Returns the fully qualified URL of the current source value e.g. http://mysite.com/video.mp4
* Can be used in conjuction with `currentType` to assist in rebuilding the current source object.
*
* @return {String} The current source
*/
Player.prototype.currentSrc = function currentSrc() {
return this.techGet_('currentSrc') || this.cache_.src || '';
};
/**
* Get the current source type e.g. video/mp4
* This can allow you rebuild the current source object so that you could load the same
* source and tech later
*
* @return {String} The source MIME type
*/
Player.prototype.currentType = function currentType() {
return this.currentType_ || '';
};
/**
* Get or set the preload attribute
*
* @param {Boolean} value Boolean to determine if preload should be used
* @return {String} The preload attribute value when getting
* @return {Player} Returns the player when setting
*/
Player.prototype.preload = function preload(value) {
if (value !== undefined) {
this.techCall_('setPreload', value);
this.options_.preload = value;
return this;
}
return this.techGet_('preload');
};
/**
* Get or set the autoplay attribute.
*
* @param {Boolean} value Boolean to determine if video should autoplay
* @return {String} The autoplay attribute value when getting
* @return {Player} Returns the player when setting
*/
Player.prototype.autoplay = function autoplay(value) {
if (value !== undefined) {
this.techCall_('setAutoplay', value);
this.options_.autoplay = value;
return this;
}
return this.techGet_('autoplay', value);
};
/**
* Get or set the loop attribute on the video element.
*
* @param {Boolean} value Boolean to determine if video should loop
* @return {String} The loop attribute value when getting
* @return {Player} Returns the player when setting
*/
Player.prototype.loop = function loop(value) {
if (value !== undefined) {
this.techCall_('setLoop', value);
this.options_.loop = value;
return this;
}
return this.techGet_('loop');
};
/**
* Get or set the poster image source url
*
* ##### EXAMPLE:
* ```js
* // get
* var currentPoster = myPlayer.poster();
* // set
* myPlayer.poster('http://example.com/myImage.jpg');
* ```
*
* @param {String=} src Poster image source URL
* @return {String} poster URL when getting
* @return {Player} self when setting
*/
Player.prototype.poster = function poster(src) {
if (src === undefined) {
return this.poster_;
}
// The correct way to remove a poster is to set as an empty string
// other falsey values will throw errors
if (!src) {
src = '';
}
// update the internal poster variable
this.poster_ = src;
// update the tech's poster
this.techCall_('setPoster', src);
// alert components that the poster has been set
this.trigger('posterchange');
return this;
};
/**
* Some techs (e.g. YouTube) can provide a poster source in an
* asynchronous way. We want the poster component to use this
* poster source so that it covers up the tech's controls.
* (YouTube's play button). However we only want to use this
* soruce if the player user hasn't set a poster through
* the normal APIs.
*
* @private
*/
Player.prototype.handleTechPosterChange_ = function handleTechPosterChange_() {
if (!this.poster_ && this.tech_ && this.tech_.poster) {
this.poster_ = this.tech_.poster() || '';
// Let components know the poster has changed
this.trigger('posterchange');
}
};
/**
* Get or set whether or not the controls are showing.
*
* @param {Boolean} bool Set controls to showing or not
* @return {Boolean} Controls are showing
*/
Player.prototype.controls = function controls(bool) {
if (bool !== undefined) {
bool = !!bool;
// Don't trigger a change event unless it actually changed
if (this.controls_ !== bool) {
this.controls_ = bool;
if (this.usingNativeControls()) {
this.techCall_('setControls', bool);
}
if (bool) {
this.removeClass('vjs-controls-disabled');
this.addClass('vjs-controls-enabled');
this.trigger('controlsenabled');
if (!this.usingNativeControls()) {
this.addTechControlsListeners_();
}
} else {
this.removeClass('vjs-controls-enabled');
this.addClass('vjs-controls-disabled');
this.trigger('controlsdisabled');
if (!this.usingNativeControls()) {
this.removeTechControlsListeners_();
}
}
}
return this;
}
return !!this.controls_;
};
/**
* Toggle native controls on/off. Native controls are the controls built into
* devices (e.g. default iPhone controls), Flash, or other techs
* (e.g. Vimeo Controls)
* **This should only be set by the current tech, because only the tech knows
* if it can support native controls**
*
* @param {Boolean} bool True signals that native controls are on
* @return {Player} Returns the player
* @private
*/
Player.prototype.usingNativeControls = function usingNativeControls(bool) {
if (bool !== undefined) {
bool = !!bool;
// Don't trigger a change event unless it actually changed
if (this.usingNativeControls_ !== bool) {
this.usingNativeControls_ = bool;
if (bool) {
this.addClass('vjs-using-native-controls');
/**
* player is using the native device controls
*
* @event usingnativecontrols
* @memberof Player
* @instance
* @private
*/
this.trigger('usingnativecontrols');
} else {
this.removeClass('vjs-using-native-controls');
/**
* player is using the custom HTML controls
*
* @event usingcustomcontrols
* @memberof Player
* @instance
* @private
*/
this.trigger('usingcustomcontrols');
}
}
return this;
}
return !!this.usingNativeControls_;
};
/**
* Set or get the current MediaError
*
* @param {*} err A MediaError or a String/Number to be turned into a MediaError
* @return {MediaError|null} when getting
* @return {Player} when setting
*/
Player.prototype.error = function error(err) {
if (err === undefined) {
return this.error_ || null;
}
// restoring to default
if (err === null) {
this.error_ = err;
this.removeClass('vjs-error');
if (this.errorDisplay) {
this.errorDisplay.close();
}
return this;
}
this.error_ = new _mediaError2['default'](err);
// add the vjs-error classname to the player
this.addClass('vjs-error');
// log the name of the error type and any message
// ie8 just logs "[object object]" if you just log the error object
_log2['default'].error('(CODE:' + this.error_.code + ' ' + _mediaError2['default'].errorTypes[this.error_.code] + ')', this.error_.message, this.error_);
// fire an error event on the player
this.trigger('error');
return this;
};
/**
* Report user activity
*
* @param {Object} event Event object
*/
Player.prototype.reportUserActivity = function reportUserActivity(event) {
this.userActivity_ = true;
};
/**
* Get/set if user is active
*
* @param {Boolean} bool Value when setting
* @return {Boolean} Value if user is active user when getting
*/
Player.prototype.userActive = function userActive(bool) {
if (bool !== undefined) {
bool = !!bool;
if (bool !== this.userActive_) {
this.userActive_ = bool;
if (bool) {
// If the user was inactive and is now active we want to reset the
// inactivity timer
this.userActivity_ = true;
this.removeClass('vjs-user-inactive');
this.addClass('vjs-user-active');
this.trigger('useractive');
} else {
// We're switching the state to inactive manually, so erase any other
// activity
this.userActivity_ = false;
// Chrome/Safari/IE have bugs where when you change the cursor it can
// trigger a mousemove event. This causes an issue when you're hiding
// the cursor when the user is inactive, and a mousemove signals user
// activity. Making it impossible to go into inactive mode. Specifically
// this happens in fullscreen when we really need to hide the cursor.
//
// When this gets resolved in ALL browsers it can be removed
// https://code.google.com/p/chromium/issues/detail?id=103041
if (this.tech_) {
this.tech_.one('mousemove', function (e) {
e.stopPropagation();
e.preventDefault();
});
}
this.removeClass('vjs-user-active');
this.addClass('vjs-user-inactive');
this.trigger('userinactive');
}
}
return this;
}
return this.userActive_;
};
/**
* Listen for user activity based on timeout value
*
* @private
*/
Player.prototype.listenForUserActivity_ = function listenForUserActivity_() {
var mouseInProgress = void 0;
var lastMoveX = void 0;
var lastMoveY = void 0;
var handleActivity = Fn.bind(this, this.reportUserActivity);
var handleMouseMove = function handleMouseMove(e) {
// #1068 - Prevent mousemove spamming
// Chrome Bug: https://code.google.com/p/chromium/issues/detail?id=366970
if (e.screenX !== lastMoveX || e.screenY !== lastMoveY) {
lastMoveX = e.screenX;
lastMoveY = e.screenY;
handleActivity();
}
};
var handleMouseDown = function handleMouseDown() {
handleActivity();
// For as long as the they are touching the device or have their mouse down,
// we consider them active even if they're not moving their finger or mouse.
// So we want to continue to update that they are active
this.clearInterval(mouseInProgress);
// Setting userActivity=true now and setting the interval to the same time
// as the activityCheck interval (250) should ensure we never miss the
// next activityCheck
mouseInProgress = this.setInterval(handleActivity, 250);
};
var handleMouseUp = function handleMouseUp(event) {
handleActivity();
// Stop the interval that maintains activity if the mouse/touch is down
this.clearInterval(mouseInProgress);
};
// Any mouse movement will be considered user activity
this.on('mousedown', handleMouseDown);
this.on('mousemove', handleMouseMove);
this.on('mouseup', handleMouseUp);
// Listen for keyboard navigation
// Shouldn't need to use inProgress interval because of key repeat
this.on('keydown', handleActivity);
this.on('keyup', handleActivity);
// Run an interval every 250 milliseconds instead of stuffing everything into
// the mousemove/touchmove function itself, to prevent performance degradation.
// `this.reportUserActivity` simply sets this.userActivity_ to true, which
// then gets picked up by this loop
// http://ejohn.org/blog/learning-from-twitter/
var inactivityTimeout = void 0;
this.setInterval(function () {
// Check to see if mouse/touch activity has happened
if (this.userActivity_) {
// Reset the activity tracker
this.userActivity_ = false;
// If the user state was inactive, set the state to active
this.userActive(true);
// Clear any existing inactivity timeout to start the timer over
this.clearTimeout(inactivityTimeout);
var timeout = this.options_.inactivityTimeout;
if (timeout > 0) {
// In <timeout> milliseconds, if no more activity has occurred the
// user will be considered inactive
inactivityTimeout = this.setTimeout(function () {
// Protect against the case where the inactivityTimeout can trigger just
// before the next user activity is picked up by the activity check loop
// causing a flicker
if (!this.userActivity_) {
this.userActive(false);
}
}, timeout);
}
}
}, 250);
};
/**
* Gets or sets the current playback rate. A playback rate of
* 1.0 represents normal speed and 0.5 would indicate half-speed
* playback, for instance.
* @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-playbackrate
*
* @param {Number} rate New playback rate to set.
* @return {Number} Returns the new playback rate when setting
* @return {Number} Returns the current playback rate when getting
*/
Player.prototype.playbackRate = function playbackRate(rate) {
if (rate !== undefined) {
this.techCall_('setPlaybackRate', rate);
return this;
}
if (this.tech_ && this.tech_.featuresPlaybackRate) {
return this.techGet_('playbackRate');
}
return 1.0;
};
/**
* Gets or sets the audio flag
*
* @param {Boolean} bool True signals that this is an audio player.
* @return {Boolean} Returns true if player is audio, false if not when getting
* @return {Player} Returns the player if setting
* @private
*/
Player.prototype.isAudio = function isAudio(bool) {
if (bool !== undefined) {
this.isAudio_ = !!bool;
return this;
}
return !!this.isAudio_;
};
/**
* Get a video track list
* @link https://html.spec.whatwg.org/multipage/embedded-content.html#videotracklist
*
* @return {VideoTrackList} thes current video track list
*/
Player.prototype.videoTracks = function videoTracks() {
// if we have not yet loadTech_, we create videoTracks_
// these will be passed to the tech during loading
if (!this.tech_) {
this.videoTracks_ = this.videoTracks_ || new _videoTrackList2['default']();
return this.videoTracks_;
}
return this.tech_.videoTracks();
};
/**
* Get an audio track list
* @link https://html.spec.whatwg.org/multipage/embedded-content.html#audiotracklist
*
* @return {AudioTrackList} thes current audio track list
*/
Player.prototype.audioTracks = function audioTracks() {
// if we have not yet loadTech_, we create videoTracks_
// these will be passed to the tech during loading
if (!this.tech_) {
this.audioTracks_ = this.audioTracks_ || new _audioTrackList2['default']();
return this.audioTracks_;
}
return this.tech_.audioTracks();
};
/**
* Text tracks are tracks of timed text events.
* Captions - text displayed over the video for the hearing impaired
* Subtitles - text displayed over the video for those who don't understand language in the video
* Chapters - text displayed in a menu allowing the user to jump to particular points (chapters) in the video
* Descriptions (not supported yet) - audio descriptions that are read back to the user by a screen reading device
*/
/**
* Get an array of associated text tracks. captions, subtitles, chapters, descriptions
* http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-texttracks
*
* @return {Array} Array of track objects
*/
Player.prototype.textTracks = function textTracks() {
// cannot use techGet_ directly because it checks to see whether the tech is ready.
// Flash is unlikely to be ready in time but textTracks should still work.
if (this.tech_) {
return this.tech_.textTracks();
}
};
/**
* Get an array of remote text tracks
*
* @return {Array}
*/
Player.prototype.remoteTextTracks = function remoteTextTracks() {
if (this.tech_) {
return this.tech_.remoteTextTracks();
}
};
/**
* Get an array of remote html track elements
*
* @return {HTMLTrackElement[]}
*/
Player.prototype.remoteTextTrackEls = function remoteTextTrackEls() {
if (this.tech_) {
return this.tech_.remoteTextTrackEls();
}
};
/**
* Add a text track
* In addition to the W3C settings we allow adding additional info through options.
* http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-addtexttrack
*
* @param {String} kind Captions, subtitles, chapters, descriptions, or metadata
* @param {String=} label Optional label
* @param {String=} language Optional language
*/
Player.prototype.addTextTrack = function addTextTrack(kind, label, language) {
if (this.tech_) {
return this.tech_.addTextTrack(kind, label, language);
}
};
/**
* Add a remote text track
*
* @param {Object} options Options for remote text track
*/
Player.prototype.addRemoteTextTrack = function addRemoteTextTrack(options) {
if (this.tech_) {
return this.tech_.addRemoteTextTrack(options);
}
};
/**
* Remove a remote text track
*
* @param {Object} track Remote text track to remove
*/
// destructure the input into an object with a track argument, defaulting to arguments[0]
// default the whole argument to an empty object if nothing was passed in
Player.prototype.removeRemoteTextTrack = function removeRemoteTextTrack() {
var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var _ref3$track = _ref3.track;
var track = _ref3$track === undefined ? arguments[0] : _ref3$track;
if (this.tech_) {
return this.tech_.removeRemoteTextTrack(track);
}
};
/**
* Get video width
*
* @return {Number} Video width
*/
Player.prototype.videoWidth = function videoWidth() {
return this.tech_ && this.tech_.videoWidth && this.tech_.videoWidth() || 0;
};
/**
* Get video height
*
* @return {Number} Video height
*/
Player.prototype.videoHeight = function videoHeight() {
return this.tech_ && this.tech_.videoHeight && this.tech_.videoHeight() || 0;
};
// Methods to add support for
// initialTime: function() { return this.techCall_('initialTime'); },
// startOffsetTime: function() { return this.techCall_('startOffsetTime'); },
// played: function() { return this.techCall_('played'); },
// defaultPlaybackRate: function() { return this.techCall_('defaultPlaybackRate'); },
// defaultMuted: function() { return this.techCall_('defaultMuted'); }
/**
* The player's language code
* NOTE: The language should be set in the player options if you want the
* the controls to be built with a specific language. Changing the lanugage
* later will not update controls text.
*
* @param {String} code The locale string
* @return {String} The locale string when getting
* @return {Player} self when setting
*/
Player.prototype.language = function language(code) {
if (code === undefined) {
return this.language_;
}
this.language_ = String(code).toLowerCase();
return this;
};
/**
* Get the player's language dictionary
* Merge every time, because a newly added plugin might call videojs.addLanguage() at any time
* Languages specified directly in the player options have precedence
*
* @return {Array} Array of languages
*/
Player.prototype.languages = function languages() {
return (0, _mergeOptions2['default'])(Player.prototype.options_.languages, this.languages_);
};
/**
* Converts track info to JSON
*
* @return {Object} JSON object of options
*/
Player.prototype.toJSON = function toJSON() {
var options = (0, _mergeOptions2['default'])(this.options_);
var tracks = options.tracks;
options.tracks = [];
for (var i = 0; i < tracks.length; i++) {
var track = tracks[i];
// deep merge tracks and null out player so no circular references
track = (0, _mergeOptions2['default'])(track);
track.player = undefined;
options.tracks[i] = track;
}
return options;
};
/**
* Creates a simple modal dialog (an instance of the `ModalDialog`
* component) that immediately overlays the player with arbitrary
* content and removes itself when closed.
*
* @param {String|Function|Element|Array|Null} content
* Same as `ModalDialog#content`'s param of the same name.
*
* The most straight-forward usage is to provide a string or DOM
* element.
*
* @param {Object} [options]
* Extra options which will be passed on to the `ModalDialog`.
*
* @return {ModalDialog}
*/
Player.prototype.createModal = function createModal(content, options) {
var _this5 = this;
options = options || {};
options.content = content || '';
var modal = new _modalDialog2['default'](this, options);
this.addChild(modal);
modal.on('dispose', function () {
_this5.removeChild(modal);
});
return modal.open();
};
/**
* Gets tag settings
*
* @param {Element} tag The player tag
* @return {Array} An array of sources and track objects
* @static
*/
Player.getTagSettings = function getTagSettings(tag) {
var baseOptions = {
sources: [],
tracks: []
};
var tagOptions = Dom.getElAttributes(tag);
var dataSetup = tagOptions['data-setup'];
// Check if data-setup attr exists.
if (dataSetup !== null) {
// Parse options JSON
// If empty string, make it a parsable json object.
var _safeParseTuple = (0, _tuple2['default'])(dataSetup || '{}');
var err = _safeParseTuple[0];
var data = _safeParseTuple[1];
if (err) {
_log2['default'].error(err);
}
(0, _object2['default'])(tagOptions, data);
}
(0, _object2['default'])(baseOptions, tagOptions);
// Get tag children settings
if (tag.hasChildNodes()) {
var children = tag.childNodes;
for (var i = 0, j = children.length; i < j; i++) {
var child = children[i];
// Change case needed: http://ejohn.org/blog/nodename-case-sensitivity/
var childName = child.nodeName.toLowerCase();
if (childName === 'source') {
baseOptions.sources.push(Dom.getElAttributes(child));
} else if (childName === 'track') {
baseOptions.tracks.push(Dom.getElAttributes(child));
}
}
}
return baseOptions;
};
/**
* Determine wether or not flexbox is supported
*
* @return {Boolean} wether or not flexbox is supported
*/
Player.prototype.flexNotSupported_ = function flexNotSupported_() {
var elem = _document2['default'].createElement('i');
// Note: We don't actually use flexBasis (or flexOrder), but it's one of the more
// common flex features that we can rely on when checking for flex support.
return !('flexBasis' in elem.style || 'webkitFlexBasis' in elem.style || 'mozFlexBasis' in elem.style || 'msFlexBasis' in elem.style ||
// IE10-specific (2012 flex spec)
'msFlexOrder' in elem.style);
};
return Player;
}(_component2['default']);
/*
* Global player list
*
* @type {Object}
*/
Player.players = {};
var navigator = _window2['default'].navigator;
/*
* Player instance options, surfaced using options
* options = Player.prototype.options_
* Make changes in options, not here.
*
* @type {Object}
* @private
*/
Player.prototype.options_ = {
// Default order of fallback technology
techOrder: ['html5', 'flash'],
// techOrder: ['flash','html5'],
html5: {},
flash: {},
// defaultVolume: 0.85,
defaultVolume: 0.00,
// default inactivity timeout
inactivityTimeout: 2000,
// default playback rates
playbackRates: [],
// Add playback rate selection by adding rates
// 'playbackRates': [0.5, 1, 1.5, 2],
// Included control sets
children: ['mediaLoader', 'posterImage', 'textTrackDisplay', 'loadingSpinner', 'bigPlayButton', 'controlBar', 'errorDisplay', 'textTrackSettings'],
language: navigator && (navigator.languages && navigator.languages[0] || navigator.userLanguage || navigator.language) || 'en',
// locales and their language translations
languages: {},
// Default message to show when a video cannot be played.
notSupportedMessage: 'No compatible source was found for this media.'
};
[
/**
* Returns whether or not the player is in the "ended" state.
*
* @return {Boolean} True if the player is in the ended state, false if not.
* @method Player.prototype.ended
*/
'ended',
/**
* Returns whether or not the player is in the "seeking" state.
*
* @return {Boolean} True if the player is in the seeking state, false if not.
* @method Player.prototype.seeking
*/
'seeking',
/**
* Returns the TimeRanges of the media that are currently available
* for seeking to.
*
* @return {TimeRanges} the seekable intervals of the media timeline
* @method Player.prototype.seekable
*/
'seekable',
/**
* Returns the current state of network activity for the element, from
* the codes in the list below.
* - NETWORK_EMPTY (numeric value 0)
* The element has not yet been initialised. All attributes are in
* their initial states.
* - NETWORK_IDLE (numeric value 1)
* The element's resource selection algorithm is active and has
* selected a resource, but it is not actually using the network at
* this time.
* - NETWORK_LOADING (numeric value 2)
* The user agent is actively trying to download data.
* - NETWORK_NO_SOURCE (numeric value 3)
* The element's resource selection algorithm is active, but it has
* not yet found a resource to use.
*
* @see https://html.spec.whatwg.org/multipage/embedded-content.html#network-states
* @return {Number} the current network activity state
* @method Player.prototype.networkState
*/
'networkState',
/**
* Returns a value that expresses the current state of the element
* with respect to rendering the current playback position, from the
* codes in the list below.
* - HAVE_NOTHING (numeric value 0)
* No information regarding the media resource is available.
* - HAVE_METADATA (numeric value 1)
* Enough of the resource has been obtained that the duration of the
* resource is available.
* - HAVE_CURRENT_DATA (numeric value 2)
* Data for the immediate current playback position is available.
* - HAVE_FUTURE_DATA (numeric value 3)
* Data for the immediate current playback position is available, as
* well as enough data for the user agent to advance the current
* playback position in the direction of playback.
* - HAVE_ENOUGH_DATA (numeric value 4)
* The user agent estimates that enough data is available for
* playback to proceed uninterrupted.
*
* @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-readystate
* @return {Number} the current playback rendering state
* @method Player.prototype.readyState
*/
'readyState'].forEach(function (fn) {
Player.prototype[fn] = function () {
return this.techGet_(fn);
};
});
TECH_EVENTS_RETRIGGER.forEach(function (event) {
Player.prototype['handleTech' + (0, _toTitleCase2['default'])(event) + '_'] = function () {
return this.trigger(event);
};
});
/* document methods */
/**
* Fired when the player has initial duration and dimension information
*
* @event loadedmetadata
* @private
* @method Player.prototype.handleLoadedMetaData_
*/
/**
* Fired when the player receives text data
*
* @event textdata
* @private
* @method Player.prototype.handleTextData_
*/
/**
* Fired when the player has downloaded data at the current playback position
*
* @event loadeddata
* @private
* @method Player.prototype.handleLoadedData_
*/
/**
* Fired when the user is active, e.g. moves the mouse over the player
*
* @event useractive
* @private
* @method Player.prototype.handleUserActive_
*/
/**
* Fired when the user is inactive, e.g. a short delay after the last mouse move or control interaction
*
* @event userinactive
* @private
* @method Player.prototype.handleUserInactive_
*/
/**
* Fired when the current playback position has changed *
* During playback this is fired every 15-250 milliseconds, depending on the
* playback technology in use.
*
* @event timeupdate
* @private
* @method Player.prototype.handleTimeUpdate_
*/
/**
* Fired when the volume changes
*
* @event volumechange
* @private
* @method Player.prototype.handleVolumeChange_
*/
/**
* Fired when an error occurs
*
* @event error
* @private
* @method Player.prototype.handleError_
*/
_component2['default'].registerComponent('Player', Player);
exports['default'] = Player;
},{"1":1,"136":136,"145":145,"4":4,"41":41,"44":44,"45":45,"46":46,"5":5,"50":50,"55":55,"59":59,"60":60,"61":61,"62":62,"63":63,"68":68,"69":69,"71":71,"76":76,"78":78,"79":79,"8":8,"80":80,"81":81,"82":82,"84":84,"85":85,"86":86,"87":87,"88":88,"89":89,"92":92,"93":93}],52:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _player = _dereq_(51);
var _player2 = _interopRequireDefault(_player);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
/**
* The method for registering a video.js plugin
*
* @param {String} name The name of the plugin
* @param {Function} init The function that is run when the player inits
* @method plugin
*/
var plugin = function plugin(name, init) {
_player2['default'].prototype[name] = init;
}; /**
* @file plugins.js
*/
exports['default'] = plugin;
},{"51":51}],53:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _clickableComponent = _dereq_(3);
var _clickableComponent2 = _interopRequireDefault(_clickableComponent);
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file popup-button.js
*/
/**
* A button class with a popup control
*
* @param {Player|Object} player
* @param {Object=} options
* @extends ClickableComponent
* @class PopupButton
*/
var PopupButton = function (_ClickableComponent) {
_inherits(PopupButton, _ClickableComponent);
function PopupButton(player) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
_classCallCheck(this, PopupButton);
var _this = _possibleConstructorReturn(this, _ClickableComponent.call(this, player, options));
_this.update();
return _this;
}
/**
* Update popup
*
* @method update
*/
PopupButton.prototype.update = function update() {
var popup = this.createPopup();
if (this.popup) {
this.removeChild(this.popup);
}
this.popup = popup;
this.addChild(popup);
if (this.items && this.items.length === 0) {
this.hide();
} else if (this.items && this.items.length > 1) {
this.show();
}
};
/**
* Create popup - Override with specific functionality for component
*
* @return {Popup} The constructed popup
* @method createPopup
*/
PopupButton.prototype.createPopup = function createPopup() {};
/**
* Create the component's DOM element
*
* @return {Element}
* @method createEl
*/
PopupButton.prototype.createEl = function createEl() {
return _ClickableComponent.prototype.createEl.call(this, 'div', {
className: this.buildCSSClass()
});
};
/**
* Allow sub components to stack CSS class names
*
* @return {String} The constructed class name
* @method buildCSSClass
*/
PopupButton.prototype.buildCSSClass = function buildCSSClass() {
var menuButtonClass = 'vjs-menu-button';
// If the inline option is passed, we want to use different styles altogether.
if (this.options_.inline === true) {
menuButtonClass += '-inline';
} else {
menuButtonClass += '-popup';
}
return 'vjs-menu-button ' + menuButtonClass + ' ' + _ClickableComponent.prototype.buildCSSClass.call(this);
};
return PopupButton;
}(_clickableComponent2['default']);
_component2['default'].registerComponent('PopupButton', PopupButton);
exports['default'] = PopupButton;
},{"3":3,"5":5}],54:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _dom = _dereq_(80);
var Dom = _interopRequireWildcard(_dom);
var _fn = _dereq_(82);
var Fn = _interopRequireWildcard(_fn);
var _events = _dereq_(81);
var Events = _interopRequireWildcard(_events);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file popup.js
*/
/**
* The Popup component is used to build pop up controls.
*
* @extends Component
* @class Popup
*/
var Popup = function (_Component) {
_inherits(Popup, _Component);
function Popup() {
_classCallCheck(this, Popup);
return _possibleConstructorReturn(this, _Component.apply(this, arguments));
}
/**
* Add a popup item to the popup
*
* @param {Object|String} component Component or component type to add
* @method addItem
*/
Popup.prototype.addItem = function addItem(component) {
this.addChild(component);
component.on('click', Fn.bind(this, function () {
this.unlockShowing();
}));
};
/**
* Create the component's DOM element
*
* @return {Element}
* @method createEl
*/
Popup.prototype.createEl = function createEl() {
var contentElType = this.options_.contentElType || 'ul';
this.contentEl_ = Dom.createEl(contentElType, {
className: 'vjs-menu-content'
});
var el = _Component.prototype.createEl.call(this, 'div', {
append: this.contentEl_,
className: 'vjs-menu'
});
el.appendChild(this.contentEl_);
// Prevent clicks from bubbling up. Needed for Popup Buttons,
// where a click on the parent is significant
Events.on(el, 'click', function (event) {
event.preventDefault();
event.stopImmediatePropagation();
});
return el;
};
return Popup;
}(_component2['default']);
_component2['default'].registerComponent('Popup', Popup);
exports['default'] = Popup;
},{"5":5,"80":80,"81":81,"82":82}],55:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _clickableComponent = _dereq_(3);
var _clickableComponent2 = _interopRequireDefault(_clickableComponent);
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _fn = _dereq_(82);
var Fn = _interopRequireWildcard(_fn);
var _dom = _dereq_(80);
var Dom = _interopRequireWildcard(_dom);
var _browser = _dereq_(78);
var browser = _interopRequireWildcard(_browser);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file poster-image.js
*/
/**
* The component that handles showing the poster image.
*
* @param {Player|Object} player
* @param {Object=} options
* @extends Button
* @class PosterImage
*/
var PosterImage = function (_ClickableComponent) {
_inherits(PosterImage, _ClickableComponent);
function PosterImage(player, options) {
_classCallCheck(this, PosterImage);
var _this = _possibleConstructorReturn(this, _ClickableComponent.call(this, player, options));
_this.update();
player.on('posterchange', Fn.bind(_this, _this.update));
return _this;
}
/**
* Clean up the poster image
*
* @method dispose
*/
PosterImage.prototype.dispose = function dispose() {
this.player().off('posterchange', this.update);
_ClickableComponent.prototype.dispose.call(this);
};
/**
* Create the poster's image element
*
* @return {Element}
* @method createEl
*/
PosterImage.prototype.createEl = function createEl() {
var el = Dom.createEl('div', {
className: 'vjs-poster',
// Don't want poster to be tabbable.
tabIndex: -1
});
// To ensure the poster image resizes while maintaining its original aspect
// ratio, use a div with `background-size` when available. For browsers that
// do not support `background-size` (e.g. IE8), fall back on using a regular
// img element.
if (!browser.BACKGROUND_SIZE_SUPPORTED) {
this.fallbackImg_ = Dom.createEl('img');
el.appendChild(this.fallbackImg_);
}
return el;
};
/**
* Event handler for updates to the player's poster source
*
* @method update
*/
PosterImage.prototype.update = function update() {
var url = this.player().poster();
this.setSrc(url);
// If there's no poster source we should display:none on this component
// so it's not still clickable or right-clickable
if (url) {
this.show();
} else {
this.hide();
}
};
/**
* Set the poster source depending on the display method
*
* @param {String} url The URL to the poster source
* @method setSrc
*/
PosterImage.prototype.setSrc = function setSrc(url) {
if (this.fallbackImg_) {
this.fallbackImg_.src = url;
} else {
var backgroundImage = '';
// Any falsey values should stay as an empty string, otherwise
// this will throw an extra error
if (url) {
backgroundImage = 'url("' + url + '")';
}
this.el_.style.backgroundImage = backgroundImage;
}
};
/**
* Event handler for clicks on the poster image
*
* @method handleClick
*/
PosterImage.prototype.handleClick = function handleClick() {
// We don't want a click to trigger playback when controls are disabled
// but CSS should be hiding the poster to prevent that from happening
if (this.player_.paused()) {
this.player_.play();
} else {
this.player_.pause();
}
};
return PosterImage;
}(_clickableComponent2['default']);
_component2['default'].registerComponent('PosterImage', PosterImage);
exports['default'] = PosterImage;
},{"3":3,"5":5,"78":78,"80":80,"82":82}],56:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
exports.hasLoaded = exports.autoSetupTimeout = exports.autoSetup = undefined;
var _events = _dereq_(81);
var Events = _interopRequireWildcard(_events);
var _document = _dereq_(92);
var _document2 = _interopRequireDefault(_document);
var _window = _dereq_(93);
var _window2 = _interopRequireDefault(_window);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
var _windowLoaded = false; /**
* @file setup.js
*
* Functions for automatically setting up a player
* based on the data-setup attribute of the video tag
*/
var videojs = void 0;
// Automatically set up any tags that have a data-setup attribute
var autoSetup = function autoSetup() {
// One day, when we stop supporting IE8, go back to this, but in the meantime...*hack hack hack*
// var vids = Array.prototype.slice.call(document.getElementsByTagName('video'));
// var audios = Array.prototype.slice.call(document.getElementsByTagName('audio'));
// var mediaEls = vids.concat(audios);
// Because IE8 doesn't support calling slice on a node list, we need to loop
// through each list of elements to build up a new, combined list of elements.
var vids = _document2['default'].getElementsByTagName('video');
var audios = _document2['default'].getElementsByTagName('audio');
var mediaEls = [];
if (vids && vids.length > 0) {
for (var i = 0, e = vids.length; i < e; i++) {
mediaEls.push(vids[i]);
}
}
if (audios && audios.length > 0) {
for (var _i = 0, _e = audios.length; _i < _e; _i++) {
mediaEls.push(audios[_i]);
}
}
// Check if any media elements exist
if (mediaEls && mediaEls.length > 0) {
for (var _i2 = 0, _e2 = mediaEls.length; _i2 < _e2; _i2++) {
var mediaEl = mediaEls[_i2];
// Check if element exists, has getAttribute func.
// IE seems to consider typeof el.getAttribute == 'object' instead of
// 'function' like expected, at least when loading the player immediately.
if (mediaEl && mediaEl.getAttribute) {
// Make sure this player hasn't already been set up.
if (mediaEl.player === undefined) {
var options = mediaEl.getAttribute('data-setup');
// Check if data-setup attr exists.
// We only auto-setup if they've added the data-setup attr.
if (options !== null) {
// Create new video.js instance.
videojs(mediaEl);
}
}
// If getAttribute isn't defined, we need to wait for the DOM.
} else {
autoSetupTimeout(1);
break;
}
}
// No videos were found, so keep looping unless page is finished loading.
} else if (!_windowLoaded) {
autoSetupTimeout(1);
}
};
// Pause to let the DOM keep processing
function autoSetupTimeout(wait, vjs) {
if (vjs) {
videojs = vjs;
}
setTimeout(autoSetup, wait);
}
if (_document2['default'].readyState === 'complete') {
_windowLoaded = true;
} else {
Events.one(_window2['default'], 'load', function () {
_windowLoaded = true;
});
}
var hasLoaded = function hasLoaded() {
return _windowLoaded;
};
exports.autoSetup = autoSetup;
exports.autoSetupTimeout = autoSetupTimeout;
exports.hasLoaded = hasLoaded;
},{"81":81,"92":92,"93":93}],57:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _dom = _dereq_(80);
var Dom = _interopRequireWildcard(_dom);
var _object = _dereq_(136);
var _object2 = _interopRequireDefault(_object);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file slider.js
*/
/**
* The base functionality for sliders like the volume bar and seek bar
*
* @param {Player|Object} player
* @param {Object=} options
* @extends Component
* @class Slider
*/
var Slider = function (_Component) {
_inherits(Slider, _Component);
function Slider(player, options) {
_classCallCheck(this, Slider);
// Set property names to bar to match with the child Slider class is looking for
var _this = _possibleConstructorReturn(this, _Component.call(this, player, options));
_this.bar = _this.getChild(_this.options_.barName);
// Set a horizontal or vertical class on the slider depending on the slider type
_this.vertical(!!_this.options_.vertical);
_this.on('mousedown', _this.handleMouseDown);
_this.on('touchstart', _this.handleMouseDown);
_this.on('focus', _this.handleFocus);
_this.on('blur', _this.handleBlur);
_this.on('click', _this.handleClick);
_this.on(player, 'controlsvisible', _this.update);
_this.on(player, _this.playerEvent, _this.update);
return _this;
}
/**
* Create the component's DOM element
*
* @param {String} type Type of element to create
* @param {Object=} props List of properties in Object form
* @return {Element}
* @method createEl
*/
Slider.prototype.createEl = function createEl(type) {
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
// Add the slider element class to all sub classes
props.className = props.className + ' vjs-slider';
props = (0, _object2['default'])({
tabIndex: 0
}, props);
attributes = (0, _object2['default'])({
'role': 'slider',
'aria-valuenow': 0,
'aria-valuemin': 0,
'aria-valuemax': 100,
'tabIndex': 0
}, attributes);
return _Component.prototype.createEl.call(this, type, props, attributes);
};
/**
* Handle mouse down on slider
*
* @param {Object} event Mouse down event object
* @method handleMouseDown
*/
Slider.prototype.handleMouseDown = function handleMouseDown(event) {
var doc = this.bar.el_.ownerDocument;
event.preventDefault();
Dom.blockTextSelection();
this.addClass('vjs-sliding');
this.trigger('slideractive');
this.on(doc, 'mousemove', this.handleMouseMove);
this.on(doc, 'mouseup', this.handleMouseUp);
this.on(doc, 'touchmove', this.handleMouseMove);
this.on(doc, 'touchend', this.handleMouseUp);
this.handleMouseMove(event);
};
/**
* To be overridden by a subclass
*
* @method handleMouseMove
*/
Slider.prototype.handleMouseMove = function handleMouseMove() {};
/**
* Handle mouse up on Slider
*
* @method handleMouseUp
*/
Slider.prototype.handleMouseUp = function handleMouseUp() {
var doc = this.bar.el_.ownerDocument;
Dom.unblockTextSelection();
this.removeClass('vjs-sliding');
this.trigger('sliderinactive');
this.off(doc, 'mousemove', this.handleMouseMove);
this.off(doc, 'mouseup', this.handleMouseUp);
this.off(doc, 'touchmove', this.handleMouseMove);
this.off(doc, 'touchend', this.handleMouseUp);
this.update();
};
/**
* Update slider
*
* @method update
*/
Slider.prototype.update = function update() {
// In VolumeBar init we have a setTimeout for update that pops and update to the end of the
// execution stack. The player is destroyed before then update will cause an error
if (!this.el_) {
return;
}
// If scrubbing, we could use a cached value to make the handle keep up with the user's mouse.
// On HTML5 browsers scrubbing is really smooth, but some flash players are slow, so we might want to utilize this later.
// var progress = (this.player_.scrubbing()) ? this.player_.getCache().currentTime / this.player_.duration() : this.player_.currentTime() / this.player_.duration();
var progress = this.getPercent();
var bar = this.bar;
// If there's no bar...
if (!bar) {
return;
}
// Protect against no duration and other division issues
if (typeof progress !== 'number' || progress !== progress || progress < 0 || progress === Infinity) {
progress = 0;
}
// Convert to a percentage for setting
var percentage = (progress * 100).toFixed(2) + '%';
// Set the new bar width or height
if (this.vertical()) {
bar.el().style.height = percentage;
} else {
bar.el().style.width = percentage;
}
};
/**
* Calculate distance for slider
*
* @param {Object} event Event object
* @method calculateDistance
*/
Slider.prototype.calculateDistance = function calculateDistance(event) {
var position = Dom.getPointerPosition(this.el_, event);
if (this.vertical()) {
return position.y;
}
return position.x;
};
/**
* Handle on focus for slider
*
* @method handleFocus
*/
Slider.prototype.handleFocus = function handleFocus() {
this.on(this.bar.el_.ownerDocument, 'keydown', this.handleKeyPress);
};
/**
* Handle key press for slider
*
* @param {Object} event Event object
* @method handleKeyPress
*/
Slider.prototype.handleKeyPress = function handleKeyPress(event) {
// Left and Down Arrows
if (event.which === 37 || event.which === 40) {
event.preventDefault();
this.stepBack();
// Up and Right Arrows
} else if (event.which === 38 || event.which === 39) {
event.preventDefault();
this.stepForward();
}
};
/**
* Handle on blur for slider
*
* @method handleBlur
*/
Slider.prototype.handleBlur = function handleBlur() {
this.off(this.bar.el_.ownerDocument, 'keydown', this.handleKeyPress);
};
/**
* Listener for click events on slider, used to prevent clicks
* from bubbling up to parent elements like button menus.
*
* @param {Object} event Event object
* @method handleClick
*/
Slider.prototype.handleClick = function handleClick(event) {
event.stopImmediatePropagation();
event.preventDefault();
};
/**
* Get/set if slider is horizontal for vertical
*
* @param {Boolean} bool True if slider is vertical, false is horizontal
* @return {Boolean} True if slider is vertical, false is horizontal
* @method vertical
*/
Slider.prototype.vertical = function vertical(bool) {
if (bool === undefined) {
return this.vertical_ || false;
}
this.vertical_ = !!bool;
if (this.vertical_) {
this.addClass('vjs-slider-vertical');
} else {
this.addClass('vjs-slider-horizontal');
}
return this;
};
return Slider;
}(_component2['default']);
_component2['default'].registerComponent('Slider', Slider);
exports['default'] = Slider;
},{"136":136,"5":5,"80":80}],58:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
/**
* @file flash-rtmp.js
*/
function FlashRtmpDecorator(Flash) {
Flash.streamingFormats = {
'rtmp/mp4': 'MP4',
'rtmp/flv': 'FLV'
};
Flash.streamFromParts = function (connection, stream) {
return connection + '&' + stream;
};
Flash.streamToParts = function (src) {
var parts = {
connection: '',
stream: ''
};
if (!src) {
return parts;
}
// Look for the normal URL separator we expect, '&'.
// If found, we split the URL into two pieces around the
// first '&'.
var connEnd = src.search(/&(?!\w+=)/);
var streamBegin = void 0;
if (connEnd !== -1) {
streamBegin = connEnd + 1;
} else {
// If there's not a '&', we use the last '/' as the delimiter.
connEnd = streamBegin = src.lastIndexOf('/') + 1;
if (connEnd === 0) {
// really, there's not a '/'?
connEnd = streamBegin = src.length;
}
}
parts.connection = src.substring(0, connEnd);
parts.stream = src.substring(streamBegin, src.length);
return parts;
};
Flash.isStreamingType = function (srcType) {
return srcType in Flash.streamingFormats;
};
// RTMP has four variations, any string starting
// with one of these protocols should be valid
Flash.RTMP_RE = /^rtmp[set]?:\/\//i;
Flash.isStreamingSrc = function (src) {
return Flash.RTMP_RE.test(src);
};
/**
* A source handler for RTMP urls
* @type {Object}
*/
Flash.rtmpSourceHandler = {};
/**
* Check if Flash can play the given videotype
* @param {String} type The mimetype to check
* @return {String} 'probably', 'maybe', or '' (empty string)
*/
Flash.rtmpSourceHandler.canPlayType = function (type) {
if (Flash.isStreamingType(type)) {
return 'maybe';
}
return '';
};
/**
* Check if Flash can handle the source natively
* @param {Object} source The source object
* @param {Object} options The options passed to the tech
* @return {String} 'probably', 'maybe', or '' (empty string)
*/
Flash.rtmpSourceHandler.canHandleSource = function (source, options) {
var can = Flash.rtmpSourceHandler.canPlayType(source.type);
if (can) {
return can;
}
if (Flash.isStreamingSrc(source.src)) {
return 'maybe';
}
return '';
};
/**
* Pass the source to the flash object
* Adaptive source handlers will have more complicated workflows before passing
* video data to the video element
* @param {Object} source The source object
* @param {Flash} tech The instance of the Flash tech
* @param {Object} options The options to pass to the source
*/
Flash.rtmpSourceHandler.handleSource = function (source, tech, options) {
var srcParts = Flash.streamToParts(source.src);
tech.setRtmpConnection(srcParts.connection);
tech.setRtmpStream(srcParts.stream);
};
// Register the native source handler
Flash.registerSourceHandler(Flash.rtmpSourceHandler);
return Flash;
}
exports['default'] = FlashRtmpDecorator;
},{}],59:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _tech = _dereq_(62);
var _tech2 = _interopRequireDefault(_tech);
var _dom = _dereq_(80);
var Dom = _interopRequireWildcard(_dom);
var _url = _dereq_(90);
var Url = _interopRequireWildcard(_url);
var _timeRanges = _dereq_(88);
var _flashRtmp = _dereq_(58);
var _flashRtmp2 = _interopRequireDefault(_flashRtmp);
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _window = _dereq_(93);
var _window2 = _interopRequireDefault(_window);
var _object = _dereq_(136);
var _object2 = _interopRequireDefault(_object);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file flash.js
* VideoJS-SWF - Custom Flash Player with HTML5-ish API
* https://github.com/zencoder/video-js-swf
* Not using setupTriggers. Using global onEvent func to distribute events
*/
var navigator = _window2['default'].navigator;
/**
* Flash Media Controller - Wrapper for fallback SWF API
*
* @param {Object=} options Object of option names and values
* @param {Function=} ready Ready callback function
* @extends Tech
* @class Flash
*/
var Flash = function (_Tech) {
_inherits(Flash, _Tech);
function Flash(options, ready) {
_classCallCheck(this, Flash);
// Set the source when ready
var _this = _possibleConstructorReturn(this, _Tech.call(this, options, ready));
if (options.source) {
_this.ready(function () {
this.setSource(options.source);
}, true);
}
// Having issues with Flash reloading on certain page actions (hide/resize/fullscreen) in certain browsers
// This allows resetting the playhead when we catch the reload
if (options.startTime) {
_this.ready(function () {
this.load();
this.play();
this.currentTime(options.startTime);
}, true);
}
// Add global window functions that the swf expects
// A 4.x workflow we weren't able to solve for in 5.0
// because of the need to hard code these functions
// into the swf for security reasons
_window2['default'].videojs = _window2['default'].videojs || {};
_window2['default'].videojs.Flash = _window2['default'].videojs.Flash || {};
_window2['default'].videojs.Flash.onReady = Flash.onReady;
_window2['default'].videojs.Flash.onEvent = Flash.onEvent;
_window2['default'].videojs.Flash.onError = Flash.onError;
_this.on('seeked', function () {
this.lastSeekTarget_ = undefined;
});
return _this;
}
/**
* Create the component's DOM element
*
* @return {Element}
* @method createEl
*/
Flash.prototype.createEl = function createEl() {
var options = this.options_;
// If video.js is hosted locally you should also set the location
// for the hosted swf, which should be relative to the page (not video.js)
// Otherwise this adds a CDN url.
// The CDN also auto-adds a swf URL for that specific version.
if (!options.swf) {
var ver = '5.1.0';
options.swf = '//vjs.zencdn.net/swf/' + ver + '/video-js.swf';
}
// Generate ID for swf object
var objId = options.techId;
// Merge default flashvars with ones passed in to init
var flashVars = (0, _object2['default'])({
// SWF Callback Functions
readyFunction: 'videojs.Flash.onReady',
eventProxyFunction: 'videojs.Flash.onEvent',
errorEventProxyFunction: 'videojs.Flash.onError',
// Player Settings
autoplay: options.autoplay,
preload: options.preload,
loop: options.loop,
muted: options.muted
}, options.flashVars);
// Merge default parames with ones passed in
var params = (0, _object2['default'])({
// Opaque is needed to overlay controls, but can affect playback performance
wmode: 'opaque',
// Using bgcolor prevents a white flash when the object is loading
bgcolor: '#000000'
}, options.params);
// Merge default attributes with ones passed in
var attributes = (0, _object2['default'])({
// Both ID and Name needed or swf to identify itself
id: objId,
name: objId,
'class': 'vjs-tech'
}, options.attributes);
this.el_ = Flash.embed(options.swf, flashVars, params, attributes);
this.el_.tech = this;
return this.el_;
};
/**
* Play for flash tech
*
* @method play
*/
Flash.prototype.play = function play() {
if (this.ended()) {
this.setCurrentTime(0);
}
this.el_.vjs_play();
};
/**
* Pause for flash tech
*
* @method pause
*/
Flash.prototype.pause = function pause() {
this.el_.vjs_pause();
};
/**
* Get/set video
*
* @param {Object=} src Source object
* @return {Object}
* @method src
*/
Flash.prototype.src = function src(_src) {
if (_src === undefined) {
return this.currentSrc();
}
// Setting src through `src` not `setSrc` will be deprecated
return this.setSrc(_src);
};
/**
* Set video
*
* @param {Object=} src Source object
* @deprecated
* @method setSrc
*/
Flash.prototype.setSrc = function setSrc(src) {
var _this2 = this;
// Make sure source URL is absolute.
src = Url.getAbsoluteURL(src);
this.el_.vjs_src(src);
// Currently the SWF doesn't autoplay if you load a source later.
// e.g. Load player w/ no source, wait 2s, set src.
if (this.autoplay()) {
this.setTimeout(function () {
return _this2.play();
}, 0);
}
};
/**
* Returns true if the tech is currently seeking.
* @return {boolean} true if seeking
*/
Flash.prototype.seeking = function seeking() {
return this.lastSeekTarget_ !== undefined;
};
/**
* Set current time
*
* @param {Number} time Current time of video
* @method setCurrentTime
*/
Flash.prototype.setCurrentTime = function setCurrentTime(time) {
var seekable = this.seekable();
if (seekable.length) {
// clamp to the current seekable range
time = time > seekable.start(0) ? time : seekable.start(0);
time = time < seekable.end(seekable.length - 1) ? time : seekable.end(seekable.length - 1);
this.lastSeekTarget_ = time;
this.trigger('seeking');
this.el_.vjs_setProperty('currentTime', time);
_Tech.prototype.setCurrentTime.call(this);
}
};
/**
* Get current time
*
* @param {Number=} time Current time of video
* @return {Number} Current time
* @method currentTime
*/
Flash.prototype.currentTime = function currentTime(time) {
// when seeking make the reported time keep up with the requested time
// by reading the time we're seeking to
if (this.seeking()) {
return this.lastSeekTarget_ || 0;
}
return this.el_.vjs_getProperty('currentTime');
};
/**
* Get current source
*
* @method currentSrc
*/
Flash.prototype.currentSrc = function currentSrc() {
if (this.currentSource_) {
return this.currentSource_.src;
}
return this.el_.vjs_getProperty('currentSrc');
};
/**
* Get media duration
*
* @returns {Number} Media duration
*/
Flash.prototype.duration = function duration() {
if (this.readyState() === 0) {
return NaN;
}
var duration = this.el_.vjs_getProperty('duration');
return duration >= 0 ? duration : Infinity;
};
/**
* Load media into player
*
* @method load
*/
Flash.prototype.load = function load() {
this.el_.vjs_load();
};
/**
* Get poster
*
* @method poster
*/
Flash.prototype.poster = function poster() {
this.el_.vjs_getProperty('poster');
};
/**
* Poster images are not handled by the Flash tech so make this a no-op
*
* @method setPoster
*/
Flash.prototype.setPoster = function setPoster() {};
/**
* Determine if can seek in media
*
* @return {TimeRangeObject}
* @method seekable
*/
Flash.prototype.seekable = function seekable() {
var duration = this.duration();
if (duration === 0) {
return (0, _timeRanges.createTimeRange)();
}
return (0, _timeRanges.createTimeRange)(0, duration);
};
/**
* Get buffered time range
*
* @return {TimeRangeObject}
* @method buffered
*/
Flash.prototype.buffered = function buffered() {
var ranges = this.el_.vjs_getProperty('buffered');
if (ranges.length === 0) {
return (0, _timeRanges.createTimeRange)();
}
return (0, _timeRanges.createTimeRange)(ranges[0][0], ranges[0][1]);
};
/**
* Get fullscreen support -
* Flash does not allow fullscreen through javascript
* so always returns false
*
* @return {Boolean} false
* @method supportsFullScreen
*/
Flash.prototype.supportsFullScreen = function supportsFullScreen() {
// Flash does not allow fullscreen through javascript
return false;
};
/**
* Request to enter fullscreen
* Flash does not allow fullscreen through javascript
* so always returns false
*
* @return {Boolean} false
* @method enterFullScreen
*/
Flash.prototype.enterFullScreen = function enterFullScreen() {
return false;
};
return Flash;
}(_tech2['default']);
// Create setters and getters for attributes
var _api = Flash.prototype;
var _readWrite = 'rtmpConnection,rtmpStream,preload,defaultPlaybackRate,playbackRate,autoplay,loop,mediaGroup,controller,controls,volume,muted,defaultMuted'.split(',');
var _readOnly = 'networkState,readyState,initialTime,startOffsetTime,paused,ended,videoWidth,videoHeight'.split(',');
function _createSetter(attr) {
var attrUpper = attr.charAt(0).toUpperCase() + attr.slice(1);
_api['set' + attrUpper] = function (val) {
return this.el_.vjs_setProperty(attr, val);
};
}
function _createGetter(attr) {
_api[attr] = function () {
return this.el_.vjs_getProperty(attr);
};
}
// Create getter and setters for all read/write attributes
for (var i = 0; i < _readWrite.length; i++) {
_createGetter(_readWrite[i]);
_createSetter(_readWrite[i]);
}
// Create getters for read-only attributes
for (var _i = 0; _i < _readOnly.length; _i++) {
_createGetter(_readOnly[_i]);
}
/* Flash Support Testing -------------------------------------------------------- */
Flash.isSupported = function () {
return Flash.version()[0] >= 10;
// return swfobject.hasFlashPlayerVersion('10');
};
// Add Source Handler pattern functions to this tech
_tech2['default'].withSourceHandlers(Flash);
/*
* The default native source handler.
* This simply passes the source to the video element. Nothing fancy.
*
* @param {Object} source The source object
* @param {Flash} tech The instance of the Flash tech
*/
Flash.nativeSourceHandler = {};
/**
* Check if Flash can play the given videotype
* @param {String} type The mimetype to check
* @return {String} 'probably', 'maybe', or '' (empty string)
*/
Flash.nativeSourceHandler.canPlayType = function (type) {
if (type in Flash.formats) {
return 'maybe';
}
return '';
};
/*
* Check Flash can handle the source natively
*
* @param {Object} source The source object
* @param {Object} options The options passed to the tech
* @return {String} 'probably', 'maybe', or '' (empty string)
*/
Flash.nativeSourceHandler.canHandleSource = function (source, options) {
var type = void 0;
function guessMimeType(src) {
var ext = Url.getFileExtension(src);
if (ext) {
return 'video/' + ext;
}
return '';
}
if (!source.type) {
type = guessMimeType(source.src);
} else {
// Strip code information from the type because we don't get that specific
type = source.type.replace(/;.*/, '').toLowerCase();
}
return Flash.nativeSourceHandler.canPlayType(type);
};
/*
* Pass the source to the flash object
* Adaptive source handlers will have more complicated workflows before passing
* video data to the video element
*
* @param {Object} source The source object
* @param {Flash} tech The instance of the Flash tech
* @param {Object} options The options to pass to the source
*/
Flash.nativeSourceHandler.handleSource = function (source, tech, options) {
tech.setSrc(source.src);
};
/*
* Clean up the source handler when disposing the player or switching sources..
* (no cleanup is needed when supporting the format natively)
*/
Flash.nativeSourceHandler.dispose = function () {};
// Register the native source handler
Flash.registerSourceHandler(Flash.nativeSourceHandler);
Flash.formats = {
'video/flv': 'FLV',
'video/x-flv': 'FLV',
'video/mp4': 'MP4',
'video/m4v': 'MP4'
};
Flash.onReady = function (currSwf) {
var el = Dom.getEl(currSwf);
var tech = el && el.tech;
// if there is no el then the tech has been disposed
// and the tech element was removed from the player div
if (tech && tech.el()) {
// check that the flash object is really ready
Flash.checkReady(tech);
}
};
// The SWF isn't always ready when it says it is. Sometimes the API functions still need to be added to the object.
// If it's not ready, we set a timeout to check again shortly.
Flash.checkReady = function (tech) {
// stop worrying if the tech has been disposed
if (!tech.el()) {
return;
}
// check if API property exists
if (tech.el().vjs_getProperty) {
// tell tech it's ready
tech.triggerReady();
} else {
// wait longer
this.setTimeout(function () {
Flash.checkReady(tech);
}, 50);
}
};
// Trigger events from the swf on the player
Flash.onEvent = function (swfID, eventName) {
var tech = Dom.getEl(swfID).tech;
tech.trigger(eventName, Array.prototype.slice.call(arguments, 2));
};
// Log errors from the swf
Flash.onError = function (swfID, err) {
var tech = Dom.getEl(swfID).tech;
// trigger MEDIA_ERR_SRC_NOT_SUPPORTED
if (err === 'srcnotfound') {
return tech.error(4);
}
// trigger a custom error
tech.error('FLASH: ' + err);
};
// Flash Version Check
Flash.version = function () {
var version = '0,0,0';
// IE
try {
version = new _window2['default'].ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\D+/g, ',').match(/^,?(.+),?$/)[1];
// other browsers
} catch (e) {
try {
if (navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin) {
version = (navigator.plugins['Shockwave Flash 2.0'] || navigator.plugins['Shockwave Flash']).description.replace(/\D+/g, ',').match(/^,?(.+),?$/)[1];
}
} catch (err) {
// satisfy linter
}
}
return version.split(',');
};
// Flash embedding method. Only used in non-iframe mode
Flash.embed = function (swf, flashVars, params, attributes) {
var code = Flash.getEmbedCode(swf, flashVars, params, attributes);
// Get element by embedding code and retrieving created element
var obj = Dom.createEl('div', { innerHTML: code }).childNodes[0];
return obj;
};
Flash.getEmbedCode = function (swf, flashVars, params, attributes) {
var objTag = '<object type="application/x-shockwave-flash" ';
var flashVarsString = '';
var paramsString = '';
var attrsString = '';
// Convert flash vars to string
if (flashVars) {
Object.getOwnPropertyNames(flashVars).forEach(function (key) {
flashVarsString += key + '=' + flashVars[key] + '&';
});
}
// Add swf, flashVars, and other default params
params = (0, _object2['default'])({
movie: swf,
flashvars: flashVarsString,
// Required to talk to swf
allowScriptAccess: 'always',
// All should be default, but having security issues.
allowNetworking: 'all'
}, params);
// Create param tags string
Object.getOwnPropertyNames(params).forEach(function (key) {
paramsString += '<param name="' + key + '" value="' + params[key] + '" />';
});
attributes = (0, _object2['default'])({
// Add swf to attributes (need both for IE and Others to work)
data: swf,
// Default to 100% width/height
width: '100%',
height: '100%'
}, attributes);
// Create Attributes string
Object.getOwnPropertyNames(attributes).forEach(function (key) {
attrsString += key + '="' + attributes[key] + '" ';
});
return '' + objTag + attrsString + '>' + paramsString + '</object>';
};
// Run Flash through the RTMP decorator
(0, _flashRtmp2['default'])(Flash);
_component2['default'].registerComponent('Flash', Flash);
_tech2['default'].registerTech('Flash', Flash);
exports['default'] = Flash;
},{"136":136,"5":5,"58":58,"62":62,"80":80,"88":88,"90":90,"93":93}],60:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _templateObject = _taggedTemplateLiteralLoose(['Text Tracks are being loaded from another origin but the crossorigin attribute isn\'t used.\n This may prevent text tracks from loading.'], ['Text Tracks are being loaded from another origin but the crossorigin attribute isn\'t used.\n This may prevent text tracks from loading.']);
var _tech = _dereq_(62);
var _tech2 = _interopRequireDefault(_tech);
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _dom = _dereq_(80);
var Dom = _interopRequireWildcard(_dom);
var _url = _dereq_(90);
var Url = _interopRequireWildcard(_url);
var _fn = _dereq_(82);
var Fn = _interopRequireWildcard(_fn);
var _log = _dereq_(85);
var _log2 = _interopRequireDefault(_log);
var _tsml = _dereq_(146);
var _tsml2 = _interopRequireDefault(_tsml);
var _browser = _dereq_(78);
var browser = _interopRequireWildcard(_browser);
var _document = _dereq_(92);
var _document2 = _interopRequireDefault(_document);
var _window = _dereq_(93);
var _window2 = _interopRequireDefault(_window);
var _object = _dereq_(136);
var _object2 = _interopRequireDefault(_object);
var _mergeOptions = _dereq_(86);
var _mergeOptions2 = _interopRequireDefault(_mergeOptions);
var _toTitleCase = _dereq_(89);
var _toTitleCase2 = _interopRequireDefault(_toTitleCase);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _taggedTemplateLiteralLoose(strings, raw) { strings.raw = raw; return strings; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file html5.js
* HTML5 Media Controller - Wrapper for HTML5 Media API
*/
/**
* HTML5 Media Controller - Wrapper for HTML5 Media API
*
* @param {Object=} options Object of option names and values
* @param {Function=} ready Ready callback function
* @class Html5
*/
var Html5 = function (_Tech) {
_inherits(Html5, _Tech);
function Html5(options, ready) {
_classCallCheck(this, Html5);
var _this = _possibleConstructorReturn(this, _Tech.call(this, options, ready));
var source = options.source;
var crossoriginTracks = false;
// Set the source if one is provided
// 1) Check if the source is new (if not, we want to keep the original so playback isn't interrupted)
// 2) Check to see if the network state of the tag was failed at init, and if so, reset the source
// anyway so the error gets fired.
if (source && (_this.el_.currentSrc !== source.src || options.tag && options.tag.initNetworkState_ === 3)) {
_this.setSource(source);
} else {
_this.handleLateInit_(_this.el_);
}
if (_this.el_.hasChildNodes()) {
var nodes = _this.el_.childNodes;
var nodesLength = nodes.length;
var removeNodes = [];
while (nodesLength--) {
var node = nodes[nodesLength];
var nodeName = node.nodeName.toLowerCase();
if (nodeName === 'track') {
if (!_this.featuresNativeTextTracks) {
// Empty video tag tracks so the built-in player doesn't use them also.
// This may not be fast enough to stop HTML5 browsers from reading the tags
// so we'll need to turn off any default tracks if we're manually doing
// captions and subtitles. videoElement.textTracks
removeNodes.push(node);
} else {
// store HTMLTrackElement and TextTrack to remote list
_this.remoteTextTrackEls().addTrackElement_(node);
_this.remoteTextTracks().addTrack_(node.track);
if (!crossoriginTracks && !_this.el_.hasAttribute('crossorigin') && Url.isCrossOrigin(node.src)) {
crossoriginTracks = true;
}
}
}
}
for (var i = 0; i < removeNodes.length; i++) {
_this.el_.removeChild(removeNodes[i]);
}
}
// TODO: add text tracks into this list
var trackTypes = ['audio', 'video'];
// ProxyNative Video/Audio Track
trackTypes.forEach(function (type) {
var elTracks = _this.el()[type + 'Tracks'];
var techTracks = _this[type + 'Tracks']();
var capitalType = (0, _toTitleCase2['default'])(type);
if (!_this['featuresNative' + capitalType + 'Tracks'] || !elTracks || !elTracks.addEventListener) {
return;
}
_this['handle' + capitalType + 'TrackChange_'] = function (e) {
techTracks.trigger({
type: 'change',
target: techTracks,
currentTarget: techTracks,
srcElement: techTracks
});
};
_this['handle' + capitalType + 'TrackAdd_'] = function (e) {
return techTracks.addTrack(e.track);
};
_this['handle' + capitalType + 'TrackRemove_'] = function (e) {
return techTracks.removeTrack(e.track);
};
elTracks.addEventListener('change', _this['handle' + capitalType + 'TrackChange_']);
elTracks.addEventListener('addtrack', _this['handle' + capitalType + 'TrackAdd_']);
elTracks.addEventListener('removetrack', _this['handle' + capitalType + 'TrackRemove_']);
_this['removeOld' + capitalType + 'Tracks_'] = function (e) {
return _this.removeOldTracks_(techTracks, elTracks);
};
// Remove (native) tracks that are not used anymore
_this.on('loadstart', _this['removeOld' + capitalType + 'Tracks_']);
});
if (_this.featuresNativeTextTracks) {
if (crossoriginTracks) {
_log2['default'].warn((0, _tsml2['default'])(_templateObject));
}
_this.handleTextTrackChange_ = Fn.bind(_this, _this.handleTextTrackChange);
_this.handleTextTrackAdd_ = Fn.bind(_this, _this.handleTextTrackAdd);
_this.handleTextTrackRemove_ = Fn.bind(_this, _this.handleTextTrackRemove);
_this.proxyNativeTextTracks_();
}
// Determine if native controls should be used
// Our goal should be to get the custom controls on mobile solid everywhere
// so we can remove this all together. Right now this will block custom
// controls on touch enabled laptops like the Chrome Pixel
if ((browser.TOUCH_ENABLED || browser.IS_IPHONE || browser.IS_NATIVE_ANDROID) && options.nativeControlsForTouch === true) {
_this.setControls(true);
}
// on iOS, we want to proxy `webkitbeginfullscreen` and `webkitendfullscreen`
// into a `fullscreenchange` event
_this.proxyWebkitFullscreen_();
_this.triggerReady();
return _this;
}
/**
* Dispose of html5 media element
*/
Html5.prototype.dispose = function dispose() {
var _this2 = this;
// Un-ProxyNativeTracks
['audio', 'video', 'text'].forEach(function (type) {
var capitalType = (0, _toTitleCase2['default'])(type);
var tl = _this2.el_[type + 'Tracks'];
if (tl && tl.removeEventListener) {
tl.removeEventListener('change', _this2['handle' + capitalType + 'TrackChange_']);
tl.removeEventListener('addtrack', _this2['handle' + capitalType + 'TrackAdd_']);
tl.removeEventListener('removetrack', _this2['handle' + capitalType + 'TrackRemove_']);
}
// Stop removing old text tracks
if (tl) {
_this2.off('loadstart', _this2['removeOld' + capitalType + 'Tracks_']);
}
});
Html5.disposeMediaElement(this.el_);
// tech will handle clearing of the emulated track list
_Tech.prototype.dispose.call(this);
};
/**
* Create the component's DOM element
*
* @return {Element}
*/
Html5.prototype.createEl = function createEl() {
var el = this.options_.tag;
// Check if this browser supports moving the element into the box.
// On the iPhone video will break if you move the element,
// So we have to create a brand new element.
if (!el || this.movingMediaElementInDOM === false) {
// If the original tag is still there, clone and remove it.
if (el) {
var clone = el.cloneNode(true);
el.parentNode.insertBefore(clone, el);
Html5.disposeMediaElement(el);
el = clone;
} else {
el = _document2['default'].createElement('video');
// determine if native controls should be used
var tagAttributes = this.options_.tag && Dom.getElAttributes(this.options_.tag);
var attributes = (0, _mergeOptions2['default'])({}, tagAttributes);
if (!browser.TOUCH_ENABLED || this.options_.nativeControlsForTouch !== true) {
delete attributes.controls;
}
Dom.setElAttributes(el, (0, _object2['default'])(attributes, {
id: this.options_.techId,
'class': 'vjs-tech'
}));
}
el.playerId = this.options_.playerId;
}
// Update specific tag settings, in case they were overridden
var settingsAttrs = ['autoplay', 'preload', 'loop', 'muted'];
for (var i = settingsAttrs.length - 1; i >= 0; i--) {
var attr = settingsAttrs[i];
var overwriteAttrs = {};
if (typeof this.options_[attr] !== 'undefined') {
overwriteAttrs[attr] = this.options_[attr];
}
Dom.setElAttributes(el, overwriteAttrs);
}
return el;
// jenniisawesome = true;
};
// If we're loading the playback object after it has started loading
// or playing the video (often with autoplay on) then the loadstart event
// has already fired and we need to fire it manually because many things
// rely on it.
Html5.prototype.handleLateInit_ = function handleLateInit_(el) {
var _this3 = this;
if (el.networkState === 0 || el.networkState === 3) {
// The video element hasn't started loading the source yet
// or didn't find a source
return;
}
if (el.readyState === 0) {
var _ret = function () {
// NetworkState is set synchronously BUT loadstart is fired at the
// end of the current stack, usually before setInterval(fn, 0).
// So at this point we know loadstart may have already fired or is
// about to fire, and either way the player hasn't seen it yet.
// We don't want to fire loadstart prematurely here and cause a
// double loadstart so we'll wait and see if it happens between now
// and the next loop, and fire it if not.
// HOWEVER, we also want to make sure it fires before loadedmetadata
// which could also happen between now and the next loop, so we'll
// watch for that also.
var loadstartFired = false;
var setLoadstartFired = function setLoadstartFired() {
loadstartFired = true;
};
_this3.on('loadstart', setLoadstartFired);
var triggerLoadstart = function triggerLoadstart() {
// We did miss the original loadstart. Make sure the player
// sees loadstart before loadedmetadata
if (!loadstartFired) {
this.trigger('loadstart');
}
};
_this3.on('loadedmetadata', triggerLoadstart);
_this3.ready(function () {
this.off('loadstart', setLoadstartFired);
this.off('loadedmetadata', triggerLoadstart);
if (!loadstartFired) {
// We did miss the original native loadstart. Fire it now.
this.trigger('loadstart');
}
});
return {
v: void 0
};
}();
if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v;
}
// From here on we know that loadstart already fired and we missed it.
// The other readyState events aren't as much of a problem if we double
// them, so not going to go to as much trouble as loadstart to prevent
// that unless we find reason to.
var eventsToTrigger = ['loadstart'];
// loadedmetadata: newly equal to HAVE_METADATA (1) or greater
eventsToTrigger.push('loadedmetadata');
// loadeddata: newly increased to HAVE_CURRENT_DATA (2) or greater
if (el.readyState >= 2) {
eventsToTrigger.push('loadeddata');
}
// canplay: newly increased to HAVE_FUTURE_DATA (3) or greater
if (el.readyState >= 3) {
eventsToTrigger.push('canplay');
}
// canplaythrough: newly equal to HAVE_ENOUGH_DATA (4)
if (el.readyState >= 4) {
eventsToTrigger.push('canplaythrough');
}
// We still need to give the player time to add event listeners
this.ready(function () {
eventsToTrigger.forEach(function (type) {
this.trigger(type);
}, this);
});
};
Html5.prototype.proxyNativeTextTracks_ = function proxyNativeTextTracks_() {
var tt = this.el().textTracks;
if (tt) {
// Add tracks - if player is initialised after DOM loaded, textTracks
// will not trigger addtrack
for (var i = 0; i < tt.length; i++) {
this.textTracks().addTrack_(tt[i]);
}
if (tt.addEventListener) {
tt.addEventListener('change', this.handleTextTrackChange_);
tt.addEventListener('addtrack', this.handleTextTrackAdd_);
tt.addEventListener('removetrack', this.handleTextTrackRemove_);
}
// Remove (native) texttracks that are not used anymore
this.on('loadstart', this.removeOldTextTracks_);
}
};
Html5.prototype.handleTextTrackChange = function handleTextTrackChange(e) {
var tt = this.textTracks();
this.textTracks().trigger({
type: 'change',
target: tt,
currentTarget: tt,
srcElement: tt
});
};
Html5.prototype.handleTextTrackAdd = function handleTextTrackAdd(e) {
this.textTracks().addTrack_(e.track);
};
Html5.prototype.handleTextTrackRemove = function handleTextTrackRemove(e) {
this.textTracks().removeTrack_(e.track);
};
/**
* This is a helper function that is used in removeOldTextTracks_, removeOldAudioTracks_ and
* removeOldVideoTracks_
* @param {Track[]} techTracks Tracks for this tech
* @param {Track[]} elTracks Tracks for the HTML5 video element
* @private
*/
Html5.prototype.removeOldTracks_ = function removeOldTracks_(techTracks, elTracks) {
// This will loop over the techTracks and check if they are still used by the HTML5 video element
// If not, they will be removed from the emulated list
var removeTracks = [];
if (!elTracks) {
return;
}
for (var i = 0; i < techTracks.length; i++) {
var techTrack = techTracks[i];
var found = false;
for (var j = 0; j < elTracks.length; j++) {
if (elTracks[j] === techTrack) {
found = true;
break;
}
}
if (!found) {
removeTracks.push(techTrack);
}
}
for (var _i = 0; _i < removeTracks.length; _i++) {
var _track = removeTracks[_i];
techTracks.removeTrack_(_track);
}
};
Html5.prototype.removeOldTextTracks_ = function removeOldTextTracks_() {
var techTracks = this.textTracks();
var elTracks = this.el().textTracks;
this.removeOldTracks_(techTracks, elTracks);
};
/**
* Play for html5 tech
*/
Html5.prototype.play = function play() {
var playPromise = this.el_.play();
// Catch/silence error when a pause interrupts a play request
// on browsers which return a promise
if (playPromise !== undefined && typeof playPromise.then === 'function') {
playPromise.then(null, function (e) {});
}
};
/**
* Set current time
*
* @param {Number} seconds Current time of video
*/
Html5.prototype.setCurrentTime = function setCurrentTime(seconds) {
try {
this.el_.currentTime = seconds;
} catch (e) {
(0, _log2['default'])(e, 'Video is not ready. (Video.js)');
// this.warning(VideoJS.warnings.videoNotReady);
}
};
/**
* Get duration
*
* @return {Number}
*/
Html5.prototype.duration = function duration() {
return this.el_.duration || 0;
};
/**
* Get player width
*
* @return {Number}
*/
Html5.prototype.width = function width() {
return this.el_.offsetWidth;
};
/**
* Get player height
*
* @return {Number}
*/
Html5.prototype.height = function height() {
return this.el_.offsetHeight;
};
/**
* Proxy iOS `webkitbeginfullscreen` and `webkitendfullscreen` into
* `fullscreenchange` event
*
* @private
* @method proxyWebkitFullscreen_
*/
Html5.prototype.proxyWebkitFullscreen_ = function proxyWebkitFullscreen_() {
var _this4 = this;
if (!('webkitDisplayingFullscreen' in this.el_)) {
return;
}
var endFn = function endFn() {
this.trigger('fullscreenchange', { isFullscreen: false });
};
var beginFn = function beginFn() {
this.one('webkitendfullscreen', endFn);
this.trigger('fullscreenchange', { isFullscreen: true });
};
this.on('webkitbeginfullscreen', beginFn);
this.on('dispose', function () {
_this4.off('webkitbeginfullscreen', beginFn);
_this4.off('webkitendfullscreen', endFn);
});
};
/**
* Get if there is fullscreen support
*
* @return {Boolean}
*/
Html5.prototype.supportsFullScreen = function supportsFullScreen() {
if (typeof this.el_.webkitEnterFullScreen === 'function') {
var userAgent = _window2['default'].navigator && _window2['default'].navigator.userAgent || '';
// Seems to be broken in Chromium/Chrome && Safari in Leopard
if (/Android/.test(userAgent) || !/Chrome|Mac OS X 10.5/.test(userAgent)) {
return true;
}
}
return false;
};
/**
* Request to enter fullscreen
*/
Html5.prototype.enterFullScreen = function enterFullScreen() {
var video = this.el_;
if (video.paused && video.networkState <= video.HAVE_METADATA) {
// attempt to prime the video element for programmatic access
// this isn't necessary on the desktop but shouldn't hurt
this.el_.play();
// playing and pausing synchronously during the transition to fullscreen
// can get iOS ~6.1 devices into a play/pause loop
this.setTimeout(function () {
video.pause();
video.webkitEnterFullScreen();
}, 0);
} else {
video.webkitEnterFullScreen();
}
};
/**
* Request to exit fullscreen
*/
Html5.prototype.exitFullScreen = function exitFullScreen() {
this.el_.webkitExitFullScreen();
};
/**
* Get/set video
*
* @param {Object=} src Source object
* @return {Object}
*/
Html5.prototype.src = function src(_src) {
if (_src === undefined) {
return this.el_.src;
}
// Setting src through `src` instead of `setSrc` will be deprecated
this.setSrc(_src);
};
/**
* Reset the tech. Removes all sources and calls `load`.
*/
Html5.prototype.reset = function reset() {
Html5.resetMediaElement(this.el_);
};
/**
* Get current source
*
* @return {Object}
*/
Html5.prototype.currentSrc = function currentSrc() {
if (this.currentSource_) {
return this.currentSource_.src;
}
return this.el_.currentSrc;
};
/**
* Set controls attribute
*
* @param {String} val Value for controls attribute
*/
Html5.prototype.setControls = function setControls(val) {
this.el_.controls = !!val;
};
/**
* Creates and returns a text track object
*
* @param {String} kind Text track kind (subtitles, captions, descriptions
* chapters and metadata)
* @param {String=} label Label to identify the text track
* @param {String=} language Two letter language abbreviation
* @return {TextTrackObject}
*/
Html5.prototype.addTextTrack = function addTextTrack(kind, label, language) {
if (!this.featuresNativeTextTracks) {
return _Tech.prototype.addTextTrack.call(this, kind, label, language);
}
return this.el_.addTextTrack(kind, label, language);
};
/**
* Creates a remote text track object and returns a html track element
*
* @param {Object} options The object should contain values for
* kind, language, label and src (location of the WebVTT file)
* @return {HTMLTrackElement}
*/
Html5.prototype.addRemoteTextTrack = function addRemoteTextTrack() {
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
if (!this.featuresNativeTextTracks) {
return _Tech.prototype.addRemoteTextTrack.call(this, options);
}
var htmlTrackElement = _document2['default'].createElement('track');
if (options.kind) {
htmlTrackElement.kind = options.kind;
}
if (options.label) {
htmlTrackElement.label = options.label;
}
if (options.language || options.srclang) {
htmlTrackElement.srclang = options.language || options.srclang;
}
if (options['default']) {
htmlTrackElement['default'] = options['default'];
}
if (options.id) {
htmlTrackElement.id = options.id;
}
if (options.src) {
htmlTrackElement.src = options.src;
}
this.el().appendChild(htmlTrackElement);
// store HTMLTrackElement and TextTrack to remote list
this.remoteTextTrackEls().addTrackElement_(htmlTrackElement);
this.remoteTextTracks().addTrack_(htmlTrackElement.track);
return htmlTrackElement;
};
/**
* Remove remote text track from TextTrackList object
*
* @param {TextTrackObject} track Texttrack object to remove
*/
Html5.prototype.removeRemoteTextTrack = function removeRemoteTextTrack(track) {
if (!this.featuresNativeTextTracks) {
return _Tech.prototype.removeRemoteTextTrack.call(this, track);
}
var trackElement = this.remoteTextTrackEls().getTrackElementByTrack_(track);
// remove HTMLTrackElement and TextTrack from remote list
this.remoteTextTrackEls().removeTrackElement_(trackElement);
this.remoteTextTracks().removeTrack_(track);
var tracks = this.$$('track');
var i = tracks.length;
while (i--) {
if (track === tracks[i] || track === tracks[i].track) {
this.el().removeChild(tracks[i]);
}
}
};
return Html5;
}(_tech2['default']);
/* HTML5 Support Testing ---------------------------------------------------- */
/**
* Element for testing browser HTML5 video capabilities
*
* @type {Element}
* @constant
* @private
*/
Html5.TEST_VID = _document2['default'].createElement('video');
var track = _document2['default'].createElement('track');
track.kind = 'captions';
track.srclang = 'en';
track.label = 'English';
Html5.TEST_VID.appendChild(track);
/**
* Check if HTML5 video is supported by this browser/device
*
* @return {Boolean}
*/
Html5.isSupported = function () {
// IE9 with no Media Player is a LIAR! (#984)
try {
Html5.TEST_VID.volume = 0.5;
} catch (e) {
return false;
}
return !!Html5.TEST_VID.canPlayType;
};
// Add Source Handler pattern functions to this tech
_tech2['default'].withSourceHandlers(Html5);
/**
* The default native source handler.
* This simply passes the source to the video element. Nothing fancy.
*
* @param {Object} source The source object
* @param {Html5} tech The instance of the HTML5 tech
*/
Html5.nativeSourceHandler = {};
/**
* Check if the video element can play the given videotype
*
* @param {String} type The mimetype to check
* @return {String} 'probably', 'maybe', or '' (empty string)
*/
Html5.nativeSourceHandler.canPlayType = function (type) {
// IE9 on Windows 7 without MediaPlayer throws an error here
// https://github.com/videojs/video.js/issues/519
try {
return Html5.TEST_VID.canPlayType(type);
} catch (e) {
return '';
}
};
/**
* Check if the video element can handle the source natively
*
* @param {Object} source The source object
* @param {Object} options The options passed to the tech
* @return {String} 'probably', 'maybe', or '' (empty string)
*/
Html5.nativeSourceHandler.canHandleSource = function (source, options) {
// If a type was provided we should rely on that
if (source.type) {
return Html5.nativeSourceHandler.canPlayType(source.type);
// If no type, fall back to checking 'video/[EXTENSION]'
} else if (source.src) {
var ext = Url.getFileExtension(source.src);
return Html5.nativeSourceHandler.canPlayType('video/' + ext);
}
return '';
};
/**
* Pass the source to the video element
* Adaptive source handlers will have more complicated workflows before passing
* video data to the video element
*
* @param {Object} source The source object
* @param {Html5} tech The instance of the Html5 tech
* @param {Object} options The options to pass to the source
*/
Html5.nativeSourceHandler.handleSource = function (source, tech, options) {
tech.setSrc(source.src);
};
/*
* Clean up the source handler when disposing the player or switching sources..
* (no cleanup is needed when supporting the format natively)
*/
Html5.nativeSourceHandler.dispose = function () {};
// Register the native source handler
Html5.registerSourceHandler(Html5.nativeSourceHandler);
/**
* Check if the volume can be changed in this browser/device.
* Volume cannot be changed in a lot of mobile devices.
* Specifically, it can't be changed from 1 on iOS.
*
* @return {Boolean}
*/
Html5.canControlVolume = function () {
// IE will error if Windows Media Player not installed #3315
try {
var volume = Html5.TEST_VID.volume;
Html5.TEST_VID.volume = volume / 2 + 0.1;
return volume !== Html5.TEST_VID.volume;
} catch (e) {
return false;
}
};
/**
* Check if playbackRate is supported in this browser/device.
*
* @return {Boolean}
*/
Html5.canControlPlaybackRate = function () {
// Playback rate API is implemented in Android Chrome, but doesn't do anything
// https://github.com/videojs/video.js/issues/3180
if (browser.IS_ANDROID && browser.IS_CHROME) {
return false;
}
// IE will error if Windows Media Player not installed #3315
try {
var playbackRate = Html5.TEST_VID.playbackRate;
Html5.TEST_VID.playbackRate = playbackRate / 2 + 0.1;
return playbackRate !== Html5.TEST_VID.playbackRate;
} catch (e) {
return false;
}
};
/**
* Check to see if native text tracks are supported by this browser/device
*
* @return {Boolean}
*/
Html5.supportsNativeTextTracks = function () {
var supportsTextTracks = void 0;
// Figure out native text track support
// If mode is a number, we cannot change it because it'll disappear from view.
// Browsers with numeric modes include IE10 and older (<=2013) samsung android models.
// Firefox isn't playing nice either with modifying the mode
// TODO: Investigate firefox: https://github.com/videojs/video.js/issues/1862
supportsTextTracks = !!Html5.TEST_VID.textTracks;
if (supportsTextTracks && Html5.TEST_VID.textTracks.length > 0) {
supportsTextTracks = typeof Html5.TEST_VID.textTracks[0].mode !== 'number';
}
if (supportsTextTracks && browser.IS_FIREFOX) {
supportsTextTracks = false;
}
if (supportsTextTracks && !('onremovetrack' in Html5.TEST_VID.textTracks)) {
supportsTextTracks = false;
}
return supportsTextTracks;
};
/**
* Check to see if native video tracks are supported by this browser/device
*
* @return {Boolean}
*/
Html5.supportsNativeVideoTracks = function () {
var supportsVideoTracks = !!Html5.TEST_VID.videoTracks;
return supportsVideoTracks;
};
/**
* Check to see if native audio tracks are supported by this browser/device
*
* @return {Boolean}
*/
Html5.supportsNativeAudioTracks = function () {
var supportsAudioTracks = !!Html5.TEST_VID.audioTracks;
return supportsAudioTracks;
};
/**
* An array of events available on the Html5 tech.
*
* @private
* @type {Array}
*/
Html5.Events = ['loadstart', 'suspend', 'abort', 'error', 'emptied', 'stalled', 'loadedmetadata', 'loadeddata', 'canplay', 'canplaythrough', 'playing', 'waiting', 'seeking', 'seeked', 'ended', 'durationchange', 'timeupdate', 'progress', 'play', 'pause', 'ratechange', 'volumechange'];
/**
* Set the tech's volume control support status
*
* @type {Boolean}
*/
Html5.prototype.featuresVolumeControl = Html5.canControlVolume();
/**
* Set the tech's playbackRate support status
*
* @type {Boolean}
*/
Html5.prototype.featuresPlaybackRate = Html5.canControlPlaybackRate();
/**
* Set the tech's status on moving the video element.
* In iOS, if you move a video element in the DOM, it breaks video playback.
*
* @type {Boolean}
*/
Html5.prototype.movingMediaElementInDOM = !browser.IS_IOS;
/**
* Set the the tech's fullscreen resize support status.
* HTML video is able to automatically resize when going to fullscreen.
* (No longer appears to be used. Can probably be removed.)
*/
Html5.prototype.featuresFullscreenResize = true;
/**
* Set the tech's progress event support status
* (this disables the manual progress events of the Tech)
*/
Html5.prototype.featuresProgressEvents = true;
/**
* Set the tech's timeupdate event support status
* (this disables the manual timeupdate events of the Tech)
*/
Html5.prototype.featuresTimeupdateEvents = true;
/**
* Sets the tech's status on native text track support
*
* @type {Boolean}
*/
Html5.prototype.featuresNativeTextTracks = Html5.supportsNativeTextTracks();
/**
* Sets the tech's status on native text track support
*
* @type {Boolean}
*/
Html5.prototype.featuresNativeVideoTracks = Html5.supportsNativeVideoTracks();
/**
* Sets the tech's status on native audio track support
*
* @type {Boolean}
*/
Html5.prototype.featuresNativeAudioTracks = Html5.supportsNativeAudioTracks();
// HTML5 Feature detection and Device Fixes --------------------------------- //
var canPlayType = void 0;
var mpegurlRE = /^application\/(?:x-|vnd\.apple\.)mpegurl/i;
var mp4RE = /^video\/mp4/i;
Html5.patchCanPlayType = function () {
// Android 4.0 and above can play HLS to some extent but it reports being unable to do so
if (browser.ANDROID_VERSION >= 4.0 && !browser.IS_FIREFOX) {
if (!canPlayType) {
canPlayType = Html5.TEST_VID.constructor.prototype.canPlayType;
}
Html5.TEST_VID.constructor.prototype.canPlayType = function (type) {
if (type && mpegurlRE.test(type)) {
return 'maybe';
}
return canPlayType.call(this, type);
};
}
// Override Android 2.2 and less canPlayType method which is broken
if (browser.IS_OLD_ANDROID) {
if (!canPlayType) {
canPlayType = Html5.TEST_VID.constructor.prototype.canPlayType;
}
Html5.TEST_VID.constructor.prototype.canPlayType = function (type) {
if (type && mp4RE.test(type)) {
return 'maybe';
}
return canPlayType.call(this, type);
};
}
};
Html5.unpatchCanPlayType = function () {
var r = Html5.TEST_VID.constructor.prototype.canPlayType;
Html5.TEST_VID.constructor.prototype.canPlayType = canPlayType;
canPlayType = null;
return r;
};
// by default, patch the video element
Html5.patchCanPlayType();
Html5.disposeMediaElement = function (el) {
if (!el) {
return;
}
if (el.parentNode) {
el.parentNode.removeChild(el);
}
// remove any child track or source nodes to prevent their loading
while (el.hasChildNodes()) {
el.removeChild(el.firstChild);
}
// remove any src reference. not setting `src=''` because that causes a warning
// in firefox
el.removeAttribute('src');
// force the media element to update its loading state by calling load()
// however IE on Windows 7N has a bug that throws an error so need a try/catch (#793)
if (typeof el.load === 'function') {
// wrapping in an iife so it's not deoptimized (#1060#discussion_r10324473)
(function () {
try {
el.load();
} catch (e) {
// not supported
}
})();
}
};
Html5.resetMediaElement = function (el) {
if (!el) {
return;
}
var sources = el.querySelectorAll('source');
var i = sources.length;
while (i--) {
el.removeChild(sources[i]);
}
// remove any src reference.
// not setting `src=''` because that throws an error
el.removeAttribute('src');
if (typeof el.load === 'function') {
// wrapping in an iife so it's not deoptimized (#1060#discussion_r10324473)
(function () {
try {
el.load();
} catch (e) {
// satisfy linter
}
})();
}
};
/* Native HTML5 element property wrapping ----------------------------------- */
// Wrap native properties with a getter
[
/**
* Paused for html5 tech
*
* @method Html5.prototype.paused
* @return {Boolean}
*/
'paused',
/**
* Get current time
*
* @method Html5.prototype.currentTime
* @return {Number}
*/
'currentTime',
/**
* Get a TimeRange object that represents the intersection
* of the time ranges for which the user agent has all
* relevant media
*
* @return {TimeRangeObject}
* @method Html5.prototype.buffered
*/
'buffered',
/**
* Get volume level
*
* @return {Number}
* @method Html5.prototype.volume
*/
'volume',
/**
* Get if muted
*
* @return {Boolean}
* @method Html5.prototype.muted
*/
'muted',
/**
* Get poster
*
* @return {String}
* @method Html5.prototype.poster
*/
'poster',
/**
* Get preload attribute
*
* @return {String}
* @method Html5.prototype.preload
*/
'preload',
/**
* Get autoplay attribute
*
* @return {String}
* @method Html5.prototype.autoplay
*/
'autoplay',
/**
* Get controls attribute
*
* @return {String}
* @method Html5.prototype.controls
*/
'controls',
/**
* Get loop attribute
*
* @return {String}
* @method Html5.prototype.loop
*/
'loop',
/**
* Get error value
*
* @return {String}
* @method Html5.prototype.error
*/
'error',
/**
* Get whether or not the player is in the "seeking" state
*
* @return {Boolean}
* @method Html5.prototype.seeking
*/
'seeking',
/**
* Get a TimeRanges object that represents the
* ranges of the media resource to which it is possible
* for the user agent to seek.
*
* @return {TimeRangeObject}
* @method Html5.prototype.seekable
*/
'seekable',
/**
* Get if video ended
*
* @return {Boolean}
* @method Html5.prototype.ended
*/
'ended',
/**
* Get the value of the muted content attribute
* This attribute has no dynamic effect, it only
* controls the default state of the element
*
* @return {Boolean}
* @method Html5.prototype.defaultMuted
*/
'defaultMuted',
/**
* Get desired speed at which the media resource is to play
*
* @return {Number}
* @method Html5.prototype.playbackRate
*/
'playbackRate',
/**
* Returns a TimeRanges object that represents the ranges of the
* media resource that the user agent has played.
* @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-played
*
* @return {TimeRangeObject} the range of points on the media
* timeline that has been reached through
* normal playback
* @method Html5.prototype.played
*/
'played',
/**
* Get the current state of network activity for the element, from
* the list below
* - NETWORK_EMPTY (numeric value 0)
* - NETWORK_IDLE (numeric value 1)
* - NETWORK_LOADING (numeric value 2)
* - NETWORK_NO_SOURCE (numeric value 3)
*
* @return {Number}
* @method Html5.prototype.networkState
*/
'networkState',
/**
* Get a value that expresses the current state of the element
* with respect to rendering the current playback position, from
* the codes in the list below
* - HAVE_NOTHING (numeric value 0)
* - HAVE_METADATA (numeric value 1)
* - HAVE_CURRENT_DATA (numeric value 2)
* - HAVE_FUTURE_DATA (numeric value 3)
* - HAVE_ENOUGH_DATA (numeric value 4)
*
* @return {Number}
* @method Html5.prototype.readyState
*/
'readyState',
/**
* Get width of video
*
* @return {Number}
* @method Html5.prototype.videoWidth
*/
'videoWidth',
/**
* Get height of video
*
* @return {Number}
* @method Html5.prototype.videoHeight
*/
'videoHeight'].forEach(function (prop) {
Html5.prototype[prop] = function () {
return this.el_[prop];
};
});
// Wrap native properties with a setter in this format:
// set + toTitleCase(name)
[
/**
* Set volume level
*
* @param {Number} percentAsDecimal Volume percent as a decimal
* @method Html5.prototype.setVolume
*/
'volume',
/**
* Set muted
*
* @param {Boolean} muted If player is to be muted or note
* @method Html5.prototype.setMuted
*/
'muted',
/**
* Set video source
*
* @param {Object} src Source object
* @deprecated since version 5
* @method Html5.prototype.setSrc
*/
'src',
/**
* Set poster
*
* @param {String} val URL to poster image
* @method Html5.prototype.setPoster
*/
'poster',
/**
* Set preload attribute
*
* @param {String} val Value for the preload attribute
* @method Htm5.prototype.setPreload
*/
'preload',
/**
* Set autoplay attribute
*
* @param {Boolean} autoplay Value for the autoplay attribute
* @method setAutoplay
*/
'autoplay',
/**
* Set loop attribute
*
* @param {Boolean} loop Value for the loop attribute
* @method Html5.prototype.setLoop
*/
'loop',
/**
* Set desired speed at which the media resource is to play
*
* @param {Number} val Speed at which the media resource is to play
* @method Html5.prototype.setPlaybackRate
*/
'playbackRate'].forEach(function (prop) {
Html5.prototype['set' + (0, _toTitleCase2['default'])(prop)] = function (v) {
this.el_[prop] = v;
};
});
// wrap native functions with a function
[
/**
* Pause for html5 tech
*
* @method Html5.prototype.pause
*/
'pause',
/**
* Load media into player
*
* @method Html5.prototype.load
*/
'load'].forEach(function (prop) {
Html5.prototype[prop] = function () {
return this.el_[prop]();
};
});
_component2['default'].registerComponent('Html5', Html5);
_tech2['default'].registerTech('Html5', Html5);
exports['default'] = Html5;
},{"136":136,"146":146,"5":5,"62":62,"78":78,"80":80,"82":82,"85":85,"86":86,"89":89,"90":90,"92":92,"93":93}],61:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _tech = _dereq_(62);
var _tech2 = _interopRequireDefault(_tech);
var _toTitleCase = _dereq_(89);
var _toTitleCase2 = _interopRequireDefault(_toTitleCase);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file loader.js
*/
/**
* The Media Loader is the component that decides which playback technology to load
* when the player is initialized.
*
* @param {Object} player Main Player
* @param {Object=} options Object of option names and values
* @param {Function=} ready Ready callback function
* @extends Component
* @class MediaLoader
*/
var MediaLoader = function (_Component) {
_inherits(MediaLoader, _Component);
function MediaLoader(player, options, ready) {
_classCallCheck(this, MediaLoader);
// If there are no sources when the player is initialized,
// load the first supported playback technology.
var _this = _possibleConstructorReturn(this, _Component.call(this, player, options, ready));
if (!options.playerOptions.sources || options.playerOptions.sources.length === 0) {
for (var i = 0, j = options.playerOptions.techOrder; i < j.length; i++) {
var techName = (0, _toTitleCase2['default'])(j[i]);
var tech = _tech2['default'].getTech(techName);
// Support old behavior of techs being registered as components.
// Remove once that deprecated behavior is removed.
if (!techName) {
tech = _component2['default'].getComponent(techName);
}
// Check if the browser supports this technology
if (tech && tech.isSupported()) {
player.loadTech_(techName);
break;
}
}
} else {
// Loop through playback technologies (HTML5, Flash) and check for support.
// Then load the best source.
// A few assumptions here:
// All playback technologies respect preload false.
player.src(options.playerOptions.sources);
}
return _this;
}
return MediaLoader;
}(_component2['default']);
_component2['default'].registerComponent('MediaLoader', MediaLoader);
exports['default'] = MediaLoader;
},{"5":5,"62":62,"89":89}],62:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _htmlTrackElement = _dereq_(66);
var _htmlTrackElement2 = _interopRequireDefault(_htmlTrackElement);
var _htmlTrackElementList = _dereq_(65);
var _htmlTrackElementList2 = _interopRequireDefault(_htmlTrackElementList);
var _mergeOptions = _dereq_(86);
var _mergeOptions2 = _interopRequireDefault(_mergeOptions);
var _textTrack = _dereq_(72);
var _textTrack2 = _interopRequireDefault(_textTrack);
var _textTrackList = _dereq_(70);
var _textTrackList2 = _interopRequireDefault(_textTrackList);
var _videoTrackList = _dereq_(76);
var _videoTrackList2 = _interopRequireDefault(_videoTrackList);
var _audioTrackList = _dereq_(63);
var _audioTrackList2 = _interopRequireDefault(_audioTrackList);
var _fn = _dereq_(82);
var Fn = _interopRequireWildcard(_fn);
var _log = _dereq_(85);
var _log2 = _interopRequireDefault(_log);
var _timeRanges = _dereq_(88);
var _buffer = _dereq_(79);
var _mediaError = _dereq_(46);
var _mediaError2 = _interopRequireDefault(_mediaError);
var _window = _dereq_(93);
var _window2 = _interopRequireDefault(_window);
var _document = _dereq_(92);
var _document2 = _interopRequireDefault(_document);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file tech.js
* Media Technology Controller - Base class for media playback
* technology controllers like Flash and HTML5
*/
function createTrackHelper(self, kind, label, language) {
var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
var tracks = self.textTracks();
options.kind = kind;
if (label) {
options.label = label;
}
if (language) {
options.language = language;
}
options.tech = self;
var track = new _textTrack2['default'](options);
tracks.addTrack_(track);
return track;
}
/**
* Base class for media (HTML5 Video, Flash) controllers
*
* @param {Object=} options Options object
* @param {Function=} ready Ready callback function
* @extends Component
* @class Tech
*/
var Tech = function (_Component) {
_inherits(Tech, _Component);
function Tech() {
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var ready = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
_classCallCheck(this, Tech);
// we don't want the tech to report user activity automatically.
// This is done manually in addControlsListeners
options.reportTouchActivity = false;
// keep track of whether the current source has played at all to
// implement a very limited played()
var _this = _possibleConstructorReturn(this, _Component.call(this, null, options, ready));
_this.hasStarted_ = false;
_this.on('playing', function () {
this.hasStarted_ = true;
});
_this.on('loadstart', function () {
this.hasStarted_ = false;
});
_this.textTracks_ = options.textTracks;
_this.videoTracks_ = options.videoTracks;
_this.audioTracks_ = options.audioTracks;
// Manually track progress in cases where the browser/flash player doesn't report it.
if (!_this.featuresProgressEvents) {
_this.manualProgressOn();
}
// Manually track timeupdates in cases where the browser/flash player doesn't report it.
if (!_this.featuresTimeupdateEvents) {
_this.manualTimeUpdatesOn();
}
if (options.nativeCaptions === false || options.nativeTextTracks === false) {
_this.featuresNativeTextTracks = false;
}
if (!_this.featuresNativeTextTracks) {
_this.on('ready', _this.emulateTextTracks);
}
_this.initTextTrackListeners();
_this.initTrackListeners();
// Turn on component tap events
_this.emitTapEvents();
return _this;
}
/* Fallbacks for unsupported event types
================================================================================ */
// Manually trigger progress events based on changes to the buffered amount
// Many flash players and older HTML5 browsers don't send progress or progress-like events
/**
* Turn on progress events
*
* @method manualProgressOn
*/
Tech.prototype.manualProgressOn = function manualProgressOn() {
this.on('durationchange', this.onDurationChange);
this.manualProgress = true;
// Trigger progress watching when a source begins loading
this.one('ready', this.trackProgress);
};
/**
* Turn off progress events
*
* @method manualProgressOff
*/
Tech.prototype.manualProgressOff = function manualProgressOff() {
this.manualProgress = false;
this.stopTrackingProgress();
this.off('durationchange', this.onDurationChange);
};
/**
* Track progress
*
* @method trackProgress
*/
Tech.prototype.trackProgress = function trackProgress() {
this.stopTrackingProgress();
this.progressInterval = this.setInterval(Fn.bind(this, function () {
// Don't trigger unless buffered amount is greater than last time
var numBufferedPercent = this.bufferedPercent();
if (this.bufferedPercent_ !== numBufferedPercent) {
this.trigger('progress');
}
this.bufferedPercent_ = numBufferedPercent;
if (numBufferedPercent === 1) {
this.stopTrackingProgress();
}
}), 500);
};
/**
* Update duration
*
* @method onDurationChange
*/
Tech.prototype.onDurationChange = function onDurationChange() {
this.duration_ = this.duration();
};
/**
* Create and get TimeRange object for buffering
*
* @return {TimeRangeObject}
* @method buffered
*/
Tech.prototype.buffered = function buffered() {
return (0, _timeRanges.createTimeRange)(0, 0);
};
/**
* Get buffered percent
*
* @return {Number}
* @method bufferedPercent
*/
Tech.prototype.bufferedPercent = function bufferedPercent() {
return (0, _buffer.bufferedPercent)(this.buffered(), this.duration_);
};
/**
* Stops tracking progress by clearing progress interval
*
* @method stopTrackingProgress
*/
Tech.prototype.stopTrackingProgress = function stopTrackingProgress() {
this.clearInterval(this.progressInterval);
};
/**
* Set event listeners for on play and pause and tracking current time
*
* @method manualTimeUpdatesOn
*/
Tech.prototype.manualTimeUpdatesOn = function manualTimeUpdatesOn() {
this.manualTimeUpdates = true;
this.on('play', this.trackCurrentTime);
this.on('pause', this.stopTrackingCurrentTime);
};
/**
* Remove event listeners for on play and pause and tracking current time
*
* @method manualTimeUpdatesOff
*/
Tech.prototype.manualTimeUpdatesOff = function manualTimeUpdatesOff() {
this.manualTimeUpdates = false;
this.stopTrackingCurrentTime();
this.off('play', this.trackCurrentTime);
this.off('pause', this.stopTrackingCurrentTime);
};
/**
* Tracks current time
*
* @method trackCurrentTime
*/
Tech.prototype.trackCurrentTime = function trackCurrentTime() {
if (this.currentTimeInterval) {
this.stopTrackingCurrentTime();
}
this.currentTimeInterval = this.setInterval(function () {
this.trigger({ type: 'timeupdate', target: this, manuallyTriggered: true });
// 42 = 24 fps // 250 is what Webkit uses // FF uses 15
}, 250);
};
/**
* Turn off play progress tracking (when paused or dragging)
*
* @method stopTrackingCurrentTime
*/
Tech.prototype.stopTrackingCurrentTime = function stopTrackingCurrentTime() {
this.clearInterval(this.currentTimeInterval);
// #1002 - if the video ends right before the next timeupdate would happen,
// the progress bar won't make it all the way to the end
this.trigger({ type: 'timeupdate', target: this, manuallyTriggered: true });
};
/**
* Turn off any manual progress or timeupdate tracking
*
* @method dispose
*/
Tech.prototype.dispose = function dispose() {
// clear out all tracks because we can't reuse them between techs
this.clearTracks(['audio', 'video', 'text']);
// Turn off any manual progress or timeupdate tracking
if (this.manualProgress) {
this.manualProgressOff();
}
if (this.manualTimeUpdates) {
this.manualTimeUpdatesOff();
}
_Component.prototype.dispose.call(this);
};
/**
* clear out a track list, or multiple track lists
*
* Note: Techs without source handlers should call this between
* sources for video & audio tracks, as usually you don't want
* to use them between tracks and we have no automatic way to do
* it for you
*
* @method clearTracks
* @param {Array|String} types type(s) of track lists to empty
*/
Tech.prototype.clearTracks = function clearTracks(types) {
var _this2 = this;
types = [].concat(types);
// clear out all tracks because we can't reuse them between techs
types.forEach(function (type) {
var list = _this2[type + 'Tracks']() || [];
var i = list.length;
while (i--) {
var track = list[i];
if (type === 'text') {
_this2.removeRemoteTextTrack(track);
}
list.removeTrack_(track);
}
});
};
/**
* Reset the tech. Removes all sources and resets readyState.
*
* @method reset
*/
Tech.prototype.reset = function reset() {};
/**
* When invoked without an argument, returns a MediaError object
* representing the current error state of the player or null if
* there is no error. When invoked with an argument, set the current
* error state of the player.
* @param {MediaError=} err Optional an error object
* @return {MediaError} the current error object or null
* @method error
*/
Tech.prototype.error = function error(err) {
if (err !== undefined) {
this.error_ = new _mediaError2['default'](err);
this.trigger('error');
}
return this.error_;
};
/**
* Return the time ranges that have been played through for the
* current source. This implementation is incomplete. It does not
* track the played time ranges, only whether the source has played
* at all or not.
* @return {TimeRangeObject} a single time range if this video has
* played or an empty set of ranges if not.
* @method played
*/
Tech.prototype.played = function played() {
if (this.hasStarted_) {
return (0, _timeRanges.createTimeRange)(0, 0);
}
return (0, _timeRanges.createTimeRange)();
};
/**
* Set current time
*
* @method setCurrentTime
*/
Tech.prototype.setCurrentTime = function setCurrentTime() {
// improve the accuracy of manual timeupdates
if (this.manualTimeUpdates) {
this.trigger({ type: 'timeupdate', target: this, manuallyTriggered: true });
}
};
/**
* Initialize texttrack listeners
*
* @method initTextTrackListeners
*/
Tech.prototype.initTextTrackListeners = function initTextTrackListeners() {
var textTrackListChanges = Fn.bind(this, function () {
this.trigger('texttrackchange');
});
var tracks = this.textTracks();
if (!tracks) {
return;
}
tracks.addEventListener('removetrack', textTrackListChanges);
tracks.addEventListener('addtrack', textTrackListChanges);
this.on('dispose', Fn.bind(this, function () {
tracks.removeEventListener('removetrack', textTrackListChanges);
tracks.removeEventListener('addtrack', textTrackListChanges);
}));
};
/**
* Initialize audio and video track listeners
*
* @method initTrackListeners
*/
Tech.prototype.initTrackListeners = function initTrackListeners() {
var _this3 = this;
var trackTypes = ['video', 'audio'];
trackTypes.forEach(function (type) {
var trackListChanges = function trackListChanges() {
_this3.trigger(type + 'trackchange');
};
var tracks = _this3[type + 'Tracks']();
tracks.addEventListener('removetrack', trackListChanges);
tracks.addEventListener('addtrack', trackListChanges);
_this3.on('dispose', function () {
tracks.removeEventListener('removetrack', trackListChanges);
tracks.removeEventListener('addtrack', trackListChanges);
});
});
};
/**
* Emulate texttracks
*
* @method emulateTextTracks
*/
Tech.prototype.emulateTextTracks = function emulateTextTracks() {
var _this4 = this;
var tracks = this.textTracks();
if (!tracks) {
return;
}
if (!_window2['default'].WebVTT && this.el().parentNode !== null && this.el().parentNode !== undefined) {
(function () {
var script = _document2['default'].createElement('script');
script.src = _this4.options_['vtt.js'] || 'https://cdn.rawgit.com/gkatsev/vtt.js/vjs-v0.12.1/dist/vtt.min.js';
script.onload = function () {
_this4.trigger('vttjsloaded');
};
script.onerror = function () {
_this4.trigger('vttjserror');
};
_this4.on('dispose', function () {
script.onload = null;
script.onerror = null;
});
// but have not loaded yet and we set it to true before the inject so that
// we don't overwrite the injected window.WebVTT if it loads right away
_window2['default'].WebVTT = true;
_this4.el().parentNode.appendChild(script);
})();
}
var updateDisplay = function updateDisplay() {
return _this4.trigger('texttrackchange');
};
var textTracksChanges = function textTracksChanges() {
updateDisplay();
for (var i = 0; i < tracks.length; i++) {
var track = tracks[i];
track.removeEventListener('cuechange', updateDisplay);
if (track.mode === 'showing') {
track.addEventListener('cuechange', updateDisplay);
}
}
};
textTracksChanges();
tracks.addEventListener('change', textTracksChanges);
this.on('dispose', function () {
tracks.removeEventListener('change', textTracksChanges);
});
};
/**
* Get videotracks
*
* @returns {VideoTrackList}
* @method videoTracks
*/
Tech.prototype.videoTracks = function videoTracks() {
this.videoTracks_ = this.videoTracks_ || new _videoTrackList2['default']();
return this.videoTracks_;
};
/**
* Get audiotracklist
*
* @returns {AudioTrackList}
* @method audioTracks
*/
Tech.prototype.audioTracks = function audioTracks() {
this.audioTracks_ = this.audioTracks_ || new _audioTrackList2['default']();
return this.audioTracks_;
};
/*
* Provide default methods for text tracks.
*
* Html5 tech overrides these.
*/
/**
* Get texttracks
*
* @returns {TextTrackList}
* @method textTracks
*/
Tech.prototype.textTracks = function textTracks() {
this.textTracks_ = this.textTracks_ || new _textTrackList2['default']();
return this.textTracks_;
};
/**
* Get remote texttracks
*
* @returns {TextTrackList}
* @method remoteTextTracks
*/
Tech.prototype.remoteTextTracks = function remoteTextTracks() {
this.remoteTextTracks_ = this.remoteTextTracks_ || new _textTrackList2['default']();
return this.remoteTextTracks_;
};
/**
* Get remote htmltrackelements
*
* @returns {HTMLTrackElementList}
* @method remoteTextTrackEls
*/
Tech.prototype.remoteTextTrackEls = function remoteTextTrackEls() {
this.remoteTextTrackEls_ = this.remoteTextTrackEls_ || new _htmlTrackElementList2['default']();
return this.remoteTextTrackEls_;
};
/**
* Creates and returns a remote text track object
*
* @param {String} kind Text track kind (subtitles, captions, descriptions
* chapters and metadata)
* @param {String=} label Label to identify the text track
* @param {String=} language Two letter language abbreviation
* @return {TextTrackObject}
* @method addTextTrack
*/
Tech.prototype.addTextTrack = function addTextTrack(kind, label, language) {
if (!kind) {
throw new Error('TextTrack kind is required but was not provided');
}
return createTrackHelper(this, kind, label, language);
};
/**
* Creates a remote text track object and returns a emulated html track element
*
* @param {Object} options The object should contain values for
* kind, language, label and src (location of the WebVTT file)
* @return {HTMLTrackElement}
* @method addRemoteTextTrack
*/
Tech.prototype.addRemoteTextTrack = function addRemoteTextTrack(options) {
var track = (0, _mergeOptions2['default'])(options, {
tech: this
});
var htmlTrackElement = new _htmlTrackElement2['default'](track);
// store HTMLTrackElement and TextTrack to remote list
this.remoteTextTrackEls().addTrackElement_(htmlTrackElement);
this.remoteTextTracks().addTrack_(htmlTrackElement.track);
// must come after remoteTextTracks()
this.textTracks().addTrack_(htmlTrackElement.track);
return htmlTrackElement;
};
/**
* Remove remote texttrack
*
* @param {TextTrackObject} track Texttrack to remove
* @method removeRemoteTextTrack
*/
Tech.prototype.removeRemoteTextTrack = function removeRemoteTextTrack(track) {
this.textTracks().removeTrack_(track);
var trackElement = this.remoteTextTrackEls().getTrackElementByTrack_(track);
// remove HTMLTrackElement and TextTrack from remote list
this.remoteTextTrackEls().removeTrackElement_(trackElement);
this.remoteTextTracks().removeTrack_(track);
};
/**
* Provide a default setPoster method for techs
* Poster support for techs should be optional, so we don't want techs to
* break if they don't have a way to set a poster.
*
* @method setPoster
*/
Tech.prototype.setPoster = function setPoster() {};
/*
* Check if the tech can support the given type
*
* The base tech does not support any type, but source handlers might
* overwrite this.
*
* @param {String} type The mimetype to check
* @return {String} 'probably', 'maybe', or '' (empty string)
*/
Tech.prototype.canPlayType = function canPlayType() {
return '';
};
/*
* Return whether the argument is a Tech or not.
* Can be passed either a Class like `Html5` or a instance like `player.tech_`
*
* @param {Object} component An item to check
* @return {Boolean} Whether it is a tech or not
*/
Tech.isTech = function isTech(component) {
return component.prototype instanceof Tech || component instanceof Tech || component === Tech;
};
/**
* Registers a Tech
*
* @param {String} name Name of the Tech to register
* @param {Object} tech The tech to register
* @static
* @method registerComponent
*/
Tech.registerTech = function registerTech(name, tech) {
if (!Tech.techs_) {
Tech.techs_ = {};
}
if (!Tech.isTech(tech)) {
throw new Error('Tech ' + name + ' must be a Tech');
}
Tech.techs_[name] = tech;
return tech;
};
/**
* Gets a component by name
*
* @param {String} name Name of the component to get
* @return {Component}
* @static
* @method getComponent
*/
Tech.getTech = function getTech(name) {
if (Tech.techs_ && Tech.techs_[name]) {
return Tech.techs_[name];
}
if (_window2['default'] && _window2['default'].videojs && _window2['default'].videojs[name]) {
_log2['default'].warn('The ' + name + ' tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)');
return _window2['default'].videojs[name];
}
};
return Tech;
}(_component2['default']);
/**
* List of associated text tracks
*
* @type {TextTrackList}
* @private
*/
Tech.prototype.textTracks_; // eslint-disable-line
/**
* List of associated audio tracks
*
* @type {AudioTrackList}
* @private
*/
Tech.prototype.audioTracks_; // eslint-disable-line
/**
* List of associated video tracks
*
* @type {VideoTrackList}
* @private
*/
Tech.prototype.videoTracks_; // eslint-disable-line
Tech.prototype.featuresVolumeControl = true;
// Resizing plugins using request fullscreen reloads the plugin
Tech.prototype.featuresFullscreenResize = false;
Tech.prototype.featuresPlaybackRate = false;
// Optional events that we can manually mimic with timers
// currently not triggered by video-js-swf
Tech.prototype.featuresProgressEvents = false;
Tech.prototype.featuresTimeupdateEvents = false;
Tech.prototype.featuresNativeTextTracks = false;
/**
* A functional mixin for techs that want to use the Source Handler pattern.
*
* ##### EXAMPLE:
*
* Tech.withSourceHandlers.call(MyTech);
*
*/
Tech.withSourceHandlers = function (_Tech) {
/**
* Register a source handler
* Source handlers are scripts for handling specific formats.
* The source handler pattern is used for adaptive formats (HLS, DASH) that
* manually load video data and feed it into a Source Buffer (Media Source Extensions)
* @param {Function} handler The source handler
* @param {Boolean} first Register it before any existing handlers
*/
_Tech.registerSourceHandler = function (handler, index) {
var handlers = _Tech.sourceHandlers;
if (!handlers) {
handlers = _Tech.sourceHandlers = [];
}
if (index === undefined) {
// add to the end of the list
index = handlers.length;
}
handlers.splice(index, 0, handler);
};
/**
* Check if the tech can support the given type
* @param {String} type The mimetype to check
* @return {String} 'probably', 'maybe', or '' (empty string)
*/
_Tech.canPlayType = function (type) {
var handlers = _Tech.sourceHandlers || [];
var can = void 0;
for (var i = 0; i < handlers.length; i++) {
can = handlers[i].canPlayType(type);
if (can) {
return can;
}
}
return '';
};
/**
* Return the first source handler that supports the source
* TODO: Answer question: should 'probably' be prioritized over 'maybe'
* @param {Object} source The source object
* @param {Object} options The options passed to the tech
* @returns {Object} The first source handler that supports the source
* @returns {null} Null if no source handler is found
*/
_Tech.selectSourceHandler = function (source, options) {
var handlers = _Tech.sourceHandlers || [];
var can = void 0;
for (var i = 0; i < handlers.length; i++) {
can = handlers[i].canHandleSource(source, options);
if (can) {
return handlers[i];
}
}
return null;
};
/**
* Check if the tech can support the given source
* @param {Object} srcObj The source object
* @param {Object} options The options passed to the tech
* @return {String} 'probably', 'maybe', or '' (empty string)
*/
_Tech.canPlaySource = function (srcObj, options) {
var sh = _Tech.selectSourceHandler(srcObj, options);
if (sh) {
return sh.canHandleSource(srcObj, options);
}
return '';
};
/**
* When using a source handler, prefer its implementation of
* any function normally provided by the tech.
*/
var deferrable = ['seekable', 'duration'];
deferrable.forEach(function (fnName) {
var originalFn = this[fnName];
if (typeof originalFn !== 'function') {
return;
}
this[fnName] = function () {
if (this.sourceHandler_ && this.sourceHandler_[fnName]) {
return this.sourceHandler_[fnName].apply(this.sourceHandler_, arguments);
}
return originalFn.apply(this, arguments);
};
}, _Tech.prototype);
/**
* Create a function for setting the source using a source object
* and source handlers.
* Should never be called unless a source handler was found.
* @param {Object} source A source object with src and type keys
* @return {Tech} self
*/
_Tech.prototype.setSource = function (source) {
var sh = _Tech.selectSourceHandler(source, this.options_);
if (!sh) {
// Fall back to a native source hander when unsupported sources are
// deliberately set
if (_Tech.nativeSourceHandler) {
sh = _Tech.nativeSourceHandler;
} else {
_log2['default'].error('No source hander found for the current source.');
}
}
// Dispose any existing source handler
this.disposeSourceHandler();
this.off('dispose', this.disposeSourceHandler);
// if we have a source and get another one
// then we are loading something new
// than clear all of our current tracks
if (this.currentSource_) {
this.clearTracks(['audio', 'video']);
this.currentSource_ = null;
}
if (sh !== _Tech.nativeSourceHandler) {
this.currentSource_ = source;
// Catch if someone replaced the src without calling setSource.
// If they do, set currentSource_ to null and dispose our source handler.
this.off(this.el_, 'loadstart', _Tech.prototype.firstLoadStartListener_);
this.off(this.el_, 'loadstart', _Tech.prototype.successiveLoadStartListener_);
this.one(this.el_, 'loadstart', _Tech.prototype.firstLoadStartListener_);
}
this.sourceHandler_ = sh.handleSource(source, this, this.options_);
this.on('dispose', this.disposeSourceHandler);
return this;
};
// On the first loadstart after setSource
_Tech.prototype.firstLoadStartListener_ = function () {
this.one(this.el_, 'loadstart', _Tech.prototype.successiveLoadStartListener_);
};
// On successive loadstarts when setSource has not been called again
_Tech.prototype.successiveLoadStartListener_ = function () {
this.currentSource_ = null;
this.disposeSourceHandler();
this.one(this.el_, 'loadstart', _Tech.prototype.successiveLoadStartListener_);
};
/*
* Clean up any existing source handler
*/
_Tech.prototype.disposeSourceHandler = function () {
if (this.sourceHandler_ && this.sourceHandler_.dispose) {
this.off(this.el_, 'loadstart', _Tech.prototype.firstLoadStartListener_);
this.off(this.el_, 'loadstart', _Tech.prototype.successiveLoadStartListener_);
this.sourceHandler_.dispose();
this.sourceHandler_ = null;
}
};
};
_component2['default'].registerComponent('Tech', Tech);
// Old name for Tech
_component2['default'].registerComponent('MediaTechController', Tech);
Tech.registerTech('Tech', Tech);
exports['default'] = Tech;
},{"46":46,"5":5,"63":63,"65":65,"66":66,"70":70,"72":72,"76":76,"79":79,"82":82,"85":85,"86":86,"88":88,"92":92,"93":93}],63:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _trackList = _dereq_(74);
var _trackList2 = _interopRequireDefault(_trackList);
var _browser = _dereq_(78);
var browser = _interopRequireWildcard(_browser);
var _document = _dereq_(92);
var _document2 = _interopRequireDefault(_document);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file audio-track-list.js
*/
/**
* anywhere we call this function we diverge from the spec
* as we only support one enabled audiotrack at a time
*
* @param {Array|AudioTrackList} list list to work on
* @param {AudioTrack} track the track to skip
*/
var disableOthers = function disableOthers(list, track) {
for (var i = 0; i < list.length; i++) {
if (track.id === list[i].id) {
continue;
}
// another audio track is enabled, disable it
list[i].enabled = false;
}
};
/**
* A list of possible audio tracks. All functionality is in the
* base class Tracklist and the spec for AudioTrackList is located at:
* @link https://html.spec.whatwg.org/multipage/embedded-content.html#audiotracklist
*
* interface AudioTrackList : EventTarget {
* readonly attribute unsigned long length;
* getter AudioTrack (unsigned long index);
* AudioTrack? getTrackById(DOMString id);
*
* attribute EventHandler onchange;
* attribute EventHandler onaddtrack;
* attribute EventHandler onremovetrack;
* };
*
* @param {AudioTrack[]} tracks a list of audio tracks to instantiate the list with
* @extends TrackList
* @class AudioTrackList
*/
var AudioTrackList = function (_TrackList) {
_inherits(AudioTrackList, _TrackList);
function AudioTrackList() {
var _this, _ret;
var tracks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
_classCallCheck(this, AudioTrackList);
var list = void 0;
// make sure only 1 track is enabled
// sorted from last index to first index
for (var i = tracks.length - 1; i >= 0; i--) {
if (tracks[i].enabled) {
disableOthers(tracks, tracks[i]);
break;
}
}
// IE8 forces us to implement inheritance ourselves
// as it does not support Object.defineProperty properly
if (browser.IS_IE8) {
list = _document2['default'].createElement('custom');
for (var prop in _trackList2['default'].prototype) {
if (prop !== 'constructor') {
list[prop] = _trackList2['default'].prototype[prop];
}
}
for (var _prop in AudioTrackList.prototype) {
if (_prop !== 'constructor') {
list[_prop] = AudioTrackList.prototype[_prop];
}
}
}
list = (_this = _possibleConstructorReturn(this, _TrackList.call(this, tracks, list)), _this);
list.changing_ = false;
return _ret = list, _possibleConstructorReturn(_this, _ret);
}
AudioTrackList.prototype.addTrack_ = function addTrack_(track) {
var _this2 = this;
if (track.enabled) {
disableOthers(this, track);
}
_TrackList.prototype.addTrack_.call(this, track);
// native tracks don't have this
if (!track.addEventListener) {
return;
}
track.addEventListener('enabledchange', function () {
// when we are disabling other tracks (since we don't support
// more than one track at a time) we will set changing_
// to true so that we don't trigger additional change events
if (_this2.changing_) {
return;
}
_this2.changing_ = true;
disableOthers(_this2, track);
_this2.changing_ = false;
_this2.trigger('change');
});
};
AudioTrackList.prototype.addTrack = function addTrack(track) {
this.addTrack_(track);
};
AudioTrackList.prototype.removeTrack = function removeTrack(track) {
_TrackList.prototype.removeTrack_.call(this, track);
};
return AudioTrackList;
}(_trackList2['default']);
exports['default'] = AudioTrackList;
},{"74":74,"78":78,"92":92}],64:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _trackEnums = _dereq_(73);
var _track = _dereq_(75);
var _track2 = _interopRequireDefault(_track);
var _mergeOptions = _dereq_(86);
var _mergeOptions2 = _interopRequireDefault(_mergeOptions);
var _browser = _dereq_(78);
var browser = _interopRequireWildcard(_browser);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
/**
* A single audio text track as defined in:
* @link https://html.spec.whatwg.org/multipage/embedded-content.html#audiotrack
*
* interface AudioTrack {
* readonly attribute DOMString id;
* readonly attribute DOMString kind;
* readonly attribute DOMString label;
* readonly attribute DOMString language;
* attribute boolean enabled;
* };
*
* @param {Object=} options Object of option names and values
* @class AudioTrack
*/
var AudioTrack = function (_Track) {
_inherits(AudioTrack, _Track);
function AudioTrack() {
var _this, _ret;
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
_classCallCheck(this, AudioTrack);
var settings = (0, _mergeOptions2['default'])(options, {
kind: _trackEnums.AudioTrackKind[options.kind] || ''
});
// on IE8 this will be a document element
// for every other browser this will be a normal object
var track = (_this = _possibleConstructorReturn(this, _Track.call(this, settings)), _this);
var enabled = false;
if (browser.IS_IE8) {
for (var prop in AudioTrack.prototype) {
if (prop !== 'constructor') {
track[prop] = AudioTrack.prototype[prop];
}
}
}
Object.defineProperty(track, 'enabled', {
get: function get() {
return enabled;
},
set: function set(newEnabled) {
// an invalid or unchanged value
if (typeof newEnabled !== 'boolean' || newEnabled === enabled) {
return;
}
enabled = newEnabled;
this.trigger('enabledchange');
}
});
// if the user sets this track to selected then
// set selected to that true value otherwise
// we keep it false
if (settings.enabled) {
track.enabled = settings.enabled;
}
track.loaded_ = true;
return _ret = track, _possibleConstructorReturn(_this, _ret);
}
return AudioTrack;
}(_track2['default']);
exports['default'] = AudioTrack;
},{"73":73,"75":75,"78":78,"86":86}],65:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _browser = _dereq_(78);
var browser = _interopRequireWildcard(_browser);
var _document = _dereq_(92);
var _document2 = _interopRequireDefault(_document);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } /**
* @file html-track-element-list.js
*/
var HtmlTrackElementList = function () {
function HtmlTrackElementList() {
var trackElements = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
_classCallCheck(this, HtmlTrackElementList);
var list = this; // eslint-disable-line
if (browser.IS_IE8) {
list = _document2['default'].createElement('custom');
for (var prop in HtmlTrackElementList.prototype) {
if (prop !== 'constructor') {
list[prop] = HtmlTrackElementList.prototype[prop];
}
}
}
list.trackElements_ = [];
Object.defineProperty(list, 'length', {
get: function get() {
return this.trackElements_.length;
}
});
for (var i = 0, length = trackElements.length; i < length; i++) {
list.addTrackElement_(trackElements[i]);
}
if (browser.IS_IE8) {
return list;
}
}
HtmlTrackElementList.prototype.addTrackElement_ = function addTrackElement_(trackElement) {
this.trackElements_.push(trackElement);
};
HtmlTrackElementList.prototype.getTrackElementByTrack_ = function getTrackElementByTrack_(track) {
var trackElement_ = void 0;
for (var i = 0, length = this.trackElements_.length; i < length; i++) {
if (track === this.trackElements_[i].track) {
trackElement_ = this.trackElements_[i];
break;
}
}
return trackElement_;
};
HtmlTrackElementList.prototype.removeTrackElement_ = function removeTrackElement_(trackElement) {
for (var i = 0, length = this.trackElements_.length; i < length; i++) {
if (trackElement === this.trackElements_[i]) {
this.trackElements_.splice(i, 1);
break;
}
}
};
return HtmlTrackElementList;
}();
exports['default'] = HtmlTrackElementList;
},{"78":78,"92":92}],66:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _browser = _dereq_(78);
var browser = _interopRequireWildcard(_browser);
var _document = _dereq_(92);
var _document2 = _interopRequireDefault(_document);
var _eventTarget = _dereq_(42);
var _eventTarget2 = _interopRequireDefault(_eventTarget);
var _textTrack = _dereq_(72);
var _textTrack2 = _interopRequireDefault(_textTrack);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file html-track-element.js
*/
var NONE = 0;
var LOADING = 1;
var LOADED = 2;
var ERROR = 3;
/**
* https://html.spec.whatwg.org/multipage/embedded-content.html#htmltrackelement
*
* interface HTMLTrackElement : HTMLElement {
* attribute DOMString kind;
* attribute DOMString src;
* attribute DOMString srclang;
* attribute DOMString label;
* attribute boolean default;
*
* const unsigned short NONE = 0;
* const unsigned short LOADING = 1;
* const unsigned short LOADED = 2;
* const unsigned short ERROR = 3;
* readonly attribute unsigned short readyState;
*
* readonly attribute TextTrack track;
* };
*
* @param {Object} options TextTrack configuration
* @class HTMLTrackElement
*/
var HTMLTrackElement = function (_EventTarget) {
_inherits(HTMLTrackElement, _EventTarget);
function HTMLTrackElement() {
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
_classCallCheck(this, HTMLTrackElement);
var _this = _possibleConstructorReturn(this, _EventTarget.call(this));
var readyState = void 0;
var trackElement = _this; // eslint-disable-line
if (browser.IS_IE8) {
trackElement = _document2['default'].createElement('custom');
for (var prop in HTMLTrackElement.prototype) {
if (prop !== 'constructor') {
trackElement[prop] = HTMLTrackElement.prototype[prop];
}
}
}
var track = new _textTrack2['default'](options);
trackElement.kind = track.kind;
trackElement.src = track.src;
trackElement.srclang = track.language;
trackElement.label = track.label;
trackElement['default'] = track['default'];
Object.defineProperty(trackElement, 'readyState', {
get: function get() {
return readyState;
}
});
Object.defineProperty(trackElement, 'track', {
get: function get() {
return track;
}
});
readyState = NONE;
track.addEventListener('loadeddata', function () {
readyState = LOADED;
trackElement.trigger({
type: 'load',
target: trackElement
});
});
if (browser.IS_IE8) {
var _ret;
return _ret = trackElement, _possibleConstructorReturn(_this, _ret);
}
return _this;
}
return HTMLTrackElement;
}(_eventTarget2['default']);
HTMLTrackElement.prototype.allowedEvents_ = {
load: 'load'
};
HTMLTrackElement.NONE = NONE;
HTMLTrackElement.LOADING = LOADING;
HTMLTrackElement.LOADED = LOADED;
HTMLTrackElement.ERROR = ERROR;
exports['default'] = HTMLTrackElement;
},{"42":42,"72":72,"78":78,"92":92}],67:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _browser = _dereq_(78);
var browser = _interopRequireWildcard(_browser);
var _document = _dereq_(92);
var _document2 = _interopRequireDefault(_document);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } /**
* @file text-track-cue-list.js
*/
/**
* A List of text track cues as defined in:
* https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackcuelist
*
* interface TextTrackCueList {
* readonly attribute unsigned long length;
* getter TextTrackCue (unsigned long index);
* TextTrackCue? getCueById(DOMString id);
* };
*
* @param {Array} cues A list of cues to be initialized with
* @class TextTrackCueList
*/
var TextTrackCueList = function () {
function TextTrackCueList(cues) {
_classCallCheck(this, TextTrackCueList);
var list = this; // eslint-disable-line
if (browser.IS_IE8) {
list = _document2['default'].createElement('custom');
for (var prop in TextTrackCueList.prototype) {
if (prop !== 'constructor') {
list[prop] = TextTrackCueList.prototype[prop];
}
}
}
TextTrackCueList.prototype.setCues_.call(list, cues);
Object.defineProperty(list, 'length', {
get: function get() {
return this.length_;
}
});
if (browser.IS_IE8) {
return list;
}
}
/**
* A setter for cues in this list
*
* @param {Array} cues an array of cues
* @method setCues_
* @private
*/
TextTrackCueList.prototype.setCues_ = function setCues_(cues) {
var oldLength = this.length || 0;
var i = 0;
var l = cues.length;
this.cues_ = cues;
this.length_ = cues.length;
var defineProp = function defineProp(index) {
if (!('' + index in this)) {
Object.defineProperty(this, '' + index, {
get: function get() {
return this.cues_[index];
}
});
}
};
if (oldLength < l) {
i = oldLength;
for (; i < l; i++) {
defineProp.call(this, i);
}
}
};
/**
* Get a cue that is currently in the Cue list by id
*
* @param {String} id
* @method getCueById
* @return {Object} a single cue
*/
TextTrackCueList.prototype.getCueById = function getCueById(id) {
var result = null;
for (var i = 0, l = this.length; i < l; i++) {
var cue = this[i];
if (cue.id === id) {
result = cue;
break;
}
}
return result;
};
return TextTrackCueList;
}();
exports['default'] = TextTrackCueList;
},{"78":78,"92":92}],68:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _fn = _dereq_(82);
var Fn = _interopRequireWildcard(_fn);
var _window = _dereq_(93);
var _window2 = _interopRequireDefault(_window);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file text-track-display.js
*/
var darkGray = '#222';
var lightGray = '#ccc';
var fontMap = {
monospace: 'monospace',
sansSerif: 'sans-serif',
serif: 'serif',
monospaceSansSerif: '"Andale Mono", "Lucida Console", monospace',
monospaceSerif: '"Courier New", monospace',
proportionalSansSerif: 'sans-serif',
proportionalSerif: 'serif',
casual: '"Comic Sans MS", Impact, fantasy',
script: '"Monotype Corsiva", cursive',
smallcaps: '"Andale Mono", "Lucida Console", monospace, sans-serif'
};
/**
* Add cue HTML to display
*
* @param {Number} color Hex number for color, like #f0e
* @param {Number} opacity Value for opacity,0.0 - 1.0
* @return {RGBAColor} In the form 'rgba(255, 0, 0, 0.3)'
* @method constructColor
*/
function constructColor(color, opacity) {
return 'rgba(' +
// color looks like "#f0e"
parseInt(color[1] + color[1], 16) + ',' + parseInt(color[2] + color[2], 16) + ',' + parseInt(color[3] + color[3], 16) + ',' + opacity + ')';
}
/**
* Try to update style
* Some style changes will throw an error, particularly in IE8. Those should be noops.
*
* @param {Element} el The element to be styles
* @param {CSSProperty} style The CSS property to be styled
* @param {CSSStyle} rule The actual style to be applied to the property
* @method tryUpdateStyle
*/
function tryUpdateStyle(el, style, rule) {
try {
el.style[style] = rule;
} catch (e) {
// Satisfies linter.
return;
}
}
/**
* The component for displaying text track cues
*
* @param {Object} player Main Player
* @param {Object=} options Object of option names and values
* @param {Function=} ready Ready callback function
* @extends Component
* @class TextTrackDisplay
*/
var TextTrackDisplay = function (_Component) {
_inherits(TextTrackDisplay, _Component);
function TextTrackDisplay(player, options, ready) {
_classCallCheck(this, TextTrackDisplay);
var _this = _possibleConstructorReturn(this, _Component.call(this, player, options, ready));
player.on('loadstart', Fn.bind(_this, _this.toggleDisplay));
player.on('texttrackchange', Fn.bind(_this, _this.updateDisplay));
// This used to be called during player init, but was causing an error
// if a track should show by default and the display hadn't loaded yet.
// Should probably be moved to an external track loader when we support
// tracks that don't need a display.
player.ready(Fn.bind(_this, function () {
if (player.tech_ && player.tech_.featuresNativeTextTracks) {
this.hide();
return;
}
player.on('fullscreenchange', Fn.bind(this, this.updateDisplay));
var tracks = this.options_.playerOptions.tracks || [];
for (var i = 0; i < tracks.length; i++) {
this.player_.addRemoteTextTrack(tracks[i]);
}
var modes = { captions: 1, subtitles: 1 };
var trackList = this.player_.textTracks();
var firstDesc = void 0;
var firstCaptions = void 0;
if (trackList) {
for (var _i = 0; _i < trackList.length; _i++) {
var track = trackList[_i];
if (track['default']) {
if (track.kind === 'descriptions' && !firstDesc) {
firstDesc = track;
} else if (track.kind in modes && !firstCaptions) {
firstCaptions = track;
}
}
}
// We want to show the first default track but captions and subtitles
// take precedence over descriptions.
// So, display the first default captions or subtitles track
// and otherwise the first default descriptions track.
if (firstCaptions) {
firstCaptions.mode = 'showing';
} else if (firstDesc) {
firstDesc.mode = 'showing';
}
}
}));
return _this;
}
/**
* Toggle display texttracks
*
* @method toggleDisplay
*/
TextTrackDisplay.prototype.toggleDisplay = function toggleDisplay() {
if (this.player_.tech_ && this.player_.tech_.featuresNativeTextTracks) {
this.hide();
} else {
this.show();
}
};
/**
* Create the component's DOM element
*
* @return {Element}
* @method createEl
*/
TextTrackDisplay.prototype.createEl = function createEl() {
return _Component.prototype.createEl.call(this, 'div', {
className: 'vjs-text-track-display'
}, {
'aria-live': 'assertive',
'aria-atomic': 'true'
});
};
/**
* Clear display texttracks
*
* @method clearDisplay
*/
TextTrackDisplay.prototype.clearDisplay = function clearDisplay() {
if (typeof _window2['default'].WebVTT === 'function') {
_window2['default'].WebVTT.processCues(_window2['default'], [], this.el_);
}
};
/**
* Update display texttracks
*
* @method updateDisplay
*/
TextTrackDisplay.prototype.updateDisplay = function updateDisplay() {
var tracks = this.player_.textTracks();
this.clearDisplay();
if (!tracks) {
return;
}
// Track display prioritization model: if multiple tracks are 'showing',
// display the first 'subtitles' or 'captions' track which is 'showing',
// otherwise display the first 'descriptions' track which is 'showing'
var descriptionsTrack = null;
var captionsSubtitlesTrack = null;
var i = tracks.length;
while (i--) {
var track = tracks[i];
if (track.mode === 'showing') {
if (track.kind === 'descriptions') {
descriptionsTrack = track;
} else {
captionsSubtitlesTrack = track;
}
}
}
if (captionsSubtitlesTrack) {
this.updateForTrack(captionsSubtitlesTrack);
} else if (descriptionsTrack) {
this.updateForTrack(descriptionsTrack);
}
};
/**
* Add texttrack to texttrack list
*
* @param {TextTrackObject} track Texttrack object to be added to list
* @method updateForTrack
*/
TextTrackDisplay.prototype.updateForTrack = function updateForTrack(track) {
if (typeof _window2['default'].WebVTT !== 'function' || !track.activeCues) {
return;
}
var overrides = this.player_.textTrackSettings.getValues();
var cues = [];
for (var _i2 = 0; _i2 < track.activeCues.length; _i2++) {
cues.push(track.activeCues[_i2]);
}
_window2['default'].WebVTT.processCues(_window2['default'], cues, this.el_);
var i = cues.length;
while (i--) {
var cue = cues[i];
if (!cue) {
continue;
}
var cueDiv = cue.displayState;
if (overrides.color) {
cueDiv.firstChild.style.color = overrides.color;
}
if (overrides.textOpacity) {
tryUpdateStyle(cueDiv.firstChild, 'color', constructColor(overrides.color || '#fff', overrides.textOpacity));
}
if (overrides.backgroundColor) {
cueDiv.firstChild.style.backgroundColor = overrides.backgroundColor;
}
if (overrides.backgroundOpacity) {
tryUpdateStyle(cueDiv.firstChild, 'backgroundColor', constructColor(overrides.backgroundColor || '#000', overrides.backgroundOpacity));
}
if (overrides.windowColor) {
if (overrides.windowOpacity) {
tryUpdateStyle(cueDiv, 'backgroundColor', constructColor(overrides.windowColor, overrides.windowOpacity));
} else {
cueDiv.style.backgroundColor = overrides.windowColor;
}
}
if (overrides.edgeStyle) {
if (overrides.edgeStyle === 'dropshadow') {
cueDiv.firstChild.style.textShadow = '2px 2px 3px ' + darkGray + ', 2px 2px 4px ' + darkGray + ', 2px 2px 5px ' + darkGray;
} else if (overrides.edgeStyle === 'raised') {
cueDiv.firstChild.style.textShadow = '1px 1px ' + darkGray + ', 2px 2px ' + darkGray + ', 3px 3px ' + darkGray;
} else if (overrides.edgeStyle === 'depressed') {
cueDiv.firstChild.style.textShadow = '1px 1px ' + lightGray + ', 0 1px ' + lightGray + ', -1px -1px ' + darkGray + ', 0 -1px ' + darkGray;
} else if (overrides.edgeStyle === 'uniform') {
cueDiv.firstChild.style.textShadow = '0 0 4px ' + darkGray + ', 0 0 4px ' + darkGray + ', 0 0 4px ' + darkGray + ', 0 0 4px ' + darkGray;
}
}
if (overrides.fontPercent && overrides.fontPercent !== 1) {
var fontSize = _window2['default'].parseFloat(cueDiv.style.fontSize);
cueDiv.style.fontSize = fontSize * overrides.fontPercent + 'px';
cueDiv.style.height = 'auto';
cueDiv.style.top = 'auto';
cueDiv.style.bottom = '2px';
}
if (overrides.fontFamily && overrides.fontFamily !== 'default') {
if (overrides.fontFamily === 'small-caps') {
cueDiv.firstChild.style.fontVariant = 'small-caps';
} else {
cueDiv.firstChild.style.fontFamily = fontMap[overrides.fontFamily];
}
}
}
};
return TextTrackDisplay;
}(_component2['default']);
_component2['default'].registerComponent('TextTrackDisplay', TextTrackDisplay);
exports['default'] = TextTrackDisplay;
},{"5":5,"82":82,"93":93}],69:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
/**
* Utilities for capturing text track state and re-creating tracks
* based on a capture.
*
* @file text-track-list-converter.js
*/
/**
* Examine a single text track and return a JSON-compatible javascript
* object that represents the text track's state.
* @param track {TextTrackObject} the text track to query
* @return {Object} a serializable javascript representation of the
* @private
*/
var trackToJson_ = function trackToJson_(track) {
var ret = ['kind', 'label', 'language', 'id', 'inBandMetadataTrackDispatchType', 'mode', 'src'].reduce(function (acc, prop, i) {
if (track[prop]) {
acc[prop] = track[prop];
}
return acc;
}, {
cues: track.cues && Array.prototype.map.call(track.cues, function (cue) {
return {
startTime: cue.startTime,
endTime: cue.endTime,
text: cue.text,
id: cue.id
};
})
});
return ret;
};
/**
* Examine a tech and return a JSON-compatible javascript array that
* represents the state of all text tracks currently configured. The
* return array is compatible with `jsonToTextTracks`.
* @param tech {tech} the tech object to query
* @return {Array} a serializable javascript representation of the
* @function textTracksToJson
*/
var textTracksToJson = function textTracksToJson(tech) {
var trackEls = tech.$$('track');
var trackObjs = Array.prototype.map.call(trackEls, function (t) {
return t.track;
});
var tracks = Array.prototype.map.call(trackEls, function (trackEl) {
var json = trackToJson_(trackEl.track);
if (trackEl.src) {
json.src = trackEl.src;
}
return json;
});
return tracks.concat(Array.prototype.filter.call(tech.textTracks(), function (track) {
return trackObjs.indexOf(track) === -1;
}).map(trackToJson_));
};
/**
* Creates a set of remote text tracks on a tech based on an array of
* javascript text track representations.
* @param json {Array} an array of text track representation objects,
* like those that would be produced by `textTracksToJson`
* @param tech {tech} the tech to create text tracks on
* @function jsonToTextTracks
*/
var jsonToTextTracks = function jsonToTextTracks(json, tech) {
json.forEach(function (track) {
var addedTrack = tech.addRemoteTextTrack(track).track;
if (!track.src && track.cues) {
track.cues.forEach(function (cue) {
return addedTrack.addCue(cue);
});
}
});
return tech.textTracks();
};
exports['default'] = { textTracksToJson: textTracksToJson, jsonToTextTracks: jsonToTextTracks, trackToJson_: trackToJson_ };
},{}],70:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _trackList = _dereq_(74);
var _trackList2 = _interopRequireDefault(_trackList);
var _fn = _dereq_(82);
var Fn = _interopRequireWildcard(_fn);
var _browser = _dereq_(78);
var browser = _interopRequireWildcard(_browser);
var _document = _dereq_(92);
var _document2 = _interopRequireDefault(_document);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file text-track-list.js
*/
/**
* A list of possible text tracks. All functionality is in the
* base class TrackList. The spec for TextTrackList is located at:
* @link https://html.spec.whatwg.org/multipage/embedded-content.html#texttracklist
*
* interface TextTrackList : EventTarget {
* readonly attribute unsigned long length;
* getter TextTrack (unsigned long index);
* TextTrack? getTrackById(DOMString id);
*
* attribute EventHandler onchange;
* attribute EventHandler onaddtrack;
* attribute EventHandler onremovetrack;
* };
*
* @param {TextTrack[]} tracks A list of tracks to initialize the list with
* @extends TrackList
* @class TextTrackList
*/
var TextTrackList = function (_TrackList) {
_inherits(TextTrackList, _TrackList);
function TextTrackList() {
var _this, _ret;
var tracks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
_classCallCheck(this, TextTrackList);
var list = void 0;
// IE8 forces us to implement inheritance ourselves
// as it does not support Object.defineProperty properly
if (browser.IS_IE8) {
list = _document2['default'].createElement('custom');
for (var prop in _trackList2['default'].prototype) {
if (prop !== 'constructor') {
list[prop] = _trackList2['default'].prototype[prop];
}
}
for (var _prop in TextTrackList.prototype) {
if (_prop !== 'constructor') {
list[_prop] = TextTrackList.prototype[_prop];
}
}
}
list = (_this = _possibleConstructorReturn(this, _TrackList.call(this, tracks, list)), _this);
return _ret = list, _possibleConstructorReturn(_this, _ret);
}
TextTrackList.prototype.addTrack_ = function addTrack_(track) {
_TrackList.prototype.addTrack_.call(this, track);
track.addEventListener('modechange', Fn.bind(this, function () {
this.trigger('change');
}));
};
/**
* Remove TextTrack from TextTrackList
* NOTE: Be mindful of what is passed in as it may be a HTMLTrackElement
*
* @param {TextTrack} rtrack
* @method removeTrack_
* @private
*/
TextTrackList.prototype.removeTrack_ = function removeTrack_(rtrack) {
var track = void 0;
for (var i = 0, l = this.length; i < l; i++) {
if (this[i] === rtrack) {
track = this[i];
if (track.off) {
track.off();
}
this.tracks_.splice(i, 1);
break;
}
}
if (!track) {
return;
}
this.trigger({
track: track,
type: 'removetrack'
});
};
/**
* Get a TextTrack from TextTrackList by a tracks id
*
* @param {String} id - the id of the track to get
* @method getTrackById
* @return {TextTrack}
* @private
*/
TextTrackList.prototype.getTrackById = function getTrackById(id) {
var result = null;
for (var i = 0, l = this.length; i < l; i++) {
var track = this[i];
if (track.id === id) {
result = track;
break;
}
}
return result;
};
return TextTrackList;
}(_trackList2['default']);
exports['default'] = TextTrackList;
},{"74":74,"78":78,"82":82,"92":92}],71:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _events = _dereq_(81);
var Events = _interopRequireWildcard(_events);
var _fn = _dereq_(82);
var Fn = _interopRequireWildcard(_fn);
var _log = _dereq_(85);
var _log2 = _interopRequireDefault(_log);
var _tuple = _dereq_(145);
var _tuple2 = _interopRequireDefault(_tuple);
var _window = _dereq_(93);
var _window2 = _interopRequireDefault(_window);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file text-track-settings.js
*/
function captionOptionsMenuTemplate(uniqueId, dialogLabelId, dialogDescriptionId) {
var template = '\n <div role="document">\n <div role="heading" aria-level="1" id="' + dialogLabelId + '" class="vjs-control-text">Captions Settings Dialog</div>\n <div id="' + dialogDescriptionId + '" class="vjs-control-text">Beginning of dialog window. Escape will cancel and close the window.</div>\n <div class="vjs-tracksettings">\n <div class="vjs-tracksettings-colors">\n <fieldset class="vjs-fg-color vjs-tracksetting">\n <legend>Text</legend>\n <label class="vjs-label" for="captions-foreground-color-' + uniqueId + '">Color</label>\n <select id="captions-foreground-color-' + uniqueId + '">\n <option value="#FFF" selected>White</option>\n <option value="#000">Black</option>\n <option value="#F00">Red</option>\n <option value="#0F0">Green</option>\n <option value="#00F">Blue</option>\n <option value="#FF0">Yellow</option>\n <option value="#F0F">Magenta</option>\n <option value="#0FF">Cyan</option>\n </select>\n <span class="vjs-text-opacity vjs-opacity">\n <label class="vjs-label" for="captions-foreground-opacity-' + uniqueId + '">Transparency</label>\n <select id="captions-foreground-opacity-' + uniqueId + '">\n <option value="1" selected>Opaque</option>\n <option value="0.5">Semi-Opaque</option>\n </select>\n </span>\n </fieldset>\n <fieldset class="vjs-bg-color vjs-tracksetting">\n <legend>Background</legend>\n <label class="vjs-label" for="captions-background-color-' + uniqueId + '">Color</label>\n <select id="captions-background-color-' + uniqueId + '">\n <option value="#000" selected>Black</option>\n <option value="#FFF">White</option>\n <option value="#F00">Red</option>\n <option value="#0F0">Green</option>\n <option value="#00F">Blue</option>\n <option value="#FF0">Yellow</option>\n <option value="#F0F">Magenta</option>\n <option value="#0FF">Cyan</option>\n </select>\n <span class="vjs-bg-opacity vjs-opacity">\n <label class="vjs-label" for="captions-background-opacity-' + uniqueId + '">Transparency</label>\n <select id="captions-background-opacity-' + uniqueId + '">\n <option value="1" selected>Opaque</option>\n <option value="0.5">Semi-Transparent</option>\n <option value="0">Transparent</option>\n </select>\n </span>\n </fieldset>\n <fieldset class="window-color vjs-tracksetting">\n <legend>Window</legend>\n <label class="vjs-label" for="captions-window-color-' + uniqueId + '">Color</label>\n <select id="captions-window-color-' + uniqueId + '">\n <option value="#000" selected>Black</option>\n <option value="#FFF">White</option>\n <option value="#F00">Red</option>\n <option value="#0F0">Green</option>\n <option value="#00F">Blue</option>\n <option value="#FF0">Yellow</option>\n <option value="#F0F">Magenta</option>\n <option value="#0FF">Cyan</option>\n </select>\n <span class="vjs-window-opacity vjs-opacity">\n <label class="vjs-label" for="captions-window-opacity-' + uniqueId + '">Transparency</label>\n <select id="captions-window-opacity-' + uniqueId + '">\n <option value="0" selected>Transparent</option>\n <option value="0.5">Semi-Transparent</option>\n <option value="1">Opaque</option>\n </select>\n </span>\n </fieldset>\n </div> <!-- vjs-tracksettings-colors -->\n <div class="vjs-tracksettings-font">\n <div class="vjs-font-percent vjs-tracksetting">\n <label class="vjs-label" for="captions-font-size-' + uniqueId + '">Font Size</label>\n <select id="captions-font-size-' + uniqueId + '">\n <option value="0.50">50%</option>\n <option value="0.75">75%</option>\n <option value="1.00" selected>100%</option>\n <option value="1.25">125%</option>\n <option value="1.50">150%</option>\n <option value="1.75">175%</option>\n <option value="2.00">200%</option>\n <option value="3.00">300%</option>\n <option value="4.00">400%</option>\n </select>\n </div>\n <div class="vjs-edge-style vjs-tracksetting">\n <label class="vjs-label" for="captions-edge-style-' + uniqueId + '">Text Edge Style</label>\n <select id="captions-edge-style-' + uniqueId + '">\n <option value="none" selected>None</option>\n <option value="raised">Raised</option>\n <option value="depressed">Depressed</option>\n <option value="uniform">Uniform</option>\n <option value="dropshadow">Dropshadow</option>\n </select>\n </div>\n <div class="vjs-font-family vjs-tracksetting">\n <label class="vjs-label" for="captions-font-family-' + uniqueId + '">Font Family</label>\n <select id="captions-font-family-' + uniqueId + '">\n <option value="proportionalSansSerif" selected>Proportional Sans-Serif</option>\n <option value="monospaceSansSerif">Monospace Sans-Serif</option>\n <option value="proportionalSerif">Proportional Serif</option>\n <option value="monospaceSerif">Monospace Serif</option>\n <option value="casual">Casual</option>\n <option value="script">Script</option>\n <option value="small-caps">Small Caps</option>\n </select>\n </div>\n </div> <!-- vjs-tracksettings-font -->\n <div class="vjs-tracksettings-controls">\n <button class="vjs-default-button">Defaults</button>\n <button class="vjs-done-button">Done</button>\n </div>\n </div> <!-- vjs-tracksettings -->\n </div> <!-- role="document" -->\n ';
return template;
}
function getSelectedOptionValue(target) {
var selectedOption = void 0;
// not all browsers support selectedOptions, so, fallback to options
if (target.selectedOptions) {
selectedOption = target.selectedOptions[0];
} else if (target.options) {
selectedOption = target.options[target.options.selectedIndex];
}
return selectedOption.value;
}
function setSelectedOption(target, value) {
if (!value) {
return;
}
var i = void 0;
for (i = 0; i < target.options.length; i++) {
var option = target.options[i];
if (option.value === value) {
break;
}
}
target.selectedIndex = i;
}
/**
* Manipulate settings of texttracks
*
* @param {Object} player Main Player
* @param {Object=} options Object of option names and values
* @extends Component
* @class TextTrackSettings
*/
var TextTrackSettings = function (_Component) {
_inherits(TextTrackSettings, _Component);
function TextTrackSettings(player, options) {
_classCallCheck(this, TextTrackSettings);
var _this = _possibleConstructorReturn(this, _Component.call(this, player, options));
_this.hide();
// Grab `persistTextTrackSettings` from the player options if not passed in child options
if (options.persistTextTrackSettings === undefined) {
_this.options_.persistTextTrackSettings = _this.options_.playerOptions.persistTextTrackSettings;
}
Events.on(_this.$('.vjs-done-button'), 'click', Fn.bind(_this, function () {
this.saveSettings();
this.hide();
}));
Events.on(_this.$('.vjs-default-button'), 'click', Fn.bind(_this, function () {
this.$('.vjs-fg-color > select').selectedIndex = 0;
this.$('.vjs-bg-color > select').selectedIndex = 0;
this.$('.window-color > select').selectedIndex = 0;
this.$('.vjs-text-opacity > select').selectedIndex = 0;
this.$('.vjs-bg-opacity > select').selectedIndex = 0;
this.$('.vjs-window-opacity > select').selectedIndex = 0;
this.$('.vjs-edge-style select').selectedIndex = 0;
this.$('.vjs-font-family select').selectedIndex = 0;
this.$('.vjs-font-percent select').selectedIndex = 2;
this.updateDisplay();
}));
Events.on(_this.$('.vjs-fg-color > select'), 'change', Fn.bind(_this, _this.updateDisplay));
Events.on(_this.$('.vjs-bg-color > select'), 'change', Fn.bind(_this, _this.updateDisplay));
Events.on(_this.$('.window-color > select'), 'change', Fn.bind(_this, _this.updateDisplay));
Events.on(_this.$('.vjs-text-opacity > select'), 'change', Fn.bind(_this, _this.updateDisplay));
Events.on(_this.$('.vjs-bg-opacity > select'), 'change', Fn.bind(_this, _this.updateDisplay));
Events.on(_this.$('.vjs-window-opacity > select'), 'change', Fn.bind(_this, _this.updateDisplay));
Events.on(_this.$('.vjs-font-percent select'), 'change', Fn.bind(_this, _this.updateDisplay));
Events.on(_this.$('.vjs-edge-style select'), 'change', Fn.bind(_this, _this.updateDisplay));
Events.on(_this.$('.vjs-font-family select'), 'change', Fn.bind(_this, _this.updateDisplay));
if (_this.options_.persistTextTrackSettings) {
_this.restoreSettings();
}
return _this;
}
/**
* Create the component's DOM element
*
* @return {Element}
* @method createEl
*/
TextTrackSettings.prototype.createEl = function createEl() {
var uniqueId = this.id_;
var dialogLabelId = 'TTsettingsDialogLabel-' + uniqueId;
var dialogDescriptionId = 'TTsettingsDialogDescription-' + uniqueId;
return _Component.prototype.createEl.call(this, 'div', {
className: 'vjs-caption-settings vjs-modal-overlay',
innerHTML: captionOptionsMenuTemplate(uniqueId, dialogLabelId, dialogDescriptionId),
tabIndex: -1
}, {
'role': 'dialog',
'aria-labelledby': dialogLabelId,
'aria-describedby': dialogDescriptionId
});
};
/**
* Get texttrack settings
* Settings are
* .vjs-edge-style
* .vjs-font-family
* .vjs-fg-color
* .vjs-text-opacity
* .vjs-bg-color
* .vjs-bg-opacity
* .window-color
* .vjs-window-opacity
*
* @return {Object}
* @method getValues
*/
TextTrackSettings.prototype.getValues = function getValues() {
var textEdge = getSelectedOptionValue(this.$('.vjs-edge-style select'));
var fontFamily = getSelectedOptionValue(this.$('.vjs-font-family select'));
var fgColor = getSelectedOptionValue(this.$('.vjs-fg-color > select'));
var textOpacity = getSelectedOptionValue(this.$('.vjs-text-opacity > select'));
var bgColor = getSelectedOptionValue(this.$('.vjs-bg-color > select'));
var bgOpacity = getSelectedOptionValue(this.$('.vjs-bg-opacity > select'));
var windowColor = getSelectedOptionValue(this.$('.window-color > select'));
var windowOpacity = getSelectedOptionValue(this.$('.vjs-window-opacity > select'));
var fontPercent = _window2['default'].parseFloat(getSelectedOptionValue(this.$('.vjs-font-percent > select')));
var result = {
fontPercent: fontPercent,
fontFamily: fontFamily,
textOpacity: textOpacity,
windowColor: windowColor,
windowOpacity: windowOpacity,
backgroundOpacity: bgOpacity,
edgeStyle: textEdge,
color: fgColor,
backgroundColor: bgColor
};
for (var name in result) {
if (result[name] === '' || result[name] === 'none' || name === 'fontPercent' && result[name] === 1.00) {
delete result[name];
}
}
return result;
};
/**
* Set texttrack settings
* Settings are
* .vjs-edge-style
* .vjs-font-family
* .vjs-fg-color
* .vjs-text-opacity
* .vjs-bg-color
* .vjs-bg-opacity
* .window-color
* .vjs-window-opacity
*
* @param {Object} values Object with texttrack setting values
* @method setValues
*/
TextTrackSettings.prototype.setValues = function setValues(values) {
setSelectedOption(this.$('.vjs-edge-style select'), values.edgeStyle);
setSelectedOption(this.$('.vjs-font-family select'), values.fontFamily);
setSelectedOption(this.$('.vjs-fg-color > select'), values.color);
setSelectedOption(this.$('.vjs-text-opacity > select'), values.textOpacity);
setSelectedOption(this.$('.vjs-bg-color > select'), values.backgroundColor);
setSelectedOption(this.$('.vjs-bg-opacity > select'), values.backgroundOpacity);
setSelectedOption(this.$('.window-color > select'), values.windowColor);
setSelectedOption(this.$('.vjs-window-opacity > select'), values.windowOpacity);
var fontPercent = values.fontPercent;
if (fontPercent) {
fontPercent = fontPercent.toFixed(2);
}
setSelectedOption(this.$('.vjs-font-percent > select'), fontPercent);
};
/**
* Restore texttrack settings
*
* @method restoreSettings
*/
TextTrackSettings.prototype.restoreSettings = function restoreSettings() {
var err = void 0;
var values = void 0;
try {
var _safeParseTuple = (0, _tuple2['default'])(_window2['default'].localStorage.getItem('vjs-text-track-settings'));
err = _safeParseTuple[0];
values = _safeParseTuple[1];
if (err) {
_log2['default'].error(err);
}
} catch (e) {
_log2['default'].warn(e);
}
if (values) {
this.setValues(values);
}
};
/**
* Save texttrack settings to local storage
*
* @method saveSettings
*/
TextTrackSettings.prototype.saveSettings = function saveSettings() {
if (!this.options_.persistTextTrackSettings) {
return;
}
var values = this.getValues();
try {
if (Object.getOwnPropertyNames(values).length > 0) {
_window2['default'].localStorage.setItem('vjs-text-track-settings', JSON.stringify(values));
} else {
_window2['default'].localStorage.removeItem('vjs-text-track-settings');
}
} catch (e) {
_log2['default'].warn(e);
}
};
/**
* Update display of texttrack settings
*
* @method updateDisplay
*/
TextTrackSettings.prototype.updateDisplay = function updateDisplay() {
var ttDisplay = this.player_.getChild('textTrackDisplay');
if (ttDisplay) {
ttDisplay.updateDisplay();
}
};
return TextTrackSettings;
}(_component2['default']);
_component2['default'].registerComponent('TextTrackSettings', TextTrackSettings);
exports['default'] = TextTrackSettings;
},{"145":145,"5":5,"81":81,"82":82,"85":85,"93":93}],72:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _textTrackCueList = _dereq_(67);
var _textTrackCueList2 = _interopRequireDefault(_textTrackCueList);
var _fn = _dereq_(82);
var Fn = _interopRequireWildcard(_fn);
var _trackEnums = _dereq_(73);
var _log = _dereq_(85);
var _log2 = _interopRequireDefault(_log);
var _window = _dereq_(93);
var _window2 = _interopRequireDefault(_window);
var _track = _dereq_(75);
var _track2 = _interopRequireDefault(_track);
var _url = _dereq_(90);
var _xhr = _dereq_(147);
var _xhr2 = _interopRequireDefault(_xhr);
var _mergeOptions = _dereq_(86);
var _mergeOptions2 = _interopRequireDefault(_mergeOptions);
var _browser = _dereq_(78);
var browser = _interopRequireWildcard(_browser);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file text-track.js
*/
/**
* takes a webvtt file contents and parses it into cues
*
* @param {String} srcContent webVTT file contents
* @param {Track} track track to addcues to
*/
var parseCues = function parseCues(srcContent, track) {
var parser = new _window2['default'].WebVTT.Parser(_window2['default'], _window2['default'].vttjs, _window2['default'].WebVTT.StringDecoder());
var errors = [];
parser.oncue = function (cue) {
track.addCue(cue);
};
parser.onparsingerror = function (error) {
errors.push(error);
};
parser.onflush = function () {
track.trigger({
type: 'loadeddata',
target: track
});
};
parser.parse(srcContent);
if (errors.length > 0) {
if (_window2['default'].console && _window2['default'].console.groupCollapsed) {
_window2['default'].console.groupCollapsed('Text Track parsing errors for ' + track.src);
}
errors.forEach(function (error) {
return _log2['default'].error(error);
});
if (_window2['default'].console && _window2['default'].console.groupEnd) {
_window2['default'].console.groupEnd();
}
}
parser.flush();
};
/**
* load a track from a specifed url
*
* @param {String} src url to load track from
* @param {Track} track track to addcues to
*/
var loadTrack = function loadTrack(src, track) {
var opts = {
uri: src
};
var crossOrigin = (0, _url.isCrossOrigin)(src);
if (crossOrigin) {
opts.cors = crossOrigin;
}
(0, _xhr2['default'])(opts, Fn.bind(this, function (err, response, responseBody) {
if (err) {
return _log2['default'].error(err, response);
}
track.loaded_ = true;
// Make sure that vttjs has loaded, otherwise, wait till it finished loading
// NOTE: this is only used for the alt/video.novtt.js build
if (typeof _window2['default'].WebVTT !== 'function') {
if (track.tech_) {
(function () {
var loadHandler = function loadHandler() {
return parseCues(responseBody, track);
};
track.tech_.on('vttjsloaded', loadHandler);
track.tech_.on('vttjserror', function () {
_log2['default'].error('vttjs failed to load, stopping trying to process ' + track.src);
track.tech_.off('vttjsloaded', loadHandler);
});
})();
}
} else {
parseCues(responseBody, track);
}
}));
};
/**
* A single text track as defined in:
* @link https://html.spec.whatwg.org/multipage/embedded-content.html#texttrack
*
* interface TextTrack : EventTarget {
* readonly attribute TextTrackKind kind;
* readonly attribute DOMString label;
* readonly attribute DOMString language;
*
* readonly attribute DOMString id;
* readonly attribute DOMString inBandMetadataTrackDispatchType;
*
* attribute TextTrackMode mode;
*
* readonly attribute TextTrackCueList? cues;
* readonly attribute TextTrackCueList? activeCues;
*
* void addCue(TextTrackCue cue);
* void removeCue(TextTrackCue cue);
*
* attribute EventHandler oncuechange;
* };
*
* @param {Object=} options Object of option names and values
* @extends Track
* @class TextTrack
*/
var TextTrack = function (_Track) {
_inherits(TextTrack, _Track);
function TextTrack() {
var _this, _ret2;
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
_classCallCheck(this, TextTrack);
if (!options.tech) {
throw new Error('A tech was not provided.');
}
var settings = (0, _mergeOptions2['default'])(options, {
kind: _trackEnums.TextTrackKind[options.kind] || 'subtitles',
language: options.language || options.srclang || ''
});
var mode = _trackEnums.TextTrackMode[settings.mode] || 'disabled';
var default_ = settings['default'];
if (settings.kind === 'metadata' || settings.kind === 'chapters') {
mode = 'hidden';
}
// on IE8 this will be a document element
// for every other browser this will be a normal object
var tt = (_this = _possibleConstructorReturn(this, _Track.call(this, settings)), _this);
tt.tech_ = settings.tech;
if (browser.IS_IE8) {
for (var prop in TextTrack.prototype) {
if (prop !== 'constructor') {
tt[prop] = TextTrack.prototype[prop];
}
}
}
tt.cues_ = [];
tt.activeCues_ = [];
var cues = new _textTrackCueList2['default'](tt.cues_);
var activeCues = new _textTrackCueList2['default'](tt.activeCues_);
var changed = false;
var timeupdateHandler = Fn.bind(tt, function () {
// Accessing this.activeCues for the side-effects of updating itself
// due to it's nature as a getter function. Do not remove or cues will
// stop updating!
/* eslint-disable no-unused-expressions */
this.activeCues;
/* eslint-enable no-unused-expressions */
if (changed) {
this.trigger('cuechange');
changed = false;
}
});
if (mode !== 'disabled') {
tt.tech_.on('timeupdate', timeupdateHandler);
}
Object.defineProperty(tt, 'default', {
get: function get() {
return default_;
},
set: function set() {}
});
Object.defineProperty(tt, 'mode', {
get: function get() {
return mode;
},
set: function set(newMode) {
if (!_trackEnums.TextTrackMode[newMode]) {
return;
}
mode = newMode;
if (mode === 'showing') {
this.tech_.on('timeupdate', timeupdateHandler);
}
this.trigger('modechange');
}
});
Object.defineProperty(tt, 'cues', {
get: function get() {
if (!this.loaded_) {
return null;
}
return cues;
},
set: function set() {}
});
Object.defineProperty(tt, 'activeCues', {
get: function get() {
if (!this.loaded_) {
return null;
}
// nothing to do
if (this.cues.length === 0) {
return activeCues;
}
var ct = this.tech_.currentTime();
var active = [];
for (var i = 0, l = this.cues.length; i < l; i++) {
var cue = this.cues[i];
if (cue.startTime <= ct && cue.endTime >= ct) {
active.push(cue);
} else if (cue.startTime === cue.endTime && cue.startTime <= ct && cue.startTime + 0.5 >= ct) {
active.push(cue);
}
}
changed = false;
if (active.length !== this.activeCues_.length) {
changed = true;
} else {
for (var _i = 0; _i < active.length; _i++) {
if (this.activeCues_.indexOf(active[_i]) === -1) {
changed = true;
}
}
}
this.activeCues_ = active;
activeCues.setCues_(this.activeCues_);
return activeCues;
},
set: function set() {}
});
if (settings.src) {
tt.src = settings.src;
loadTrack(settings.src, tt);
} else {
tt.loaded_ = true;
}
return _ret2 = tt, _possibleConstructorReturn(_this, _ret2);
}
/**
* add a cue to the internal list of cues
*
* @param {Object} cue the cue to add to our internal list
* @method addCue
*/
TextTrack.prototype.addCue = function addCue(cue) {
var tracks = this.tech_.textTracks();
if (tracks) {
for (var i = 0; i < tracks.length; i++) {
if (tracks[i] !== this) {
tracks[i].removeCue(cue);
}
}
}
this.cues_.push(cue);
this.cues.setCues_(this.cues_);
};
/**
* remvoe a cue from our internal list
*
* @param {Object} removeCue the cue to remove from our internal list
* @method removeCue
*/
TextTrack.prototype.removeCue = function removeCue(_removeCue) {
var removed = false;
for (var i = 0, l = this.cues_.length; i < l; i++) {
var cue = this.cues_[i];
if (cue === _removeCue) {
this.cues_.splice(i, 1);
removed = true;
}
}
if (removed) {
this.cues.setCues_(this.cues_);
}
};
return TextTrack;
}(_track2['default']);
/**
* cuechange - One or more cues in the track have become active or stopped being active.
*/
TextTrack.prototype.allowedEvents_ = {
cuechange: 'cuechange'
};
exports['default'] = TextTrack;
},{"147":147,"67":67,"73":73,"75":75,"78":78,"82":82,"85":85,"86":86,"90":90,"93":93}],73:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
/**
* @file track-kinds.js
*/
/**
* https://html.spec.whatwg.org/multipage/embedded-content.html#dom-videotrack-kind
*
* enum VideoTrackKind {
* "alternative",
* "captions",
* "main",
* "sign",
* "subtitles",
* "commentary",
* "",
* };
*/
var VideoTrackKind = exports.VideoTrackKind = {
alternative: 'alternative',
captions: 'captions',
main: 'main',
sign: 'sign',
subtitles: 'subtitles',
commentary: 'commentary'
};
/**
* https://html.spec.whatwg.org/multipage/embedded-content.html#dom-audiotrack-kind
*
* enum AudioTrackKind {
* "alternative",
* "descriptions",
* "main",
* "main-desc",
* "translation",
* "commentary",
* "",
* };
*/
var AudioTrackKind = exports.AudioTrackKind = {
'alternative': 'alternative',
'descriptions': 'descriptions',
'main': 'main',
'main-desc': 'main-desc',
'translation': 'translation',
'commentary': 'commentary'
};
/**
* https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackkind
*
* enum TextTrackKind {
* "subtitles",
* "captions",
* "descriptions",
* "chapters",
* "metadata"
* };
*/
var TextTrackKind = exports.TextTrackKind = {
subtitles: 'subtitles',
captions: 'captions',
descriptions: 'descriptions',
chapters: 'chapters',
metadata: 'metadata'
};
/**
* https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackmode
*
* enum TextTrackMode { "disabled", "hidden", "showing" };
*/
var TextTrackMode = exports.TextTrackMode = {
disabled: 'disabled',
hidden: 'hidden',
showing: 'showing'
};
},{}],74:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _eventTarget = _dereq_(42);
var _eventTarget2 = _interopRequireDefault(_eventTarget);
var _browser = _dereq_(78);
var browser = _interopRequireWildcard(_browser);
var _document = _dereq_(92);
var _document2 = _interopRequireDefault(_document);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file track-list.js
*/
/**
* Common functionaliy between Text, Audio, and Video TrackLists
* Interfaces defined in the following spec:
* @link https://html.spec.whatwg.org/multipage/embedded-content.html
*
* @param {Track[]} tracks A list of tracks to initialize the list with
* @param {Object} list the child object with inheritance done manually for ie8
* @extends EventTarget
* @class TrackList
*/
var TrackList = function (_EventTarget) {
_inherits(TrackList, _EventTarget);
function TrackList() {
var tracks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
var _ret;
var list = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
_classCallCheck(this, TrackList);
var _this = _possibleConstructorReturn(this, _EventTarget.call(this));
if (!list) {
list = _this; // eslint-disable-line
if (browser.IS_IE8) {
list = _document2['default'].createElement('custom');
for (var prop in TrackList.prototype) {
if (prop !== 'constructor') {
list[prop] = TrackList.prototype[prop];
}
}
}
}
list.tracks_ = [];
Object.defineProperty(list, 'length', {
get: function get() {
return this.tracks_.length;
}
});
for (var i = 0; i < tracks.length; i++) {
list.addTrack_(tracks[i]);
}
return _ret = list, _possibleConstructorReturn(_this, _ret);
}
/**
* Add a Track from TrackList
*
* @param {Mixed} track
* @method addTrack_
* @private
*/
TrackList.prototype.addTrack_ = function addTrack_(track) {
var index = this.tracks_.length;
if (!('' + index in this)) {
Object.defineProperty(this, index, {
get: function get() {
return this.tracks_[index];
}
});
}
// Do not add duplicate tracks
if (this.tracks_.indexOf(track) === -1) {
this.tracks_.push(track);
this.trigger({
track: track,
type: 'addtrack'
});
}
};
/**
* Remove a Track from TrackList
*
* @param {Track} rtrack track to be removed
* @method removeTrack_
* @private
*/
TrackList.prototype.removeTrack_ = function removeTrack_(rtrack) {
var track = void 0;
for (var i = 0, l = this.length; i < l; i++) {
if (this[i] === rtrack) {
track = this[i];
if (track.off) {
track.off();
}
this.tracks_.splice(i, 1);
break;
}
}
if (!track) {
return;
}
this.trigger({
track: track,
type: 'removetrack'
});
};
/**
* Get a Track from the TrackList by a tracks id
*
* @param {String} id - the id of the track to get
* @method getTrackById
* @return {Track}
* @private
*/
TrackList.prototype.getTrackById = function getTrackById(id) {
var result = null;
for (var i = 0, l = this.length; i < l; i++) {
var track = this[i];
if (track.id === id) {
result = track;
break;
}
}
return result;
};
return TrackList;
}(_eventTarget2['default']);
/**
* change - One or more tracks in the track list have been enabled or disabled.
* addtrack - A track has been added to the track list.
* removetrack - A track has been removed from the track list.
*/
TrackList.prototype.allowedEvents_ = {
change: 'change',
addtrack: 'addtrack',
removetrack: 'removetrack'
};
// emulate attribute EventHandler support to allow for feature detection
for (var event in TrackList.prototype.allowedEvents_) {
TrackList.prototype['on' + event] = null;
}
exports['default'] = TrackList;
},{"42":42,"78":78,"92":92}],75:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _browser = _dereq_(78);
var browser = _interopRequireWildcard(_browser);
var _document = _dereq_(92);
var _document2 = _interopRequireDefault(_document);
var _guid = _dereq_(84);
var Guid = _interopRequireWildcard(_guid);
var _eventTarget = _dereq_(42);
var _eventTarget2 = _interopRequireDefault(_eventTarget);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file track.js
*/
/**
* setup the common parts of an audio, video, or text track
* @link https://html.spec.whatwg.org/multipage/embedded-content.html
*
* @param {String} type The type of track we are dealing with audio|video|text
* @param {Object=} options Object of option names and values
* @extends EventTarget
* @class Track
*/
var Track = function (_EventTarget) {
_inherits(Track, _EventTarget);
function Track() {
var _ret;
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
_classCallCheck(this, Track);
var _this = _possibleConstructorReturn(this, _EventTarget.call(this));
var track = _this; // eslint-disable-line
if (browser.IS_IE8) {
track = _document2['default'].createElement('custom');
for (var prop in Track.prototype) {
if (prop !== 'constructor') {
track[prop] = Track.prototype[prop];
}
}
}
var trackProps = {
id: options.id || 'vjs_track_' + Guid.newGUID(),
kind: options.kind || '',
label: options.label || '',
language: options.language || ''
};
var _loop = function _loop(key) {
Object.defineProperty(track, key, {
get: function get() {
return trackProps[key];
},
set: function set() {}
});
};
for (var key in trackProps) {
_loop(key);
}
return _ret = track, _possibleConstructorReturn(_this, _ret);
}
return Track;
}(_eventTarget2['default']);
exports['default'] = Track;
},{"42":42,"78":78,"84":84,"92":92}],76:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _trackList = _dereq_(74);
var _trackList2 = _interopRequireDefault(_trackList);
var _browser = _dereq_(78);
var browser = _interopRequireWildcard(_browser);
var _document = _dereq_(92);
var _document2 = _interopRequireDefault(_document);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @file video-track-list.js
*/
/**
* disable other video tracks before selecting the new one
*
* @param {Array|VideoTrackList} list list to work on
* @param {VideoTrack} track the track to skip
*/
var disableOthers = function disableOthers(list, track) {
for (var i = 0; i < list.length; i++) {
if (track.id === list[i].id) {
continue;
}
// another audio track is enabled, disable it
list[i].selected = false;
}
};
/**
* A list of possiblee video tracks. Most functionality is in the
* base class Tracklist and the spec for VideoTrackList is located at:
* @link https://html.spec.whatwg.org/multipage/embedded-content.html#videotracklist
*
* interface VideoTrackList : EventTarget {
* readonly attribute unsigned long length;
* getter VideoTrack (unsigned long index);
* VideoTrack? getTrackById(DOMString id);
* readonly attribute long selectedIndex;
*
* attribute EventHandler onchange;
* attribute EventHandler onaddtrack;
* attribute EventHandler onremovetrack;
* };
*
* @param {VideoTrack[]} tracks a list of video tracks to instantiate the list with
# @extends TrackList
* @class VideoTrackList
*/
var VideoTrackList = function (_TrackList) {
_inherits(VideoTrackList, _TrackList);
function VideoTrackList() {
var _this, _ret;
var tracks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
_classCallCheck(this, VideoTrackList);
var list = void 0;
// make sure only 1 track is enabled
// sorted from last index to first index
for (var i = tracks.length - 1; i >= 0; i--) {
if (tracks[i].selected) {
disableOthers(tracks, tracks[i]);
break;
}
}
// IE8 forces us to implement inheritance ourselves
// as it does not support Object.defineProperty properly
if (browser.IS_IE8) {
list = _document2['default'].createElement('custom');
for (var prop in _trackList2['default'].prototype) {
if (prop !== 'constructor') {
list[prop] = _trackList2['default'].prototype[prop];
}
}
for (var _prop in VideoTrackList.prototype) {
if (_prop !== 'constructor') {
list[_prop] = VideoTrackList.prototype[_prop];
}
}
}
list = (_this = _possibleConstructorReturn(this, _TrackList.call(this, tracks, list)), _this);
list.changing_ = false;
Object.defineProperty(list, 'selectedIndex', {
get: function get() {
for (var _i = 0; _i < this.length; _i++) {
if (this[_i].selected) {
return _i;
}
}
return -1;
},
set: function set() {}
});
return _ret = list, _possibleConstructorReturn(_this, _ret);
}
VideoTrackList.prototype.addTrack_ = function addTrack_(track) {
var _this2 = this;
if (track.selected) {
disableOthers(this, track);
}
_TrackList.prototype.addTrack_.call(this, track);
// native tracks don't have this
if (!track.addEventListener) {
return;
}
track.addEventListener('selectedchange', function () {
if (_this2.changing_) {
return;
}
_this2.changing_ = true;
disableOthers(_this2, track);
_this2.changing_ = false;
_this2.trigger('change');
});
};
VideoTrackList.prototype.addTrack = function addTrack(track) {
this.addTrack_(track);
};
VideoTrackList.prototype.removeTrack = function removeTrack(track) {
_TrackList.prototype.removeTrack_.call(this, track);
};
return VideoTrackList;
}(_trackList2['default']);
exports['default'] = VideoTrackList;
},{"74":74,"78":78,"92":92}],77:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _trackEnums = _dereq_(73);
var _track = _dereq_(75);
var _track2 = _interopRequireDefault(_track);
var _mergeOptions = _dereq_(86);
var _mergeOptions2 = _interopRequireDefault(_mergeOptions);
var _browser = _dereq_(78);
var browser = _interopRequireWildcard(_browser);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
/**
* A single video text track as defined in:
* @link https://html.spec.whatwg.org/multipage/embedded-content.html#videotrack
*
* interface VideoTrack {
* readonly attribute DOMString id;
* readonly attribute DOMString kind;
* readonly attribute DOMString label;
* readonly attribute DOMString language;
* attribute boolean selected;
* };
*
* @param {Object=} options Object of option names and values
* @class VideoTrack
*/
var VideoTrack = function (_Track) {
_inherits(VideoTrack, _Track);
function VideoTrack() {
var _this, _ret;
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
_classCallCheck(this, VideoTrack);
var settings = (0, _mergeOptions2['default'])(options, {
kind: _trackEnums.VideoTrackKind[options.kind] || ''
});
// on IE8 this will be a document element
// for every other browser this will be a normal object
var track = (_this = _possibleConstructorReturn(this, _Track.call(this, settings)), _this);
var selected = false;
if (browser.IS_IE8) {
for (var prop in VideoTrack.prototype) {
if (prop !== 'constructor') {
track[prop] = VideoTrack.prototype[prop];
}
}
}
Object.defineProperty(track, 'selected', {
get: function get() {
return selected;
},
set: function set(newSelected) {
// an invalid or unchanged value
if (typeof newSelected !== 'boolean' || newSelected === selected) {
return;
}
selected = newSelected;
this.trigger('selectedchange');
}
});
// if the user sets this track to selected then
// set selected to that true value otherwise
// we keep it false
if (settings.selected) {
track.selected = settings.selected;
}
return _ret = track, _possibleConstructorReturn(_this, _ret);
}
return VideoTrack;
}(_track2['default']);
exports['default'] = VideoTrack;
},{"73":73,"75":75,"78":78,"86":86}],78:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
exports.BACKGROUND_SIZE_SUPPORTED = exports.TOUCH_ENABLED = exports.IE_VERSION = exports.IS_IE8 = exports.IS_CHROME = exports.IS_EDGE = exports.IS_FIREFOX = exports.IS_NATIVE_ANDROID = exports.IS_OLD_ANDROID = exports.ANDROID_VERSION = exports.IS_ANDROID = exports.IOS_VERSION = exports.IS_IOS = exports.IS_IPOD = exports.IS_IPHONE = exports.IS_IPAD = undefined;
var _document = _dereq_(92);
var _document2 = _interopRequireDefault(_document);
var _window = _dereq_(93);
var _window2 = _interopRequireDefault(_window);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
/**
* @file browser.js
*/
var USER_AGENT = _window2['default'].navigator && _window2['default'].navigator.userAgent || '';
var webkitVersionMap = /AppleWebKit\/([\d.]+)/i.exec(USER_AGENT);
var appleWebkitVersion = webkitVersionMap ? parseFloat(webkitVersionMap.pop()) : null;
/*
* Device is an iPhone
*
* @type {Boolean}
* @constant
* @private
*/
var IS_IPAD = exports.IS_IPAD = /iPad/i.test(USER_AGENT);
// The Facebook app's UIWebView identifies as both an iPhone and iPad, so
// to identify iPhones, we need to exclude iPads.
// http://artsy.github.io/blog/2012/10/18/the-perils-of-ios-user-agent-sniffing/
var IS_IPHONE = exports.IS_IPHONE = /iPhone/i.test(USER_AGENT) && !IS_IPAD;
var IS_IPOD = exports.IS_IPOD = /iPod/i.test(USER_AGENT);
var IS_IOS = exports.IS_IOS = IS_IPHONE || IS_IPAD || IS_IPOD;
var IOS_VERSION = exports.IOS_VERSION = function () {
var match = USER_AGENT.match(/OS (\d+)_/i);
if (match && match[1]) {
return match[1];
}
return null;
}();
var IS_ANDROID = exports.IS_ANDROID = /Android/i.test(USER_AGENT);
var ANDROID_VERSION = exports.ANDROID_VERSION = function () {
// This matches Android Major.Minor.Patch versions
// ANDROID_VERSION is Major.Minor as a Number, if Minor isn't available, then only Major is returned
var match = USER_AGENT.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);
if (!match) {
return null;
}
var major = match[1] && parseFloat(match[1]);
var minor = match[2] && parseFloat(match[2]);
if (major && minor) {
return parseFloat(match[1] + '.' + match[2]);
} else if (major) {
return major;
}
return null;
}();
// Old Android is defined as Version older than 2.3, and requiring a webkit version of the android browser
var IS_OLD_ANDROID = exports.IS_OLD_ANDROID = IS_ANDROID && /webkit/i.test(USER_AGENT) && ANDROID_VERSION < 2.3;
var IS_NATIVE_ANDROID = exports.IS_NATIVE_ANDROID = IS_ANDROID && ANDROID_VERSION < 5 && appleWebkitVersion < 537;
var IS_FIREFOX = exports.IS_FIREFOX = /Firefox/i.test(USER_AGENT);
var IS_EDGE = exports.IS_EDGE = /Edge/i.test(USER_AGENT);
var IS_CHROME = exports.IS_CHROME = !IS_EDGE && /Chrome/i.test(USER_AGENT);
var IS_IE8 = exports.IS_IE8 = /MSIE\s8\.0/.test(USER_AGENT);
var IE_VERSION = exports.IE_VERSION = function (result) {
return result && parseFloat(result[1]);
}(/MSIE\s(\d+)\.\d/.exec(USER_AGENT));
var TOUCH_ENABLED = exports.TOUCH_ENABLED = !!('ontouchstart' in _window2['default'] || _window2['default'].DocumentTouch && _document2['default'] instanceof _window2['default'].DocumentTouch);
var BACKGROUND_SIZE_SUPPORTED = exports.BACKGROUND_SIZE_SUPPORTED = 'backgroundSize' in _document2['default'].createElement('video').style;
},{"92":92,"93":93}],79:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
exports.bufferedPercent = bufferedPercent;
var _timeRanges = _dereq_(88);
/**
* Compute how much your video has been buffered
*
* @param {Object} Buffered object
* @param {Number} Total duration
* @return {Number} Percent buffered of the total duration
* @private
* @function bufferedPercent
*/
function bufferedPercent(buffered, duration) {
var bufferedDuration = 0;
var start = void 0;
var end = void 0;
if (!duration) {
return 0;
}
if (!buffered || !buffered.length) {
buffered = (0, _timeRanges.createTimeRange)(0, 0);
}
for (var i = 0; i < buffered.length; i++) {
start = buffered.start(i);
end = buffered.end(i);
// buffered end can be bigger than duration by a very small fraction
if (end > duration) {
end = duration;
}
bufferedDuration += end - start;
}
return bufferedDuration / duration;
} /**
* @file buffer.js
*/
},{"88":88}],80:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
exports.$$ = exports.$ = undefined;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; /**
* @file dom.js
*/
var _templateObject = _taggedTemplateLiteralLoose(['Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set ', ' to ', '.'], ['Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set ', ' to ', '.']);
exports.isEl = isEl;
exports.getEl = getEl;
exports.createEl = createEl;
exports.textContent = textContent;
exports.insertElFirst = insertElFirst;
exports.getElData = getElData;
exports.hasElData = hasElData;
exports.removeElData = removeElData;
exports.hasElClass = hasElClass;
exports.addElClass = addElClass;
exports.removeElClass = removeElClass;
exports.toggleElClass = toggleElClass;
exports.setElAttributes = setElAttributes;
exports.getElAttributes = getElAttributes;
exports.blockTextSelection = blockTextSelection;
exports.unblockTextSelection = unblockTextSelection;
exports.findElPosition = findElPosition;
exports.getPointerPosition = getPointerPosition;
exports.isTextNode = isTextNode;
exports.emptyEl = emptyEl;
exports.normalizeContent = normalizeContent;
exports.appendContent = appendContent;
exports.insertContent = insertContent;
var _document = _dereq_(92);
var _document2 = _interopRequireDefault(_document);
var _window = _dereq_(93);
var _window2 = _interopRequireDefault(_window);
var _guid = _dereq_(84);
var Guid = _interopRequireWildcard(_guid);
var _log = _dereq_(85);
var _log2 = _interopRequireDefault(_log);
var _tsml = _dereq_(146);
var _tsml2 = _interopRequireDefault(_tsml);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _taggedTemplateLiteralLoose(strings, raw) { strings.raw = raw; return strings; }
/**
* Detect if a value is a string with any non-whitespace characters.
*
* @param {String} str
* @return {Boolean}
*/
function isNonBlankString(str) {
return typeof str === 'string' && /\S/.test(str);
}
/**
* Throws an error if the passed string has whitespace. This is used by
* class methods to be relatively consistent with the classList API.
*
* @param {String} str
* @return {Boolean}
*/
function throwIfWhitespace(str) {
if (/\s/.test(str)) {
throw new Error('class has illegal whitespace characters');
}
}
/**
* Produce a regular expression for matching a class name.
*
* @param {String} className
* @return {RegExp}
*/
function classRegExp(className) {
return new RegExp('(^|\\s)' + className + '($|\\s)');
}
/**
* Determines, via duck typing, whether or not a value is a DOM element.
*
* @function isEl
* @param {Mixed} value
* @return {Boolean}
*/
function isEl(value) {
return !!value && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.nodeType === 1;
}
/**
* Creates functions to query the DOM using a given method.
*
* @function createQuerier
* @private
* @param {String} method
* @return {Function}
*/
function createQuerier(method) {
return function (selector, context) {
if (!isNonBlankString(selector)) {
return _document2['default'][method](null);
}
if (isNonBlankString(context)) {
context = _document2['default'].querySelector(context);
}
var ctx = isEl(context) ? context : _document2['default'];
return ctx[method] && ctx[method](selector);
};
}
/**
* Shorthand for document.getElementById()
* Also allows for CSS (jQuery) ID syntax. But nothing other than IDs.
*
* @param {String} id Element ID
* @return {Element} Element with supplied ID
* @function getEl
*/
function getEl(id) {
if (id.indexOf('#') === 0) {
id = id.slice(1);
}
return _document2['default'].getElementById(id);
}
/**
* Creates an element and applies properties.
*
* @param {String} [tagName='div'] Name of tag to be created.
* @param {Object} [properties={}] Element properties to be applied.
* @param {Object} [attributes={}] Element attributes to be applied.
* @return {Element}
* @function createEl
*/
function createEl() {
var tagName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'div';
var properties = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
var el = _document2['default'].createElement(tagName);
Object.getOwnPropertyNames(properties).forEach(function (propName) {
var val = properties[propName];
// See #2176
// We originally were accepting both properties and attributes in the
// same object, but that doesn't work so well.
if (propName.indexOf('aria-') !== -1 || propName === 'role' || propName === 'type') {
_log2['default'].warn((0, _tsml2['default'])(_templateObject, propName, val));
el.setAttribute(propName, val);
} else {
el[propName] = val;
}
});
Object.getOwnPropertyNames(attributes).forEach(function (attrName) {
el.setAttribute(attrName, attributes[attrName]);
});
return el;
}
/**
* Injects text into an element, replacing any existing contents entirely.
*
* @param {Element} el
* @param {String} text
* @return {Element}
* @function textContent
*/
function textContent(el, text) {
if (typeof el.textContent === 'undefined') {
el.innerText = text;
} else {
el.textContent = text;
}
}
/**
* Insert an element as the first child node of another
*
* @param {Element} child Element to insert
* @param {Element} parent Element to insert child into
* @private
* @function insertElFirst
*/
function insertElFirst(child, parent) {
if (parent.firstChild) {
parent.insertBefore(child, parent.firstChild);
} else {
parent.appendChild(child);
}
}
/**
* Element Data Store. Allows for binding data to an element without putting it directly on the element.
* Ex. Event listeners are stored here.
* (also from jsninja.com, slightly modified and updated for closure compiler)
*
* @type {Object}
* @private
*/
var elData = {};
/*
* Unique attribute name to store an element's guid in
*
* @type {String}
* @constant
* @private
*/
var elIdAttr = 'vdata' + new Date().getTime();
/**
* Returns the cache object where data for an element is stored
*
* @param {Element} el Element to store data for.
* @return {Object}
* @function getElData
*/
function getElData(el) {
var id = el[elIdAttr];
if (!id) {
id = el[elIdAttr] = Guid.newGUID();
}
if (!elData[id]) {
elData[id] = {};
}
return elData[id];
}
/**
* Returns whether or not an element has cached data
*
* @param {Element} el A dom element
* @return {Boolean}
* @private
* @function hasElData
*/
function hasElData(el) {
var id = el[elIdAttr];
if (!id) {
return false;
}
return !!Object.getOwnPropertyNames(elData[id]).length;
}
/**
* Delete data for the element from the cache and the guid attr from getElementById
*
* @param {Element} el Remove data for an element
* @private
* @function removeElData
*/
function removeElData(el) {
var id = el[elIdAttr];
if (!id) {
return;
}
// Remove all stored data
delete elData[id];
// Remove the elIdAttr property from the DOM node
try {
delete el[elIdAttr];
} catch (e) {
if (el.removeAttribute) {
el.removeAttribute(elIdAttr);
} else {
// IE doesn't appear to support removeAttribute on the document element
el[elIdAttr] = null;
}
}
}
/**
* Check if an element has a CSS class
*
* @function hasElClass
* @param {Element} element Element to check
* @param {String} classToCheck Classname to check
*/
function hasElClass(element, classToCheck) {
throwIfWhitespace(classToCheck);
if (element.classList) {
return element.classList.contains(classToCheck);
}
return classRegExp(classToCheck).test(element.className);
}
/**
* Add a CSS class name to an element
*
* @function addElClass
* @param {Element} element Element to add class name to
* @param {String} classToAdd Classname to add
*/
function addElClass(element, classToAdd) {
if (element.classList) {
element.classList.add(classToAdd);
// Don't need to `throwIfWhitespace` here because `hasElClass` will do it
// in the case of classList not being supported.
} else if (!hasElClass(element, classToAdd)) {
element.className = (element.className + ' ' + classToAdd).trim();
}
return element;
}
/**
* Remove a CSS class name from an element
*
* @function removeElClass
* @param {Element} element Element to remove from class name
* @param {String} classToRemove Classname to remove
*/
function removeElClass(element, classToRemove) {
if (element.classList) {
element.classList.remove(classToRemove);
} else {
throwIfWhitespace(classToRemove);
element.className = element.className.split(/\s+/).filter(function (c) {
return c !== classToRemove;
}).join(' ');
}
return element;
}
/**
* Adds or removes a CSS class name on an element depending on an optional
* condition or the presence/absence of the class name.
*
* @function toggleElClass
* @param {Element} element
* @param {String} classToToggle
* @param {Boolean|Function} [predicate]
* Can be a function that returns a Boolean. If `true`, the class
* will be added; if `false`, the class will be removed. If not
* given, the class will be added if not present and vice versa.
*/
function toggleElClass(element, classToToggle, predicate) {
// This CANNOT use `classList` internally because IE does not support the
// second parameter to the `classList.toggle()` method! Which is fine because
// `classList` will be used by the add/remove functions.
var has = hasElClass(element, classToToggle);
if (typeof predicate === 'function') {
predicate = predicate(element, classToToggle);
}
if (typeof predicate !== 'boolean') {
predicate = !has;
}
// If the necessary class operation matches the current state of the
// element, no action is required.
if (predicate === has) {
return;
}
if (predicate) {
addElClass(element, classToToggle);
} else {
removeElClass(element, classToToggle);
}
return element;
}
/**
* Apply attributes to an HTML element.
*
* @param {Element} el Target element.
* @param {Object=} attributes Element attributes to be applied.
* @private
* @function setElAttributes
*/
function setElAttributes(el, attributes) {
Object.getOwnPropertyNames(attributes).forEach(function (attrName) {
var attrValue = attributes[attrName];
if (attrValue === null || typeof attrValue === 'undefined' || attrValue === false) {
el.removeAttribute(attrName);
} else {
el.setAttribute(attrName, attrValue === true ? '' : attrValue);
}
});
}
/**
* Get an element's attribute values, as defined on the HTML tag
* Attributes are not the same as properties. They're defined on the tag
* or with setAttribute (which shouldn't be used with HTML)
* This will return true or false for boolean attributes.
*
* @param {Element} tag Element from which to get tag attributes
* @return {Object}
* @private
* @function getElAttributes
*/
function getElAttributes(tag) {
var obj = {};
// known boolean attributes
// we can check for matching boolean properties, but older browsers
// won't know about HTML5 boolean attributes that we still read from
var knownBooleans = ',' + 'autoplay,controls,loop,muted,default' + ',';
if (tag && tag.attributes && tag.attributes.length > 0) {
var attrs = tag.attributes;
for (var i = attrs.length - 1; i >= 0; i--) {
var attrName = attrs[i].name;
var attrVal = attrs[i].value;
// check for known booleans
// the matching element property will return a value for typeof
if (typeof tag[attrName] === 'boolean' || knownBooleans.indexOf(',' + attrName + ',') !== -1) {
// the value of an included boolean attribute is typically an empty
// string ('') which would equal false if we just check for a false value.
// we also don't want support bad code like autoplay='false'
attrVal = attrVal !== null ? true : false;
}
obj[attrName] = attrVal;
}
}
return obj;
}
/**
* Attempt to block the ability to select text while dragging controls
*
* @return {Boolean}
* @function blockTextSelection
*/
function blockTextSelection() {
_document2['default'].body.focus();
_document2['default'].onselectstart = function () {
return false;
};
}
/**
* Turn off text selection blocking
*
* @return {Boolean}
* @function unblockTextSelection
*/
function unblockTextSelection() {
_document2['default'].onselectstart = function () {
return true;
};
}
/**
* Offset Left
* getBoundingClientRect technique from
* John Resig http://ejohn.org/blog/getboundingclientrect-is-awesome/
*
* @function findElPosition
* @param {Element} el Element from which to get offset
* @return {Object}
*/
function findElPosition(el) {
var box = void 0;
if (el.getBoundingClientRect && el.parentNode) {
box = el.getBoundingClientRect();
}
if (!box) {
return {
left: 0,
top: 0
};
}
var docEl = _document2['default'].documentElement;
var body = _document2['default'].body;
var clientLeft = docEl.clientLeft || body.clientLeft || 0;
var scrollLeft = _window2['default'].pageXOffset || body.scrollLeft;
var left = box.left + scrollLeft - clientLeft;
var clientTop = docEl.clientTop || body.clientTop || 0;
var scrollTop = _window2['default'].pageYOffset || body.scrollTop;
var top = box.top + scrollTop - clientTop;
// Android sometimes returns slightly off decimal values, so need to round
return {
left: Math.round(left),
top: Math.round(top)
};
}
/**
* Get pointer position in element
* Returns an object with x and y coordinates.
* The base on the coordinates are the bottom left of the element.
*
* @function getPointerPosition
* @param {Element} el Element on which to get the pointer position on
* @param {Event} event Event object
* @return {Object} This object will have x and y coordinates corresponding to the mouse position
*/
function getPointerPosition(el, event) {
var position = {};
var box = findElPosition(el);
var boxW = el.offsetWidth;
var boxH = el.offsetHeight;
var boxY = box.top;
var boxX = box.left;
var pageY = event.pageY;
var pageX = event.pageX;
if (event.changedTouches) {
pageX = event.changedTouches[0].pageX;
pageY = event.changedTouches[0].pageY;
}
position.y = Math.max(0, Math.min(1, (boxY - pageY + boxH) / boxH));
position.x = Math.max(0, Math.min(1, (pageX - boxX) / boxW));
return position;
}
/**
* Determines, via duck typing, whether or not a value is a text node.
*
* @param {Mixed} value
* @return {Boolean}
*/
function isTextNode(value) {
return !!value && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.nodeType === 3;
}
/**
* Empties the contents of an element.
*
* @function emptyEl
* @param {Element} el
* @return {Element}
*/
function emptyEl(el) {
while (el.firstChild) {
el.removeChild(el.firstChild);
}
return el;
}
/**
* Normalizes content for eventual insertion into the DOM.
*
* This allows a wide range of content definition methods, but protects
* from falling into the trap of simply writing to `innerHTML`, which is
* an XSS concern.
*
* The content for an element can be passed in multiple types and
* combinations, whose behavior is as follows:
*
* - String
* Normalized into a text node.
*
* - Element, TextNode
* Passed through.
*
* - Array
* A one-dimensional array of strings, elements, nodes, or functions (which
* return single strings, elements, or nodes).
*
* - Function
* If the sole argument, is expected to produce a string, element,
* node, or array.
*
* @function normalizeContent
* @param {String|Element|TextNode|Array|Function} content
* @return {Array}
*/
function normalizeContent(content) {
// First, invoke content if it is a function. If it produces an array,
// that needs to happen before normalization.
if (typeof content === 'function') {
content = content();
}
// Next up, normalize to an array, so one or many items can be normalized,
// filtered, and returned.
return (Array.isArray(content) ? content : [content]).map(function (value) {
// First, invoke value if it is a function to produce a new value,
// which will be subsequently normalized to a Node of some kind.
if (typeof value === 'function') {
value = value();
}
if (isEl(value) || isTextNode(value)) {
return value;
}
if (typeof value === 'string' && /\S/.test(value)) {
return _document2['default'].createTextNode(value);
}
}).filter(function (value) {
return value;
});
}
/**
* Normalizes and appends content to an element.
*
* @function appendContent
* @param {Element} el
* @param {String|Element|TextNode|Array|Function} content
* See: `normalizeContent`
* @return {Element}
*/
function appendContent(el, content) {
normalizeContent(content).forEach(function (node) {
return el.appendChild(node);
});
return el;
}
/**
* Normalizes and inserts content into an element; this is identical to
* `appendContent()`, except it empties the element first.
*
* @function insertContent
* @param {Element} el
* @param {String|Element|TextNode|Array|Function} content
* See: `normalizeContent`
* @return {Element}
*/
function insertContent(el, content) {
return appendContent(emptyEl(el), content);
}
/**
* Finds a single DOM element matching `selector` within the optional
* `context` of another DOM element (defaulting to `document`).
*
* @function $
* @param {String} selector
* A valid CSS selector, which will be passed to `querySelector`.
*
* @param {Element|String} [context=document]
* A DOM element within which to query. Can also be a selector
* string in which case the first matching element will be used
* as context. If missing (or no element matches selector), falls
* back to `document`.
*
* @return {Element|null}
*/
var $ = exports.$ = createQuerier('querySelector');
/**
* Finds a all DOM elements matching `selector` within the optional
* `context` of another DOM element (defaulting to `document`).
*
* @function $$
* @param {String} selector
* A valid CSS selector, which will be passed to `querySelectorAll`.
*
* @param {Element|String} [context=document]
* A DOM element within which to query. Can also be a selector
* string in which case the first matching element will be used
* as context. If missing (or no element matches selector), falls
* back to `document`.
*
* @return {NodeList}
*/
var $$ = exports.$$ = createQuerier('querySelectorAll');
},{"146":146,"84":84,"85":85,"92":92,"93":93}],81:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
exports.fixEvent = fixEvent;
exports.on = on;
exports.off = off;
exports.trigger = trigger;
exports.one = one;
var _dom = _dereq_(80);
var Dom = _interopRequireWildcard(_dom);
var _guid = _dereq_(84);
var Guid = _interopRequireWildcard(_guid);
var _log = _dereq_(85);
var _log2 = _interopRequireDefault(_log);
var _window = _dereq_(93);
var _window2 = _interopRequireDefault(_window);
var _document = _dereq_(92);
var _document2 = _interopRequireDefault(_document);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
/**
* Clean up the listener cache and dispatchers
*
* @param {Element|Object} elem Element to clean up
* @param {String} type Type of event to clean up
* @private
* @method _cleanUpEvents
*/
function _cleanUpEvents(elem, type) {
var data = Dom.getElData(elem);
// Remove the events of a particular type if there are none left
if (data.handlers[type].length === 0) {
delete data.handlers[type];
// data.handlers[type] = null;
// Setting to null was causing an error with data.handlers
// Remove the meta-handler from the element
if (elem.removeEventListener) {
elem.removeEventListener(type, data.dispatcher, false);
} else if (elem.detachEvent) {
elem.detachEvent('on' + type, data.dispatcher);
}
}
// Remove the events object if there are no types left
if (Object.getOwnPropertyNames(data.handlers).length <= 0) {
delete data.handlers;
delete data.dispatcher;
delete data.disabled;
}
// Finally remove the element data if there is no data left
if (Object.getOwnPropertyNames(data).length === 0) {
Dom.removeElData(elem);
}
}
/**
* Loops through an array of event types and calls the requested method for each type.
*
* @param {Function} fn The event method we want to use.
* @param {Element|Object} elem Element or object to bind listeners to
* @param {String} type Type of event to bind to.
* @param {Function} callback Event listener.
* @private
* @function _handleMultipleEvents
*/
/**
* @file events.js
*
* Event System (John Resig - Secrets of a JS Ninja http://jsninja.com/)
* (Original book version wasn't completely usable, so fixed some things and made Closure Compiler compatible)
* This should work very similarly to jQuery's events, however it's based off the book version which isn't as
* robust as jquery's, so there's probably some differences.
*/
function _handleMultipleEvents(fn, elem, types, callback) {
types.forEach(function (type) {
// Call the event method for each one of the types
fn(elem, type, callback);
});
}
/**
* Fix a native event to have standard property values
*
* @param {Object} event Event object to fix
* @return {Object}
* @private
* @method fixEvent
*/
function fixEvent(event) {
function returnTrue() {
return true;
}
function returnFalse() {
return false;
}
// Test if fixing up is needed
// Used to check if !event.stopPropagation instead of isPropagationStopped
// But native events return true for stopPropagation, but don't have
// other expected methods like isPropagationStopped. Seems to be a problem
// with the Javascript Ninja code. So we're just overriding all events now.
if (!event || !event.isPropagationStopped) {
(function () {
var old = event || _window2['default'].event;
event = {};
// Clone the old object so that we can modify the values event = {};
// IE8 Doesn't like when you mess with native event properties
// Firefox returns false for event.hasOwnProperty('type') and other props
// which makes copying more difficult.
// TODO: Probably best to create a whitelist of event props
for (var key in old) {
// Safari 6.0.3 warns you if you try to copy deprecated layerX/Y
// Chrome warns you if you try to copy deprecated keyboardEvent.keyLocation
// and webkitMovementX/Y
if (key !== 'layerX' && key !== 'layerY' && key !== 'keyLocation' && key !== 'webkitMovementX' && key !== 'webkitMovementY') {
// Chrome 32+ warns if you try to copy deprecated returnValue, but
// we still want to if preventDefault isn't supported (IE8).
if (!(key === 'returnValue' && old.preventDefault)) {
event[key] = old[key];
}
}
}
// The event occurred on this element
if (!event.target) {
event.target = event.srcElement || _document2['default'];
}
// Handle which other element the event is related to
if (!event.relatedTarget) {
event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement;
}
// Stop the default browser action
event.preventDefault = function () {
if (old.preventDefault) {
old.preventDefault();
}
event.returnValue = false;
old.returnValue = false;
event.defaultPrevented = true;
};
event.defaultPrevented = false;
// Stop the event from bubbling
event.stopPropagation = function () {
if (old.stopPropagation) {
old.stopPropagation();
}
event.cancelBubble = true;
old.cancelBubble = true;
event.isPropagationStopped = returnTrue;
};
event.isPropagationStopped = returnFalse;
// Stop the event from bubbling and executing other handlers
event.stopImmediatePropagation = function () {
if (old.stopImmediatePropagation) {
old.stopImmediatePropagation();
}
event.isImmediatePropagationStopped = returnTrue;
event.stopPropagation();
};
event.isImmediatePropagationStopped = returnFalse;
// Handle mouse position
if (event.clientX !== null && event.clientX !== undefined) {
var doc = _document2['default'].documentElement;
var body = _document2['default'].body;
event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);
}
// Handle key presses
event.which = event.charCode || event.keyCode;
// Fix button for mouse clicks:
// 0 == left; 1 == middle; 2 == right
if (event.button !== null && event.button !== undefined) {
// The following is disabled because it does not pass videojs-standard
// and... yikes.
/* eslint-disable */
event.button = event.button & 1 ? 0 : event.button & 4 ? 1 : event.button & 2 ? 2 : 0;
/* eslint-enable */
}
})();
}
// Returns fixed-up instance
return event;
}
/**
* Add an event listener to element
* It stores the handler function in a separate cache object
* and adds a generic handler to the element's event,
* along with a unique id (guid) to the element.
*
* @param {Element|Object} elem Element or object to bind listeners to
* @param {String|Array} type Type of event to bind to.
* @param {Function} fn Event listener.
* @method on
*/
function on(elem, type, fn) {
if (Array.isArray(type)) {
return _handleMultipleEvents(on, elem, type, fn);
}
var data = Dom.getElData(elem);
// We need a place to store all our handler data
if (!data.handlers) {
data.handlers = {};
}
if (!data.handlers[type]) {
data.handlers[type] = [];
}
if (!fn.guid) {
fn.guid = Guid.newGUID();
}
data.handlers[type].push(fn);
if (!data.dispatcher) {
data.disabled = false;
data.dispatcher = function (event, hash) {
if (data.disabled) {
return;
}
event = fixEvent(event);
var handlers = data.handlers[event.type];
if (handlers) {
// Copy handlers so if handlers are added/removed during the process it doesn't throw everything off.
var handlersCopy = handlers.slice(0);
for (var m = 0, n = handlersCopy.length; m < n; m++) {
if (event.isImmediatePropagationStopped()) {
break;
} else {
try {
handlersCopy[m].call(elem, event, hash);
} catch (e) {
_log2['default'].error(e);
}
}
}
}
};
}
if (data.handlers[type].length === 1) {
if (elem.addEventListener) {
elem.addEventListener(type, data.dispatcher, false);
} else if (elem.attachEvent) {
elem.attachEvent('on' + type, data.dispatcher);
}
}
}
/**
* Removes event listeners from an element
*
* @param {Element|Object} elem Object to remove listeners from
* @param {String|Array=} type Type of listener to remove. Don't include to remove all events from element.
* @param {Function} fn Specific listener to remove. Don't include to remove listeners for an event type.
* @method off
*/
function off(elem, type, fn) {
// Don't want to add a cache object through getElData if not needed
if (!Dom.hasElData(elem)) {
return;
}
var data = Dom.getElData(elem);
// If no events exist, nothing to unbind
if (!data.handlers) {
return;
}
if (Array.isArray(type)) {
return _handleMultipleEvents(off, elem, type, fn);
}
// Utility function
var removeType = function removeType(t) {
data.handlers[t] = [];
_cleanUpEvents(elem, t);
};
// Are we removing all bound events?
if (!type) {
for (var t in data.handlers) {
removeType(t);
}
return;
}
var handlers = data.handlers[type];
// If no handlers exist, nothing to unbind
if (!handlers) {
return;
}
// If no listener was provided, remove all listeners for type
if (!fn) {
removeType(type);
return;
}
// We're only removing a single handler
if (fn.guid) {
for (var n = 0; n < handlers.length; n++) {
if (handlers[n].guid === fn.guid) {
handlers.splice(n--, 1);
}
}
}
_cleanUpEvents(elem, type);
}
/**
* Trigger an event for an element
*
* @param {Element|Object} elem Element to trigger an event on
* @param {Event|Object|String} event A string (the type) or an event object with a type attribute
* @param {Object} [hash] data hash to pass along with the event
* @return {Boolean=} Returned only if default was prevented
* @method trigger
*/
function trigger(elem, event, hash) {
// Fetches element data and a reference to the parent (for bubbling).
// Don't want to add a data object to cache for every parent,
// so checking hasElData first.
var elemData = Dom.hasElData(elem) ? Dom.getElData(elem) : {};
var parent = elem.parentNode || elem.ownerDocument;
// type = event.type || event,
// handler;
// If an event name was passed as a string, creates an event out of it
if (typeof event === 'string') {
event = { type: event, target: elem };
}
// Normalizes the event properties.
event = fixEvent(event);
// If the passed element has a dispatcher, executes the established handlers.
if (elemData.dispatcher) {
elemData.dispatcher.call(elem, event, hash);
}
// Unless explicitly stopped or the event does not bubble (e.g. media events)
// recursively calls this function to bubble the event up the DOM.
if (parent && !event.isPropagationStopped() && event.bubbles === true) {
trigger.call(null, parent, event, hash);
// If at the top of the DOM, triggers the default action unless disabled.
} else if (!parent && !event.defaultPrevented) {
var targetData = Dom.getElData(event.target);
// Checks if the target has a default action for this event.
if (event.target[event.type]) {
// Temporarily disables event dispatching on the target as we have already executed the handler.
targetData.disabled = true;
// Executes the default action.
if (typeof event.target[event.type] === 'function') {
event.target[event.type]();
}
// Re-enables event dispatching.
targetData.disabled = false;
}
}
// Inform the triggerer if the default was prevented by returning false
return !event.defaultPrevented;
}
/**
* Trigger a listener only once for an event
*
* @param {Element|Object} elem Element or object to
* @param {String|Array} type Name/type of event
* @param {Function} fn Event handler function
* @method one
*/
function one(elem, type, fn) {
if (Array.isArray(type)) {
return _handleMultipleEvents(one, elem, type, fn);
}
var func = function func() {
off(elem, type, func);
fn.apply(this, arguments);
};
// copy the guid to the new function so it can removed using the original function's ID
func.guid = fn.guid = fn.guid || Guid.newGUID();
on(elem, type, func);
}
},{"80":80,"84":84,"85":85,"92":92,"93":93}],82:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
exports.bind = undefined;
var _guid = _dereq_(84);
/**
* Bind (a.k.a proxy or Context). A simple method for changing the context of a function
* It also stores a unique id on the function so it can be easily removed from events
*
* @param {*} context The object to bind as scope
* @param {Function} fn The function to be bound to a scope
* @param {Number=} uid An optional unique ID for the function to be set
* @return {Function}
* @private
* @method bind
*/
var bind = exports.bind = function bind(context, fn, uid) {
// Make sure the function has a unique ID
if (!fn.guid) {
fn.guid = (0, _guid.newGUID)();
}
// Create the new function that changes the context
var ret = function ret() {
return fn.apply(context, arguments);
};
// Allow for the ability to individualize this function
// Needed in the case where multiple objects might share the same prototype
// IF both items add an event listener with the same function, then you try to remove just one
// it will remove both because they both have the same guid.
// when using this, you need to use the bind method when you remove the listener as well.
// currently used in text tracks
ret.guid = uid ? uid + '_' + fn.guid : fn.guid;
return ret;
}; /**
* @file fn.js
*/
},{"84":84}],83:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
/**
* @file format-time.js
*
* Format seconds as a time string, H:MM:SS or M:SS
* Supplying a guide (in seconds) will force a number of leading zeros
* to cover the length of the guide
*
* @param {Number} seconds Number of seconds to be turned into a string
* @param {Number} guide Number (in seconds) to model the string after
* @return {String} Time formatted as H:MM:SS or M:SS
* @private
* @function formatTime
*/
function formatTime(seconds) {
var guide = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : seconds;
seconds = seconds < 0 ? 0 : seconds;
var s = Math.floor(seconds % 60);
var m = Math.floor(seconds / 60 % 60);
var h = Math.floor(seconds / 3600);
var gm = Math.floor(guide / 60 % 60);
var gh = Math.floor(guide / 3600);
// handle invalid times
if (isNaN(seconds) || seconds === Infinity) {
// '-' is false for all relational operators (e.g. <, >=) so this setting
// will add the minimum number of fields specified by the guide
h = m = s = '-';
}
// Check if we need to show hours
h = h > 0 || gh > 0 ? h + ':' : '';
// If hours are showing, we may need to add a leading zero.
// Always show at least one digit of minutes.
m = ((h || gm >= 10) && m < 10 ? '0' + m : m) + ':';
// Check if leading zero is need for seconds
s = s < 10 ? '0' + s : s;
return h + m + s;
}
exports['default'] = formatTime;
},{}],84:[function(_dereq_,module,exports){
"use strict";
exports.__esModule = true;
exports.newGUID = newGUID;
/**
* @file guid.js
*
* Unique ID for an element or function
* @type {Number}
* @private
*/
var _guid = 1;
/**
* Get the next unique ID
*
* @return {String}
* @function newGUID
*/
function newGUID() {
return _guid++;
}
},{}],85:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
exports.logByType = undefined;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; /**
* @file log.js
*/
var _window = _dereq_(93);
var _window2 = _interopRequireDefault(_window);
var _browser = _dereq_(78);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var log = void 0;
/**
* Log messages to the console and history based on the type of message
*
* @param {String} type
* The name of the console method to use.
* @param {Array} args
* The arguments to be passed to the matching console method.
* @param {Boolean} [stringify]
* By default, only old IEs should get console argument stringification,
* but this is exposed as a parameter to facilitate testing.
*/
var logByType = exports.logByType = function logByType(type, args) {
var stringify = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !!_browser.IE_VERSION && _browser.IE_VERSION < 11;
// If there's no console then don't try to output messages, but they will
// still be stored in `log.history`.
//
// Was setting these once outside of this function, but containing them
// in the function makes it easier to test cases where console doesn't exist
// when the module is executed.
var fn = _window2['default'].console && _window2['default'].console[type] || function () {};
if (type !== 'log') {
// add the type to the front of the message when it's not "log"
args.unshift(type.toUpperCase() + ':');
}
// add to history
log.history.push(args);
// add console prefix after adding to history
args.unshift('VIDEOJS:');
// IEs previous to 11 log objects uselessly as "[object Object]"; so, JSONify
// objects and arrays for those less-capable browsers.
if (stringify) {
args = args.map(function (a) {
if (a && (typeof a === 'undefined' ? 'undefined' : _typeof(a)) === 'object' || Array.isArray(a)) {
try {
return JSON.stringify(a);
} catch (x) {
return String(a);
}
}
// Cast to string before joining, so we get null and undefined explicitly
// included in output (as we would in a modern console).
return String(a);
}).join(' ');
}
// Old IE versions do not allow .apply() for console methods (they are
// reported as objects rather than functions).
if (!fn.apply) {
fn(args);
} else {
fn[Array.isArray(args) ? 'apply' : 'call'](console, args);
}
};
/**
* Log plain debug messages
*
* @function log
*/
log = function log() {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
logByType('log', args);
};
/**
* Keep a history of log messages
*
* @type {Array}
*/
log.history = [];
/**
* Log error messages
*
* @method error
*/
log.error = function () {
for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
return logByType('error', args);
};
/**
* Log warning messages
*
* @method warn
*/
log.warn = function () {
for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
args[_key3] = arguments[_key3];
}
return logByType('warn', args);
};
exports['default'] = log;
},{"78":78,"93":93}],86:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; /**
* @file merge-options.js
*/
exports['default'] = mergeOptions;
var _merge = _dereq_(131);
var _merge2 = _interopRequireDefault(_merge);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function isPlain(obj) {
return !!obj && (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && obj.toString() === '[object Object]' && obj.constructor === Object;
}
/**
* Merge customizer. video.js simply overwrites non-simple objects
* (like arrays) instead of attempting to overlay them.
* @see https://lodash.com/docs#merge
*/
function customizer(destination, source) {
// If we're not working with a plain object, copy the value as is
// If source is an array, for instance, it will replace destination
if (!isPlain(source)) {
return source;
}
// If the new value is a plain object but the first object value is not
// we need to create a new object for the first object to merge with.
// This makes it consistent with how merge() works by default
// and also protects from later changes the to first object affecting
// the second object's values.
if (!isPlain(destination)) {
return mergeOptions(source);
}
}
/**
* Merge one or more options objects, recursively merging **only**
* plain object properties. Previously `deepMerge`.
*
* @param {...Object} source One or more objects to merge
* @returns {Object} a new object that is the union of all
* provided objects
* @function mergeOptions
*/
function mergeOptions() {
// contruct the call dynamically to handle the variable number of
// objects to merge
var args = Array.prototype.slice.call(arguments);
// unshift an empty object into the front of the call as the target
// of the merge
args.unshift({});
// customize conflict resolution to match our historical merge behavior
args.push(customizer);
_merge2['default'].apply(null, args);
// return the mutated result object
return args[0];
}
},{"131":131}],87:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
exports.setTextContent = exports.createStyleElement = undefined;
var _document = _dereq_(92);
var _document2 = _interopRequireDefault(_document);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var createStyleElement = exports.createStyleElement = function createStyleElement(className) {
var style = _document2['default'].createElement('style');
style.className = className;
return style;
};
var setTextContent = exports.setTextContent = function setTextContent(el, content) {
if (el.styleSheet) {
el.styleSheet.cssText = content;
} else {
el.textContent = content;
}
};
},{"92":92}],88:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
exports.createTimeRange = undefined;
exports.createTimeRanges = createTimeRanges;
var _log = _dereq_(85);
var _log2 = _interopRequireDefault(_log);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function rangeCheck(fnName, index, maxIndex) {
if (index < 0 || index > maxIndex) {
throw new Error('Failed to execute \'' + fnName + '\' on \'TimeRanges\': The index provided (' + index + ') is greater than or equal to the maximum bound (' + maxIndex + ').');
}
}
function getRange(fnName, valueIndex, ranges, rangeIndex) {
if (rangeIndex === undefined) {
_log2['default'].warn('DEPRECATED: Function \'' + fnName + '\' on \'TimeRanges\' called without an index argument.');
rangeIndex = 0;
}
rangeCheck(fnName, rangeIndex, ranges.length - 1);
return ranges[rangeIndex][valueIndex];
}
function createTimeRangesObj(ranges) {
if (ranges === undefined || ranges.length === 0) {
return {
length: 0,
start: function start() {
throw new Error('This TimeRanges object is empty');
},
end: function end() {
throw new Error('This TimeRanges object is empty');
}
};
}
return {
length: ranges.length,
start: getRange.bind(null, 'start', 0, ranges),
end: getRange.bind(null, 'end', 1, ranges)
};
}
/**
* @file time-ranges.js
*
* Should create a fake TimeRange object
* Mimics an HTML5 time range instance, which has functions that
* return the start and end times for a range
* TimeRanges are returned by the buffered() method
*
* @param {(Number|Array)} Start of a single range or an array of ranges
* @param {Number} End of a single range
* @private
* @method createTimeRanges
*/
function createTimeRanges(start, end) {
if (Array.isArray(start)) {
return createTimeRangesObj(start);
} else if (start === undefined || end === undefined) {
return createTimeRangesObj();
}
return createTimeRangesObj([[start, end]]);
}
exports.createTimeRange = createTimeRanges;
},{"85":85}],89:[function(_dereq_,module,exports){
"use strict";
exports.__esModule = true;
/**
* @file to-title-case.js
*
* Uppercase the first letter of a string
*
* @param {String} string String to be uppercased
* @return {String}
* @private
* @method toTitleCase
*/
function toTitleCase(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
}
exports["default"] = toTitleCase;
},{}],90:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
exports.isCrossOrigin = exports.getFileExtension = exports.getAbsoluteURL = exports.parseUrl = undefined;
var _document = _dereq_(92);
var _document2 = _interopRequireDefault(_document);
var _window = _dereq_(93);
var _window2 = _interopRequireDefault(_window);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
/**
* Resolve and parse the elements of a URL
*
* @param {String} url The url to parse
* @return {Object} An object of url details
* @method parseUrl
*/
/**
* @file url.js
*/
var parseUrl = exports.parseUrl = function parseUrl(url) {
var props = ['protocol', 'hostname', 'port', 'pathname', 'search', 'hash', 'host'];
// add the url to an anchor and let the browser parse the URL
var a = _document2['default'].createElement('a');
a.href = url;
// IE8 (and 9?) Fix
// ie8 doesn't parse the URL correctly until the anchor is actually
// added to the body, and an innerHTML is needed to trigger the parsing
var addToBody = a.host === '' && a.protocol !== 'file:';
var div = void 0;
if (addToBody) {
div = _document2['default'].createElement('div');
div.innerHTML = '<a href="' + url + '"></a>';
a = div.firstChild;
// prevent the div from affecting layout
div.setAttribute('style', 'display:none; position:absolute;');
_document2['default'].body.appendChild(div);
}
// Copy the specific URL properties to a new object
// This is also needed for IE8 because the anchor loses its
// properties when it's removed from the dom
var details = {};
for (var i = 0; i < props.length; i++) {
details[props[i]] = a[props[i]];
}
// IE9 adds the port to the host property unlike everyone else. If
// a port identifier is added for standard ports, strip it.
if (details.protocol === 'http:') {
details.host = details.host.replace(/:80$/, '');
}
if (details.protocol === 'https:') {
details.host = details.host.replace(/:443$/, '');
}
if (addToBody) {
_document2['default'].body.removeChild(div);
}
return details;
};
/**
* Get absolute version of relative URL. Used to tell flash correct URL.
* http://stackoverflow.com/questions/470832/getting-an-absolute-url-from-a-relative-one-ie6-issue
*
* @param {String} url URL to make absolute
* @return {String} Absolute URL
* @private
* @method getAbsoluteURL
*/
var getAbsoluteURL = exports.getAbsoluteURL = function getAbsoluteURL(url) {
// Check if absolute URL
if (!url.match(/^https?:\/\//)) {
// Convert to absolute URL. Flash hosted off-site needs an absolute URL.
var div = _document2['default'].createElement('div');
div.innerHTML = '<a href="' + url + '">x</a>';
url = div.firstChild.href;
}
return url;
};
/**
* Returns the extension of the passed file name. It will return an empty string if you pass an invalid path
*
* @param {String} path The fileName path like '/path/to/file.mp4'
* @returns {String} The extension in lower case or an empty string if no extension could be found.
* @method getFileExtension
*/
var getFileExtension = exports.getFileExtension = function getFileExtension(path) {
if (typeof path === 'string') {
var splitPathRe = /^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i;
var pathParts = splitPathRe.exec(path);
if (pathParts) {
return pathParts.pop().toLowerCase();
}
}
return '';
};
/**
* Returns whether the url passed is a cross domain request or not.
*
* @param {String} url The url to check
* @return {Boolean} Whether it is a cross domain request or not
* @method isCrossOrigin
*/
var isCrossOrigin = exports.isCrossOrigin = function isCrossOrigin(url) {
var winLoc = _window2['default'].location;
var urlInfo = parseUrl(url);
// IE8 protocol relative urls will return ':' for protocol
var srcProtocol = urlInfo.protocol === ':' ? winLoc.protocol : urlInfo.protocol;
// Check if url is for another domain/origin
// IE8 doesn't know location.origin, so we won't rely on it here
var crossOrigin = srcProtocol + urlInfo.host !== winLoc.protocol + winLoc.host;
return crossOrigin;
};
},{"92":92,"93":93}],91:[function(_dereq_,module,exports){
'use strict';
exports.__esModule = true;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; /**
* @file video.js
*/
/* global define */
// Include the built-in techs
var _window = _dereq_(93);
var _window2 = _interopRequireDefault(_window);
var _document = _dereq_(92);
var _document2 = _interopRequireDefault(_document);
var _setup = _dereq_(56);
var setup = _interopRequireWildcard(_setup);
var _stylesheet = _dereq_(87);
var stylesheet = _interopRequireWildcard(_stylesheet);
var _component = _dereq_(5);
var _component2 = _interopRequireDefault(_component);
var _eventTarget = _dereq_(42);
var _eventTarget2 = _interopRequireDefault(_eventTarget);
var _events = _dereq_(81);
var Events = _interopRequireWildcard(_events);
var _player = _dereq_(51);
var _player2 = _interopRequireDefault(_player);
var _plugins = _dereq_(52);
var _plugins2 = _interopRequireDefault(_plugins);
var _mergeOptions = _dereq_(86);
var _mergeOptions2 = _interopRequireDefault(_mergeOptions);
var _fn = _dereq_(82);
var Fn = _interopRequireWildcard(_fn);
var _textTrack = _dereq_(72);
var _textTrack2 = _interopRequireDefault(_textTrack);
var _audioTrack = _dereq_(64);
var _audioTrack2 = _interopRequireDefault(_audioTrack);
var _videoTrack = _dereq_(77);
var _videoTrack2 = _interopRequireDefault(_videoTrack);
var _timeRanges = _dereq_(88);
var _formatTime = _dereq_(83);
var _formatTime2 = _interopRequireDefault(_formatTime);
var _log = _dereq_(85);
var _log2 = _interopRequireDefault(_log);
var _dom = _dereq_(80);
var Dom = _interopRequireWildcard(_dom);
var _browser = _dereq_(78);
var browser = _interopRequireWildcard(_browser);
var _url = _dereq_(90);
var Url = _interopRequireWildcard(_url);
var _extend = _dereq_(43);
var _extend2 = _interopRequireDefault(_extend);
var _merge2 = _dereq_(131);
var _merge3 = _interopRequireDefault(_merge2);
var _xhr = _dereq_(147);
var _xhr2 = _interopRequireDefault(_xhr);
var _tech = _dereq_(62);
var _tech2 = _interopRequireDefault(_tech);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
// HTML5 Element Shim for IE8
if (typeof HTMLVideoElement === 'undefined') {
_document2['default'].createElement('video');
_document2['default'].createElement('audio');
_document2['default'].createElement('track');
}
/**
* Doubles as the main function for users to create a player instance and also
* the main library object.
* The `videojs` function can be used to initialize or retrieve a player.
* ```js
* var myPlayer = videojs('my_video_id');
* ```
*
* @param {String|Element} id Video element or video element ID
* @param {Object=} options Optional options object for config/settings
* @param {Function=} ready Optional ready callback
* @return {Player} A player instance
* @mixes videojs
* @method videojs
*/
function videojs(id, options, ready) {
var tag = void 0;
// Allow for element or ID to be passed in
// String ID
if (typeof id === 'string') {
// Adjust for jQuery ID syntax
if (id.indexOf('#') === 0) {
id = id.slice(1);
}
// If a player instance has already been created for this ID return it.
if (videojs.getPlayers()[id]) {
// If options or ready funtion are passed, warn
if (options) {
_log2['default'].warn('Player "' + id + '" is already initialised. Options will not be applied.');
}
if (ready) {
videojs.getPlayers()[id].ready(ready);
}
return videojs.getPlayers()[id];
}
// Otherwise get element for ID
tag = Dom.getEl(id);
// ID is a media element
} else {
tag = id;
}
// Check for a useable element
// re: nodeName, could be a box div also
if (!tag || !tag.nodeName) {
throw new TypeError('The element or ID supplied is not valid. (videojs)');
}
// Element may have a player attr referring to an already created player instance.
// If not, set up a new player and return the instance.
return tag.player || _player2['default'].players[tag.playerId] || new _player2['default'](tag, options, ready);
}
// Add default styles
if (_window2['default'].VIDEOJS_NO_DYNAMIC_STYLE !== true) {
var style = Dom.$('.vjs-styles-defaults');
if (!style) {
style = stylesheet.createStyleElement('vjs-styles-defaults');
var head = Dom.$('head');
if (head) {
head.insertBefore(style, head.firstChild);
}
stylesheet.setTextContent(style, '\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ');
}
}
// Run Auto-load players
// You have to wait at least once in case this script is loaded after your
// video in the DOM (weird behavior only with minified version)
setup.autoSetupTimeout(1, videojs);
/*
* Current software version (semver)
*
* @type {String}
*/
videojs.VERSION = '5.12.3';
/**
* The global options object. These are the settings that take effect
* if no overrides are specified when the player is created.
*
* ```js
* videojs.options.autoplay = true
* // -> all players will autoplay by default
* ```
*
* @type {Object}
*/
videojs.options = _player2['default'].prototype.options_;
/**
* Get an object with the currently created players, keyed by player ID
*
* @return {Object} The created players
* @mixes videojs
* @method getPlayers
*/
videojs.getPlayers = function () {
return _player2['default'].players;
};
/**
* Expose players object.
*
* @memberOf videojs
* @property {Object} players
*/
videojs.players = _player2['default'].players;
/**
* Get a component class object by name
* ```js
* var VjsButton = videojs.getComponent('Button');
* // Create a new instance of the component
* var myButton = new VjsButton(myPlayer);
* ```
*
* @return {Component} Component identified by name
* @mixes videojs
* @method getComponent
*/
videojs.getComponent = _component2['default'].getComponent;
/**
* Register a component so it can referred to by name
* Used when adding to other
* components, either through addChild
* `component.addChild('myComponent')`
* or through default children options
* `{ children: ['myComponent'] }`.
* ```js
* // Get a component to subclass
* var VjsButton = videojs.getComponent('Button');
* // Subclass the component (see 'extend' doc for more info)
* var MySpecialButton = videojs.extend(VjsButton, {});
* // Register the new component
* VjsButton.registerComponent('MySepcialButton', MySepcialButton);
* // (optionally) add the new component as a default player child
* myPlayer.addChild('MySepcialButton');
* ```
* NOTE: You could also just initialize the component before adding.
* `component.addChild(new MyComponent());`
*
* @param {String} The class name of the component
* @param {Component} The component class
* @return {Component} The newly registered component
* @mixes videojs
* @method registerComponent
*/
videojs.registerComponent = function (name, comp) {
if (_tech2['default'].isTech(comp)) {
_log2['default'].warn('The ' + name + ' tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)');
}
_component2['default'].registerComponent.call(_component2['default'], name, comp);
};
/**
* Get a Tech class object by name
* ```js
* var Html5 = videojs.getTech('Html5');
* // Create a new instance of the component
* var html5 = new Html5(options);
* ```
*
* @return {Tech} Tech identified by name
* @mixes videojs
* @method getComponent
*/
videojs.getTech = _tech2['default'].getTech;
/**
* Register a Tech so it can referred to by name.
* This is used in the tech order for the player.
*
* ```js
* // get the Html5 Tech
* var Html5 = videojs.getTech('Html5');
* var MyTech = videojs.extend(Html5, {});
* // Register the new Tech
* VjsButton.registerTech('Tech', MyTech);
* var player = videojs('myplayer', {
* techOrder: ['myTech', 'html5']
* });
* ```
*
* @param {String} The class name of the tech
* @param {Tech} The tech class
* @return {Tech} The newly registered Tech
* @mixes videojs
* @method registerTech
*/
videojs.registerTech = _tech2['default'].registerTech;
/**
* A suite of browser and device tests
*
* @type {Object}
* @private
*/
videojs.browser = browser;
/**
* Whether or not the browser supports touch events. Included for backward
* compatibility with 4.x, but deprecated. Use `videojs.browser.TOUCH_ENABLED`
* instead going forward.
*
* @deprecated
* @type {Boolean}
*/
videojs.TOUCH_ENABLED = browser.TOUCH_ENABLED;
/**
* Subclass an existing class
* Mimics ES6 subclassing with the `extend` keyword
* ```js
* // Create a basic javascript 'class'
* function MyClass(name) {
* // Set a property at initialization
* this.myName = name;
* }
* // Create an instance method
* MyClass.prototype.sayMyName = function() {
* alert(this.myName);
* };
* // Subclass the exisitng class and change the name
* // when initializing
* var MySubClass = videojs.extend(MyClass, {
* constructor: function(name) {
* // Call the super class constructor for the subclass
* MyClass.call(this, name)
* }
* });
* // Create an instance of the new sub class
* var myInstance = new MySubClass('John');
* myInstance.sayMyName(); // -> should alert "John"
* ```
*
* @param {Function} The Class to subclass
* @param {Object} An object including instace methods for the new class
* Optionally including a `constructor` function
* @return {Function} The newly created subclass
* @mixes videojs
* @method extend
*/
videojs.extend = _extend2['default'];
/**
* Merge two options objects recursively
* Performs a deep merge like lodash.merge but **only merges plain objects**
* (not arrays, elements, anything else)
* Other values will be copied directly from the second object.
* ```js
* var defaultOptions = {
* foo: true,
* bar: {
* a: true,
* b: [1,2,3]
* }
* };
* var newOptions = {
* foo: false,
* bar: {
* b: [4,5,6]
* }
* };
* var result = videojs.mergeOptions(defaultOptions, newOptions);
* // result.foo = false;
* // result.bar.a = true;
* // result.bar.b = [4,5,6];
* ```
*
* @param {Object} defaults The options object whose values will be overriden
* @param {Object} overrides The options object with values to override the first
* @param {Object} etc Any number of additional options objects
*
* @return {Object} a new object with the merged values
* @mixes videojs
* @method mergeOptions
*/
videojs.mergeOptions = _mergeOptions2['default'];
/**
* Change the context (this) of a function
*
* videojs.bind(newContext, function() {
* this === newContext
* });
*
* NOTE: as of v5.0 we require an ES5 shim, so you should use the native
* `function() {}.bind(newContext);` instead of this.
*
* @param {*} context The object to bind as scope
* @param {Function} fn The function to be bound to a scope
* @param {Number=} uid An optional unique ID for the function to be set
* @return {Function}
*/
videojs.bind = Fn.bind;
/**
* Create a Video.js player plugin
* Plugins are only initialized when options for the plugin are included
* in the player options, or the plugin function on the player instance is
* called.
* **See the plugin guide in the docs for a more detailed example**
* ```js
* // Make a plugin that alerts when the player plays
* videojs.plugin('myPlugin', function(myPluginOptions) {
* myPluginOptions = myPluginOptions || {};
*
* var player = this;
* var alertText = myPluginOptions.text || 'Player is playing!'
*
* player.on('play', function() {
* alert(alertText);
* });
* });
* // USAGE EXAMPLES
* // EXAMPLE 1: New player with plugin options, call plugin immediately
* var player1 = videojs('idOne', {
* myPlugin: {
* text: 'Custom text!'
* }
* });
* // Click play
* // --> Should alert 'Custom text!'
* // EXAMPLE 3: New player, initialize plugin later
* var player3 = videojs('idThree');
* // Click play
* // --> NO ALERT
* // Click pause
* // Initialize plugin using the plugin function on the player instance
* player3.myPlugin({
* text: 'Plugin added later!'
* });
* // Click play
* // --> Should alert 'Plugin added later!'
* ```
*
* @param {String} name The plugin name
* @param {Function} fn The plugin function that will be called with options
* @mixes videojs
* @method plugin
*/
videojs.plugin = _plugins2['default'];
/**
* Adding languages so that they're available to all players.
* ```js
* videojs.addLanguage('es', { 'Hello': 'Hola' });
* ```
*
* @param {String} code The language code or dictionary property
* @param {Object} data The data values to be translated
* @return {Object} The resulting language dictionary object
* @mixes videojs
* @method addLanguage
*/
videojs.addLanguage = function (code, data) {
var _merge;
code = ('' + code).toLowerCase();
return (0, _merge3['default'])(videojs.options.languages, (_merge = {}, _merge[code] = data, _merge))[code];
};
/**
* Log debug messages.
*
* @param {...Object} messages One or more messages to log
*/
videojs.log = _log2['default'];
/**
* Creates an emulated TimeRange object.
*
* @param {Number|Array} start Start time in seconds or an array of ranges
* @param {Number} end End time in seconds
* @return {Object} Fake TimeRange object
* @method createTimeRange
*/
videojs.createTimeRange = videojs.createTimeRanges = _timeRanges.createTimeRanges;
/**
* Format seconds as a time string, H:MM:SS or M:SS
* Supplying a guide (in seconds) will force a number of leading zeros
* to cover the length of the guide
*
* @param {Number} seconds Number of seconds to be turned into a string
* @param {Number} guide Number (in seconds) to model the string after
* @return {String} Time formatted as H:MM:SS or M:SS
* @method formatTime
*/
videojs.formatTime = _formatTime2['default'];
/**
* Resolve and parse the elements of a URL
*
* @param {String} url The url to parse
* @return {Object} An object of url details
* @method parseUrl
*/
videojs.parseUrl = Url.parseUrl;
/**
* Returns whether the url passed is a cross domain request or not.
*
* @param {String} url The url to check
* @return {Boolean} Whether it is a cross domain request or not
* @method isCrossOrigin
*/
videojs.isCrossOrigin = Url.isCrossOrigin;
/**
* Event target class.
*
* @type {Function}
*/
videojs.EventTarget = _eventTarget2['default'];
/**
* Add an event listener to element
* It stores the handler function in a separate cache object
* and adds a generic handler to the element's event,
* along with a unique id (guid) to the element.
*
* @param {Element|Object} elem Element or object to bind listeners to
* @param {String|Array} type Type of event to bind to.
* @param {Function} fn Event listener.
* @method on
*/
videojs.on = Events.on;
/**
* Trigger a listener only once for an event
*
* @param {Element|Object} elem Element or object to
* @param {String|Array} type Name/type of event
* @param {Function} fn Event handler function
* @method one
*/
videojs.one = Events.one;
/**
* Removes event listeners from an element
*
* @param {Element|Object} elem Object to remove listeners from
* @param {String|Array=} type Type of listener to remove. Don't include to remove all events from element.
* @param {Function} fn Specific listener to remove. Don't include to remove listeners for an event type.
* @method off
*/
videojs.off = Events.off;
/**
* Trigger an event for an element
*
* @param {Element|Object} elem Element to trigger an event on
* @param {Event|Object|String} event A string (the type) or an event object with a type attribute
* @param {Object} [hash] data hash to pass along with the event
* @return {Boolean=} Returned only if default was prevented
* @method trigger
*/
videojs.trigger = Events.trigger;
/**
* A cross-browser XMLHttpRequest wrapper. Here's a simple example:
*
* videojs.xhr({
* body: someJSONString,
* uri: "/foo",
* headers: {
* "Content-Type": "application/json"
* }
* }, function (err, resp, body) {
* // check resp.statusCode
* });
*
* Check out the [full
* documentation](https://github.com/Raynos/xhr/blob/v2.1.0/README.md)
* for more options.
*
* @param {Object} options settings for the request.
* @return {XMLHttpRequest|XDomainRequest} the request object.
* @see https://github.com/Raynos/xhr
*/
videojs.xhr = _xhr2['default'];
/**
* TextTrack class
*
* @type {Function}
*/
videojs.TextTrack = _textTrack2['default'];
/**
* export the AudioTrack class so that source handlers can create
* AudioTracks and then add them to the players AudioTrackList
*
* @type {Function}
*/
videojs.AudioTrack = _audioTrack2['default'];
/**
* export the VideoTrack class so that source handlers can create
* VideoTracks and then add them to the players VideoTrackList
*
* @type {Function}
*/
videojs.VideoTrack = _videoTrack2['default'];
/**
* Determines, via duck typing, whether or not a value is a DOM element.
*
* @method isEl
* @param {Mixed} value
* @return {Boolean}
*/
videojs.isEl = Dom.isEl;
/**
* Determines, via duck typing, whether or not a value is a text node.
*
* @method isTextNode
* @param {Mixed} value
* @return {Boolean}
*/
videojs.isTextNode = Dom.isTextNode;
/**
* Creates an element and applies properties.
*
* @method createEl
* @param {String} [tagName='div'] Name of tag to be created.
* @param {Object} [properties={}] Element properties to be applied.
* @param {Object} [attributes={}] Element attributes to be applied.
* @return {Element}
*/
videojs.createEl = Dom.createEl;
/**
* Check if an element has a CSS class
*
* @method hasClass
* @param {Element} element Element to check
* @param {String} classToCheck Classname to check
*/
videojs.hasClass = Dom.hasElClass;
/**
* Add a CSS class name to an element
*
* @method addClass
* @param {Element} element Element to add class name to
* @param {String} classToAdd Classname to add
*/
videojs.addClass = Dom.addElClass;
/**
* Remove a CSS class name from an element
*
* @method removeClass
* @param {Element} element Element to remove from class name
* @param {String} classToRemove Classname to remove
*/
videojs.removeClass = Dom.removeElClass;
/**
* Adds or removes a CSS class name on an element depending on an optional
* condition or the presence/absence of the class name.
*
* @method toggleElClass
* @param {Element} element
* @param {String} classToToggle
* @param {Boolean|Function} [predicate]
* Can be a function that returns a Boolean. If `true`, the class
* will be added; if `false`, the class will be removed. If not
* given, the class will be added if not present and vice versa.
*/
videojs.toggleClass = Dom.toggleElClass;
/**
* Apply attributes to an HTML element.
*
* @method setAttributes
* @param {Element} el Target element.
* @param {Object=} attributes Element attributes to be applied.
*/
videojs.setAttributes = Dom.setElAttributes;
/**
* Get an element's attribute values, as defined on the HTML tag
* Attributes are not the same as properties. They're defined on the tag
* or with setAttribute (which shouldn't be used with HTML)
* This will return true or false for boolean attributes.
*
* @method getAttributes
* @param {Element} tag Element from which to get tag attributes
* @return {Object}
*/
videojs.getAttributes = Dom.getElAttributes;
/**
* Empties the contents of an element.
*
* @method emptyEl
* @param {Element} el
* @return {Element}
*/
videojs.emptyEl = Dom.emptyEl;
/**
* Normalizes and appends content to an element.
*
* The content for an element can be passed in multiple types and
* combinations, whose behavior is as follows:
*
* - String
* Normalized into a text node.
*
* - Element, TextNode
* Passed through.
*
* - Array
* A one-dimensional array of strings, elements, nodes, or functions (which
* return single strings, elements, or nodes).
*
* - Function
* If the sole argument, is expected to produce a string, element,
* node, or array.
*
* @method appendContent
* @param {Element} el
* @param {String|Element|TextNode|Array|Function} content
* @return {Element}
*/
videojs.appendContent = Dom.appendContent;
/**
* Normalizes and inserts content into an element; this is identical to
* `appendContent()`, except it empties the element first.
*
* The content for an element can be passed in multiple types and
* combinations, whose behavior is as follows:
*
* - String
* Normalized into a text node.
*
* - Element, TextNode
* Passed through.
*
* - Array
* A one-dimensional array of strings, elements, nodes, or functions (which
* return single strings, elements, or nodes).
*
* - Function
* If the sole argument, is expected to produce a string, element,
* node, or array.
*
* @method insertContent
* @param {Element} el
* @param {String|Element|TextNode|Array|Function} content
* @return {Element}
*/
videojs.insertContent = Dom.insertContent;
/*
* Custom Universal Module Definition (UMD)
*
* Video.js will never be a non-browser lib so we can simplify UMD a bunch and
* still support requirejs and browserify. This also needs to be closure
* compiler compatible, so string keys are used.
*/
if (typeof define === 'function' && define.amd) {
define('videojs', [], function () {
return videojs;
});
// checking that module is an object too because of umdjs/umd#35
} else if ((typeof exports === 'undefined' ? 'undefined' : _typeof(exports)) === 'object' && (typeof module === 'undefined' ? 'undefined' : _typeof(module)) === 'object') {
module.exports = videojs;
}
exports['default'] = videojs;
},{"131":131,"147":147,"42":42,"43":43,"5":5,"51":51,"52":52,"56":56,"62":62,"64":64,"72":72,"77":77,"78":78,"80":80,"81":81,"82":82,"83":83,"85":85,"86":86,"87":87,"88":88,"90":90,"92":92,"93":93}],92:[function(_dereq_,module,exports){
(function (global){
var topLevel = typeof global !== 'undefined' ? global :
typeof window !== 'undefined' ? window : {}
var minDoc = _dereq_(94);
if (typeof document !== 'undefined') {
module.exports = document;
} else {
var doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'];
if (!doccy) {
doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc;
}
module.exports = doccy;
}
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"94":94}],93:[function(_dereq_,module,exports){
(function (global){
if (typeof window !== "undefined") {
module.exports = window;
} else if (typeof global !== "undefined") {
module.exports = global;
} else if (typeof self !== "undefined"){
module.exports = self;
} else {
module.exports = {};
}
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}],94:[function(_dereq_,module,exports){
},{}],95:[function(_dereq_,module,exports){
var getNative = _dereq_(111);
/* Native method references for those with the same name as other `lodash` methods. */
var nativeNow = getNative(Date, 'now');
/**
* Gets the number of milliseconds that have elapsed since the Unix epoch
* (1 January 1970 00:00:00 UTC).
*
* @static
* @memberOf _
* @category Date
* @example
*
* _.defer(function(stamp) {
* console.log(_.now() - stamp);
* }, _.now());
* // => logs the number of milliseconds it took for the deferred function to be invoked
*/
var now = nativeNow || function() {
return new Date().getTime();
};
module.exports = now;
},{"111":111}],96:[function(_dereq_,module,exports){
var isObject = _dereq_(124),
now = _dereq_(95);
/** Used as the `TypeError` message for "Functions" methods. */
var FUNC_ERROR_TEXT = 'Expected a function';
/* Native method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max;
/**
* Creates a debounced function that delays invoking `func` until after `wait`
* milliseconds have elapsed since the last time the debounced function was
* invoked. The debounced function comes with a `cancel` method to cancel
* delayed invocations. Provide an options object to indicate that `func`
* should be invoked on the leading and/or trailing edge of the `wait` timeout.
* Subsequent calls to the debounced function return the result of the last
* `func` invocation.
*
* **Note:** If `leading` and `trailing` options are `true`, `func` is invoked
* on the trailing edge of the timeout only if the the debounced function is
* invoked more than once during the `wait` timeout.
*
* See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation)
* for details over the differences between `_.debounce` and `_.throttle`.
*
* @static
* @memberOf _
* @category Function
* @param {Function} func The function to debounce.
* @param {number} [wait=0] The number of milliseconds to delay.
* @param {Object} [options] The options object.
* @param {boolean} [options.leading=false] Specify invoking on the leading
* edge of the timeout.
* @param {number} [options.maxWait] The maximum time `func` is allowed to be
* delayed before it's invoked.
* @param {boolean} [options.trailing=true] Specify invoking on the trailing
* edge of the timeout.
* @returns {Function} Returns the new debounced function.
* @example
*
* // avoid costly calculations while the window size is in flux
* jQuery(window).on('resize', _.debounce(calculateLayout, 150));
*
* // invoke `sendMail` when the click event is fired, debouncing subsequent calls
* jQuery('#postbox').on('click', _.debounce(sendMail, 300, {
* 'leading': true,
* 'trailing': false
* }));
*
* // ensure `batchLog` is invoked once after 1 second of debounced calls
* var source = new EventSource('/stream');
* jQuery(source).on('message', _.debounce(batchLog, 250, {
* 'maxWait': 1000
* }));
*
* // cancel a debounced call
* var todoChanges = _.debounce(batchLog, 1000);
* Object.observe(models.todo, todoChanges);
*
* Object.observe(models, function(changes) {
* if (_.find(changes, { 'user': 'todo', 'type': 'delete'})) {
* todoChanges.cancel();
* }
* }, ['delete']);
*
* // ...at some point `models.todo` is changed
* models.todo.completed = true;
*
* // ...before 1 second has passed `models.todo` is deleted
* // which cancels the debounced `todoChanges` call
* delete models.todo;
*/
function debounce(func, wait, options) {
var args,
maxTimeoutId,
result,
stamp,
thisArg,
timeoutId,
trailingCall,
lastCalled = 0,
maxWait = false,
trailing = true;
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
wait = wait < 0 ? 0 : (+wait || 0);
if (options === true) {
var leading = true;
trailing = false;
} else if (isObject(options)) {
leading = !!options.leading;
maxWait = 'maxWait' in options && nativeMax(+options.maxWait || 0, wait);
trailing = 'trailing' in options ? !!options.trailing : trailing;
}
function cancel() {
if (timeoutId) {
clearTimeout(timeoutId);
}
if (maxTimeoutId) {
clearTimeout(maxTimeoutId);
}
lastCalled = 0;
maxTimeoutId = timeoutId = trailingCall = undefined;
}
function complete(isCalled, id) {
if (id) {
clearTimeout(id);
}
maxTimeoutId = timeoutId = trailingCall = undefined;
if (isCalled) {
lastCalled = now();
result = func.apply(thisArg, args);
if (!timeoutId && !maxTimeoutId) {
args = thisArg = undefined;
}
}
}
function delayed() {
var remaining = wait - (now() - stamp);
if (remaining <= 0 || remaining > wait) {
complete(trailingCall, maxTimeoutId);
} else {
timeoutId = setTimeout(delayed, remaining);
}
}
function maxDelayed() {
complete(trailing, timeoutId);
}
function debounced() {
args = arguments;
stamp = now();
thisArg = this;
trailingCall = trailing && (timeoutId || !leading);
if (maxWait === false) {
var leadingCall = leading && !timeoutId;
} else {
if (!maxTimeoutId && !leading) {
lastCalled = stamp;
}
var remaining = maxWait - (stamp - lastCalled),
isCalled = remaining <= 0 || remaining > maxWait;
if (isCalled) {
if (maxTimeoutId) {
maxTimeoutId = clearTimeout(maxTimeoutId);
}
lastCalled = stamp;
result = func.apply(thisArg, args);
}
else if (!maxTimeoutId) {
maxTimeoutId = setTimeout(maxDelayed, remaining);
}
}
if (isCalled && timeoutId) {
timeoutId = clearTimeout(timeoutId);
}
else if (!timeoutId && wait !== maxWait) {
timeoutId = setTimeout(delayed, wait);
}
if (leadingCall) {
isCalled = true;
result = func.apply(thisArg, args);
}
if (isCalled && !timeoutId && !maxTimeoutId) {
args = thisArg = undefined;
}
return result;
}
debounced.cancel = cancel;
return debounced;
}
module.exports = debounce;
},{"124":124,"95":95}],97:[function(_dereq_,module,exports){
/** Used as the `TypeError` message for "Functions" methods. */
var FUNC_ERROR_TEXT = 'Expected a function';
/* Native method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max;
/**
* Creates a function that invokes `func` with the `this` binding of the
* created function and arguments from `start` and beyond provided as an array.
*
* **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/Web/JavaScript/Reference/Functions/rest_parameters).
*
* @static
* @memberOf _
* @category Function
* @param {Function} func The function to apply a rest parameter to.
* @param {number} [start=func.length-1] The start position of the rest parameter.
* @returns {Function} Returns the new function.
* @example
*
* var say = _.restParam(function(what, names) {
* return what + ' ' + _.initial(names).join(', ') +
* (_.size(names) > 1 ? ', & ' : '') + _.last(names);
* });
*
* say('hello', 'fred', 'barney', 'pebbles');
* // => 'hello fred, barney, & pebbles'
*/
function restParam(func, start) {
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0);
return function() {
var args = arguments,
index = -1,
length = nativeMax(args.length - start, 0),
rest = Array(length);
while (++index < length) {
rest[index] = args[start + index];
}
switch (start) {
case 0: return func.call(this, rest);
case 1: return func.call(this, args[0], rest);
case 2: return func.call(this, args[0], args[1], rest);
}
var otherArgs = Array(start + 1);
index = -1;
while (++index < start) {
otherArgs[index] = args[index];
}
otherArgs[start] = rest;
return func.apply(this, otherArgs);
};
}
module.exports = restParam;
},{}],98:[function(_dereq_,module,exports){
var debounce = _dereq_(96),
isObject = _dereq_(124);
/** Used as the `TypeError` message for "Functions" methods. */
var FUNC_ERROR_TEXT = 'Expected a function';
/**
* Creates a throttled function that only invokes `func` at most once per
* every `wait` milliseconds. The throttled function comes with a `cancel`
* method to cancel delayed invocations. Provide an options object to indicate
* that `func` should be invoked on the leading and/or trailing edge of the
* `wait` timeout. Subsequent calls to the throttled function return the
* result of the last `func` call.
*
* **Note:** If `leading` and `trailing` options are `true`, `func` is invoked
* on the trailing edge of the timeout only if the the throttled function is
* invoked more than once during the `wait` timeout.
*
* See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation)
* for details over the differences between `_.throttle` and `_.debounce`.
*
* @static
* @memberOf _
* @category Function
* @param {Function} func The function to throttle.
* @param {number} [wait=0] The number of milliseconds to throttle invocations to.
* @param {Object} [options] The options object.
* @param {boolean} [options.leading=true] Specify invoking on the leading
* edge of the timeout.
* @param {boolean} [options.trailing=true] Specify invoking on the trailing
* edge of the timeout.
* @returns {Function} Returns the new throttled function.
* @example
*
* // avoid excessively updating the position while scrolling
* jQuery(window).on('scroll', _.throttle(updatePosition, 100));
*
* // invoke `renewToken` when the click event is fired, but not more than once every 5 minutes
* jQuery('.interactive').on('click', _.throttle(renewToken, 300000, {
* 'trailing': false
* }));
*
* // cancel a trailing throttled call
* jQuery(window).on('popstate', throttled.cancel);
*/
function throttle(func, wait, options) {
var leading = true,
trailing = true;
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
if (options === false) {
leading = false;
} else if (isObject(options)) {
leading = 'leading' in options ? !!options.leading : leading;
trailing = 'trailing' in options ? !!options.trailing : trailing;
}
return debounce(func, wait, { 'leading': leading, 'maxWait': +wait, 'trailing': trailing });
}
module.exports = throttle;
},{"124":124,"96":96}],99:[function(_dereq_,module,exports){
/**
* Copies the values of `source` to `array`.
*
* @private
* @param {Array} source The array to copy values from.
* @param {Array} [array=[]] The array to copy values to.
* @returns {Array} Returns `array`.
*/
function arrayCopy(source, array) {
var index = -1,
length = source.length;
array || (array = Array(length));
while (++index < length) {
array[index] = source[index];
}
return array;
}
module.exports = arrayCopy;
},{}],100:[function(_dereq_,module,exports){
/**
* A specialized version of `_.forEach` for arrays without support for callback
* shorthands and `this` binding.
*
* @private
* @param {Array} array The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns `array`.
*/
function arrayEach(array, iteratee) {
var index = -1,
length = array.length;
while (++index < length) {
if (iteratee(array[index], index, array) === false) {
break;
}
}
return array;
}
module.exports = arrayEach;
},{}],101:[function(_dereq_,module,exports){
/**
* Copies properties of `source` to `object`.
*
* @private
* @param {Object} source The object to copy properties from.
* @param {Array} props The property names to copy.
* @param {Object} [object={}] The object to copy properties to.
* @returns {Object} Returns `object`.
*/
function baseCopy(source, props, object) {
object || (object = {});
var index = -1,
length = props.length;
while (++index < length) {
var key = props[index];
object[key] = source[key];
}
return object;
}
module.exports = baseCopy;
},{}],102:[function(_dereq_,module,exports){
var createBaseFor = _dereq_(109);
/**
* The base implementation of `baseForIn` and `baseForOwn` which iterates
* over `object` properties returned by `keysFunc` invoking `iteratee` for
* each property. Iteratee functions may exit iteration early by explicitly
* returning `false`.
*
* @private
* @param {Object} object The object to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @param {Function} keysFunc The function to get the keys of `object`.
* @returns {Object} Returns `object`.
*/
var baseFor = createBaseFor();
module.exports = baseFor;
},{"109":109}],103:[function(_dereq_,module,exports){
var baseFor = _dereq_(102),
keysIn = _dereq_(130);
/**
* The base implementation of `_.forIn` without support for callback
* shorthands and `this` binding.
*
* @private
* @param {Object} object The object to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Object} Returns `object`.
*/
function baseForIn(object, iteratee) {
return baseFor(object, iteratee, keysIn);
}
module.exports = baseForIn;
},{"102":102,"130":130}],104:[function(_dereq_,module,exports){
var arrayEach = _dereq_(100),
baseMergeDeep = _dereq_(105),
isArray = _dereq_(121),
isArrayLike = _dereq_(112),
isObject = _dereq_(124),
isObjectLike = _dereq_(117),
isTypedArray = _dereq_(127),
keys = _dereq_(129);
/**
* The base implementation of `_.merge` without support for argument juggling,
* multiple sources, and `this` binding `customizer` functions.
*
* @private
* @param {Object} object The destination object.
* @param {Object} source The source object.
* @param {Function} [customizer] The function to customize merged values.
* @param {Array} [stackA=[]] Tracks traversed source objects.
* @param {Array} [stackB=[]] Associates values with source counterparts.
* @returns {Object} Returns `object`.
*/
function baseMerge(object, source, customizer, stackA, stackB) {
if (!isObject(object)) {
return object;
}
var isSrcArr = isArrayLike(source) && (isArray(source) || isTypedArray(source)),
props = isSrcArr ? undefined : keys(source);
arrayEach(props || source, function(srcValue, key) {
if (props) {
key = srcValue;
srcValue = source[key];
}
if (isObjectLike(srcValue)) {
stackA || (stackA = []);
stackB || (stackB = []);
baseMergeDeep(object, source, key, baseMerge, customizer, stackA, stackB);
}
else {
var value = object[key],
result = customizer ? customizer(value, srcValue, key, object, source) : undefined,
isCommon = result === undefined;
if (isCommon) {
result = srcValue;
}
if ((result !== undefined || (isSrcArr && !(key in object))) &&
(isCommon || (result === result ? (result !== value) : (value === value)))) {
object[key] = result;
}
}
});
return object;
}
module.exports = baseMerge;
},{"100":100,"105":105,"112":112,"117":117,"121":121,"124":124,"127":127,"129":129}],105:[function(_dereq_,module,exports){
var arrayCopy = _dereq_(99),
isArguments = _dereq_(120),
isArray = _dereq_(121),
isArrayLike = _dereq_(112),
isPlainObject = _dereq_(125),
isTypedArray = _dereq_(127),
toPlainObject = _dereq_(128);
/**
* A specialized version of `baseMerge` for arrays and objects which performs
* deep merges and tracks traversed objects enabling objects with circular
* references to be merged.
*
* @private
* @param {Object} object The destination object.
* @param {Object} source The source object.
* @param {string} key The key of the value to merge.
* @param {Function} mergeFunc The function to merge values.
* @param {Function} [customizer] The function to customize merged values.
* @param {Array} [stackA=[]] Tracks traversed source objects.
* @param {Array} [stackB=[]] Associates values with source counterparts.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
function baseMergeDeep(object, source, key, mergeFunc, customizer, stackA, stackB) {
var length = stackA.length,
srcValue = source[key];
while (length--) {
if (stackA[length] == srcValue) {
object[key] = stackB[length];
return;
}
}
var value = object[key],
result = customizer ? customizer(value, srcValue, key, object, source) : undefined,
isCommon = result === undefined;
if (isCommon) {
result = srcValue;
if (isArrayLike(srcValue) && (isArray(srcValue) || isTypedArray(srcValue))) {
result = isArray(value)
? value
: (isArrayLike(value) ? arrayCopy(value) : []);
}
else if (isPlainObject(srcValue) || isArguments(srcValue)) {
result = isArguments(value)
? toPlainObject(value)
: (isPlainObject(value) ? value : {});
}
else {
isCommon = false;
}
}
// Add the source value to the stack of traversed objects and associate
// it with its merged value.
stackA.push(srcValue);
stackB.push(result);
if (isCommon) {
// Recursively merge objects and arrays (susceptible to call stack limits).
object[key] = mergeFunc(result, srcValue, customizer, stackA, stackB);
} else if (result === result ? (result !== value) : (value === value)) {
object[key] = result;
}
}
module.exports = baseMergeDeep;
},{"112":112,"120":120,"121":121,"125":125,"127":127,"128":128,"99":99}],106:[function(_dereq_,module,exports){
var toObject = _dereq_(119);
/**
* The base implementation of `_.property` without support for deep paths.
*
* @private
* @param {string} key The key of the property to get.
* @returns {Function} Returns the new function.
*/
function baseProperty(key) {
return function(object) {
return object == null ? undefined : toObject(object)[key];
};
}
module.exports = baseProperty;
},{"119":119}],107:[function(_dereq_,module,exports){
var identity = _dereq_(133);
/**
* A specialized version of `baseCallback` which only supports `this` binding
* and specifying the number of arguments to provide to `func`.
*
* @private
* @param {Function} func The function to bind.
* @param {*} thisArg The `this` binding of `func`.
* @param {number} [argCount] The number of arguments to provide to `func`.
* @returns {Function} Returns the callback.
*/
function bindCallback(func, thisArg, argCount) {
if (typeof func != 'function') {
return identity;
}
if (thisArg === undefined) {
return func;
}
switch (argCount) {
case 1: return function(value) {
return func.call(thisArg, value);
};
case 3: return function(value, index, collection) {
return func.call(thisArg, value, index, collection);
};
case 4: return function(accumulator, value, index, collection) {
return func.call(thisArg, accumulator, value, index, collection);
};
case 5: return function(value, other, key, object, source) {
return func.call(thisArg, value, other, key, object, source);
};
}
return function() {
return func.apply(thisArg, arguments);
};
}
module.exports = bindCallback;
},{"133":133}],108:[function(_dereq_,module,exports){
var bindCallback = _dereq_(107),
isIterateeCall = _dereq_(115),
restParam = _dereq_(97);
/**
* Creates a `_.assign`, `_.defaults`, or `_.merge` function.
*
* @private
* @param {Function} assigner The function to assign values.
* @returns {Function} Returns the new assigner function.
*/
function createAssigner(assigner) {
return restParam(function(object, sources) {
var index = -1,
length = object == null ? 0 : sources.length,
customizer = length > 2 ? sources[length - 2] : undefined,
guard = length > 2 ? sources[2] : undefined,
thisArg = length > 1 ? sources[length - 1] : undefined;
if (typeof customizer == 'function') {
customizer = bindCallback(customizer, thisArg, 5);
length -= 2;
} else {
customizer = typeof thisArg == 'function' ? thisArg : undefined;
length -= (customizer ? 1 : 0);
}
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
customizer = length < 3 ? undefined : customizer;
length = 1;
}
while (++index < length) {
var source = sources[index];
if (source) {
assigner(object, source, customizer);
}
}
return object;
});
}
module.exports = createAssigner;
},{"107":107,"115":115,"97":97}],109:[function(_dereq_,module,exports){
var toObject = _dereq_(119);
/**
* Creates a base function for `_.forIn` or `_.forInRight`.
*
* @private
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {Function} Returns the new base function.
*/
function createBaseFor(fromRight) {
return function(object, iteratee, keysFunc) {
var iterable = toObject(object),
props = keysFunc(object),
length = props.length,
index = fromRight ? length : -1;
while ((fromRight ? index-- : ++index < length)) {
var key = props[index];
if (iteratee(iterable[key], key, iterable) === false) {
break;
}
}
return object;
};
}
module.exports = createBaseFor;
},{"119":119}],110:[function(_dereq_,module,exports){
var baseProperty = _dereq_(106);
/**
* Gets the "length" property value of `object`.
*
* **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
* that affects Safari on at least iOS 8.1-8.3 ARM64.
*
* @private
* @param {Object} object The object to query.
* @returns {*} Returns the "length" value.
*/
var getLength = baseProperty('length');
module.exports = getLength;
},{"106":106}],111:[function(_dereq_,module,exports){
var isNative = _dereq_(123);
/**
* Gets the native function at `key` of `object`.
*
* @private
* @param {Object} object The object to query.
* @param {string} key The key of the method to get.
* @returns {*} Returns the function if it's native, else `undefined`.
*/
function getNative(object, key) {
var value = object == null ? undefined : object[key];
return isNative(value) ? value : undefined;
}
module.exports = getNative;
},{"123":123}],112:[function(_dereq_,module,exports){
var getLength = _dereq_(110),
isLength = _dereq_(116);
/**
* Checks if `value` is array-like.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
*/
function isArrayLike(value) {
return value != null && isLength(getLength(value));
}
module.exports = isArrayLike;
},{"110":110,"116":116}],113:[function(_dereq_,module,exports){
/**
* Checks if `value` is a host object in IE < 9.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a host object, else `false`.
*/
var isHostObject = (function() {
try {
Object({ 'toString': 0 } + '');
} catch(e) {
return function() { return false; };
}
return function(value) {
// IE < 9 presents many host objects as `Object` objects that can coerce
// to strings despite having improperly defined `toString` methods.
return typeof value.toString != 'function' && typeof (value + '') == 'string';
};
}());
module.exports = isHostObject;
},{}],114:[function(_dereq_,module,exports){
/** Used to detect unsigned integer values. */
var reIsUint = /^\d+$/;
/**
* Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
* of an array-like value.
*/
var MAX_SAFE_INTEGER = 9007199254740991;
/**
* Checks if `value` is a valid array-like index.
*
* @private
* @param {*} value The value to check.
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
*/
function isIndex(value, length) {
value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
length = length == null ? MAX_SAFE_INTEGER : length;
return value > -1 && value % 1 == 0 && value < length;
}
module.exports = isIndex;
},{}],115:[function(_dereq_,module,exports){
var isArrayLike = _dereq_(112),
isIndex = _dereq_(114),
isObject = _dereq_(124);
/**
* Checks if the provided arguments are from an iteratee call.
*
* @private
* @param {*} value The potential iteratee value argument.
* @param {*} index The potential iteratee index or key argument.
* @param {*} object The potential iteratee object argument.
* @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`.
*/
function isIterateeCall(value, index, object) {
if (!isObject(object)) {
return false;
}
var type = typeof index;
if (type == 'number'
? (isArrayLike(object) && isIndex(index, object.length))
: (type == 'string' && index in object)) {
var other = object[index];
return value === value ? (value === other) : (other !== other);
}
return false;
}
module.exports = isIterateeCall;
},{"112":112,"114":114,"124":124}],116:[function(_dereq_,module,exports){
/**
* Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
* of an array-like value.
*/
var MAX_SAFE_INTEGER = 9007199254740991;
/**
* Checks if `value` is a valid array-like length.
*
* **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
*/
function isLength(value) {
return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}
module.exports = isLength;
},{}],117:[function(_dereq_,module,exports){
/**
* Checks if `value` is object-like.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
*/
function isObjectLike(value) {
return !!value && typeof value == 'object';
}
module.exports = isObjectLike;
},{}],118:[function(_dereq_,module,exports){
var isArguments = _dereq_(120),
isArray = _dereq_(121),
isIndex = _dereq_(114),
isLength = _dereq_(116),
isString = _dereq_(126),
keysIn = _dereq_(130);
/** Used for native method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* A fallback implementation of `Object.keys` which creates an array of the
* own enumerable property names of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
*/
function shimKeys(object) {
var props = keysIn(object),
propsLength = props.length,
length = propsLength && object.length;
var allowIndexes = !!length && isLength(length) &&
(isArray(object) || isArguments(object) || isString(object));
var index = -1,
result = [];
while (++index < propsLength) {
var key = props[index];
if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) {
result.push(key);
}
}
return result;
}
module.exports = shimKeys;
},{"114":114,"116":116,"120":120,"121":121,"126":126,"130":130}],119:[function(_dereq_,module,exports){
var isObject = _dereq_(124),
isString = _dereq_(126),
support = _dereq_(132);
/**
* Converts `value` to an object if it's not one.
*
* @private
* @param {*} value The value to process.
* @returns {Object} Returns the object.
*/
function toObject(value) {
if (support.unindexedChars && isString(value)) {
var index = -1,
length = value.length,
result = Object(value);
while (++index < length) {
result[index] = value.charAt(index);
}
return result;
}
return isObject(value) ? value : Object(value);
}
module.exports = toObject;
},{"124":124,"126":126,"132":132}],120:[function(_dereq_,module,exports){
var isArrayLike = _dereq_(112),
isObjectLike = _dereq_(117);
/** Used for native method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/** Native method references. */
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
/**
* Checks if `value` is classified as an `arguments` object.
*
* @static
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
* @example
*
* _.isArguments(function() { return arguments; }());
* // => true
*
* _.isArguments([1, 2, 3]);
* // => false
*/
function isArguments(value) {
return isObjectLike(value) && isArrayLike(value) &&
hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');
}
module.exports = isArguments;
},{"112":112,"117":117}],121:[function(_dereq_,module,exports){
var getNative = _dereq_(111),
isLength = _dereq_(116),
isObjectLike = _dereq_(117);
/** `Object#toString` result references. */
var arrayTag = '[object Array]';
/** Used for native method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objToString = objectProto.toString;
/* Native method references for those with the same name as other `lodash` methods. */
var nativeIsArray = getNative(Array, 'isArray');
/**
* Checks if `value` is classified as an `Array` object.
*
* @static
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
* @example
*
* _.isArray([1, 2, 3]);
* // => true
*
* _.isArray(function() { return arguments; }());
* // => false
*/
var isArray = nativeIsArray || function(value) {
return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag;
};
module.exports = isArray;
},{"111":111,"116":116,"117":117}],122:[function(_dereq_,module,exports){
var isObject = _dereq_(124);
/** `Object#toString` result references. */
var funcTag = '[object Function]';
/** Used for native method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objToString = objectProto.toString;
/**
* Checks if `value` is classified as a `Function` object.
*
* @static
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
* @example
*
* _.isFunction(_);
* // => true
*
* _.isFunction(/abc/);
* // => false
*/
function isFunction(value) {
// The use of `Object#toString` avoids issues with the `typeof` operator
// in older versions of Chrome and Safari which return 'function' for regexes
// and Safari 8 which returns 'object' for typed array constructors.
return isObject(value) && objToString.call(value) == funcTag;
}
module.exports = isFunction;
},{"124":124}],123:[function(_dereq_,module,exports){
var isFunction = _dereq_(122),
isHostObject = _dereq_(113),
isObjectLike = _dereq_(117);
/** Used to detect host constructors (Safari > 5). */
var reIsHostCtor = /^\[object .+?Constructor\]$/;
/** Used for native method references. */
var objectProto = Object.prototype;
/** Used to resolve the decompiled source of functions. */
var fnToString = Function.prototype.toString;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/** Used to detect if a method is native. */
var reIsNative = RegExp('^' +
fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
);
/**
* Checks if `value` is a native function.
*
* @static
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a native function, else `false`.
* @example
*
* _.isNative(Array.prototype.push);
* // => true
*
* _.isNative(_);
* // => false
*/
function isNative(value) {
if (value == null) {
return false;
}
if (isFunction(value)) {
return reIsNative.test(fnToString.call(value));
}
return isObjectLike(value) && (isHostObject(value) ? reIsNative : reIsHostCtor).test(value);
}
module.exports = isNative;
},{"113":113,"117":117,"122":122}],124:[function(_dereq_,module,exports){
/**
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
* @example
*
* _.isObject({});
* // => true
*
* _.isObject([1, 2, 3]);
* // => true
*
* _.isObject(1);
* // => false
*/
function isObject(value) {
// Avoid a V8 JIT bug in Chrome 19-20.
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
var type = typeof value;
return !!value && (type == 'object' || type == 'function');
}
module.exports = isObject;
},{}],125:[function(_dereq_,module,exports){
var baseForIn = _dereq_(103),
isArguments = _dereq_(120),
isHostObject = _dereq_(113),
isObjectLike = _dereq_(117),
support = _dereq_(132);
/** `Object#toString` result references. */
var objectTag = '[object Object]';
/** Used for native method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objToString = objectProto.toString;
/**
* Checks if `value` is a plain object, that is, an object created by the
* `Object` constructor or one with a `[[Prototype]]` of `null`.
*
* **Note:** This method assumes objects created by the `Object` constructor
* have no inherited enumerable properties.
*
* @static
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
* @example
*
* function Foo() {
* this.a = 1;
* }
*
* _.isPlainObject(new Foo);
* // => false
*
* _.isPlainObject([1, 2, 3]);
* // => false
*
* _.isPlainObject({ 'x': 0, 'y': 0 });
* // => true
*
* _.isPlainObject(Object.create(null));
* // => true
*/
function isPlainObject(value) {
var Ctor;
// Exit early for non `Object` objects.
if (!(isObjectLike(value) && objToString.call(value) == objectTag && !isHostObject(value) && !isArguments(value)) ||
(!hasOwnProperty.call(value, 'constructor') && (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) {
return false;
}
// IE < 9 iterates inherited properties before own properties. If the first
// iterated property is an object's own property then there are no inherited
// enumerable properties.
var result;
if (support.ownLast) {
baseForIn(value, function(subValue, key, object) {
result = hasOwnProperty.call(object, key);
return false;
});
return result !== false;
}
// In most environments an object's own properties are iterated before
// its inherited properties. If the last iterated property is an object's
// own property then there are no inherited enumerable properties.
baseForIn(value, function(subValue, key) {
result = key;
});
return result === undefined || hasOwnProperty.call(value, result);
}
module.exports = isPlainObject;
},{"103":103,"113":113,"117":117,"120":120,"132":132}],126:[function(_dereq_,module,exports){
var isObjectLike = _dereq_(117);
/** `Object#toString` result references. */
var stringTag = '[object String]';
/** Used for native method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objToString = objectProto.toString;
/**
* Checks if `value` is classified as a `String` primitive or object.
*
* @static
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
* @example
*
* _.isString('abc');
* // => true
*
* _.isString(1);
* // => false
*/
function isString(value) {
return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag);
}
module.exports = isString;
},{"117":117}],127:[function(_dereq_,module,exports){
var isLength = _dereq_(116),
isObjectLike = _dereq_(117);
/** `Object#toString` result references. */
var argsTag = '[object Arguments]',
arrayTag = '[object Array]',
boolTag = '[object Boolean]',
dateTag = '[object Date]',
errorTag = '[object Error]',
funcTag = '[object Function]',
mapTag = '[object Map]',
numberTag = '[object Number]',
objectTag = '[object Object]',
regexpTag = '[object RegExp]',
setTag = '[object Set]',
stringTag = '[object String]',
weakMapTag = '[object WeakMap]';
var arrayBufferTag = '[object ArrayBuffer]',
float32Tag = '[object Float32Array]',
float64Tag = '[object Float64Array]',
int8Tag = '[object Int8Array]',
int16Tag = '[object Int16Array]',
int32Tag = '[object Int32Array]',
uint8Tag = '[object Uint8Array]',
uint8ClampedTag = '[object Uint8ClampedArray]',
uint16Tag = '[object Uint16Array]',
uint32Tag = '[object Uint32Array]';
/** Used to identify `toStringTag` values of typed arrays. */
var typedArrayTags = {};
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
typedArrayTags[uint32Tag] = true;
typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
typedArrayTags[dateTag] = typedArrayTags[errorTag] =
typedArrayTags[funcTag] = typedArrayTags[mapTag] =
typedArrayTags[numberTag] = typedArrayTags[objectTag] =
typedArrayTags[regexpTag] = typedArrayTags[setTag] =
typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
/** Used for native method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objToString = objectProto.toString;
/**
* Checks if `value` is classified as a typed array.
*
* @static
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
* @example
*
* _.isTypedArray(new Uint8Array);
* // => true
*
* _.isTypedArray([]);
* // => false
*/
function isTypedArray(value) {
return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)];
}
module.exports = isTypedArray;
},{"116":116,"117":117}],128:[function(_dereq_,module,exports){
var baseCopy = _dereq_(101),
keysIn = _dereq_(130);
/**
* Converts `value` to a plain object flattening inherited enumerable
* properties of `value` to own properties of the plain object.
*
* @static
* @memberOf _
* @category Lang
* @param {*} value The value to convert.
* @returns {Object} Returns the converted plain object.
* @example
*
* function Foo() {
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.assign({ 'a': 1 }, new Foo);
* // => { 'a': 1, 'b': 2 }
*
* _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
* // => { 'a': 1, 'b': 2, 'c': 3 }
*/
function toPlainObject(value) {
return baseCopy(value, keysIn(value));
}
module.exports = toPlainObject;
},{"101":101,"130":130}],129:[function(_dereq_,module,exports){
var getNative = _dereq_(111),
isArrayLike = _dereq_(112),
isObject = _dereq_(124),
shimKeys = _dereq_(118),
support = _dereq_(132);
/* Native method references for those with the same name as other `lodash` methods. */
var nativeKeys = getNative(Object, 'keys');
/**
* Creates an array of the own enumerable property names of `object`.
*
* **Note:** Non-object values are coerced to objects. See the
* [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
* for more details.
*
* @static
* @memberOf _
* @category Object
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.keys(new Foo);
* // => ['a', 'b'] (iteration order is not guaranteed)
*
* _.keys('hi');
* // => ['0', '1']
*/
var keys = !nativeKeys ? shimKeys : function(object) {
var Ctor = object == null ? undefined : object.constructor;
if ((typeof Ctor == 'function' && Ctor.prototype === object) ||
(typeof object == 'function' ? support.enumPrototypes : isArrayLike(object))) {
return shimKeys(object);
}
return isObject(object) ? nativeKeys(object) : [];
};
module.exports = keys;
},{"111":111,"112":112,"118":118,"124":124,"132":132}],130:[function(_dereq_,module,exports){
var arrayEach = _dereq_(100),
isArguments = _dereq_(120),
isArray = _dereq_(121),
isFunction = _dereq_(122),
isIndex = _dereq_(114),
isLength = _dereq_(116),
isObject = _dereq_(124),
isString = _dereq_(126),
support = _dereq_(132);
/** `Object#toString` result references. */
var arrayTag = '[object Array]',
boolTag = '[object Boolean]',
dateTag = '[object Date]',
errorTag = '[object Error]',
funcTag = '[object Function]',
numberTag = '[object Number]',
objectTag = '[object Object]',
regexpTag = '[object RegExp]',
stringTag = '[object String]';
/** Used to fix the JScript `[[DontEnum]]` bug. */
var shadowProps = [
'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable',
'toLocaleString', 'toString', 'valueOf'
];
/** Used for native method references. */
var errorProto = Error.prototype,
objectProto = Object.prototype,
stringProto = String.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objToString = objectProto.toString;
/** Used to avoid iterating over non-enumerable properties in IE < 9. */
var nonEnumProps = {};
nonEnumProps[arrayTag] = nonEnumProps[dateTag] = nonEnumProps[numberTag] = { 'constructor': true, 'toLocaleString': true, 'toString': true, 'valueOf': true };
nonEnumProps[boolTag] = nonEnumProps[stringTag] = { 'constructor': true, 'toString': true, 'valueOf': true };
nonEnumProps[errorTag] = nonEnumProps[funcTag] = nonEnumProps[regexpTag] = { 'constructor': true, 'toString': true };
nonEnumProps[objectTag] = { 'constructor': true };
arrayEach(shadowProps, function(key) {
for (var tag in nonEnumProps) {
if (hasOwnProperty.call(nonEnumProps, tag)) {
var props = nonEnumProps[tag];
props[key] = hasOwnProperty.call(props, key);
}
}
});
/**
* Creates an array of the own and inherited enumerable property names of `object`.
*
* **Note:** Non-object values are coerced to objects.
*
* @static
* @memberOf _
* @category Object
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.keysIn(new Foo);
* // => ['a', 'b', 'c'] (iteration order is not guaranteed)
*/
function keysIn(object) {
if (object == null) {
return [];
}
if (!isObject(object)) {
object = Object(object);
}
var length = object.length;
length = (length && isLength(length) &&
(isArray(object) || isArguments(object) || isString(object)) && length) || 0;
var Ctor = object.constructor,
index = -1,
proto = (isFunction(Ctor) && Ctor.prototype) || objectProto,
isProto = proto === object,
result = Array(length),
skipIndexes = length > 0,
skipErrorProps = support.enumErrorProps && (object === errorProto || object instanceof Error),
skipProto = support.enumPrototypes && isFunction(object);
while (++index < length) {
result[index] = (index + '');
}
// lodash skips the `constructor` property when it infers it's iterating
// over a `prototype` object because IE < 9 can't set the `[[Enumerable]]`
// attribute of an existing property and the `constructor` property of a
// prototype defaults to non-enumerable.
for (var key in object) {
if (!(skipProto && key == 'prototype') &&
!(skipErrorProps && (key == 'message' || key == 'name')) &&
!(skipIndexes && isIndex(key, length)) &&
!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
result.push(key);
}
}
if (support.nonEnumShadows && object !== objectProto) {
var tag = object === stringProto ? stringTag : (object === errorProto ? errorTag : objToString.call(object)),
nonEnums = nonEnumProps[tag] || nonEnumProps[objectTag];
if (tag == objectTag) {
proto = objectProto;
}
length = shadowProps.length;
while (length--) {
key = shadowProps[length];
var nonEnum = nonEnums[key];
if (!(isProto && nonEnum) &&
(nonEnum ? hasOwnProperty.call(object, key) : object[key] !== proto[key])) {
result.push(key);
}
}
}
return result;
}
module.exports = keysIn;
},{"100":100,"114":114,"116":116,"120":120,"121":121,"122":122,"124":124,"126":126,"132":132}],131:[function(_dereq_,module,exports){
var baseMerge = _dereq_(104),
createAssigner = _dereq_(108);
/**
* Recursively merges own enumerable properties of the source object(s), that
* don't resolve to `undefined` into the destination object. Subsequent sources
* overwrite property assignments of previous sources. If `customizer` is
* provided it's invoked to produce the merged values of the destination and
* source properties. If `customizer` returns `undefined` merging is handled
* by the method instead. The `customizer` is bound to `thisArg` and invoked
* with five arguments: (objectValue, sourceValue, key, object, source).
*
* @static
* @memberOf _
* @category Object
* @param {Object} object The destination object.
* @param {...Object} [sources] The source objects.
* @param {Function} [customizer] The function to customize assigned values.
* @param {*} [thisArg] The `this` binding of `customizer`.
* @returns {Object} Returns `object`.
* @example
*
* var users = {
* 'data': [{ 'user': 'barney' }, { 'user': 'fred' }]
* };
*
* var ages = {
* 'data': [{ 'age': 36 }, { 'age': 40 }]
* };
*
* _.merge(users, ages);
* // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] }
*
* // using a customizer callback
* var object = {
* 'fruits': ['apple'],
* 'vegetables': ['beet']
* };
*
* var other = {
* 'fruits': ['banana'],
* 'vegetables': ['carrot']
* };
*
* _.merge(object, other, function(a, b) {
* if (_.isArray(a)) {
* return a.concat(b);
* }
* });
* // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] }
*/
var merge = createAssigner(baseMerge);
module.exports = merge;
},{"104":104,"108":108}],132:[function(_dereq_,module,exports){
/** Used for native method references. */
var arrayProto = Array.prototype,
errorProto = Error.prototype,
objectProto = Object.prototype;
/** Native method references. */
var propertyIsEnumerable = objectProto.propertyIsEnumerable,
splice = arrayProto.splice;
/**
* An object environment feature flags.
*
* @static
* @memberOf _
* @type Object
*/
var support = {};
(function(x) {
var Ctor = function() { this.x = x; },
object = { '0': x, 'length': x },
props = [];
Ctor.prototype = { 'valueOf': x, 'y': x };
for (var key in new Ctor) { props.push(key); }
/**
* Detect if `name` or `message` properties of `Error.prototype` are
* enumerable by default (IE < 9, Safari < 5.1).
*
* @memberOf _.support
* @type boolean
*/
support.enumErrorProps = propertyIsEnumerable.call(errorProto, 'message') ||
propertyIsEnumerable.call(errorProto, 'name');
/**
* Detect if `prototype` properties are enumerable by default.
*
* Firefox < 3.6, Opera > 9.50 - Opera < 11.60, and Safari < 5.1
* (if the prototype or a property on the prototype has been set)
* incorrectly set the `[[Enumerable]]` value of a function's `prototype`
* property to `true`.
*
* @memberOf _.support
* @type boolean
*/
support.enumPrototypes = propertyIsEnumerable.call(Ctor, 'prototype');
/**
* Detect if properties shadowing those on `Object.prototype` are non-enumerable.
*
* In IE < 9 an object's own properties, shadowing non-enumerable ones,
* are made non-enumerable as well (a.k.a the JScript `[[DontEnum]]` bug).
*
* @memberOf _.support
* @type boolean
*/
support.nonEnumShadows = !/valueOf/.test(props);
/**
* Detect if own properties are iterated after inherited properties (IE < 9).
*
* @memberOf _.support
* @type boolean
*/
support.ownLast = props[0] != 'x';
/**
* Detect if `Array#shift` and `Array#splice` augment array-like objects
* correctly.
*
* Firefox < 10, compatibility modes of IE 8, and IE < 9 have buggy Array
* `shift()` and `splice()` functions that fail to remove the last element,
* `value[0]`, of array-like objects even though the "length" property is
* set to `0`. The `shift()` method is buggy in compatibility modes of IE 8,
* while `splice()` is buggy regardless of mode in IE < 9.
*
* @memberOf _.support
* @type boolean
*/
support.spliceObjects = (splice.call(object, 0, 1), !object[0]);
/**
* Detect lack of support for accessing string characters by index.
*
* IE < 8 can't access characters by index. IE 8 can only access characters
* by index on string literals, not string objects.
*
* @memberOf _.support
* @type boolean
*/
support.unindexedChars = ('x'[0] + Object('x')[0]) != 'xx';
}(1, 0));
module.exports = support;
},{}],133:[function(_dereq_,module,exports){
/**
* This method returns the first argument provided to it.
*
* @static
* @memberOf _
* @category Utility
* @param {*} value Any value.
* @returns {*} Returns `value`.
* @example
*
* var object = { 'user': 'fred' };
*
* _.identity(object) === object;
* // => true
*/
function identity(value) {
return value;
}
module.exports = identity;
},{}],134:[function(_dereq_,module,exports){
'use strict';
var keys = _dereq_(141);
module.exports = function hasSymbols() {
if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
if (typeof Symbol.iterator === 'symbol') { return true; }
var obj = {};
var sym = Symbol('test');
var symObj = Object(sym);
if (typeof sym === 'string') { return false; }
if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
// temp disabled per https://github.com/ljharb/object.assign/issues/17
// if (sym instanceof Symbol) { return false; }
// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
// if (!(symObj instanceof Symbol)) { return false; }
var symVal = 42;
obj[sym] = symVal;
for (sym in obj) { return false; }
if (keys(obj).length !== 0) { return false; }
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
var syms = Object.getOwnPropertySymbols(obj);
if (syms.length !== 1 || syms[0] !== sym) { return false; }
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
if (typeof Object.getOwnPropertyDescriptor === 'function') {
var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
}
return true;
};
},{"141":141}],135:[function(_dereq_,module,exports){
'use strict';
// modified from https://github.com/es-shims/es6-shim
var keys = _dereq_(141);
var bind = _dereq_(140);
var canBeObject = function (obj) {
return typeof obj !== 'undefined' && obj !== null;
};
var hasSymbols = _dereq_(134)();
var toObject = Object;
var push = bind.call(Function.call, Array.prototype.push);
var propIsEnumerable = bind.call(Function.call, Object.prototype.propertyIsEnumerable);
var originalGetSymbols = hasSymbols ? Object.getOwnPropertySymbols : null;
module.exports = function assign(target, source1) {
if (!canBeObject(target)) { throw new TypeError('target must be an object'); }
var objTarget = toObject(target);
var s, source, i, props, syms, value, key;
for (s = 1; s < arguments.length; ++s) {
source = toObject(arguments[s]);
props = keys(source);
var getSymbols = hasSymbols && (Object.getOwnPropertySymbols || originalGetSymbols);
if (getSymbols) {
syms = getSymbols(source);
for (i = 0; i < syms.length; ++i) {
key = syms[i];
if (propIsEnumerable(source, key)) {
push(props, key);
}
}
}
for (i = 0; i < props.length; ++i) {
key = props[i];
value = source[key];
if (propIsEnumerable(source, key)) {
objTarget[key] = value;
}
}
}
return objTarget;
};
},{"134":134,"140":140,"141":141}],136:[function(_dereq_,module,exports){
'use strict';
var defineProperties = _dereq_(137);
var implementation = _dereq_(135);
var getPolyfill = _dereq_(143);
var shim = _dereq_(144);
var polyfill = getPolyfill();
defineProperties(polyfill, {
implementation: implementation,
getPolyfill: getPolyfill,
shim: shim
});
module.exports = polyfill;
},{"135":135,"137":137,"143":143,"144":144}],137:[function(_dereq_,module,exports){
'use strict';
var keys = _dereq_(141);
var foreach = _dereq_(138);
var hasSymbols = typeof Symbol === 'function' && typeof Symbol() === 'symbol';
var toStr = Object.prototype.toString;
var isFunction = function (fn) {
return typeof fn === 'function' && toStr.call(fn) === '[object Function]';
};
var arePropertyDescriptorsSupported = function () {
var obj = {};
try {
Object.defineProperty(obj, 'x', { enumerable: false, value: obj });
/* eslint-disable no-unused-vars, no-restricted-syntax */
for (var _ in obj) { return false; }
/* eslint-enable no-unused-vars, no-restricted-syntax */
return obj.x === obj;
} catch (e) { /* this is IE 8. */
return false;
}
};
var supportsDescriptors = Object.defineProperty && arePropertyDescriptorsSupported();
var defineProperty = function (object, name, value, predicate) {
if (name in object && (!isFunction(predicate) || !predicate())) {
return;
}
if (supportsDescriptors) {
Object.defineProperty(object, name, {
configurable: true,
enumerable: false,
value: value,
writable: true
});
} else {
object[name] = value;
}
};
var defineProperties = function (object, map) {
var predicates = arguments.length > 2 ? arguments[2] : {};
var props = keys(map);
if (hasSymbols) {
props = props.concat(Object.getOwnPropertySymbols(map));
}
foreach(props, function (name) {
defineProperty(object, name, map[name], predicates[name]);
});
};
defineProperties.supportsDescriptors = !!supportsDescriptors;
module.exports = defineProperties;
},{"138":138,"141":141}],138:[function(_dereq_,module,exports){
var hasOwn = Object.prototype.hasOwnProperty;
var toString = Object.prototype.toString;
module.exports = function forEach (obj, fn, ctx) {
if (toString.call(fn) !== '[object Function]') {
throw new TypeError('iterator must be a function');
}
var l = obj.length;
if (l === +l) {
for (var i = 0; i < l; i++) {
fn.call(ctx, obj[i], i, obj);
}
} else {
for (var k in obj) {
if (hasOwn.call(obj, k)) {
fn.call(ctx, obj[k], k, obj);
}
}
}
};
},{}],139:[function(_dereq_,module,exports){
var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
var slice = Array.prototype.slice;
var toStr = Object.prototype.toString;
var funcType = '[object Function]';
module.exports = function bind(that) {
var target = this;
if (typeof target !== 'function' || toStr.call(target) !== funcType) {
throw new TypeError(ERROR_MESSAGE + target);
}
var args = slice.call(arguments, 1);
var bound;
var binder = function () {
if (this instanceof bound) {
var result = target.apply(
this,
args.concat(slice.call(arguments))
);
if (Object(result) === result) {
return result;
}
return this;
} else {
return target.apply(
that,
args.concat(slice.call(arguments))
);
}
};
var boundLength = Math.max(0, target.length - args.length);
var boundArgs = [];
for (var i = 0; i < boundLength; i++) {
boundArgs.push('$' + i);
}
bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
if (target.prototype) {
var Empty = function Empty() {};
Empty.prototype = target.prototype;
bound.prototype = new Empty();
Empty.prototype = null;
}
return bound;
};
},{}],140:[function(_dereq_,module,exports){
var implementation = _dereq_(139);
module.exports = Function.prototype.bind || implementation;
},{"139":139}],141:[function(_dereq_,module,exports){
'use strict';
// modified from https://github.com/es-shims/es5-shim
var has = Object.prototype.hasOwnProperty;
var toStr = Object.prototype.toString;
var slice = Array.prototype.slice;
var isArgs = _dereq_(142);
var isEnumerable = Object.prototype.propertyIsEnumerable;
var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');
var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');
var dontEnums = [
'toString',
'toLocaleString',
'valueOf',
'hasOwnProperty',
'isPrototypeOf',
'propertyIsEnumerable',
'constructor'
];
var equalsConstructorPrototype = function (o) {
var ctor = o.constructor;
return ctor && ctor.prototype === o;
};
var excludedKeys = {
$console: true,
$external: true,
$frame: true,
$frameElement: true,
$frames: true,
$innerHeight: true,
$innerWidth: true,
$outerHeight: true,
$outerWidth: true,
$pageXOffset: true,
$pageYOffset: true,
$parent: true,
$scrollLeft: true,
$scrollTop: true,
$scrollX: true,
$scrollY: true,
$self: true,
$webkitIndexedDB: true,
$webkitStorageInfo: true,
$window: true
};
var hasAutomationEqualityBug = (function () {
/* global window */
if (typeof window === 'undefined') { return false; }
for (var k in window) {
try {
if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {
try {
equalsConstructorPrototype(window[k]);
} catch (e) {
return true;
}
}
} catch (e) {
return true;
}
}
return false;
}());
var equalsConstructorPrototypeIfNotBuggy = function (o) {
/* global window */
if (typeof window === 'undefined' || !hasAutomationEqualityBug) {
return equalsConstructorPrototype(o);
}
try {
return equalsConstructorPrototype(o);
} catch (e) {
return false;
}
};
var keysShim = function keys(object) {
var isObject = object !== null && typeof object === 'object';
var isFunction = toStr.call(object) === '[object Function]';
var isArguments = isArgs(object);
var isString = isObject && toStr.call(object) === '[object String]';
var theKeys = [];
if (!isObject && !isFunction && !isArguments) {
throw new TypeError('Object.keys called on a non-object');
}
var skipProto = hasProtoEnumBug && isFunction;
if (isString && object.length > 0 && !has.call(object, 0)) {
for (var i = 0; i < object.length; ++i) {
theKeys.push(String(i));
}
}
if (isArguments && object.length > 0) {
for (var j = 0; j < object.length; ++j) {
theKeys.push(String(j));
}
} else {
for (var name in object) {
if (!(skipProto && name === 'prototype') && has.call(object, name)) {
theKeys.push(String(name));
}
}
}
if (hasDontEnumBug) {
var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);
for (var k = 0; k < dontEnums.length; ++k) {
if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {
theKeys.push(dontEnums[k]);
}
}
}
return theKeys;
};
keysShim.shim = function shimObjectKeys() {
if (Object.keys) {
var keysWorksWithArguments = (function () {
// Safari 5.0 bug
return (Object.keys(arguments) || '').length === 2;
}(1, 2));
if (!keysWorksWithArguments) {
var originalKeys = Object.keys;
Object.keys = function keys(object) {
if (isArgs(object)) {
return originalKeys(slice.call(object));
} else {
return originalKeys(object);
}
};
}
} else {
Object.keys = keysShim;
}
return Object.keys || keysShim;
};
module.exports = keysShim;
},{"142":142}],142:[function(_dereq_,module,exports){
'use strict';
var toStr = Object.prototype.toString;
module.exports = function isArguments(value) {
var str = toStr.call(value);
var isArgs = str === '[object Arguments]';
if (!isArgs) {
isArgs = str !== '[object Array]' &&
value !== null &&
typeof value === 'object' &&
typeof value.length === 'number' &&
value.length >= 0 &&
toStr.call(value.callee) === '[object Function]';
}
return isArgs;
};
},{}],143:[function(_dereq_,module,exports){
'use strict';
var implementation = _dereq_(135);
var lacksProperEnumerationOrder = function () {
if (!Object.assign) {
return false;
}
// v8, specifically in node 4.x, has a bug with incorrect property enumeration order
// note: this does not detect the bug unless there's 20 characters
var str = 'abcdefghijklmnopqrst';
var letters = str.split('');
var map = {};
for (var i = 0; i < letters.length; ++i) {
map[letters[i]] = letters[i];
}
var obj = Object.assign({}, map);
var actual = '';
for (var k in obj) {
actual += k;
}
return str !== actual;
};
var assignHasPendingExceptions = function () {
if (!Object.assign || !Object.preventExtensions) {
return false;
}
// Firefox 37 still has "pending exception" logic in its Object.assign implementation,
// which is 72% slower than our shim, and Firefox 40's native implementation.
var thrower = Object.preventExtensions({ 1: 2 });
try {
Object.assign(thrower, 'xy');
} catch (e) {
return thrower[1] === 'y';
}
return false;
};
module.exports = function getPolyfill() {
if (!Object.assign) {
return implementation;
}
if (lacksProperEnumerationOrder()) {
return implementation;
}
if (assignHasPendingExceptions()) {
return implementation;
}
return Object.assign;
};
},{"135":135}],144:[function(_dereq_,module,exports){
'use strict';
var define = _dereq_(137);
var getPolyfill = _dereq_(143);
module.exports = function shimAssign() {
var polyfill = getPolyfill();
define(
Object,
{ assign: polyfill },
{ assign: function () { return Object.assign !== polyfill; } }
);
return polyfill;
};
},{"137":137,"143":143}],145:[function(_dereq_,module,exports){
module.exports = SafeParseTuple
function SafeParseTuple(obj, reviver) {
var json
var error = null
try {
json = JSON.parse(obj, reviver)
} catch (err) {
error = err
}
return [error, json]
}
},{}],146:[function(_dereq_,module,exports){
function clean (s) {
return s.replace(/\n\r?\s*/g, '')
}
module.exports = function tsml (sa) {
var s = ''
, i = 0
for (; i < arguments.length; i++)
s += clean(sa[i]) + (arguments[i + 1] || '')
return s
}
},{}],147:[function(_dereq_,module,exports){
"use strict";
var window = _dereq_(93)
var once = _dereq_(149)
var isFunction = _dereq_(148)
var parseHeaders = _dereq_(152)
var xtend = _dereq_(153)
module.exports = createXHR
createXHR.XMLHttpRequest = window.XMLHttpRequest || noop
createXHR.XDomainRequest = "withCredentials" in (new createXHR.XMLHttpRequest()) ? createXHR.XMLHttpRequest : window.XDomainRequest
forEachArray(["get", "put", "post", "patch", "head", "delete"], function(method) {
createXHR[method === "delete" ? "del" : method] = function(uri, options, callback) {
options = initParams(uri, options, callback)
options.method = method.toUpperCase()
return _createXHR(options)
}
})
function forEachArray(array, iterator) {
for (var i = 0; i < array.length; i++) {
iterator(array[i])
}
}
function isEmpty(obj){
for(var i in obj){
if(obj.hasOwnProperty(i)) return false
}
return true
}
function initParams(uri, options, callback) {
var params = uri
if (isFunction(options)) {
callback = options
if (typeof uri === "string") {
params = {uri:uri}
}
} else {
params = xtend(options, {uri: uri})
}
params.callback = callback
return params
}
function createXHR(uri, options, callback) {
options = initParams(uri, options, callback)
return _createXHR(options)
}
function _createXHR(options) {
var callback = options.callback
if(typeof callback === "undefined"){
throw new Error("callback argument missing")
}
callback = once(callback)
function readystatechange() {
if (xhr.readyState === 4) {
loadFunc()
}
}
function getBody() {
// Chrome with requestType=blob throws errors arround when even testing access to responseText
var body = undefined
if (xhr.response) {
body = xhr.response
} else if (xhr.responseType === "text" || !xhr.responseType) {
body = xhr.responseText || xhr.responseXML
}
if (isJson) {
try {
body = JSON.parse(body)
} catch (e) {}
}
return body
}
var failureResponse = {
body: undefined,
headers: {},
statusCode: 0,
method: method,
url: uri,
rawRequest: xhr
}
function errorFunc(evt) {
clearTimeout(timeoutTimer)
if(!(evt instanceof Error)){
evt = new Error("" + (evt || "Unknown XMLHttpRequest Error") )
}
evt.statusCode = 0
callback(evt, failureResponse)
}
// will load the data & process the response in a special response object
function loadFunc() {
if (aborted) return
var status
clearTimeout(timeoutTimer)
if(options.useXDR && xhr.status===undefined) {
//IE8 CORS GET successful response doesn't have a status field, but body is fine
status = 200
} else {
status = (xhr.status === 1223 ? 204 : xhr.status)
}
var response = failureResponse
var err = null
if (status !== 0){
response = {
body: getBody(),
statusCode: status,
method: method,
headers: {},
url: uri,
rawRequest: xhr
}
if(xhr.getAllResponseHeaders){ //remember xhr can in fact be XDR for CORS in IE
response.headers = parseHeaders(xhr.getAllResponseHeaders())
}
} else {
err = new Error("Internal XMLHttpRequest Error")
}
callback(err, response, response.body)
}
var xhr = options.xhr || null
if (!xhr) {
if (options.cors || options.useXDR) {
xhr = new createXHR.XDomainRequest()
}else{
xhr = new createXHR.XMLHttpRequest()
}
}
var key
var aborted
var uri = xhr.url = options.uri || options.url
var method = xhr.method = options.method || "GET"
var body = options.body || options.data || null
var headers = xhr.headers = options.headers || {}
var sync = !!options.sync
var isJson = false
var timeoutTimer
if ("json" in options) {
isJson = true
headers["accept"] || headers["Accept"] || (headers["Accept"] = "application/json") //Don't override existing accept header declared by user
if (method !== "GET" && method !== "HEAD") {
headers["content-type"] || headers["Content-Type"] || (headers["Content-Type"] = "application/json") //Don't override existing accept header declared by user
body = JSON.stringify(options.json)
}
}
xhr.onreadystatechange = readystatechange
xhr.onload = loadFunc
xhr.onerror = errorFunc
// IE9 must have onprogress be set to a unique function.
xhr.onprogress = function () {
// IE must die
}
xhr.ontimeout = errorFunc
xhr.open(method, uri, !sync, options.username, options.password)
//has to be after open
if(!sync) {
xhr.withCredentials = !!options.withCredentials
}
// Cannot set timeout with sync request
// not setting timeout on the xhr object, because of old webkits etc. not handling that correctly
// both npm's request and jquery 1.x use this kind of timeout, so this is being consistent
if (!sync && options.timeout > 0 ) {
timeoutTimer = setTimeout(function(){
aborted=true//IE9 may still call readystatechange
xhr.abort("timeout")
var e = new Error("XMLHttpRequest timeout")
e.code = "ETIMEDOUT"
errorFunc(e)
}, options.timeout )
}
if (xhr.setRequestHeader) {
for(key in headers){
if(headers.hasOwnProperty(key)){
xhr.setRequestHeader(key, headers[key])
}
}
} else if (options.headers && !isEmpty(options.headers)) {
throw new Error("Headers cannot be set on an XDomainRequest object")
}
if ("responseType" in options) {
xhr.responseType = options.responseType
}
if ("beforeSend" in options &&
typeof options.beforeSend === "function"
) {
options.beforeSend(xhr)
}
xhr.send(body)
return xhr
}
function noop() {}
},{"148":148,"149":149,"152":152,"153":153,"93":93}],148:[function(_dereq_,module,exports){
module.exports = isFunction
var toString = Object.prototype.toString
function isFunction (fn) {
var string = toString.call(fn)
return string === '[object Function]' ||
(typeof fn === 'function' && string !== '[object RegExp]') ||
(typeof window !== 'undefined' &&
// IE8 and below
(fn === window.setTimeout ||
fn === window.alert ||
fn === window.confirm ||
fn === window.prompt))
};
},{}],149:[function(_dereq_,module,exports){
module.exports = once
once.proto = once(function () {
Object.defineProperty(Function.prototype, 'once', {
value: function () {
return once(this)
},
configurable: true
})
})
function once (fn) {
var called = false
return function () {
if (called) return
called = true
return fn.apply(this, arguments)
}
}
},{}],150:[function(_dereq_,module,exports){
var isFunction = _dereq_(148)
module.exports = forEach
var toString = Object.prototype.toString
var hasOwnProperty = Object.prototype.hasOwnProperty
function forEach(list, iterator, context) {
if (!isFunction(iterator)) {
throw new TypeError('iterator must be a function')
}
if (arguments.length < 3) {
context = this
}
if (toString.call(list) === '[object Array]')
forEachArray(list, iterator, context)
else if (typeof list === 'string')
forEachString(list, iterator, context)
else
forEachObject(list, iterator, context)
}
function forEachArray(array, iterator, context) {
for (var i = 0, len = array.length; i < len; i++) {
if (hasOwnProperty.call(array, i)) {
iterator.call(context, array[i], i, array)
}
}
}
function forEachString(string, iterator, context) {
for (var i = 0, len = string.length; i < len; i++) {
// no such thing as a sparse string.
iterator.call(context, string.charAt(i), i, string)
}
}
function forEachObject(object, iterator, context) {
for (var k in object) {
if (hasOwnProperty.call(object, k)) {
iterator.call(context, object[k], k, object)
}
}
}
},{"148":148}],151:[function(_dereq_,module,exports){
exports = module.exports = trim;
function trim(str){
return str.replace(/^\s*|\s*$/g, '');
}
exports.left = function(str){
return str.replace(/^\s*/, '');
};
exports.right = function(str){
return str.replace(/\s*$/, '');
};
},{}],152:[function(_dereq_,module,exports){
var trim = _dereq_(151)
, forEach = _dereq_(150)
, isArray = function(arg) {
return Object.prototype.toString.call(arg) === '[object Array]';
}
module.exports = function (headers) {
if (!headers)
return {}
var result = {}
forEach(
trim(headers).split('\n')
, function (row) {
var index = row.indexOf(':')
, key = trim(row.slice(0, index)).toLowerCase()
, value = trim(row.slice(index + 1))
if (typeof(result[key]) === 'undefined') {
result[key] = value
} else if (isArray(result[key])) {
result[key].push(value)
} else {
result[key] = [ result[key], value ]
}
}
)
return result
}
},{"150":150,"151":151}],153:[function(_dereq_,module,exports){
module.exports = extend
var hasOwnProperty = Object.prototype.hasOwnProperty;
function extend() {
var target = {}
for (var i = 0; i < arguments.length; i++) {
var source = arguments[i]
for (var key in source) {
if (hasOwnProperty.call(source, key)) {
target[key] = source[key]
}
}
}
return target
}
},{}]},{},[91])(91)
}); | honestree/cdnjs | ajax/libs/video.js/5.12.3/alt/video.novtt.js | JavaScript | mit | 757,116 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.