{ // 获取包含Hugging Face文本的span元素 const spans = link.querySelectorAll('span.whitespace-nowrap, span.hidden.whitespace-nowrap'); spans.forEach(span => { if (span.textContent && span.textContent.trim().match(/Hugging\s*Face/i)) { span.textContent = 'AI快站'; } }); }); // 替换logo图片的alt属性 document.querySelectorAll('img[alt*="Hugging"], img[alt*="Face"]').forEach(img => { if (img.alt.match(/Hugging\s*Face/i)) { img.alt = 'AI快站 logo'; } }); } // 替换导航栏中的链接 function replaceNavigationLinks() { // 已替换标记,防止重复运行 if (window._navLinksReplaced) { return; } // 已经替换过的链接集合,防止重复替换 const replacedLinks = new Set(); // 只在导航栏区域查找和替换链接 const headerArea = document.querySelector('header') || document.querySelector('nav'); if (!headerArea) { return; } // 在导航区域内查找链接 const navLinks = headerArea.querySelectorAll('a'); navLinks.forEach(link => { // 如果已经替换过,跳过 if (replacedLinks.has(link)) return; const linkText = link.textContent.trim(); const linkHref = link.getAttribute('href') || ''; // 替换Spaces链接 - 仅替换一次 if ( (linkHref.includes('/spaces') || linkHref === '/spaces' || linkText === 'Spaces' || linkText.match(/^s*Spacess*$/i)) && linkText !== 'OCR模型免费转Markdown' && linkText !== 'OCR模型免费转Markdown' ) { link.textContent = 'OCR模型免费转Markdown'; link.href = 'https://fast360.xyz'; link.setAttribute('target', '_blank'); link.setAttribute('rel', 'noopener noreferrer'); replacedLinks.add(link); } // 删除Posts链接 else if ( (linkHref.includes('/posts') || linkHref === '/posts' || linkText === 'Posts' || linkText.match(/^s*Postss*$/i)) ) { if (link.parentNode) { link.parentNode.removeChild(link); } replacedLinks.add(link); } // 替换Docs链接 - 仅替换一次 else if ( (linkHref.includes('/docs') || linkHref === '/docs' || linkText === 'Docs' || linkText.match(/^s*Docss*$/i)) && linkText !== '模型下载攻略' ) { link.textContent = '模型下载攻略'; link.href = '/'; replacedLinks.add(link); } // 删除Enterprise链接 else if ( (linkHref.includes('/enterprise') || linkHref === '/enterprise' || linkText === 'Enterprise' || linkText.match(/^s*Enterprises*$/i)) ) { if (link.parentNode) { link.parentNode.removeChild(link); } replacedLinks.add(link); } }); // 查找可能嵌套的Spaces和Posts文本 const textNodes = []; function findTextNodes(element) { if (element.nodeType === Node.TEXT_NODE) { const text = element.textContent.trim(); if (text === 'Spaces' || text === 'Posts' || text === 'Enterprise') { textNodes.push(element); } } else { for (const child of element.childNodes) { findTextNodes(child); } } } // 只在导航区域内查找文本节点 findTextNodes(headerArea); // 替换找到的文本节点 textNodes.forEach(node => { const text = node.textContent.trim(); if (text === 'Spaces') { node.textContent = node.textContent.replace(/Spaces/g, 'OCR模型免费转Markdown'); } else if (text === 'Posts') { // 删除Posts文本节点 if (node.parentNode) { node.parentNode.removeChild(node); } } else if (text === 'Enterprise') { // 删除Enterprise文本节点 if (node.parentNode) { node.parentNode.removeChild(node); } } }); // 标记已替换完成 window._navLinksReplaced = true; } // 替换代码区域中的域名 function replaceCodeDomains() { // 特别处理span.hljs-string和span.njs-string元素 document.querySelectorAll('span.hljs-string, span.njs-string, span[class*="hljs-string"], span[class*="njs-string"]').forEach(span => { if (span.textContent && span.textContent.includes('huggingface.co')) { span.textContent = span.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } }); // 替换hljs-string类的span中的域名(移除多余的转义符号) document.querySelectorAll('span.hljs-string, span[class*="hljs-string"]').forEach(span => { if (span.textContent && span.textContent.includes('huggingface.co')) { span.textContent = span.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } }); // 替换pre和code标签中包含git clone命令的域名 document.querySelectorAll('pre, code').forEach(element => { if (element.textContent && element.textContent.includes('git clone')) { const text = element.innerHTML; if (text.includes('huggingface.co')) { element.innerHTML = text.replace(/huggingface.co/g, 'aifasthub.com'); } } }); // 处理特定的命令行示例 document.querySelectorAll('pre, code').forEach(element => { const text = element.innerHTML; if (text.includes('huggingface.co')) { // 针对git clone命令的专门处理 if (text.includes('git clone') || text.includes('GIT_LFS_SKIP_SMUDGE=1')) { element.innerHTML = text.replace(/huggingface.co/g, 'aifasthub.com'); } } }); // 特别处理模型下载页面上的代码片段 document.querySelectorAll('.flex.border-t, .svelte_hydrator, .inline-block').forEach(container => { const content = container.innerHTML; if (content && content.includes('huggingface.co')) { container.innerHTML = content.replace(/huggingface.co/g, 'aifasthub.com'); } }); // 特别处理模型仓库克隆对话框中的代码片段 try { // 查找包含"Clone this model repository"标题的对话框 const cloneDialog = document.querySelector('.svelte_hydration_boundary, [data-target="MainHeader"]'); if (cloneDialog) { // 查找对话框中所有的代码片段和命令示例 const codeElements = cloneDialog.querySelectorAll('pre, code, span'); codeElements.forEach(element => { if (element.textContent && element.textContent.includes('huggingface.co')) { if (element.innerHTML.includes('huggingface.co')) { element.innerHTML = element.innerHTML.replace(/huggingface.co/g, 'aifasthub.com'); } else { element.textContent = element.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } } }); } // 更精确地定位克隆命令中的域名 document.querySelectorAll('[data-target]').forEach(container => { const codeBlocks = container.querySelectorAll('pre, code, span.hljs-string'); codeBlocks.forEach(block => { if (block.textContent && block.textContent.includes('huggingface.co')) { if (block.innerHTML.includes('huggingface.co')) { block.innerHTML = block.innerHTML.replace(/huggingface.co/g, 'aifasthub.com'); } else { block.textContent = block.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } } }); }); } catch (e) { // 错误处理但不打印日志 } } // 当DOM加载完成后执行替换 if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', () => { replaceHeaderBranding(); replaceNavigationLinks(); replaceCodeDomains(); // 只在必要时执行替换 - 3秒后再次检查 setTimeout(() => { if (!window._navLinksReplaced) { console.log('[Client] 3秒后重新检查导航链接'); replaceNavigationLinks(); } }, 3000); }); } else { replaceHeaderBranding(); replaceNavigationLinks(); replaceCodeDomains(); // 只在必要时执行替换 - 3秒后再次检查 setTimeout(() => { if (!window._navLinksReplaced) { console.log('[Client] 3秒后重新检查导航链接'); replaceNavigationLinks(); } }, 3000); } // 增加一个MutationObserver来处理可能的动态元素加载 const observer = new MutationObserver(mutations => { // 检查是否导航区域有变化 const hasNavChanges = mutations.some(mutation => { // 检查是否存在header或nav元素变化 return Array.from(mutation.addedNodes).some(node => { if (node.nodeType === Node.ELEMENT_NODE) { // 检查是否是导航元素或其子元素 if (node.tagName === 'HEADER' || node.tagName === 'NAV' || node.querySelector('header, nav')) { return true; } // 检查是否在导航元素内部 let parent = node.parentElement; while (parent) { if (parent.tagName === 'HEADER' || parent.tagName === 'NAV') { return true; } parent = parent.parentElement; } } return false; }); }); // 只在导航区域有变化时执行替换 if (hasNavChanges) { // 重置替换状态,允许再次替换 window._navLinksReplaced = false; replaceHeaderBranding(); replaceNavigationLinks(); } }); // 开始观察document.body的变化,包括子节点 if (document.body) { observer.observe(document.body, { childList: true, subtree: true }); } else { document.addEventListener('DOMContentLoaded', () => { observer.observe(document.body, { childList: true, subtree: true }); }); } })(); ');\nglobal.window = global.document.defaultView;\nglobal.navigator = global.window.navigator;\nconst $ = _$(window);\n\nchaiJquery(chai, chai.util, $);\n\nfunction renderComponent(ComponentClass, props = {}, state = {}) {\n const componentInstance = TestUtils.renderIntoDocument(\n \n \n \n );\n\n return $(ReactDOM.findDOMNode(componentInstance));\n}\n\n$.fn.simulate = function(eventName, value) {\n if (value) {\n this.val(value);\n }\n TestUtils.Simulate[eventName](this[0]);\n};\n\nexport {renderComponent, expect};\n"}}},{"rowIdx":427,"cells":{"target":{"kind":"string","value":"src/SubcategoryList/index.js"},"feat_repo_name":{"kind":"string","value":"christianalfoni/ducky-components"},"text":{"kind":"string","value":"import React from 'react';\nimport PropTypes from 'prop-types';\nimport Spacer from '../Spacer';\nimport ProgressbarLabeledPercentage from '../ProgressbarLabeledPercentage';\nimport Typography from '../Typography';\nimport Wrapper from '../Wrapper';\nimport styles from './styles.css';\n\nclass SubcategoryList extends React.Component {\n renderBar() {\n const sortedCategories = this.props.sortedCategories;\n\n return sortedCategories.map((category, index) => {\n return (\n \n \n \n
\n );\n });\n }\n\n render() {\n return (\n \n \n {this.props.title}\n \n \n {this.renderBar()}\n \n );\n }\n}\n\nSubcategoryList.propTypes = {\n sortedCategories: PropTypes.array,\n title: PropTypes.string\n};\n\nexport default SubcategoryList;\n"}}},{"rowIdx":428,"cells":{"target":{"kind":"string","value":"src/components/Flag.js"},"feat_repo_name":{"kind":"string","value":"DavidGuben/overwatchcharacterdatabase"},"text":{"kind":"string","value":"import React from 'react';\n\nexport const Flag = props => (\n \n {`${props.name}'s\n {props.showName && {props.name}}\n \n);\n\nexport default Flag;\n"}}},{"rowIdx":429,"cells":{"target":{"kind":"string","value":"pootle/static/js/auth/components/PasswordResetForm.js"},"feat_repo_name":{"kind":"string","value":"unho/pootle"},"text":{"kind":"string","value":"/*\n * Copyright (C) Pootle contributors.\n *\n * This file is a part of the Pootle project. It is distributed under the GPL3\n * or later license. See the LICENSE file for a copy of the license and the\n * AUTHORS file for copyright and authorship information.\n */\n\nimport assign from 'object-assign';\nimport React from 'react';\nimport { PureRenderMixin } from 'react-addons-pure-render-mixin';\n\nimport FormElement from 'components/FormElement';\nimport FormMixin from 'mixins/FormMixin';\n\nimport { gotoScreen, passwordReset } from '../actions';\nimport AuthContent from './AuthContent';\nimport AuthProgress from './AuthProgress';\n\n\nconst PasswordResetForm = React.createClass({\n\n propTypes: {\n dispatch: React.PropTypes.func.isRequired,\n formErrors: React.PropTypes.object.isRequired,\n isLoading: React.PropTypes.bool.isRequired,\n tokenFailed: React.PropTypes.bool.isRequired,\n redirectTo: React.PropTypes.string,\n },\n\n mixins: [PureRenderMixin, FormMixin],\n\n /* Lifecycle */\n\n getInitialState() {\n this.initialData = {\n password1: '',\n password2: '',\n };\n return {\n formData: assign({}, this.initialData),\n };\n },\n\n componentWillReceiveProps(nextProps) {\n if (this.state.errors !== nextProps.formErrors) {\n this.setState({ errors: nextProps.formErrors });\n }\n },\n\n\n /* Handlers */\n\n handlePasswordReset(e) {\n e.preventDefault();\n this.props.dispatch(gotoScreen('requestPasswordReset'));\n },\n\n handleFormSubmit(e) {\n e.preventDefault();\n\n const url = window.location.pathname;\n this.props.dispatch(passwordReset(this.state.formData, url));\n },\n\n\n /* Others */\n\n hasData() {\n const { formData } = this.state;\n return (formData.password1 !== '' && formData.password2 !== '' &&\n formData.password1 === formData.password2);\n },\n\n\n /* Layout */\n\n renderTokenFailed() {\n return (\n \n

{gettext('The password reset link was invalid, possibly because ' +\n 'it has already been used. Please request a new ' +\n 'password reset.')}

\n
\n \n {gettext('Reset Password')}\n \n
\n
\n );\n },\n\n render() {\n if (this.props.tokenFailed) {\n return this.renderTokenFailed();\n }\n if (this.props.redirectTo) {\n return ;\n }\n\n const { errors } = this.state;\n const { formData } = this.state;\n\n return (\n \n \n
\n \n \n
\n {this.renderAllFormErrors()}\n
\n
\n \n
\n
\n

{gettext('After changing your password you will sign in automatically.')}

\n
\n
\n \n
\n );\n },\n\n});\n\n\nexport default PasswordResetForm;\n"}}},{"rowIdx":430,"cells":{"target":{"kind":"string","value":"blueocean-material-icons/src/js/components/svg-icons/av/repeat-one.js"},"feat_repo_name":{"kind":"string","value":"jenkinsci/blueocean-plugin"},"text":{"kind":"string","value":"import React from 'react';\nimport SvgIcon from '../../SvgIcon';\n\nconst AvRepeatOne = (props) => (\n \n \n \n);\nAvRepeatOne.displayName = 'AvRepeatOne';\nAvRepeatOne.muiName = 'SvgIcon';\n\nexport default AvRepeatOne;\n"}}},{"rowIdx":431,"cells":{"target":{"kind":"string","value":"src/components/Post/index.js"},"feat_repo_name":{"kind":"string","value":"transitlinks/web-app"},"text":{"kind":"string","value":"import React from 'react';\nimport cx from 'classnames';\nimport { injectIntl } from 'react-intl';\nimport { connect } from 'react-redux';\nimport Video from './Video';\nimport withStyles from 'isomorphic-style-loader/lib/withStyles';\nimport s from './Post.css';\n\nconst Post = ({\n post, header, env\n}) => {\n\n const name = post.user || 'Anonymous';;\n\n const textOnly = (post.mediaItems || []).length === 0;\n\n return (\n
\n { header }\n
\n {\n (post.mediaItems || []).map(mediaItem => {\n if (mediaItem.type === 'image') {\n return (\n
\n \n
\n );\n } else {\n return
\n
{post.text}
\n
\n
\n );\n\n};\n\nexport default injectIntl(\n connect(state => ({\n env: state.env\n }), {\n })(withStyles(s)(Post))\n);\n\n\n"}}},{"rowIdx":432,"cells":{"target":{"kind":"string","value":"src/svg-icons/image/colorize.js"},"feat_repo_name":{"kind":"string","value":"kittyjumbalaya/material-components-web"},"text":{"kind":"string","value":"import React from 'react';\nimport pure from 'recompose/pure';\nimport SvgIcon from '../../SvgIcon';\n\nlet ImageColorize = (props) => (\n \n \n \n);\nImageColorize = pure(ImageColorize);\nImageColorize.displayName = 'ImageColorize';\nImageColorize.muiName = 'SvgIcon';\n\nexport default ImageColorize;\n"}}},{"rowIdx":433,"cells":{"target":{"kind":"string","value":"ajax/libs/react-highcharts/8.3.2/ReactHighstock.src.js"},"feat_repo_name":{"kind":"string","value":"CyrusSUEN/cdnjs"},"text":{"kind":"string","value":"(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"highcharts/highstock\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\", \"highcharts/highstock\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ReactHighstock\"] = factory(require(\"react\"), require(\"highcharts/highstock\"));\n\telse\n\t\troot[\"ReactHighstock\"] = factory(root[\"React\"], root[\"Highcharts\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_3__, __WEBPACK_EXTERNAL_MODULE_8__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n\n\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tmodule.exports = __webpack_require__(7);\n\n\n/***/ },\n/* 1 */,\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\n\tvar _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; };\n\n\tvar React = __webpack_require__(3);\n\n\tmodule.exports = function (chartType, Highcharts) {\n\t var displayName = 'Highcharts' + chartType;\n\t var result = React.createClass({\n\t displayName: displayName,\n\n\t propTypes: {\n\t config: React.PropTypes.object.isRequired,\n\t isPureConfig: React.PropTypes.bool,\n\t neverReflow: React.PropTypes.bool,\n\t callback: React.PropTypes.func\n\t },\n\n\t defaultProps: {\n\t callback: function callback() {}\n\t },\n\n\t renderChart: function renderChart(config) {\n\t var _this = this;\n\n\t if (!config) {\n\t throw new Error('Config must be specified for the ' + displayName + ' component');\n\t }\n\t var chartConfig = config.chart;\n\t this.chart = new Highcharts[chartType](_extends({}, config, {\n\t chart: _extends({}, chartConfig, {\n\t renderTo: this.refs.chart\n\t })\n\t }), this.props.callback);\n\n\t global.requestAnimationFrame && requestAnimationFrame(function () {\n\t _this.chart && _this.chart.options && _this.chart.reflow();\n\t });\n\t },\n\n\t shouldComponentUpdate: function shouldComponentUpdate(nextProps) {\n\t if (nextProps.neverReflow || nextProps.isPureConfig && this.props.config === nextProps.config) {\n\t return true;\n\t }\n\t this.renderChart(nextProps.config);\n\t return false;\n\t },\n\n\n\t getChart: function getChart() {\n\t if (!this.chart) {\n\t throw new Error('getChart() should not be called before the component is mounted');\n\t }\n\t return this.chart;\n\t },\n\n\t componentDidMount: function componentDidMount() {\n\t this.renderChart(this.props.config);\n\t },\n\n\t componentWillUnmount: function componentWillUnmount() {\n\t this.chart.destroy();\n\t },\n\n\n\t render: function render() {\n\t var props = this.props;\n\t props = _extends({}, props, {\n\t ref: 'chart'\n\t });\n\t return React.createElement('div', props);\n\t }\n\t });\n\n\t result.Highcharts = Highcharts;\n\t return result;\n\t};\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 3 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __WEBPACK_EXTERNAL_MODULE_3__;\n\n/***/ },\n/* 4 */,\n/* 5 */,\n/* 6 */,\n/* 7 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tmodule.exports = __webpack_require__(2)('StockChart', __webpack_require__(8));\n\n/***/ },\n/* 8 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __WEBPACK_EXTERNAL_MODULE_8__;\n\n/***/ }\n/******/ ])\n});\n;"}}},{"rowIdx":434,"cells":{"target":{"kind":"string","value":"src/app/core/atoms/icon/icons/fueling.js"},"feat_repo_name":{"kind":"string","value":"blowsys/reservo"},"text":{"kind":"string","value":"import React from 'react'; const Fueling = (props) => ; export default Fueling;\n"}}},{"rowIdx":435,"cells":{"target":{"kind":"string","value":"node_modules/@material-ui/core/es/NoSsr/NoSsr.js"},"feat_repo_name":{"kind":"string","value":"pcclarke/civ-techs"},"text":{"kind":"string","value":"import React from 'react';\nimport PropTypes from 'prop-types';\nimport { exactProp } from '@material-ui/utils';\nconst useEnhancedEffect = typeof window !== 'undefined' && process.env.NODE_ENV !== 'test' ? React.useLayoutEffect : React.useEffect;\n/**\n * NoSsr purposely removes components from the subject of Server Side Rendering (SSR).\n *\n * This component can be useful in a variety of situations:\n * - Escape hatch for broken dependencies not supporting SSR.\n * - Improve the time-to-first paint on the client by only rendering above the fold.\n * - Reduce the rendering time on the server.\n * - Under too heavy server load, you can turn on service degradation.\n */\n\nfunction NoSsr(props) {\n const {\n children,\n defer = false,\n fallback = null\n } = props;\n const [mountedState, setMountedState] = React.useState(false);\n useEnhancedEffect(() => {\n if (!defer) {\n setMountedState(true);\n }\n }, [defer]);\n React.useEffect(() => {\n if (defer) {\n setMountedState(true);\n }\n }, [defer]); // We need the Fragment here to force react-docgen to recognise NoSsr as a component.\n\n return React.createElement(React.Fragment, null, mountedState ? children : fallback);\n}\n\nprocess.env.NODE_ENV !== \"production\" ? NoSsr.propTypes = {\n /**\n * You can wrap a node.\n */\n children: PropTypes.node.isRequired,\n\n /**\n * If `true`, the component will not only prevent server-side rendering.\n * It will also defer the rendering of the children into a different screen frame.\n */\n defer: PropTypes.bool,\n\n /**\n * The fallback content to display.\n */\n fallback: PropTypes.node\n} : void 0;\n\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n NoSsr['propTypes' + ''] = exactProp(NoSsr.propTypes);\n}\n\nexport default NoSsr;"}}},{"rowIdx":436,"cells":{"target":{"kind":"string","value":"ExampleFormApp/__tests__/index.android.js"},"feat_repo_name":{"kind":"string","value":"markusguenther/react-native-simple-form"},"text":{"kind":"string","value":"import 'react-native';\nimport React from 'react';\nimport Index from '../index.android.js';\n\n// Note: test renderer must be required after react-native.\nimport renderer from 'react-test-renderer';\n\nit('renders correctly', () => {\n const tree = renderer.create(\n \n );\n});\n"}}},{"rowIdx":437,"cells":{"target":{"kind":"string","value":"src/svg-icons/editor/space-bar.js"},"feat_repo_name":{"kind":"string","value":"frnk94/material-ui"},"text":{"kind":"string","value":"import React from 'react';\nimport pure from 'recompose/pure';\nimport SvgIcon from '../../SvgIcon';\n\nlet EditorSpaceBar = (props) => (\n \n \n \n);\nEditorSpaceBar = pure(EditorSpaceBar);\nEditorSpaceBar.displayName = 'EditorSpaceBar';\nEditorSpaceBar.muiName = 'SvgIcon';\n\nexport default EditorSpaceBar;\n"}}},{"rowIdx":438,"cells":{"target":{"kind":"string","value":"lib/List/stories/BasicUsage.js"},"feat_repo_name":{"kind":"string","value":"folio-org/stripes-components"},"text":{"kind":"string","value":"/**\n * List Component: Basic Usage\n */\n\nimport React from 'react';\nimport List from '../List';\n\nexport default () => {\n const items = ['Bananas', 'Apples', 'Oranges', 'Kiwis', 'Strawberries'];\n\n const itemFormatter = (item, i) => (\n
  • \n {item}\n
  • \n );\n\n\n return (\n
    \n List with array of items and itemFormatter (listStyle: default)\n
    \n
    \n \n
    \n
    \n
    \n List with array of items and itemFormatter (listStyle: bullets)\n
    \n
    \n \n
    \n
    \n
    \n List with with no items that has isEmptyMessage prop\n
    \n
    \n \n
    \n );\n};\n"}}},{"rowIdx":439,"cells":{"target":{"kind":"string","value":"src/svg-icons/image/crop-3-2.js"},"feat_repo_name":{"kind":"string","value":"xmityaz/material-ui"},"text":{"kind":"string","value":"import React from 'react';\nimport pure from 'recompose/pure';\nimport SvgIcon from '../../SvgIcon';\n\nlet ImageCrop32 = (props) => (\n \n \n \n);\nImageCrop32 = pure(ImageCrop32);\nImageCrop32.displayName = 'ImageCrop32';\nImageCrop32.muiName = 'SvgIcon';\n\nexport default ImageCrop32;\n"}}},{"rowIdx":440,"cells":{"target":{"kind":"string","value":"src/Main/Layout/NavigationBar.js"},"feat_repo_name":{"kind":"string","value":"enragednuke/WoWAnalyzer"},"text":{"kind":"string","value":"import React from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport { Link } from 'react-router-dom';\n\nimport { getFightId, getPlayerName } from 'selectors/url/report';\nimport { getReport } from 'selectors/report';\nimport { getFightById } from 'selectors/fight';\n\nimport GithubLogo from '../Images/GitHub-Mark-Light-32px.png';\n\nimport FightSelectorHeader from '../FightSelectorHeader';\nimport PlayerSelectorHeader from '../PlayerSelectorHeader';\n\nimport makeAnalyzerUrl from '../makeAnalyzerUrl';\n\nclass NavigationBar extends React.PureComponent {\n static propTypes = {\n playerName: PropTypes.string,\n\n report: PropTypes.shape({\n title: PropTypes.string.isRequired,\n }),\n fight: PropTypes.object,\n parser: PropTypes.object,\n progress: PropTypes.number,\n };\n\n render() {\n const { playerName, report, fight, parser, progress } = this.props;\n\n return (\n \n );\n }\n}\n\nconst mapStateToProps = state => ({\n playerName: getPlayerName(state),\n\n report: getReport(state),\n fight: getFightById(state, getFightId(state)),\n});\n\nexport default connect(\n mapStateToProps\n)(NavigationBar);\n"}}},{"rowIdx":441,"cells":{"target":{"kind":"string","value":"examples/src/components/MultiSelectFieldWithLimit.js"},"feat_repo_name":{"kind":"string","value":"darrindickey/chc-select"},"text":{"kind":"string","value":"import React from 'react';\nimport Select from 'react-select';\n\nfunction logChange() {\n\tconsole.log.apply(console, [].concat(['Select value changed:'], Array.prototype.slice.apply(arguments)));\n}\n\nvar MultiSelectField = React.createClass({\n\tdisplayName: 'MultiSelectField',\n\tpropTypes: {\n\t\tlabel: React.PropTypes.string,\n\t},\n\tgetInitialState () {\n\t\treturn {\n\t\t\tdisabled: false,\n\t\t\tvalue: []\n\t\t};\n\t},\n\thandleSelectChange (value, values) {\n\t\tlogChange('New value:', value, 'Values:', values);\n\t\tthis.setState({ value: value });\n\t},\n\trender () {\n\t\tvar ops = [\n\t\t\t{ label: 'Chocolate', value: 'chocolate' },\n\t\t\t{ label: 'Vanilla', value: 'vanilla' },\n\t\t\t{ label: 'Strawberry', value: 'strawberry' },\n\t\t\t{ label: 'Caramel', value: 'caramel' },\n\t\t\t{ label: 'Cookies and Cream', value: 'cookiescream' },\n\t\t\t{ label: 'Peppermint', value: 'peppermint' }\n\t\t];\n\t\treturn (\n\t\t\t
    \n\t\t\t\t

    {this.props.label}

    \n\t\t\t\t\",e.querySelectorAll(\"[msallowcapture^='']\").length&&M.push(\"[*^$]=\"+nt+\"*(?:''|\\\"\\\")\"),e.querySelectorAll(\"[selected]\").length||M.push(\"\\\\[\"+nt+\"*(?:value|\"+tt+\")\"),e.querySelectorAll(\"[id~=\"+W+\"-]\").length||M.push(\"~=\"),e.querySelectorAll(\":checked\").length||M.push(\":checked\"),e.querySelectorAll(\"a#\"+W+\"+*\").length||M.push(\".#.+[+~]\")}),r(function(e){var t=i.createElement(\"input\");t.setAttribute(\"type\",\"hidden\"),e.appendChild(t).setAttribute(\"name\",\"D\"),e.querySelectorAll(\"[name=d]\").length&&M.push(\"name\"+nt+\"*[*^$|!~]?=\"),e.querySelectorAll(\":enabled\").length||M.push(\":enabled\",\":disabled\"),e.querySelectorAll(\"*,:x\"),M.push(\",.*:\")})),(T.matchesSelector=gt.test($=L.matches||L.webkitMatchesSelector||L.mozMatchesSelector||L.oMatchesSelector||L.msMatchesSelector))&&r(function(e){T.disconnectedMatch=$.call(e,\"div\"),$.call(e,\"[s!='']:x\"),N.push(\"!=\",at)}),M=M.length&&new RegExp(M.join(\"|\")),N=N.length&&new RegExp(N.join(\"|\")),t=gt.test(L.compareDocumentPosition),O=t||gt.test(L.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},H=t?function(e,t){if(e===t)return A=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!T.sortDetached&&t.compareDocumentPosition(e)===n?e===i||e.ownerDocument===z&&O(z,e)?-1:t===i||t.ownerDocument===z&&O(z,t)?1:j?et(j,e)-et(j,t):0:4&n?-1:1)}:function(e,t){if(e===t)return A=!0,0;var n,r=0,o=e.parentNode,s=t.parentNode,l=[e],u=[t];if(!o||!s)return e===i?-1:t===i?1:o?-1:s?1:j?et(j,e)-et(j,t):0;if(o===s)return a(e,t);for(n=e;n=n.parentNode;)l.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;l[r]===u[r];)r++;return r?a(l[r],u[r]):l[r]===z?-1:u[r]===z?1:0},i):Y},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==Y&&_(e),n=n.replace(dt,\"='$1']\"),!(!T.matchesSelector||!D||N&&N.test(n)||M&&M.test(n)))try{var i=$.call(e,n);if(i||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(r){}return t(n,Y,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==Y&&_(e),O(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==Y&&_(e);var n=x.attrHandle[t.toLowerCase()],i=n&&U.call(x.attrHandle,t.toLowerCase())?n(e,t,!D):void 0;return void 0!==i?i:T.attributes||!D?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},t.error=function(e){throw new Error(\"Syntax error, unrecognized expression: \"+e)},t.uniqueSort=function(e){var t,n=[],i=0,r=0;if(A=!T.detectDuplicates,j=!T.sortStable&&e.slice(0),e.sort(H),A){for(;t=e[r++];)t===e[r]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return j=null,e},C=t.getText=function(e){var t,n=\"\",i=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if(\"string\"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=C(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i++];)n+=C(t);return n},x=t.selectors={cacheLength:50,createPseudo:i,match:ht,attrHandle:{},find:{},relative:{\">\":{dir:\"parentNode\",first:!0},\" \":{dir:\"parentNode\"},\"+\":{dir:\"previousSibling\",first:!0},\"~\":{dir:\"previousSibling\"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Tt,xt),e[3]=(e[3]||e[4]||e[5]||\"\").replace(Tt,xt),\"~=\"===e[2]&&(e[3]=\" \"+e[3]+\" \"),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),\"nth\"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*(\"even\"===e[3]||\"odd\"===e[3])),e[5]=+(e[7]+e[8]||\"odd\"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return ht.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||\"\":n&&pt.test(n)&&(t=S(n,!0))&&(t=n.indexOf(\")\",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Tt,xt).toLowerCase();return\"*\"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=R[e+\" \"];return t||(t=new RegExp(\"(^|\"+nt+\")\"+e+\"(\"+nt+\"|$)\"))&&R(e,function(e){return t.test(\"string\"==typeof e.className&&e.className||\"undefined\"!=typeof e.getAttribute&&e.getAttribute(\"class\")||\"\")})},ATTR:function(e,n,i){return function(r){var o=t.attr(r,e);return null==o?\"!=\"===n:n?(o+=\"\",\"=\"===n?o===i:\"!=\"===n?o!==i:\"^=\"===n?i&&0===o.indexOf(i):\"*=\"===n?i&&o.indexOf(i)>-1:\"$=\"===n?i&&o.slice(-i.length)===i:\"~=\"===n?(\" \"+o.replace(st,\" \")+\" \").indexOf(i)>-1:\"|=\"===n?o===i||o.slice(0,i.length+1)===i+\"-\":!1):!0}},CHILD:function(e,t,n,i,r){var o=\"nth\"!==e.slice(0,3),a=\"last\"!==e.slice(-4),s=\"of-type\"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var u,c,d,p,f,h,m=o!==a?\"nextSibling\":\"previousSibling\",v=t.parentNode,g=s&&t.nodeName.toLowerCase(),y=!l&&!s;if(v){if(o){for(;m;){for(d=t;d=d[m];)if(s?d.nodeName.toLowerCase()===g:1===d.nodeType)return!1;h=m=\"only\"===e&&!h&&\"nextSibling\"}return!0}if(h=[a?v.firstChild:v.lastChild],a&&y){for(c=v[W]||(v[W]={}),u=c[e]||[],f=u[0]===Q&&u[1],p=u[0]===Q&&u[2],d=f&&v.childNodes[f];d=++f&&d&&d[m]||(p=f=0)||h.pop();)if(1===d.nodeType&&++p&&d===t){c[e]=[Q,f,p];break}}else if(y&&(u=(t[W]||(t[W]={}))[e])&&u[0]===Q)p=u[1];else for(;(d=++f&&d&&d[m]||(p=f=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==g:1!==d.nodeType)||!++p||(y&&((d[W]||(d[W]={}))[e]=[Q,p]),d!==t)););return p-=r,p===i||p%i===0&&p/i>=0}}},PSEUDO:function(e,n){var r,o=x.pseudos[e]||x.setFilters[e.toLowerCase()]||t.error(\"unsupported pseudo: \"+e);return o[W]?o(n):o.length>1?(r=[e,e,\"\",n],x.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,r=o(e,n),a=r.length;a--;)i=et(e,r[a]),e[i]=!(t[i]=r[a])}):function(e){return o(e,0,r)}):o}},pseudos:{not:i(function(e){var t=[],n=[],r=k(e.replace(lt,\"$1\"));return r[W]?i(function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:i(function(e){return function(n){return t(e,n).length>0}}),contains:i(function(e){return e=e.replace(Tt,xt),function(t){return(t.textContent||t.innerText||C(t)).indexOf(e)>-1}}),lang:i(function(e){return ft.test(e||\"\")||t.error(\"unsupported lang: \"+e),e=e.replace(Tt,xt).toLowerCase(),function(t){var n;do if(n=D?t.lang:t.getAttribute(\"xml:lang\")||t.getAttribute(\"lang\"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+\"-\");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===L},focus:function(e){return e===Y.activeElement&&(!Y.hasFocus||Y.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return\"input\"===t&&!!e.checked||\"option\"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!x.pseudos.empty(e)},header:function(e){return vt.test(e.nodeName)},input:function(e){return mt.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return\"input\"===t&&\"button\"===e.type||\"button\"===t},text:function(e){var t;return\"input\"===e.nodeName.toLowerCase()&&\"text\"===e.type&&(null==(t=e.getAttribute(\"type\"))||\"text\"===t.toLowerCase())},first:u(function(){return[0]}),last:u(function(e,t){return[t-1]}),eq:u(function(e,t,n){return[0>n?n+t:n]}),even:u(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:u(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:u(function(e,t,n){for(var i=0>n?n+t:n;--i>=0;)e.push(i);return e}),gt:u(function(e,t,n){for(var i=0>n?n+t:n;++i2&&\"ID\"===(a=o[0]).type&&T.getById&&9===t.nodeType&&D&&x.relative[o[1].type]){if(t=(x.find.ID(a.matches[0].replace(Tt,xt),t)||[])[0],!t)return n;u&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(r=ht.needsContext.test(e)?0:o.length;r--&&(a=o[r],!x.relative[s=a.type]);)if((l=x.find[s])&&(i=l(a.matches[0].replace(Tt,xt),bt.test(o[0].type)&&c(t.parentNode)||t))){if(o.splice(r,1),e=i.length&&p(o),!e)return K.apply(n,i),n;break}}return(u||k(e,d))(i,t,!D,n,bt.test(e)&&c(t.parentNode)||t),n},T.sortStable=W.split(\"\").sort(H).join(\"\")===W,T.detectDuplicates=!!A,_(),T.sortDetached=r(function(e){return 1&e.compareDocumentPosition(Y.createElement(\"div\"))}),r(function(e){return e.innerHTML=\"\",\"#\"===e.firstChild.getAttribute(\"href\")})||o(\"type|href|height|width\",function(e,t,n){return n?void 0:e.getAttribute(t,\"type\"===t.toLowerCase()?1:2)}),T.attributes&&r(function(e){return e.innerHTML=\"\",e.firstChild.setAttribute(\"value\",\"\"),\"\"===e.firstChild.getAttribute(\"value\")})||o(\"value\",function(e,t,n){return n||\"input\"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),r(function(e){return null==e.getAttribute(\"disabled\")})||o(tt,function(e,t,n){var i;return n?void 0:e[t]===!0?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(e);rt.find=ut,rt.expr=ut.selectors,rt.expr[\":\"]=rt.expr.pseudos,rt.unique=ut.uniqueSort,rt.text=ut.getText,rt.isXMLDoc=ut.isXML,rt.contains=ut.contains;var ct=rt.expr.match.needsContext,dt=/^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,pt=/^.[^:#\\[\\.,]*$/;rt.filter=function(e,t,n){var i=t[0];return n&&(e=\":not(\"+e+\")\"),1===t.length&&1===i.nodeType?rt.find.matchesSelector(i,e)?[i]:[]:rt.find.matches(e,rt.grep(t,function(e){return 1===e.nodeType}))},rt.fn.extend({find:function(e){var t,n=[],i=this,r=i.length;if(\"string\"!=typeof e)return this.pushStack(rt(e).filter(function(){for(t=0;r>t;t++)if(rt.contains(i[t],this))return!0}));for(t=0;r>t;t++)rt.find(e,i[t],n);return n=this.pushStack(r>1?rt.unique(n):n),n.selector=this.selector?this.selector+\" \"+e:e,n},filter:function(e){return this.pushStack(i(this,e||[],!1))},not:function(e){return this.pushStack(i(this,e||[],!0))},is:function(e){return!!i(this,\"string\"==typeof e&&ct.test(e)?rt(e):e||[],!1).length}});var ft,ht=e.document,mt=/^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,vt=rt.fn.init=function(e,t){var n,i;if(!e)return this;if(\"string\"==typeof e){if(n=\"<\"===e.charAt(0)&&\">\"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:mt.exec(e),!n||!n[1]&&t)return!t||t.jquery?(t||ft).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof rt?t[0]:t,rt.merge(this,rt.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:ht,!0)),dt.test(n[1])&&rt.isPlainObject(t))for(n in t)rt.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}if(i=ht.getElementById(n[2]),i&&i.parentNode){if(i.id!==n[2])return ft.find(e);this.length=1,this[0]=i}return this.context=ht,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):rt.isFunction(e)?\"undefined\"!=typeof ft.ready?ft.ready(e):e(rt):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),rt.makeArray(e,this))};vt.prototype=rt.fn,ft=rt(ht);var gt=/^(?:parents|prev(?:Until|All))/,yt={children:!0,contents:!0,next:!0,prev:!0};rt.extend({dir:function(e,t,n){for(var i=[],r=e[t];r&&9!==r.nodeType&&(void 0===n||1!==r.nodeType||!rt(r).is(n));)1===r.nodeType&&i.push(r),r=r[t];return i},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}}),rt.fn.extend({has:function(e){var t,n=rt(e,this),i=n.length;return this.filter(function(){for(t=0;i>t;t++)if(rt.contains(this,n[t]))return!0})},closest:function(e,t){for(var n,i=0,r=this.length,o=[],a=ct.test(e)||\"string\"!=typeof e?rt(e,t||this.context):0;r>i;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&rt.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?rt.unique(o):o)},index:function(e){return e?\"string\"==typeof e?rt.inArray(this[0],rt(e)):rt.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(rt.unique(rt.merge(this.get(),rt(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),rt.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return rt.dir(e,\"parentNode\")},parentsUntil:function(e,t,n){return rt.dir(e,\"parentNode\",n)},next:function(e){return r(e,\"nextSibling\")},prev:function(e){return r(e,\"previousSibling\")},nextAll:function(e){return rt.dir(e,\"nextSibling\")},prevAll:function(e){return rt.dir(e,\"previousSibling\")},nextUntil:function(e,t,n){return rt.dir(e,\"nextSibling\",n)},prevUntil:function(e,t,n){return rt.dir(e,\"previousSibling\",n)},siblings:function(e){return rt.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return rt.sibling(e.firstChild)},contents:function(e){return rt.nodeName(e,\"iframe\")?e.contentDocument||e.contentWindow.document:rt.merge([],e.childNodes)}},function(e,t){rt.fn[e]=function(n,i){var r=rt.map(this,t,n);return\"Until\"!==e.slice(-5)&&(i=n),i&&\"string\"==typeof i&&(r=rt.filter(i,r)),this.length>1&&(yt[e]||(r=rt.unique(r)),gt.test(e)&&(r=r.reverse())),this.pushStack(r)}});var bt=/\\S+/g,wt={};rt.Callbacks=function(e){e=\"string\"==typeof e?wt[e]||o(e):rt.extend({},e);var t,n,i,r,a,s,l=[],u=!e.once&&[],c=function(o){for(n=e.memory&&o,i=!0,a=s||0,s=0,r=l.length,t=!0;l&&r>a;a++)if(l[a].apply(o[0],o[1])===!1&&e.stopOnFalse){n=!1;break}t=!1,l&&(u?u.length&&c(u.shift()):n?l=[]:d.disable())},d={add:function(){if(l){var i=l.length;!function o(t){rt.each(t,function(t,n){var i=rt.type(n);\"function\"===i?e.unique&&d.has(n)||l.push(n):n&&n.length&&\"string\"!==i&&o(n)})}(arguments),t?r=l.length:n&&(s=i,c(n))}return this},remove:function(){return l&&rt.each(arguments,function(e,n){for(var i;(i=rt.inArray(n,l,i))>-1;)l.splice(i,1),t&&(r>=i&&r--,a>=i&&a--)}),this},has:function(e){return e?rt.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],r=0,this},disable:function(){return l=u=n=void 0,this},disabled:function(){return!l},lock:function(){return u=void 0,n||d.disable(),this},locked:function(){return!u},fireWith:function(e,n){return!l||i&&!u||(n=n||[],n=[e,n.slice?n.slice():n],t?u.push(n):c(n)),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!i}};return d},rt.extend({Deferred:function(e){var t=[[\"resolve\",\"done\",rt.Callbacks(\"once memory\"),\"resolved\"],[\"reject\",\"fail\",rt.Callbacks(\"once memory\"),\"rejected\"],[\"notify\",\"progress\",rt.Callbacks(\"memory\")]],n=\"pending\",i={state:function(){return n},always:function(){return r.done(arguments).fail(arguments),this},then:function(){var e=arguments;return rt.Deferred(function(n){rt.each(t,function(t,o){var a=rt.isFunction(e[t])&&e[t];r[o[1]](function(){var e=a&&a.apply(this,arguments);e&&rt.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o[0]+\"With\"](this===i?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?rt.extend(e,i):i}},r={};return i.pipe=i.then,rt.each(t,function(e,o){var a=o[2],s=o[3];i[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),r[o[0]]=function(){return r[o[0]+\"With\"](this===r?i:this,arguments),this},r[o[0]+\"With\"]=a.fireWith}),i.promise(r),e&&e.call(r,r),r},when:function(e){var t,n,i,r=0,o=X.call(arguments),a=o.length,s=1!==a||e&&rt.isFunction(e.promise)?a:0,l=1===s?e:rt.Deferred(),u=function(e,n,i){return function(r){n[e]=this,i[e]=arguments.length>1?X.call(arguments):r,i===t?l.notifyWith(n,i):--s||l.resolveWith(n,i)}};if(a>1)for(t=new Array(a),n=new Array(a),i=new Array(a);a>r;r++)o[r]&&rt.isFunction(o[r].promise)?o[r].promise().done(u(r,i,o)).fail(l.reject).progress(u(r,n,t)):--s;return s||l.resolveWith(i,o),l.promise()}});var Tt;rt.fn.ready=function(e){return rt.ready.promise().done(e),this},rt.extend({isReady:!1,readyWait:1,holdReady:function(e){e?rt.readyWait++:rt.ready(!0)},ready:function(e){if(e===!0?!--rt.readyWait:!rt.isReady){if(!ht.body)return setTimeout(rt.ready);rt.isReady=!0,e!==!0&&--rt.readyWait>0||(Tt.resolveWith(ht,[rt]),rt.fn.triggerHandler&&(rt(ht).triggerHandler(\"ready\"),rt(ht).off(\"ready\")))}}}),rt.ready.promise=function(t){if(!Tt)if(Tt=rt.Deferred(),\"complete\"===ht.readyState)setTimeout(rt.ready);else if(ht.addEventListener)ht.addEventListener(\"DOMContentLoaded\",s,!1),e.addEventListener(\"load\",s,!1);else{ht.attachEvent(\"onreadystatechange\",s),e.attachEvent(\"onload\",s);var n=!1;try{n=null==e.frameElement&&ht.documentElement}catch(i){}n&&n.doScroll&&!function r(){if(!rt.isReady){try{n.doScroll(\"left\")}catch(e){return setTimeout(r,50)}a(),rt.ready()}}()}return Tt.promise(t)};var xt,Ct=\"undefined\";for(xt in rt(nt))break;nt.ownLast=\"0\"!==xt,nt.inlineBlockNeedsLayout=!1,rt(function(){var e,t,n,i;n=ht.getElementsByTagName(\"body\")[0],n&&n.style&&(t=ht.createElement(\"div\"),i=ht.createElement(\"div\"),i.style.cssText=\"position:absolute;border:0;width:0;height:0;top:0;left:-9999px\",n.appendChild(i).appendChild(t),typeof t.style.zoom!==Ct&&(t.style.cssText=\"display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1\",nt.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(n.style.zoom=1)),n.removeChild(i))}),function(){var e=ht.createElement(\"div\");if(null==nt.deleteExpando){nt.deleteExpando=!0;try{delete e.test}catch(t){nt.deleteExpando=!1}}e=null}(),rt.acceptData=function(e){var t=rt.noData[(e.nodeName+\" \").toLowerCase()],n=+e.nodeType||1;return 1!==n&&9!==n?!1:!t||t!==!0&&e.getAttribute(\"classid\")===t};var Pt=/^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,St=/([A-Z])/g;rt.extend({cache:{},noData:{\"applet \":!0,\"embed \":!0,\"object \":\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"},hasData:function(e){return e=e.nodeType?rt.cache[e[rt.expando]]:e[rt.expando],!!e&&!u(e)},data:function(e,t,n){return c(e,t,n)},removeData:function(e,t){return d(e,t)},_data:function(e,t,n){return c(e,t,n,!0)},_removeData:function(e,t){return d(e,t,!0)}}),rt.fn.extend({data:function(e,t){var n,i,r,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(r=rt.data(o),1===o.nodeType&&!rt._data(o,\"parsedAttrs\"))){for(n=a.length;n--;)a[n]&&(i=a[n].name,0===i.indexOf(\"data-\")&&(i=rt.camelCase(i.slice(5)),l(o,i,r[i])));rt._data(o,\"parsedAttrs\",!0)}return r}return\"object\"==typeof e?this.each(function(){rt.data(this,e)}):arguments.length>1?this.each(function(){rt.data(this,e,t)}):o?l(o,e,rt.data(o,e)):void 0},removeData:function(e){return this.each(function(){rt.removeData(this,e)})}}),rt.extend({queue:function(e,t,n){var i;return e?(t=(t||\"fx\")+\"queue\",i=rt._data(e,t),n&&(!i||rt.isArray(n)?i=rt._data(e,t,rt.makeArray(n)):i.push(n)),i||[]):void 0},dequeue:function(e,t){t=t||\"fx\";var n=rt.queue(e,t),i=n.length,r=n.shift(),o=rt._queueHooks(e,t),a=function(){rt.dequeue(e,t)};\"inprogress\"===r&&(r=n.shift(),i--),r&&(\"fx\"===t&&n.unshift(\"inprogress\"),delete o.stop,r.call(e,a,o)),!i&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+\"queueHooks\";return rt._data(e,n)||rt._data(e,n,{empty:rt.Callbacks(\"once memory\").add(function(){rt._removeData(e,t+\"queue\"),rt._removeData(e,n)})})}}),rt.fn.extend({queue:function(e,t){var n=2;return\"string\"!=typeof e&&(t=e,e=\"fx\",n--),arguments.lengths;s++)t(e[s],n,a?i:i.call(e[s],s,t(e[s],n)));return r?e:u?t.call(e):l?t(e[0],n):o},At=/^(?:checkbox|radio)$/i;!function(){var e=ht.createElement(\"input\"),t=ht.createElement(\"div\"),n=ht.createDocumentFragment();if(t.innerHTML=\"
    a\",nt.leadingWhitespace=3===t.firstChild.nodeType,nt.tbody=!t.getElementsByTagName(\"tbody\").length,nt.htmlSerialize=!!t.getElementsByTagName(\"link\").length,nt.html5Clone=\"<:nav>\"!==ht.createElement(\"nav\").cloneNode(!0).outerHTML,e.type=\"checkbox\",e.checked=!0,n.appendChild(e),nt.appendChecked=e.checked,t.innerHTML=\"\",nt.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue,n.appendChild(t),t.innerHTML=\"\",nt.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,nt.noCloneEvent=!0,t.attachEvent&&(t.attachEvent(\"onclick\",function(){nt.noCloneEvent=!1}),t.cloneNode(!0).click()),null==nt.deleteExpando){nt.deleteExpando=!0;try{delete t.test}catch(i){nt.deleteExpando=!1}}}(),function(){var t,n,i=ht.createElement(\"div\");for(t in{submit:!0,change:!0,focusin:!0})n=\"on\"+t,(nt[t+\"Bubbles\"]=n in e)||(i.setAttribute(n,\"t\"),nt[t+\"Bubbles\"]=i.attributes[n].expando===!1);i=null}();var _t=/^(?:input|select|textarea)$/i,Yt=/^key/,Lt=/^(?:mouse|pointer|contextmenu)|click/,Dt=/^(?:focusinfocus|focusoutblur)$/,Mt=/^([^.]*)(?:\\.(.+)|)$/;rt.event={global:{},add:function(e,t,n,i,r){var o,a,s,l,u,c,d,p,f,h,m,v=rt._data(e);if(v){for(n.handler&&(l=n,n=l.handler,r=l.selector),n.guid||(n.guid=rt.guid++),(a=v.events)||(a=v.events={}),(c=v.handle)||(c=v.handle=function(e){return typeof rt===Ct||e&&rt.event.triggered===e.type?void 0:rt.event.dispatch.apply(c.elem,arguments)},c.elem=e),t=(t||\"\").match(bt)||[\"\"],s=t.length;s--;)o=Mt.exec(t[s])||[],f=m=o[1],h=(o[2]||\"\").split(\".\").sort(),f&&(u=rt.event.special[f]||{},f=(r?u.delegateType:u.bindType)||f,u=rt.event.special[f]||{},d=rt.extend({type:f,origType:m,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&rt.expr.match.needsContext.test(r),namespace:h.join(\".\")},l),(p=a[f])||(p=a[f]=[],p.delegateCount=0,u.setup&&u.setup.call(e,i,h,c)!==!1||(e.addEventListener?e.addEventListener(f,c,!1):e.attachEvent&&e.attachEvent(\"on\"+f,c))),u.add&&(u.add.call(e,d),d.handler.guid||(d.handler.guid=n.guid)),r?p.splice(p.delegateCount++,0,d):p.push(d),rt.event.global[f]=!0);e=null}},remove:function(e,t,n,i,r){var o,a,s,l,u,c,d,p,f,h,m,v=rt.hasData(e)&&rt._data(e);if(v&&(c=v.events)){for(t=(t||\"\").match(bt)||[\"\"],u=t.length;u--;)if(s=Mt.exec(t[u])||[],f=m=s[1],h=(s[2]||\"\").split(\".\").sort(),f){for(d=rt.event.special[f]||{},f=(i?d.delegateType:d.bindType)||f,p=c[f]||[],s=s[2]&&new RegExp(\"(^|\\\\.)\"+h.join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\"),l=o=p.length;o--;)a=p[o],!r&&m!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||i&&i!==a.selector&&(\"**\"!==i||!a.selector)||(p.splice(o,1),a.selector&&p.delegateCount--,d.remove&&d.remove.call(e,a));l&&!p.length&&(d.teardown&&d.teardown.call(e,h,v.handle)!==!1||rt.removeEvent(e,f,v.handle),delete c[f])}else for(f in c)rt.event.remove(e,f+t[u],n,i,!0);rt.isEmptyObject(c)&&(delete v.handle,rt._removeData(e,\"events\"))}},trigger:function(t,n,i,r){var o,a,s,l,u,c,d,p=[i||ht],f=tt.call(t,\"type\")?t.type:t,h=tt.call(t,\"namespace\")?t.namespace.split(\".\"):[];if(s=c=i=i||ht,3!==i.nodeType&&8!==i.nodeType&&!Dt.test(f+rt.event.triggered)&&(f.indexOf(\".\")>=0&&(h=f.split(\".\"),f=h.shift(),h.sort()),a=f.indexOf(\":\")<0&&\"on\"+f,t=t[rt.expando]?t:new rt.Event(f,\"object\"==typeof t&&t),t.isTrigger=r?2:3,t.namespace=h.join(\".\"),t.namespace_re=t.namespace?new RegExp(\"(^|\\\\.)\"+h.join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:rt.makeArray(n,[t]),u=rt.event.special[f]||{},r||!u.trigger||u.trigger.apply(i,n)!==!1)){if(!r&&!u.noBubble&&!rt.isWindow(i)){for(l=u.delegateType||f,Dt.test(l+f)||(s=s.parentNode);s;s=s.parentNode)p.push(s),c=s;\nc===(i.ownerDocument||ht)&&p.push(c.defaultView||c.parentWindow||e)}for(d=0;(s=p[d++])&&!t.isPropagationStopped();)t.type=d>1?l:u.bindType||f,o=(rt._data(s,\"events\")||{})[t.type]&&rt._data(s,\"handle\"),o&&o.apply(s,n),o=a&&s[a],o&&o.apply&&rt.acceptData(s)&&(t.result=o.apply(s,n),t.result===!1&&t.preventDefault());if(t.type=f,!r&&!t.isDefaultPrevented()&&(!u._default||u._default.apply(p.pop(),n)===!1)&&rt.acceptData(i)&&a&&i[f]&&!rt.isWindow(i)){c=i[a],c&&(i[a]=null),rt.event.triggered=f;try{i[f]()}catch(m){}rt.event.triggered=void 0,c&&(i[a]=c)}return t.result}},dispatch:function(e){e=rt.event.fix(e);var t,n,i,r,o,a=[],s=X.call(arguments),l=(rt._data(this,\"events\")||{})[e.type]||[],u=rt.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,e)!==!1){for(a=rt.event.handlers.call(this,e,l),t=0;(r=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=r.elem,o=0;(i=r.handlers[o++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,n=((rt.event.special[i.origType]||{}).handle||i.handler).apply(r.elem,s),void 0!==n&&(e.result=n)===!1&&(e.preventDefault(),e.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,i,r,o,a=[],s=t.delegateCount,l=e.target;if(s&&l.nodeType&&(!e.button||\"click\"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||\"click\"!==e.type)){for(r=[],o=0;s>o;o++)i=t[o],n=i.selector+\" \",void 0===r[n]&&(r[n]=i.needsContext?rt(n,this).index(l)>=0:rt.find(n,this,null,[l]).length),r[n]&&r.push(i);r.length&&a.push({elem:l,handlers:r})}return s]\",\"i\"),Wt=/^\\s+/,zt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi,Qt=/<([\\w:]+)/,Bt=/\\s*$/g,Xt={option:[1,\"\"],legend:[1,\"
    \",\"
    \"],area:[1,\"\",\"\"],param:[1,\"\",\"\"],thead:[1,\"\",\"
    \"],tr:[2,\"\",\"
    \"],col:[2,\"\",\"
    \"],td:[3,\"\",\"
    \"],_default:nt.htmlSerialize?[0,\"\",\"\"]:[1,\"X
    \",\"
    \"]},Gt=m(ht),Zt=Gt.appendChild(ht.createElement(\"div\"));Xt.optgroup=Xt.option,Xt.tbody=Xt.tfoot=Xt.colgroup=Xt.caption=Xt.thead,Xt.th=Xt.td,rt.extend({clone:function(e,t,n){var i,r,o,a,s,l=rt.contains(e.ownerDocument,e);if(nt.html5Clone||rt.isXMLDoc(e)||!Ot.test(\"<\"+e.nodeName+\">\")?o=e.cloneNode(!0):(Zt.innerHTML=e.outerHTML,Zt.removeChild(o=Zt.firstChild)),!(nt.noCloneEvent&&nt.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||rt.isXMLDoc(e)))for(i=v(o),s=v(e),a=0;null!=(r=s[a]);++a)i[a]&&C(r,i[a]);if(t)if(n)for(s=s||v(e),i=i||v(o),a=0;null!=(r=s[a]);a++)x(r,i[a]);else x(e,o);return i=v(o,\"script\"),i.length>0&&T(i,!l&&v(e,\"script\")),i=s=r=null,o},buildFragment:function(e,t,n,i){for(var r,o,a,s,l,u,c,d=e.length,p=m(t),f=[],h=0;d>h;h++)if(o=e[h],o||0===o)if(\"object\"===rt.type(o))rt.merge(f,o.nodeType?[o]:o);else if(Rt.test(o)){for(s=s||p.appendChild(t.createElement(\"div\")),l=(Qt.exec(o)||[\"\",\"\"])[1].toLowerCase(),c=Xt[l]||Xt._default,s.innerHTML=c[1]+o.replace(zt,\"<$1>\")+c[2],r=c[0];r--;)s=s.lastChild;if(!nt.leadingWhitespace&&Wt.test(o)&&f.push(t.createTextNode(Wt.exec(o)[0])),!nt.tbody)for(o=\"table\"!==l||Bt.test(o)?\"\"!==c[1]||Bt.test(o)?0:s:s.firstChild,r=o&&o.childNodes.length;r--;)rt.nodeName(u=o.childNodes[r],\"tbody\")&&!u.childNodes.length&&o.removeChild(u);for(rt.merge(f,s.childNodes),s.textContent=\"\";s.firstChild;)s.removeChild(s.firstChild);s=p.lastChild}else f.push(t.createTextNode(o));for(s&&p.removeChild(s),nt.appendChecked||rt.grep(v(f,\"input\"),g),h=0;o=f[h++];)if((!i||-1===rt.inArray(o,i))&&(a=rt.contains(o.ownerDocument,o),s=v(p.appendChild(o),\"script\"),a&&T(s),n))for(r=0;o=s[r++];)Ht.test(o.type||\"\")&&n.push(o);return s=null,p},cleanData:function(e,t){for(var n,i,r,o,a=0,s=rt.expando,l=rt.cache,u=nt.deleteExpando,c=rt.event.special;null!=(n=e[a]);a++)if((t||rt.acceptData(n))&&(r=n[s],o=r&&l[r])){if(o.events)for(i in o.events)c[i]?rt.event.remove(n,i):rt.removeEvent(n,i,o.handle);l[r]&&(delete l[r],u?delete n[s]:typeof n.removeAttribute!==Ct?n.removeAttribute(s):n[s]=null,U.push(r))}}}),rt.fn.extend({text:function(e){return jt(this,function(e){return void 0===e?rt.text(this):this.empty().append((this[0]&&this[0].ownerDocument||ht).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=y(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=y(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,i=e?rt.filter(e,this):this,r=0;null!=(n=i[r]);r++)t||1!==n.nodeType||rt.cleanData(v(n)),n.parentNode&&(t&&rt.contains(n.ownerDocument,n)&&T(v(n,\"script\")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&rt.cleanData(v(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&rt.nodeName(e,\"select\")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return rt.clone(this,e,t)})},html:function(e){return jt(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace($t,\"\"):void 0;if(!(\"string\"!=typeof e||Ft.test(e)||!nt.htmlSerialize&&Ot.test(e)||!nt.leadingWhitespace&&Wt.test(e)||Xt[(Qt.exec(e)||[\"\",\"\"])[1].toLowerCase()])){e=e.replace(zt,\"<$1>\");try{for(;i>n;n++)t=this[n]||{},1===t.nodeType&&(rt.cleanData(v(t,!1)),t.innerHTML=e);t=0}catch(r){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=arguments[0];return this.domManip(arguments,function(t){e=this.parentNode,rt.cleanData(v(this)),e&&e.replaceChild(t,this)}),e&&(e.length||e.nodeType)?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t){e=G.apply([],e);var n,i,r,o,a,s,l=0,u=this.length,c=this,d=u-1,p=e[0],f=rt.isFunction(p);if(f||u>1&&\"string\"==typeof p&&!nt.checkClone&&qt.test(p))return this.each(function(n){var i=c.eq(n);f&&(e[0]=p.call(this,n,i.html())),i.domManip(e,t)});if(u&&(s=rt.buildFragment(e,this[0].ownerDocument,!1,this),n=s.firstChild,1===s.childNodes.length&&(s=n),n)){for(o=rt.map(v(s,\"script\"),b),r=o.length;u>l;l++)i=s,l!==d&&(i=rt.clone(i,!0,!0),r&&rt.merge(o,v(i,\"script\"))),t.call(this[l],i,l);if(r)for(a=o[o.length-1].ownerDocument,rt.map(o,w),l=0;r>l;l++)i=o[l],Ht.test(i.type||\"\")&&!rt._data(i,\"globalEval\")&&rt.contains(a,i)&&(i.src?rt._evalUrl&&rt._evalUrl(i.src):rt.globalEval((i.text||i.textContent||i.innerHTML||\"\").replace(Ut,\"\")));s=n=null}return this}}),rt.each({appendTo:\"append\",prependTo:\"prepend\",insertBefore:\"before\",insertAfter:\"after\",replaceAll:\"replaceWith\"},function(e,t){rt.fn[e]=function(e){for(var n,i=0,r=[],o=rt(e),a=o.length-1;a>=i;i++)n=i===a?this:this.clone(!0),rt(o[i])[t](n),Z.apply(r,n.get());return this.pushStack(r)}});var Kt,Jt={};!function(){var e;nt.shrinkWrapBlocks=function(){if(null!=e)return e;e=!1;var t,n,i;return n=ht.getElementsByTagName(\"body\")[0],n&&n.style?(t=ht.createElement(\"div\"),i=ht.createElement(\"div\"),i.style.cssText=\"position:absolute;border:0;width:0;height:0;top:0;left:-9999px\",n.appendChild(i).appendChild(t),typeof t.style.zoom!==Ct&&(t.style.cssText=\"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1\",t.appendChild(ht.createElement(\"div\")).style.width=\"5px\",e=3!==t.offsetWidth),n.removeChild(i),e):void 0}}();var en,tn,nn=/^margin/,rn=new RegExp(\"^(\"+kt+\")(?!px)[a-z%]+$\",\"i\"),on=/^(top|right|bottom|left)$/;e.getComputedStyle?(en=function(t){return t.ownerDocument.defaultView.opener?t.ownerDocument.defaultView.getComputedStyle(t,null):e.getComputedStyle(t,null)},tn=function(e,t,n){var i,r,o,a,s=e.style;return n=n||en(e),a=n?n.getPropertyValue(t)||n[t]:void 0,n&&(\"\"!==a||rt.contains(e.ownerDocument,e)||(a=rt.style(e,t)),rn.test(a)&&nn.test(t)&&(i=s.width,r=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=i,s.minWidth=r,s.maxWidth=o)),void 0===a?a:a+\"\"}):ht.documentElement.currentStyle&&(en=function(e){return e.currentStyle},tn=function(e,t,n){var i,r,o,a,s=e.style;return n=n||en(e),a=n?n[t]:void 0,null==a&&s&&s[t]&&(a=s[t]),rn.test(a)&&!on.test(t)&&(i=s.left,r=e.runtimeStyle,o=r&&r.left,o&&(r.left=e.currentStyle.left),s.left=\"fontSize\"===t?\"1em\":a,a=s.pixelLeft+\"px\",s.left=i,o&&(r.left=o)),void 0===a?a:a+\"\"||\"auto\"}),function(){function t(){var t,n,i,r;n=ht.getElementsByTagName(\"body\")[0],n&&n.style&&(t=ht.createElement(\"div\"),i=ht.createElement(\"div\"),i.style.cssText=\"position:absolute;border:0;width:0;height:0;top:0;left:-9999px\",n.appendChild(i).appendChild(t),t.style.cssText=\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute\",o=a=!1,l=!0,e.getComputedStyle&&(o=\"1%\"!==(e.getComputedStyle(t,null)||{}).top,a=\"4px\"===(e.getComputedStyle(t,null)||{width:\"4px\"}).width,r=t.appendChild(ht.createElement(\"div\")),r.style.cssText=t.style.cssText=\"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0\",r.style.marginRight=r.style.width=\"0\",t.style.width=\"1px\",l=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight),t.removeChild(r)),t.innerHTML=\"
    t
    \",r=t.getElementsByTagName(\"td\"),r[0].style.cssText=\"margin:0;border:0;padding:0;display:none\",s=0===r[0].offsetHeight,s&&(r[0].style.display=\"\",r[1].style.display=\"none\",s=0===r[0].offsetHeight),n.removeChild(i))}var n,i,r,o,a,s,l;n=ht.createElement(\"div\"),n.innerHTML=\"
    a\",r=n.getElementsByTagName(\"a\")[0],i=r&&r.style,i&&(i.cssText=\"float:left;opacity:.5\",nt.opacity=\"0.5\"===i.opacity,nt.cssFloat=!!i.cssFloat,n.style.backgroundClip=\"content-box\",n.cloneNode(!0).style.backgroundClip=\"\",nt.clearCloneStyle=\"content-box\"===n.style.backgroundClip,nt.boxSizing=\"\"===i.boxSizing||\"\"===i.MozBoxSizing||\"\"===i.WebkitBoxSizing,rt.extend(nt,{reliableHiddenOffsets:function(){return null==s&&t(),s},boxSizingReliable:function(){return null==a&&t(),a},pixelPosition:function(){return null==o&&t(),o},reliableMarginRight:function(){return null==l&&t(),l}}))}(),rt.swap=function(e,t,n,i){var r,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];r=n.apply(e,i||[]);for(o in t)e.style[o]=a[o];return r};var an=/alpha\\([^)]*\\)/i,sn=/opacity\\s*=\\s*([^)]*)/,ln=/^(none|table(?!-c[ea]).+)/,un=new RegExp(\"^(\"+kt+\")(.*)$\",\"i\"),cn=new RegExp(\"^([+-])=(\"+kt+\")\",\"i\"),dn={position:\"absolute\",visibility:\"hidden\",display:\"block\"},pn={letterSpacing:\"0\",fontWeight:\"400\"},fn=[\"Webkit\",\"O\",\"Moz\",\"ms\"];rt.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=tn(e,\"opacity\");return\"\"===n?\"1\":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{\"float\":nt.cssFloat?\"cssFloat\":\"styleFloat\"},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,o,a,s=rt.camelCase(t),l=e.style;if(t=rt.cssProps[s]||(rt.cssProps[s]=E(l,s)),a=rt.cssHooks[t]||rt.cssHooks[s],void 0===n)return a&&\"get\"in a&&void 0!==(r=a.get(e,!1,i))?r:l[t];if(o=typeof n,\"string\"===o&&(r=cn.exec(n))&&(n=(r[1]+1)*r[2]+parseFloat(rt.css(e,t)),o=\"number\"),null!=n&&n===n&&(\"number\"!==o||rt.cssNumber[s]||(n+=\"px\"),nt.clearCloneStyle||\"\"!==n||0!==t.indexOf(\"background\")||(l[t]=\"inherit\"),!(a&&\"set\"in a&&void 0===(n=a.set(e,n,i)))))try{l[t]=n}catch(u){}}},css:function(e,t,n,i){var r,o,a,s=rt.camelCase(t);return t=rt.cssProps[s]||(rt.cssProps[s]=E(e.style,s)),a=rt.cssHooks[t]||rt.cssHooks[s],a&&\"get\"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=tn(e,t,i)),\"normal\"===o&&t in pn&&(o=pn[t]),\"\"===n||n?(r=parseFloat(o),n===!0||rt.isNumeric(r)?r||0:o):o}}),rt.each([\"height\",\"width\"],function(e,t){rt.cssHooks[t]={get:function(e,n,i){return n?ln.test(rt.css(e,\"display\"))&&0===e.offsetWidth?rt.swap(e,dn,function(){return _(e,t,i)}):_(e,t,i):void 0},set:function(e,n,i){var r=i&&en(e);return j(e,n,i?A(e,t,i,nt.boxSizing&&\"border-box\"===rt.css(e,\"boxSizing\",!1,r),r):0)}}}),nt.opacity||(rt.cssHooks.opacity={get:function(e,t){return sn.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||\"\")?.01*parseFloat(RegExp.$1)+\"\":t?\"1\":\"\"},set:function(e,t){var n=e.style,i=e.currentStyle,r=rt.isNumeric(t)?\"alpha(opacity=\"+100*t+\")\":\"\",o=i&&i.filter||n.filter||\"\";n.zoom=1,(t>=1||\"\"===t)&&\"\"===rt.trim(o.replace(an,\"\"))&&n.removeAttribute&&(n.removeAttribute(\"filter\"),\"\"===t||i&&!i.filter)||(n.filter=an.test(o)?o.replace(an,r):o+\" \"+r)}}),rt.cssHooks.marginRight=k(nt.reliableMarginRight,function(e,t){return t?rt.swap(e,{display:\"inline-block\"},tn,[e,\"marginRight\"]):void 0}),rt.each({margin:\"\",padding:\"\",border:\"Width\"},function(e,t){rt.cssHooks[e+t]={expand:function(n){for(var i=0,r={},o=\"string\"==typeof n?n.split(\" \"):[n];4>i;i++)r[e+Et[i]+t]=o[i]||o[i-2]||o[0];return r}},nn.test(e)||(rt.cssHooks[e+t].set=j)}),rt.fn.extend({css:function(e,t){return jt(this,function(e,t,n){var i,r,o={},a=0;if(rt.isArray(t)){for(i=en(e),r=t.length;r>a;a++)o[t[a]]=rt.css(e,t[a],!1,i);return o}return void 0!==n?rt.style(e,t,n):rt.css(e,t)},e,t,arguments.length>1)},show:function(){return I(this,!0)},hide:function(){return I(this)},toggle:function(e){return\"boolean\"==typeof e?e?this.show():this.hide():this.each(function(){It(this)?rt(this).show():rt(this).hide()})}}),rt.Tween=Y,Y.prototype={constructor:Y,init:function(e,t,n,i,r,o){this.elem=e,this.prop=n,this.easing=r||\"swing\",this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=o||(rt.cssNumber[n]?\"\":\"px\")},cur:function(){var e=Y.propHooks[this.prop];return e&&e.get?e.get(this):Y.propHooks._default.get(this)},run:function(e){var t,n=Y.propHooks[this.prop];return this.pos=t=this.options.duration?rt.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Y.propHooks._default.set(this),this}},Y.prototype.init.prototype=Y.prototype,Y.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=rt.css(e.elem,e.prop,\"\"),t&&\"auto\"!==t?t:0):e.elem[e.prop]},set:function(e){rt.fx.step[e.prop]?rt.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[rt.cssProps[e.prop]]||rt.cssHooks[e.prop])?rt.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},Y.propHooks.scrollTop=Y.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},rt.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},rt.fx=Y.prototype.init,rt.fx.step={};var hn,mn,vn=/^(?:toggle|show|hide)$/,gn=new RegExp(\"^(?:([+-])=|)(\"+kt+\")([a-z%]*)$\",\"i\"),yn=/queueHooks$/,bn=[N],wn={\"*\":[function(e,t){var n=this.createTween(e,t),i=n.cur(),r=gn.exec(t),o=r&&r[3]||(rt.cssNumber[e]?\"\":\"px\"),a=(rt.cssNumber[e]||\"px\"!==o&&+i)&&gn.exec(rt.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],r=r||[],a=+i||1;do s=s||\".5\",a/=s,rt.style(n.elem,e,a+o);while(s!==(s=n.cur()/i)&&1!==s&&--l)}return r&&(a=n.start=+a||+i||0,n.unit=o,n.end=r[1]?a+(r[1]+1)*r[2]:+r[2]),n}]};rt.Animation=rt.extend(O,{tweener:function(e,t){rt.isFunction(e)?(t=e,e=[\"*\"]):e=e.split(\" \");for(var n,i=0,r=e.length;r>i;i++)n=e[i],wn[n]=wn[n]||[],wn[n].unshift(t)},prefilter:function(e,t){t?bn.unshift(e):bn.push(e)}}),rt.speed=function(e,t,n){var i=e&&\"object\"==typeof e?rt.extend({},e):{complete:n||!n&&t||rt.isFunction(e)&&e,duration:e,easing:n&&t||t&&!rt.isFunction(t)&&t};return i.duration=rt.fx.off?0:\"number\"==typeof i.duration?i.duration:i.duration in rt.fx.speeds?rt.fx.speeds[i.duration]:rt.fx.speeds._default,(null==i.queue||i.queue===!0)&&(i.queue=\"fx\"),i.old=i.complete,i.complete=function(){rt.isFunction(i.old)&&i.old.call(this),i.queue&&rt.dequeue(this,i.queue)},i},rt.fn.extend({fadeTo:function(e,t,n,i){return this.filter(It).css(\"opacity\",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var r=rt.isEmptyObject(e),o=rt.speed(t,n,i),a=function(){var t=O(this,rt.extend({},e),o);(r||rt._data(this,\"finish\"))&&t.stop(!0)};return a.finish=a,r||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return\"string\"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||\"fx\",[]),this.each(function(){var t=!0,r=null!=e&&e+\"queueHooks\",o=rt.timers,a=rt._data(this);if(r)a[r]&&a[r].stop&&i(a[r]);else for(r in a)a[r]&&a[r].stop&&yn.test(r)&&i(a[r]);for(r=o.length;r--;)o[r].elem!==this||null!=e&&o[r].queue!==e||(o[r].anim.stop(n),t=!1,o.splice(r,1));(t||!n)&&rt.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||\"fx\"),this.each(function(){var t,n=rt._data(this),i=n[e+\"queue\"],r=n[e+\"queueHooks\"],o=rt.timers,a=i?i.length:0;for(n.finish=!0,rt.queue(this,e,[]),r&&r.stop&&r.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),rt.each([\"toggle\",\"show\",\"hide\"],function(e,t){var n=rt.fn[t];rt.fn[t]=function(e,i,r){return null==e||\"boolean\"==typeof e?n.apply(this,arguments):this.animate(D(t,!0),e,i,r)}}),rt.each({slideDown:D(\"show\"),slideUp:D(\"hide\"),slideToggle:D(\"toggle\"),fadeIn:{opacity:\"show\"},fadeOut:{opacity:\"hide\"},fadeToggle:{opacity:\"toggle\"}},function(e,t){rt.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),rt.timers=[],rt.fx.tick=function(){var e,t=rt.timers,n=0;for(hn=rt.now();n
    a\",i=t.getElementsByTagName(\"a\")[0],n=ht.createElement(\"select\"),r=n.appendChild(ht.createElement(\"option\")),e=t.getElementsByTagName(\"input\")[0],i.style.cssText=\"top:1px\",nt.getSetAttribute=\"t\"!==t.className,nt.style=/top/.test(i.getAttribute(\"style\")),nt.hrefNormalized=\"/a\"===i.getAttribute(\"href\"),nt.checkOn=!!e.value,nt.optSelected=r.selected,nt.enctype=!!ht.createElement(\"form\").enctype,n.disabled=!0,nt.optDisabled=!r.disabled,e=ht.createElement(\"input\"),e.setAttribute(\"value\",\"\"),nt.input=\"\"===e.getAttribute(\"value\"),e.value=\"t\",e.setAttribute(\"type\",\"radio\"),nt.radioValue=\"t\"===e.value}();var Tn=/\\r/g;rt.fn.extend({val:function(e){var t,n,i,r=this[0];{if(arguments.length)return i=rt.isFunction(e),this.each(function(n){var r;1===this.nodeType&&(r=i?e.call(this,n,rt(this).val()):e,null==r?r=\"\":\"number\"==typeof r?r+=\"\":rt.isArray(r)&&(r=rt.map(r,function(e){return null==e?\"\":e+\"\"})),t=rt.valHooks[this.type]||rt.valHooks[this.nodeName.toLowerCase()],t&&\"set\"in t&&void 0!==t.set(this,r,\"value\")||(this.value=r))});if(r)return t=rt.valHooks[r.type]||rt.valHooks[r.nodeName.toLowerCase()],t&&\"get\"in t&&void 0!==(n=t.get(r,\"value\"))?n:(n=r.value,\"string\"==typeof n?n.replace(Tn,\"\"):null==n?\"\":n)}}}),rt.extend({valHooks:{option:{get:function(e){var t=rt.find.attr(e,\"value\");return null!=t?t:rt.trim(rt.text(e))}},select:{get:function(e){for(var t,n,i=e.options,r=e.selectedIndex,o=\"select-one\"===e.type||0>r,a=o?null:[],s=o?r+1:i.length,l=0>r?s:o?r:0;s>l;l++)if(n=i[l],!(!n.selected&&l!==r||(nt.optDisabled?n.disabled:null!==n.getAttribute(\"disabled\"))||n.parentNode.disabled&&rt.nodeName(n.parentNode,\"optgroup\"))){if(t=rt(n).val(),o)return t;a.push(t)}return a},set:function(e,t){for(var n,i,r=e.options,o=rt.makeArray(t),a=r.length;a--;)if(i=r[a],rt.inArray(rt.valHooks.option.get(i),o)>=0)try{i.selected=n=!0}catch(s){i.scrollHeight}else i.selected=!1;return n||(e.selectedIndex=-1),r}}}}),rt.each([\"radio\",\"checkbox\"],function(){rt.valHooks[this]={set:function(e,t){return rt.isArray(t)?e.checked=rt.inArray(rt(e).val(),t)>=0:void 0}},nt.checkOn||(rt.valHooks[this].get=function(e){return null===e.getAttribute(\"value\")?\"on\":e.value})});var xn,Cn,Pn=rt.expr.attrHandle,Sn=/^(?:checked|selected)$/i,kn=nt.getSetAttribute,En=nt.input;rt.fn.extend({attr:function(e,t){return jt(this,rt.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){rt.removeAttr(this,e)})}}),rt.extend({attr:function(e,t,n){var i,r,o=e.nodeType;if(e&&3!==o&&8!==o&&2!==o)return typeof e.getAttribute===Ct?rt.prop(e,t,n):(1===o&&rt.isXMLDoc(e)||(t=t.toLowerCase(),i=rt.attrHooks[t]||(rt.expr.match.bool.test(t)?Cn:xn)),void 0===n?i&&\"get\"in i&&null!==(r=i.get(e,t))?r:(r=rt.find.attr(e,t),null==r?void 0:r):null!==n?i&&\"set\"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+\"\"),n):void rt.removeAttr(e,t))},removeAttr:function(e,t){var n,i,r=0,o=t&&t.match(bt);if(o&&1===e.nodeType)for(;n=o[r++];)i=rt.propFix[n]||n,rt.expr.match.bool.test(n)?En&&kn||!Sn.test(n)?e[i]=!1:e[rt.camelCase(\"default-\"+n)]=e[i]=!1:rt.attr(e,n,\"\"),e.removeAttribute(kn?n:i)},attrHooks:{type:{set:function(e,t){if(!nt.radioValue&&\"radio\"===t&&rt.nodeName(e,\"input\")){var n=e.value;return e.setAttribute(\"type\",t),n&&(e.value=n),t}}}}}),Cn={set:function(e,t,n){return t===!1?rt.removeAttr(e,n):En&&kn||!Sn.test(n)?e.setAttribute(!kn&&rt.propFix[n]||n,n):e[rt.camelCase(\"default-\"+n)]=e[n]=!0,n}},rt.each(rt.expr.match.bool.source.match(/\\w+/g),function(e,t){var n=Pn[t]||rt.find.attr;Pn[t]=En&&kn||!Sn.test(t)?function(e,t,i){var r,o;return i||(o=Pn[t],Pn[t]=r,r=null!=n(e,t,i)?t.toLowerCase():null,Pn[t]=o),r}:function(e,t,n){return n?void 0:e[rt.camelCase(\"default-\"+t)]?t.toLowerCase():null}}),En&&kn||(rt.attrHooks.value={set:function(e,t,n){return rt.nodeName(e,\"input\")?void(e.defaultValue=t):xn&&xn.set(e,t,n)}}),kn||(xn={set:function(e,t,n){var i=e.getAttributeNode(n);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(n)),i.value=t+=\"\",\"value\"===n||t===e.getAttribute(n)?t:void 0}},Pn.id=Pn.name=Pn.coords=function(e,t,n){var i;return n?void 0:(i=e.getAttributeNode(t))&&\"\"!==i.value?i.value:null},rt.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);return n&&n.specified?n.value:void 0},set:xn.set},rt.attrHooks.contenteditable={set:function(e,t,n){xn.set(e,\"\"===t?!1:t,n)}},rt.each([\"width\",\"height\"],function(e,t){rt.attrHooks[t]={set:function(e,n){return\"\"===n?(e.setAttribute(t,\"auto\"),n):void 0}}})),nt.style||(rt.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+\"\"}});var In=/^(?:input|select|textarea|button|object)$/i,jn=/^(?:a|area)$/i;rt.fn.extend({prop:function(e,t){return jt(this,rt.prop,e,t,arguments.length>1)},removeProp:function(e){return e=rt.propFix[e]||e,this.each(function(){try{this[e]=void 0,delete this[e]}catch(t){}})}}),rt.extend({propFix:{\"for\":\"htmlFor\",\"class\":\"className\"},prop:function(e,t,n){var i,r,o,a=e.nodeType;if(e&&3!==a&&8!==a&&2!==a)return o=1!==a||!rt.isXMLDoc(e),o&&(t=rt.propFix[t]||t,r=rt.propHooks[t]),void 0!==n?r&&\"set\"in r&&void 0!==(i=r.set(e,n,t))?i:e[t]=n:r&&\"get\"in r&&null!==(i=r.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=rt.find.attr(e,\"tabindex\");return t?parseInt(t,10):In.test(e.nodeName)||jn.test(e.nodeName)&&e.href?0:-1}}}}),nt.hrefNormalized||rt.each([\"href\",\"src\"],function(e,t){rt.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),nt.optSelected||(rt.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),rt.each([\"tabIndex\",\"readOnly\",\"maxLength\",\"cellSpacing\",\"cellPadding\",\"rowSpan\",\"colSpan\",\"useMap\",\"frameBorder\",\"contentEditable\"],function(){rt.propFix[this.toLowerCase()]=this}),nt.enctype||(rt.propFix.enctype=\"encoding\");var An=/[\\t\\r\\n\\f]/g;rt.fn.extend({addClass:function(e){var t,n,i,r,o,a,s=0,l=this.length,u=\"string\"==typeof e&&e;if(rt.isFunction(e))return this.each(function(t){rt(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||\"\").match(bt)||[];l>s;s++)if(n=this[s],i=1===n.nodeType&&(n.className?(\" \"+n.className+\" \").replace(An,\" \"):\" \")){for(o=0;r=t[o++];)i.indexOf(\" \"+r+\" \")<0&&(i+=r+\" \");a=rt.trim(i),n.className!==a&&(n.className=a)}return this},removeClass:function(e){var t,n,i,r,o,a,s=0,l=this.length,u=0===arguments.length||\"string\"==typeof e&&e;if(rt.isFunction(e))return this.each(function(t){rt(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||\"\").match(bt)||[];l>s;s++)if(n=this[s],i=1===n.nodeType&&(n.className?(\" \"+n.className+\" \").replace(An,\" \"):\"\")){for(o=0;r=t[o++];)for(;i.indexOf(\" \"+r+\" \")>=0;)i=i.replace(\" \"+r+\" \",\" \");a=e?rt.trim(i):\"\",n.className!==a&&(n.className=a)}return this},toggleClass:function(e,t){var n=typeof e;return\"boolean\"==typeof t&&\"string\"===n?t?this.addClass(e):this.removeClass(e):this.each(rt.isFunction(e)?function(n){rt(this).toggleClass(e.call(this,n,this.className,t),t)}:function(){if(\"string\"===n)for(var t,i=0,r=rt(this),o=e.match(bt)||[];t=o[i++];)r.hasClass(t)?r.removeClass(t):r.addClass(t);\nelse(n===Ct||\"boolean\"===n)&&(this.className&&rt._data(this,\"__className__\",this.className),this.className=this.className||e===!1?\"\":rt._data(this,\"__className__\")||\"\")})},hasClass:function(e){for(var t=\" \"+e+\" \",n=0,i=this.length;i>n;n++)if(1===this[n].nodeType&&(\" \"+this[n].className+\" \").replace(An,\" \").indexOf(t)>=0)return!0;return!1}}),rt.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(e,t){rt.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),rt.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,\"**\"):this.off(t,e||\"**\",n)}});var _n=rt.now(),Yn=/\\?/,Ln=/(,)|(\\[|{)|(}|])|\"(?:[^\"\\\\\\r\\n]|\\\\[\"\\\\\\/bfnrt]|\\\\u[\\da-fA-F]{4})*\"\\s*:?|true|false|null|-?(?!0\\d)\\d+(?:\\.\\d+|)(?:[eE][+-]?\\d+|)/g;rt.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+\"\");var n,i=null,r=rt.trim(t+\"\");return r&&!rt.trim(r.replace(Ln,function(e,t,r,o){return n&&t&&(i=0),0===i?e:(n=r||t,i+=!o-!r,\"\")}))?Function(\"return \"+r)():rt.error(\"Invalid JSON: \"+t)},rt.parseXML=function(t){var n,i;if(!t||\"string\"!=typeof t)return null;try{e.DOMParser?(i=new DOMParser,n=i.parseFromString(t,\"text/xml\")):(n=new ActiveXObject(\"Microsoft.XMLDOM\"),n.async=\"false\",n.loadXML(t))}catch(r){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName(\"parsererror\").length||rt.error(\"Invalid XML: \"+t),n};var Dn,Mn,Nn=/#.*$/,$n=/([?&])_=[^&]*/,On=/^(.*?):[ \\t]*([^\\r\\n]*)\\r?$/gm,Wn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,zn=/^(?:GET|HEAD)$/,Qn=/^\\/\\//,Bn=/^([\\w.+-]+:)(?:\\/\\/(?:[^\\/?#]*@|)([^\\/?#:]*)(?::(\\d+)|)|)/,Rn={},Fn={},qn=\"*/\".concat(\"*\");try{Mn=location.href}catch(Hn){Mn=ht.createElement(\"a\"),Mn.href=\"\",Mn=Mn.href}Dn=Bn.exec(Mn.toLowerCase())||[],rt.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Mn,type:\"GET\",isLocal:Wn.test(Dn[1]),global:!0,processData:!0,async:!0,contentType:\"application/x-www-form-urlencoded; charset=UTF-8\",accepts:{\"*\":qn,text:\"text/plain\",html:\"text/html\",xml:\"application/xml, text/xml\",json:\"application/json, text/javascript\"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:\"responseXML\",text:\"responseText\",json:\"responseJSON\"},converters:{\"* text\":String,\"text html\":!0,\"text json\":rt.parseJSON,\"text xml\":rt.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Q(Q(e,rt.ajaxSettings),t):Q(rt.ajaxSettings,e)},ajaxPrefilter:W(Rn),ajaxTransport:W(Fn),ajax:function(e,t){function n(e,t,n,i){var r,c,g,y,w,x=t;2!==b&&(b=2,s&&clearTimeout(s),u=void 0,a=i||\"\",T.readyState=e>0?4:0,r=e>=200&&300>e||304===e,n&&(y=B(d,T,n)),y=R(d,y,T,r),r?(d.ifModified&&(w=T.getResponseHeader(\"Last-Modified\"),w&&(rt.lastModified[o]=w),w=T.getResponseHeader(\"etag\"),w&&(rt.etag[o]=w)),204===e||\"HEAD\"===d.type?x=\"nocontent\":304===e?x=\"notmodified\":(x=y.state,c=y.data,g=y.error,r=!g)):(g=x,(e||!x)&&(x=\"error\",0>e&&(e=0))),T.status=e,T.statusText=(t||x)+\"\",r?h.resolveWith(p,[c,x,T]):h.rejectWith(p,[T,x,g]),T.statusCode(v),v=void 0,l&&f.trigger(r?\"ajaxSuccess\":\"ajaxError\",[T,d,r?c:g]),m.fireWith(p,[T,x]),l&&(f.trigger(\"ajaxComplete\",[T,d]),--rt.active||rt.event.trigger(\"ajaxStop\")))}\"object\"==typeof e&&(t=e,e=void 0),t=t||{};var i,r,o,a,s,l,u,c,d=rt.ajaxSetup({},t),p=d.context||d,f=d.context&&(p.nodeType||p.jquery)?rt(p):rt.event,h=rt.Deferred(),m=rt.Callbacks(\"once memory\"),v=d.statusCode||{},g={},y={},b=0,w=\"canceled\",T={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c)for(c={};t=On.exec(a);)c[t[1].toLowerCase()]=t[2];t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=y[n]=y[n]||e,g[e]=t),this},overrideMimeType:function(e){return b||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)v[t]=[v[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),n(0,t),this}};if(h.promise(T).complete=m.add,T.success=T.done,T.error=T.fail,d.url=((e||d.url||Mn)+\"\").replace(Nn,\"\").replace(Qn,Dn[1]+\"//\"),d.type=t.method||t.type||d.method||d.type,d.dataTypes=rt.trim(d.dataType||\"*\").toLowerCase().match(bt)||[\"\"],null==d.crossDomain&&(i=Bn.exec(d.url.toLowerCase()),d.crossDomain=!(!i||i[1]===Dn[1]&&i[2]===Dn[2]&&(i[3]||(\"http:\"===i[1]?\"80\":\"443\"))===(Dn[3]||(\"http:\"===Dn[1]?\"80\":\"443\")))),d.data&&d.processData&&\"string\"!=typeof d.data&&(d.data=rt.param(d.data,d.traditional)),z(Rn,d,t,T),2===b)return T;l=rt.event&&d.global,l&&0===rt.active++&&rt.event.trigger(\"ajaxStart\"),d.type=d.type.toUpperCase(),d.hasContent=!zn.test(d.type),o=d.url,d.hasContent||(d.data&&(o=d.url+=(Yn.test(o)?\"&\":\"?\")+d.data,delete d.data),d.cache===!1&&(d.url=$n.test(o)?o.replace($n,\"$1_=\"+_n++):o+(Yn.test(o)?\"&\":\"?\")+\"_=\"+_n++)),d.ifModified&&(rt.lastModified[o]&&T.setRequestHeader(\"If-Modified-Since\",rt.lastModified[o]),rt.etag[o]&&T.setRequestHeader(\"If-None-Match\",rt.etag[o])),(d.data&&d.hasContent&&d.contentType!==!1||t.contentType)&&T.setRequestHeader(\"Content-Type\",d.contentType),T.setRequestHeader(\"Accept\",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(\"*\"!==d.dataTypes[0]?\", \"+qn+\"; q=0.01\":\"\"):d.accepts[\"*\"]);for(r in d.headers)T.setRequestHeader(r,d.headers[r]);if(d.beforeSend&&(d.beforeSend.call(p,T,d)===!1||2===b))return T.abort();w=\"abort\";for(r in{success:1,error:1,complete:1})T[r](d[r]);if(u=z(Fn,d,t,T)){T.readyState=1,l&&f.trigger(\"ajaxSend\",[T,d]),d.async&&d.timeout>0&&(s=setTimeout(function(){T.abort(\"timeout\")},d.timeout));try{b=1,u.send(g,n)}catch(x){if(!(2>b))throw x;n(-1,x)}}else n(-1,\"No Transport\");return T},getJSON:function(e,t,n){return rt.get(e,t,n,\"json\")},getScript:function(e,t){return rt.get(e,void 0,t,\"script\")}}),rt.each([\"get\",\"post\"],function(e,t){rt[t]=function(e,n,i,r){return rt.isFunction(n)&&(r=r||i,i=n,n=void 0),rt.ajax({url:e,type:t,dataType:r,data:n,success:i})}}),rt._evalUrl=function(e){return rt.ajax({url:e,type:\"GET\",dataType:\"script\",async:!1,global:!1,\"throws\":!0})},rt.fn.extend({wrapAll:function(e){if(rt.isFunction(e))return this.each(function(t){rt(this).wrapAll(e.call(this,t))});if(this[0]){var t=rt(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return this.each(rt.isFunction(e)?function(t){rt(this).wrapInner(e.call(this,t))}:function(){var t=rt(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=rt.isFunction(e);return this.each(function(n){rt(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){rt.nodeName(this,\"body\")||rt(this).replaceWith(this.childNodes)}).end()}}),rt.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0||!nt.reliableHiddenOffsets()&&\"none\"===(e.style&&e.style.display||rt.css(e,\"display\"))},rt.expr.filters.visible=function(e){return!rt.expr.filters.hidden(e)};var Vn=/%20/g,Un=/\\[\\]$/,Xn=/\\r?\\n/g,Gn=/^(?:submit|button|image|reset|file)$/i,Zn=/^(?:input|select|textarea|keygen)/i;rt.param=function(e,t){var n,i=[],r=function(e,t){t=rt.isFunction(t)?t():null==t?\"\":t,i[i.length]=encodeURIComponent(e)+\"=\"+encodeURIComponent(t)};if(void 0===t&&(t=rt.ajaxSettings&&rt.ajaxSettings.traditional),rt.isArray(e)||e.jquery&&!rt.isPlainObject(e))rt.each(e,function(){r(this.name,this.value)});else for(n in e)F(n,e[n],t,r);return i.join(\"&\").replace(Vn,\"+\")},rt.fn.extend({serialize:function(){return rt.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=rt.prop(this,\"elements\");return e?rt.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!rt(this).is(\":disabled\")&&Zn.test(this.nodeName)&&!Gn.test(e)&&(this.checked||!At.test(e))}).map(function(e,t){var n=rt(this).val();return null==n?null:rt.isArray(n)?rt.map(n,function(e){return{name:t.name,value:e.replace(Xn,\"\\r\\n\")}}):{name:t.name,value:n.replace(Xn,\"\\r\\n\")}}).get()}}),rt.ajaxSettings.xhr=void 0!==e.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&q()||H()}:q;var Kn=0,Jn={},ei=rt.ajaxSettings.xhr();e.attachEvent&&e.attachEvent(\"onunload\",function(){for(var e in Jn)Jn[e](void 0,!0)}),nt.cors=!!ei&&\"withCredentials\"in ei,ei=nt.ajax=!!ei,ei&&rt.ajaxTransport(function(e){if(!e.crossDomain||nt.cors){var t;return{send:function(n,i){var r,o=e.xhr(),a=++Kn;if(o.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(r in e.xhrFields)o[r]=e.xhrFields[r];e.mimeType&&o.overrideMimeType&&o.overrideMimeType(e.mimeType),e.crossDomain||n[\"X-Requested-With\"]||(n[\"X-Requested-With\"]=\"XMLHttpRequest\");for(r in n)void 0!==n[r]&&o.setRequestHeader(r,n[r]+\"\");o.send(e.hasContent&&e.data||null),t=function(n,r){var s,l,u;if(t&&(r||4===o.readyState))if(delete Jn[a],t=void 0,o.onreadystatechange=rt.noop,r)4!==o.readyState&&o.abort();else{u={},s=o.status,\"string\"==typeof o.responseText&&(u.text=o.responseText);try{l=o.statusText}catch(c){l=\"\"}s||!e.isLocal||e.crossDomain?1223===s&&(s=204):s=u.text?200:404}u&&i(s,l,u,o.getAllResponseHeaders())},e.async?4===o.readyState?setTimeout(t):o.onreadystatechange=Jn[a]=t:t()},abort:function(){t&&t(void 0,!0)}}}}),rt.ajaxSetup({accepts:{script:\"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript\"},contents:{script:/(?:java|ecma)script/},converters:{\"text script\":function(e){return rt.globalEval(e),e}}}),rt.ajaxPrefilter(\"script\",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type=\"GET\",e.global=!1)}),rt.ajaxTransport(\"script\",function(e){if(e.crossDomain){var t,n=ht.head||rt(\"head\")[0]||ht.documentElement;return{send:function(i,r){t=ht.createElement(\"script\"),t.async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,n||r(200,\"success\"))},n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var ti=[],ni=/(=)\\?(?=&|$)|\\?\\?/;rt.ajaxSetup({jsonp:\"callback\",jsonpCallback:function(){var e=ti.pop()||rt.expando+\"_\"+_n++;return this[e]=!0,e}}),rt.ajaxPrefilter(\"json jsonp\",function(t,n,i){var r,o,a,s=t.jsonp!==!1&&(ni.test(t.url)?\"url\":\"string\"==typeof t.data&&!(t.contentType||\"\").indexOf(\"application/x-www-form-urlencoded\")&&ni.test(t.data)&&\"data\");return s||\"jsonp\"===t.dataTypes[0]?(r=t.jsonpCallback=rt.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(ni,\"$1\"+r):t.jsonp!==!1&&(t.url+=(Yn.test(t.url)?\"&\":\"?\")+t.jsonp+\"=\"+r),t.converters[\"script json\"]=function(){return a||rt.error(r+\" was not called\"),a[0]},t.dataTypes[0]=\"json\",o=e[r],e[r]=function(){a=arguments},i.always(function(){e[r]=o,t[r]&&(t.jsonpCallback=n.jsonpCallback,ti.push(r)),a&&rt.isFunction(o)&&o(a[0]),a=o=void 0}),\"script\"):void 0}),rt.parseHTML=function(e,t,n){if(!e||\"string\"!=typeof e)return null;\"boolean\"==typeof t&&(n=t,t=!1),t=t||ht;var i=dt.exec(e),r=!n&&[];return i?[t.createElement(i[1])]:(i=rt.buildFragment([e],t,r),r&&r.length&&rt(r).remove(),rt.merge([],i.childNodes))};var ii=rt.fn.load;rt.fn.load=function(e,t,n){if(\"string\"!=typeof e&&ii)return ii.apply(this,arguments);var i,r,o,a=this,s=e.indexOf(\" \");return s>=0&&(i=rt.trim(e.slice(s,e.length)),e=e.slice(0,s)),rt.isFunction(t)?(n=t,t=void 0):t&&\"object\"==typeof t&&(o=\"POST\"),a.length>0&&rt.ajax({url:e,type:o,dataType:\"html\",data:t}).done(function(e){r=arguments,a.html(i?rt(\"
    \").append(rt.parseHTML(e)).find(i):e)}).complete(n&&function(e,t){a.each(n,r||[e.responseText,t,e])}),this},rt.each([\"ajaxStart\",\"ajaxStop\",\"ajaxComplete\",\"ajaxError\",\"ajaxSuccess\",\"ajaxSend\"],function(e,t){rt.fn[t]=function(e){return this.on(t,e)}}),rt.expr.filters.animated=function(e){return rt.grep(rt.timers,function(t){return e===t.elem}).length};var ri=e.document.documentElement;rt.offset={setOffset:function(e,t,n){var i,r,o,a,s,l,u,c=rt.css(e,\"position\"),d=rt(e),p={};\"static\"===c&&(e.style.position=\"relative\"),s=d.offset(),o=rt.css(e,\"top\"),l=rt.css(e,\"left\"),u=(\"absolute\"===c||\"fixed\"===c)&&rt.inArray(\"auto\",[o,l])>-1,u?(i=d.position(),a=i.top,r=i.left):(a=parseFloat(o)||0,r=parseFloat(l)||0),rt.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(p.top=t.top-s.top+a),null!=t.left&&(p.left=t.left-s.left+r),\"using\"in t?t.using.call(e,p):d.css(p)}},rt.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){rt.offset.setOffset(this,e,t)});var t,n,i={top:0,left:0},r=this[0],o=r&&r.ownerDocument;if(o)return t=o.documentElement,rt.contains(t,r)?(typeof r.getBoundingClientRect!==Ct&&(i=r.getBoundingClientRect()),n=V(o),{top:i.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:i.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):i},position:function(){if(this[0]){var e,t,n={top:0,left:0},i=this[0];return\"fixed\"===rt.css(i,\"position\")?t=i.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),rt.nodeName(e[0],\"html\")||(n=e.offset()),n.top+=rt.css(e[0],\"borderTopWidth\",!0),n.left+=rt.css(e[0],\"borderLeftWidth\",!0)),{top:t.top-n.top-rt.css(i,\"marginTop\",!0),left:t.left-n.left-rt.css(i,\"marginLeft\",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||ri;e&&!rt.nodeName(e,\"html\")&&\"static\"===rt.css(e,\"position\");)e=e.offsetParent;return e||ri})}}),rt.each({scrollLeft:\"pageXOffset\",scrollTop:\"pageYOffset\"},function(e,t){var n=/Y/.test(t);rt.fn[e]=function(i){return jt(this,function(e,i,r){var o=V(e);return void 0===r?o?t in o?o[t]:o.document.documentElement[i]:e[i]:void(o?o.scrollTo(n?rt(o).scrollLeft():r,n?r:rt(o).scrollTop()):e[i]=r)},e,i,arguments.length,null)}}),rt.each([\"top\",\"left\"],function(e,t){rt.cssHooks[t]=k(nt.pixelPosition,function(e,n){return n?(n=tn(e,t),rn.test(n)?rt(e).position()[t]+\"px\":n):void 0})}),rt.each({Height:\"height\",Width:\"width\"},function(e,t){rt.each({padding:\"inner\"+e,content:t,\"\":\"outer\"+e},function(n,i){rt.fn[i]=function(i,r){var o=arguments.length&&(n||\"boolean\"!=typeof i),a=n||(i===!0||r===!0?\"margin\":\"border\");return jt(this,function(t,n,i){var r;return rt.isWindow(t)?t.document.documentElement[\"client\"+e]:9===t.nodeType?(r=t.documentElement,Math.max(t.body[\"scroll\"+e],r[\"scroll\"+e],t.body[\"offset\"+e],r[\"offset\"+e],r[\"client\"+e])):void 0===i?rt.css(t,n,a):rt.style(t,n,i,a)},t,o?i:void 0,o,null)}})}),rt.fn.size=function(){return this.length},rt.fn.andSelf=rt.fn.addBack,\"function\"==typeof define&&define.amd&&define(\"jquery\",[],function(){return rt});var oi=e.jQuery,ai=e.$;return rt.noConflict=function(t){return e.$===rt&&(e.$=ai),t&&e.jQuery===rt&&(e.jQuery=oi),rt},typeof t===Ct&&(e.jQuery=e.$=rt),rt}),function(e,t){e.rails!==t&&e.error(\"jquery-ujs has already been loaded!\");var n,i=e(document);e.rails=n={linkClickSelector:\"a[data-confirm], a[data-method], a[data-remote], a[data-disable-with], a[data-disable]\",buttonClickSelector:\"button[data-remote]:not(form button), button[data-confirm]:not(form button)\",inputChangeSelector:\"select[data-remote], input[data-remote], textarea[data-remote]\",formSubmitSelector:\"form\",formInputClickSelector:\"form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])\",disableSelector:\"input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled\",enableSelector:\"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled\",requiredInputSelector:\"input[name][required]:not([disabled]),textarea[name][required]:not([disabled])\",fileInputSelector:\"input[type=file]\",linkDisableSelector:\"a[data-disable-with], a[data-disable]\",buttonDisableSelector:\"button[data-remote][data-disable-with], button[data-remote][data-disable]\",CSRFProtection:function(t){var n=e('meta[name=\"csrf-token\"]').attr(\"content\");n&&t.setRequestHeader(\"X-CSRF-Token\",n)},refreshCSRFTokens:function(){var t=e(\"meta[name=csrf-token]\").attr(\"content\"),n=e(\"meta[name=csrf-param]\").attr(\"content\");e('form input[name=\"'+n+'\"]').val(t)},fire:function(t,n,i){var r=e.Event(n);return t.trigger(r,i),r.result!==!1},confirm:function(e){return confirm(e)},ajax:function(t){return e.ajax(t)},href:function(e){return e.attr(\"href\")},handleRemote:function(i){var r,o,a,s,l,u,c,d;if(n.fire(i,\"ajax:before\")){if(s=i.data(\"cross-domain\"),l=s===t?null:s,u=i.data(\"with-credentials\")||null,c=i.data(\"type\")||e.ajaxSettings&&e.ajaxSettings.dataType,i.is(\"form\")){r=i.attr(\"method\"),o=i.attr(\"action\"),a=i.serializeArray();var p=i.data(\"ujs:submit-button\");p&&(a.push(p),i.data(\"ujs:submit-button\",null))}else i.is(n.inputChangeSelector)?(r=i.data(\"method\"),o=i.data(\"url\"),a=i.serialize(),i.data(\"params\")&&(a=a+\"&\"+i.data(\"params\"))):i.is(n.buttonClickSelector)?(r=i.data(\"method\")||\"get\",o=i.data(\"url\"),a=i.serialize(),i.data(\"params\")&&(a=a+\"&\"+i.data(\"params\"))):(r=i.data(\"method\"),o=n.href(i),a=i.data(\"params\")||null);return d={type:r||\"GET\",data:a,dataType:c,beforeSend:function(e,r){return r.dataType===t&&e.setRequestHeader(\"accept\",\"*/*;q=0.5, \"+r.accepts.script),n.fire(i,\"ajax:beforeSend\",[e,r])?void i.trigger(\"ajax:send\",e):!1},success:function(e,t,n){i.trigger(\"ajax:success\",[e,t,n])},complete:function(e,t){i.trigger(\"ajax:complete\",[e,t])},error:function(e,t,n){i.trigger(\"ajax:error\",[e,t,n])},crossDomain:l},u&&(d.xhrFields={withCredentials:u}),o&&(d.url=o),n.ajax(d)}return!1},handleMethod:function(i){var r=n.href(i),o=i.data(\"method\"),a=i.attr(\"target\"),s=e(\"meta[name=csrf-token]\").attr(\"content\"),l=e(\"meta[name=csrf-param]\").attr(\"content\"),u=e('
    '),c='';l!==t&&s!==t&&(c+=''),a&&u.attr(\"target\",a),u.hide().append(c).appendTo(\"body\"),u.submit()},formElements:function(t,n){return t.is(\"form\")?e(t[0].elements).filter(n):t.find(n)},disableFormElements:function(t){n.formElements(t,n.disableSelector).each(function(){n.disableFormElement(e(this))})},disableFormElement:function(e){var n,i;n=e.is(\"button\")?\"html\":\"val\",i=e.data(\"disable-with\"),e.data(\"ujs:enable-with\",e[n]()),i!==t&&e[n](i),e.prop(\"disabled\",!0)},enableFormElements:function(t){n.formElements(t,n.enableSelector).each(function(){n.enableFormElement(e(this))})},enableFormElement:function(e){var t=e.is(\"button\")?\"html\":\"val\";e.data(\"ujs:enable-with\")&&e[t](e.data(\"ujs:enable-with\")),e.prop(\"disabled\",!1)},allowAction:function(e){var t,i=e.data(\"confirm\"),r=!1;return i?(n.fire(e,\"confirm\")&&(r=n.confirm(i),t=n.fire(e,\"confirm:complete\",[r])),r&&t):!0},blankInputs:function(t,n,i){var r,o,a=e(),s=n||\"input,textarea\",l=t.find(s);return l.each(function(){if(r=e(this),o=r.is(\"input[type=checkbox],input[type=radio]\")?r.is(\":checked\"):r.val(),!o==!i){if(r.is(\"input[type=radio]\")&&l.filter('input[type=radio]:checked[name=\"'+r.attr(\"name\")+'\"]').length)return!0;a=a.add(r)}}),a.length?a:!1},nonBlankInputs:function(e,t){return n.blankInputs(e,t,!0)},stopEverything:function(t){return e(t.target).trigger(\"ujs:everythingStopped\"),t.stopImmediatePropagation(),!1},disableElement:function(e){var i=e.data(\"disable-with\");e.data(\"ujs:enable-with\",e.html()),i!==t&&e.html(i),e.bind(\"click.railsDisable\",function(e){return n.stopEverything(e)})},enableElement:function(e){e.data(\"ujs:enable-with\")!==t&&(e.html(e.data(\"ujs:enable-with\")),e.removeData(\"ujs:enable-with\")),e.unbind(\"click.railsDisable\")}},n.fire(i,\"rails:attachBindings\")&&(e.ajaxPrefilter(function(e,t,i){e.crossDomain||n.CSRFProtection(i)}),e(window).on(\"pageshow.rails\",function(){e(e.rails.enableSelector).each(function(){var t=e(this);t.data(\"ujs:enable-with\")&&e.rails.enableFormElement(t)}),e(e.rails.linkDisableSelector).each(function(){var t=e(this);t.data(\"ujs:enable-with\")&&e.rails.enableElement(t)})}),i.delegate(n.linkDisableSelector,\"ajax:complete\",function(){n.enableElement(e(this))}),i.delegate(n.buttonDisableSelector,\"ajax:complete\",function(){n.enableFormElement(e(this))}),i.delegate(n.linkClickSelector,\"click.rails\",function(i){var r=e(this),o=r.data(\"method\"),a=r.data(\"params\"),s=i.metaKey||i.ctrlKey;if(!n.allowAction(r))return n.stopEverything(i);if(!s&&r.is(n.linkDisableSelector)&&n.disableElement(r),r.data(\"remote\")!==t){if(s&&(!o||\"GET\"===o)&&!a)return!0;var l=n.handleRemote(r);return l===!1?n.enableElement(r):l.fail(function(){n.enableElement(r)}),!1}return o?(n.handleMethod(r),!1):void 0}),i.delegate(n.buttonClickSelector,\"click.rails\",function(t){var i=e(this);if(!n.allowAction(i))return n.stopEverything(t);i.is(n.buttonDisableSelector)&&n.disableFormElement(i);var r=n.handleRemote(i);return r===!1?n.enableFormElement(i):r.fail(function(){n.enableFormElement(i)}),!1}),i.delegate(n.inputChangeSelector,\"change.rails\",function(t){var i=e(this);return n.allowAction(i)?(n.handleRemote(i),!1):n.stopEverything(t)}),i.delegate(n.formSubmitSelector,\"submit.rails\",function(i){var r,o,a=e(this),s=a.data(\"remote\")!==t;if(!n.allowAction(a))return n.stopEverything(i);if(a.attr(\"novalidate\")==t&&(r=n.blankInputs(a,n.requiredInputSelector),r&&n.fire(a,\"ajax:aborted:required\",[r])))return n.stopEverything(i);if(s){if(o=n.nonBlankInputs(a,n.fileInputSelector)){setTimeout(function(){n.disableFormElements(a)},13);var l=n.fire(a,\"ajax:aborted:file\",[o]);return l||setTimeout(function(){n.enableFormElements(a)},13),l}return n.handleRemote(a),!1}setTimeout(function(){n.disableFormElements(a)},13)}),i.delegate(n.formInputClickSelector,\"click.rails\",function(t){var i=e(this);if(!n.allowAction(i))return n.stopEverything(t);var r=i.attr(\"name\"),o=r?{name:r,value:i.val()}:null;i.closest(\"form\").data(\"ujs:submit-button\",o)}),i.delegate(n.formSubmitSelector,\"ajax:send.rails\",function(t){this==t.target&&n.disableFormElements(e(this))}),i.delegate(n.formSubmitSelector,\"ajax:complete.rails\",function(t){this==t.target&&n.enableFormElements(e(this))}),e(function(){n.refreshCSRFTokens()}))}(jQuery),/* ========================================================================\n * Bootstrap: affix.js v3.1.1\n * http://getbootstrap.com/javascript/#affix\n * ========================================================================\n * Copyright 2011-2014 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n+function(e){\"use strict\";var t=function(n,i){this.options=e.extend({},t.DEFAULTS,i),this.$window=e(window).on(\"scroll.bs.affix.data-api\",e.proxy(this.checkPosition,this)).on(\"click.bs.affix.data-api\",e.proxy(this.checkPositionWithEventLoop,this)),this.$element=e(n),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};t.RESET=\"affix affix-top affix-bottom\",t.DEFAULTS={offset:0},t.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(t.RESET).addClass(\"affix\");var e=this.$window.scrollTop(),n=this.$element.offset();return this.pinnedOffset=n.top-e},t.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)},t.prototype.checkPosition=function(){if(this.$element.is(\":visible\")){var n=e(document).height(),i=this.$window.scrollTop(),r=this.$element.offset(),o=this.options.offset,a=o.top,s=o.bottom;\"object\"!=typeof o&&(s=a=o),\"function\"==typeof a&&(a=o.top(this.$element)),\"function\"==typeof s&&(s=o.bottom(this.$element));var l=null!=this.unpin&&i+this.unpin<=r.top?!1:null!=s&&r.top+this.$element.height()>=n-s?\"bottom\":null!=a&&a>=i?\"top\":!1;if(this.affixed!==l){null!=this.unpin&&this.$element.css(\"top\",\"\");var u=\"affix\"+(l?\"-\"+l:\"\"),c=e.Event(u+\".bs.affix\");this.$element.trigger(c),c.isDefaultPrevented()||(this.affixed=l,this.unpin=\"bottom\"==l?this.getPinnedOffset():null,this.$element.removeClass(t.RESET).addClass(u).trigger(e.Event(u.replace(\"affix\",\"affixed\"))),\"bottom\"==l&&this.$element.offset({top:r.top}))}}};var n=e.fn.affix;e.fn.affix=function(n){return this.each(function(){var i=e(this),r=i.data(\"bs.affix\"),o=\"object\"==typeof n&&n;r||i.data(\"bs.affix\",r=new t(this,o)),\"string\"==typeof n&&r[n]()})},e.fn.affix.Constructor=t,e.fn.affix.noConflict=function(){return e.fn.affix=n,this},e(window).on(\"load\",function(){e('[data-spy=\"affix\"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(jQuery),/* ========================================================================\n * Bootstrap: alert.js v3.1.1\n * http://getbootstrap.com/javascript/#alerts\n * ========================================================================\n * Copyright 2011-2014 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n+function(e){\"use strict\";var t='[data-dismiss=\"alert\"]',n=function(n){e(n).on(\"click\",t,this.close)};n.prototype.close=function(t){function n(){o.trigger(\"closed.bs.alert\").remove()}var i=e(this),r=i.attr(\"data-target\");r||(r=i.attr(\"href\"),r=r&&r.replace(/.*(?=#[^\\s]*$)/,\"\"));var o=e(r);t&&t.preventDefault(),o.length||(o=i.hasClass(\"alert\")?i:i.parent()),o.trigger(t=e.Event(\"close.bs.alert\")),t.isDefaultPrevented()||(o.removeClass(\"in\"),e.support.transition&&o.hasClass(\"fade\")?o.one(e.support.transition.end,n).emulateTransitionEnd(150):n())};var i=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var i=e(this),r=i.data(\"bs.alert\");r||i.data(\"bs.alert\",r=new n(this)),\"string\"==typeof t&&r[t].call(i)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=i,this},e(document).on(\"click.bs.alert.data-api\",t,n.prototype.close)}(jQuery),/* ========================================================================\n * Bootstrap: button.js v3.1.1\n * http://getbootstrap.com/javascript/#buttons\n * ========================================================================\n * Copyright 2011-2014 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n+function(e){\"use strict\";var t=function(n,i){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,i),this.isLoading=!1};t.DEFAULTS={loadingText:\"loading...\"},t.prototype.setState=function(t){var n=\"disabled\",i=this.$element,r=i.is(\"input\")?\"val\":\"html\",o=i.data();t+=\"Text\",o.resetText||i.data(\"resetText\",i[r]()),i[r](o[t]||this.options[t]),setTimeout(e.proxy(function(){\"loadingText\"==t?(this.isLoading=!0,i.addClass(n).attr(n,n)):this.isLoading&&(this.isLoading=!1,i.removeClass(n).removeAttr(n))},this),0)},t.prototype.toggle=function(){var e=!0,t=this.$element.closest('[data-toggle=\"buttons\"]');if(t.length){var n=this.$element.find(\"input\");\"radio\"==n.prop(\"type\")&&(n.prop(\"checked\")&&this.$element.hasClass(\"active\")?e=!1:t.find(\".active\").removeClass(\"active\")),e&&n.prop(\"checked\",!this.$element.hasClass(\"active\")).trigger(\"change\")}e&&this.$element.toggleClass(\"active\")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var i=e(this),r=i.data(\"bs.button\"),o=\"object\"==typeof n&&n;r||i.data(\"bs.button\",r=new t(this,o)),\"toggle\"==n?r.toggle():n&&r.setState(n)})},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on(\"click.bs.button.data-api\",\"[data-toggle^=button]\",function(t){var n=e(t.target);n.hasClass(\"btn\")||(n=n.closest(\".btn\")),n.button(\"toggle\"),t.preventDefault()})}(jQuery),/* ========================================================================\n * Bootstrap: carousel.js v3.1.1\n * http://getbootstrap.com/javascript/#carousel\n * ========================================================================\n * Copyright 2011-2014 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n+function(e){\"use strict\";var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(\".carousel-indicators\"),this.options=n,this.paused=this.sliding=this.interval=this.$active=this.$items=null,\"hover\"==this.options.pause&&this.$element.on(\"mouseenter\",e.proxy(this.pause,this)).on(\"mouseleave\",e.proxy(this.cycle,this))};t.DEFAULTS={interval:5e3,pause:\"hover\",wrap:!0},t.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},t.prototype.getActiveIndex=function(){return this.$active=this.$element.find(\".item.active\"),this.$items=this.$active.parent().children(\".item\"),this.$items.index(this.$active)},t.prototype.to=function(t){var n=this,i=this.getActiveIndex();return t>this.$items.length-1||0>t?void 0:this.sliding?this.$element.one(\"slid.bs.carousel\",function(){n.to(t)}):i==t?this.pause().cycle():this.slide(t>i?\"next\":\"prev\",e(this.$items[t]))},t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(\".next, .prev\").length&&e.support.transition&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},t.prototype.next=function(){return this.sliding?void 0:this.slide(\"next\")},t.prototype.prev=function(){return this.sliding?void 0:this.slide(\"prev\")},t.prototype.slide=function(t,n){var i=this.$element.find(\".item.active\"),r=n||i[t](),o=this.interval,a=\"next\"==t?\"left\":\"right\",s=\"next\"==t?\"first\":\"last\",l=this;if(!r.length){if(!this.options.wrap)return;r=this.$element.find(\".item\")[s]()}if(r.hasClass(\"active\"))return this.sliding=!1;var u=e.Event(\"slide.bs.carousel\",{relatedTarget:r[0],direction:a});return this.$element.trigger(u),u.isDefaultPrevented()?void 0:(this.sliding=!0,o&&this.pause(),this.$indicators.length&&(this.$indicators.find(\".active\").removeClass(\"active\"),this.$element.one(\"slid.bs.carousel\",function(){var t=e(l.$indicators.children()[l.getActiveIndex()]);t&&t.addClass(\"active\")})),e.support.transition&&this.$element.hasClass(\"slide\")?(r.addClass(t),r[0].offsetWidth,i.addClass(a),r.addClass(a),i.one(e.support.transition.end,function(){r.removeClass([t,a].join(\" \")).addClass(\"active\"),i.removeClass([\"active\",a].join(\" \")),l.sliding=!1,setTimeout(function(){l.$element.trigger(\"slid.bs.carousel\")},0)}).emulateTransitionEnd(1e3*i.css(\"transition-duration\").slice(0,-1))):(i.removeClass(\"active\"),r.addClass(\"active\"),this.sliding=!1,this.$element.trigger(\"slid.bs.carousel\")),o&&this.cycle(),this)};var n=e.fn.carousel;e.fn.carousel=function(n){return this.each(function(){var i=e(this),r=i.data(\"bs.carousel\"),o=e.extend({},t.DEFAULTS,i.data(),\"object\"==typeof n&&n),a=\"string\"==typeof n?n:o.slide;r||i.data(\"bs.carousel\",r=new t(this,o)),\"number\"==typeof n?r.to(n):a?r[a]():o.interval&&r.pause().cycle()})},e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=n,this},e(document).on(\"click.bs.carousel.data-api\",\"[data-slide], [data-slide-to]\",function(t){var n,i=e(this),r=e(i.attr(\"data-target\")||(n=i.attr(\"href\"))&&n.replace(/.*(?=#[^\\s]+$)/,\"\")),o=e.extend({},r.data(),i.data()),a=i.attr(\"data-slide-to\");a&&(o.interval=!1),r.carousel(o),(a=i.attr(\"data-slide-to\"))&&r.data(\"bs.carousel\").to(a),t.preventDefault()}),e(window).on(\"load\",function(){e('[data-ride=\"carousel\"]').each(function(){var t=e(this);t.carousel(t.data())})})}(jQuery),/* ========================================================================\n * Bootstrap: collapse.js v3.1.1\n * http://getbootstrap.com/javascript/#collapse\n * ========================================================================\n * Copyright 2011-2014 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n+function(e){\"use strict\";var t=function(n,i){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,i),this.transitioning=null,this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.DEFAULTS={toggle:!0},t.prototype.dimension=function(){var e=this.$element.hasClass(\"width\");return e?\"width\":\"height\"},t.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass(\"in\")){var t=e.Event(\"show.bs.collapse\");if(this.$element.trigger(t),!t.isDefaultPrevented()){var n=this.$parent&&this.$parent.find(\"> .panel > .in\");if(n&&n.length){var i=n.data(\"bs.collapse\");if(i&&i.transitioning)return;n.collapse(\"hide\"),i||n.data(\"bs.collapse\",null)}var r=this.dimension();this.$element.removeClass(\"collapse\").addClass(\"collapsing\")[r](0),this.transitioning=1;var o=function(t){return t&&t.target!=this.$element[0]?void this.$element.one(e.support.transition.end,e.proxy(o,this)):(this.$element.removeClass(\"collapsing\").addClass(\"collapse in\")[r](\"auto\"),this.transitioning=0,void this.$element.trigger(\"shown.bs.collapse\"))};if(!e.support.transition)return o.call(this);var a=e.camelCase([\"scroll\",r].join(\"-\"));this.$element.one(e.support.transition.end,e.proxy(o,this)).emulateTransitionEnd(350)[r](this.$element[0][a])}}},t.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass(\"in\")){var t=e.Event(\"hide.bs.collapse\");if(this.$element.trigger(t),!t.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass(\"collapsing\").removeClass(\"collapse\").removeClass(\"in\"),this.transitioning=1;var i=function(t){return t&&t.target!=this.$element[0]?void this.$element.one(e.support.transition.end,e.proxy(i,this)):(this.transitioning=0,void this.$element.trigger(\"hidden.bs.collapse\").removeClass(\"collapsing\").addClass(\"collapse\"))};return e.support.transition?void this.$element[n](0).one(e.support.transition.end,e.proxy(i,this)).emulateTransitionEnd(350):i.call(this)}}},t.prototype.toggle=function(){this[this.$element.hasClass(\"in\")?\"hide\":\"show\"]()};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var i=e(this),r=i.data(\"bs.collapse\"),o=e.extend({},t.DEFAULTS,i.data(),\"object\"==typeof n&&n);!r&&o.toggle&&\"show\"==n&&(n=!n),r||i.data(\"bs.collapse\",r=new t(this,o)),\"string\"==typeof n&&r[n]()})},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on(\"click.bs.collapse.data-api\",'[data-toggle=\"collapse\"]',function(t){var n,i=e(this),r=i.attr(\"data-target\")||t.preventDefault()||(n=i.attr(\"href\"))&&n.replace(/.*(?=#[^\\s]+$)/,\"\"),o=e(r),a=o.data(\"bs.collapse\"),s=a?\"toggle\":i.data(),l=i.attr(\"data-parent\"),u=l&&e(l);a&&a.transitioning||(u&&u.find('[data-toggle=\"collapse\"][data-parent=\"'+l+'\"]').not(i).addClass(\"collapsed\"),i[o.hasClass(\"in\")?\"addClass\":\"removeClass\"](\"collapsed\")),o.collapse(s)})}(jQuery),/* ========================================================================\n * Bootstrap: dropdown.js v3.1.1\n * http://getbootstrap.com/javascript/#dropdowns\n * ========================================================================\n * Copyright 2011-2014 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n+function(e){\"use strict\";function t(t){e(i).remove(),e(r).each(function(){var i=n(e(this)),r={relatedTarget:this};i.hasClass(\"open\")&&(i.trigger(t=e.Event(\"hide.bs.dropdown\",r)),t.isDefaultPrevented()||i.removeClass(\"open\").trigger(\"hidden.bs.dropdown\",r))})}function n(t){var n=t.attr(\"data-target\");n||(n=t.attr(\"href\"),n=n&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\\s]*$)/,\"\"));var i=n&&e(n);return i&&i.length?i:t.parent()}var i=\".dropdown-backdrop\",r='[data-toggle=\"dropdown\"]',o=function(t){e(t).on(\"click.bs.dropdown\",this.toggle)};o.prototype.toggle=function(i){var r=e(this);if(!r.is(\".disabled, :disabled\")){var o=n(r),a=o.hasClass(\"open\");if(t(),!a){\"ontouchstart\"in document.documentElement&&!o.closest(\".navbar-nav\").length&&e('
    ').insertAfter(e(this)).on(\"click\",t);var s={relatedTarget:this};if(o.trigger(i=e.Event(\"show.bs.dropdown\",s)),i.isDefaultPrevented())return;r.trigger(\"focus\"),o.toggleClass(\"open\").trigger(\"shown.bs.dropdown\",s)}return!1}},o.prototype.keydown=function(t){if(/(38|40|27)/.test(t.keyCode)){var i=e(this);if(t.preventDefault(),t.stopPropagation(),!i.is(\".disabled, :disabled\")){var o=n(i),a=o.hasClass(\"open\");if(!a||a&&27==t.keyCode)return 27==t.which&&o.find(r).trigger(\"focus\"),i.trigger(\"click\");var s=\" li:not(.divider):visible a\",l=o.find('[role=\"menu\"]'+s+', [role=\"listbox\"]'+s);if(l.length){var u=l.index(l.filter(\":focus\"));38==t.keyCode&&u>0&&u--,40==t.keyCode&&u .dropdown-menu > .active\").removeClass(\"active\"),t.addClass(\"active\"),a?(t[0].offsetWidth,t.addClass(\"in\")):t.removeClass(\"fade\"),t.parent(\".dropdown-menu\")&&t.closest(\"li.dropdown\").addClass(\"active\"),i&&i()}var o=n.find(\"> .active\"),a=i&&e.support.transition&&o.hasClass(\"fade\");a?o.one(e.support.transition.end,r).emulateTransitionEnd(150):r(),o.removeClass(\"in\")};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var i=e(this),r=i.data(\"bs.tab\");r||i.data(\"bs.tab\",r=new t(this)),\"string\"==typeof n&&r[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on(\"click.bs.tab.data-api\",'[data-toggle=\"tab\"], [data-toggle=\"pill\"]',function(t){t.preventDefault(),e(this).tab(\"show\")})}(jQuery),/* ========================================================================\n * Bootstrap: transition.js v3.1.1\n * http://getbootstrap.com/javascript/#transitions\n * ========================================================================\n * Copyright 2011-2014 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n+function(e){\"use strict\";function t(){var e=document.createElement(\"bootstrap\"),t={WebkitTransition:\"webkitTransitionEnd\",MozTransition:\"transitionend\",OTransition:\"oTransitionEnd otransitionend\",transition:\"transitionend\"};for(var n in t)if(void 0!==e.style[n])return{end:t[n]};return!1}e.fn.emulateTransitionEnd=function(t){var n=!1,i=this;e(this).one(e.support.transition.end,function(){n=!0});var r=function(){n||e(i).trigger(e.support.transition.end)};return setTimeout(r,t),this},e(function(){e.support.transition=t()})}(jQuery),/* ========================================================================\n * Bootstrap: scrollspy.js v3.1.1\n * http://getbootstrap.com/javascript/#scrollspy\n * ========================================================================\n * Copyright 2011-2014 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n+function(e){\"use strict\";function t(n,i){var r,o=e.proxy(this.process,this);this.$element=e(e(n).is(\"body\")?window:n),this.$body=e(\"body\"),this.$scrollElement=this.$element.on(\"scroll.bs.scrollspy\",o),this.options=e.extend({},t.DEFAULTS,i),this.selector=(this.options.target||(r=e(n).attr(\"href\"))&&r.replace(/.*(?=#[^\\s]+$)/,\"\")||\"\")+\" .nav li > a\",this.offsets=e([]),this.targets=e([]),this.activeTarget=null,this.refresh(),this.process()}t.DEFAULTS={offset:10},t.prototype.refresh=function(){var t=this.$element[0]==window?\"offset\":\"position\";this.offsets=e([]),this.targets=e([]);var n=this;this.$body.find(this.selector).map(function(){var i=e(this),r=i.data(\"target\")||i.attr(\"href\"),o=/^#./.test(r)&&e(r);return o&&o.length&&o.is(\":visible\")&&[[o[t]().top+(!e.isWindow(n.$scrollElement.get(0))&&n.$scrollElement.scrollTop()),r]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){n.offsets.push(this[0]),n.targets.push(this[1])})},t.prototype.process=function(){var e,t=this.$scrollElement.scrollTop()+this.options.offset,n=this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight),i=n-this.$scrollElement.height(),r=this.offsets,o=this.targets,a=this.activeTarget;if(t>=i)return a!=(e=o.last()[0])&&this.activate(e);if(a&&t<=r[0])return a!=(e=o[0])&&this.activate(e);for(e=r.length;e--;)a!=o[e]&&t>=r[e]&&(!r[e+1]||t<=r[e+1])&&this.activate(o[e])},t.prototype.activate=function(t){this.activeTarget=t,e(this.selector).parentsUntil(this.options.target,\".active\").removeClass(\"active\");var n=this.selector+'[data-target=\"'+t+'\"],'+this.selector+'[href=\"'+t+'\"]',i=e(n).parents(\"li\").addClass(\"active\");i.parent(\".dropdown-menu\").length&&(i=i.closest(\"li.dropdown\").addClass(\"active\")),i.trigger(\"activate.bs.scrollspy\")};var n=e.fn.scrollspy;e.fn.scrollspy=function(n){return this.each(function(){var i=e(this),r=i.data(\"bs.scrollspy\"),o=\"object\"==typeof n&&n;r||i.data(\"bs.scrollspy\",r=new t(this,o)),\"string\"==typeof n&&r[n]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=n,this},e(window).on(\"load.bs.scrollspy.data-api\",function(){e('[data-spy=\"scroll\"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(jQuery),/* ========================================================================\n * Bootstrap: modal.js v3.1.1\n * http://getbootstrap.com/javascript/#modals\n * ========================================================================\n * Copyright 2011-2014 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n+function(e){\"use strict\";var t=function(t,n){this.options=n,this.$body=e(document.body),this.$element=e(t),this.$backdrop=this.isShown=null,this.scrollbarWidth=0,this.options.remote&&this.$element.find(\".modal-content\").load(this.options.remote,e.proxy(function(){this.$element.trigger(\"loaded.bs.modal\")},this))};t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},t.prototype.toggle=function(e){return this.isShown?this.hide():this.show(e)},t.prototype.show=function(t){var n=this,i=e.Event(\"show.bs.modal\",{relatedTarget:t});this.$element.trigger(i),this.isShown||i.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.$body.addClass(\"modal-open\"),this.setScrollbar(),this.escape(),this.$element.on(\"click.dismiss.bs.modal\",'[data-dismiss=\"modal\"]',e.proxy(this.hide,this)),this.backdrop(function(){var i=e.support.transition&&n.$element.hasClass(\"fade\");n.$element.parent().length||n.$element.appendTo(n.$body),n.$element.show().scrollTop(0),i&&n.$element[0].offsetWidth,n.$element.addClass(\"in\").attr(\"aria-hidden\",!1),n.enforceFocus();var r=e.Event(\"shown.bs.modal\",{relatedTarget:t});i?n.$element.find(\".modal-dialog\").one(e.support.transition.end,function(){n.$element.trigger(\"focus\").trigger(r)}).emulateTransitionEnd(300):n.$element.trigger(\"focus\").trigger(r)}))},t.prototype.hide=function(t){t&&t.preventDefault(),t=e.Event(\"hide.bs.modal\"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.$body.removeClass(\"modal-open\"),this.resetScrollbar(),this.escape(),e(document).off(\"focusin.bs.modal\"),this.$element.removeClass(\"in\").attr(\"aria-hidden\",!0).off(\"click.dismiss.bs.modal\"),e.support.transition&&this.$element.hasClass(\"fade\")?this.$element.one(e.support.transition.end,e.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},t.prototype.enforceFocus=function(){e(document).off(\"focusin.bs.modal\").on(\"focusin.bs.modal\",e.proxy(function(e){this.$element[0]===e.target||this.$element.has(e.target).length||this.$element.trigger(\"focus\")},this))},t.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on(\"keyup.dismiss.bs.modal\",e.proxy(function(e){27==e.which&&this.hide()},this)):this.isShown||this.$element.off(\"keyup.dismiss.bs.modal\")},t.prototype.hideModal=function(){var e=this;this.$element.hide(),this.backdrop(function(){e.removeBackdrop(),e.$element.trigger(\"hidden.bs.modal\")})},t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},t.prototype.backdrop=function(t){var n=this.$element.hasClass(\"fade\")?\"fade\":\"\";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&n;if(this.$backdrop=e('
    ').appendTo(this.$body),this.$element.on(\"click.dismiss.bs.modal\",e.proxy(function(e){e.target===e.currentTarget&&(\"static\"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass(\"in\"),!t)return;i?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass(\"in\"),e.support.transition&&this.$element.hasClass(\"fade\")?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()):t&&t()},t.prototype.checkScrollbar=function(){document.body.clientWidth>=window.innerWidth||(this.scrollbarWidth=this.scrollbarWidth||this.measureScrollbar())},t.prototype.setScrollbar=function(){var e=parseInt(this.$body.css(\"padding-right\")||0);this.scrollbarWidth&&this.$body.css(\"padding-right\",e+this.scrollbarWidth)},t.prototype.resetScrollbar=function(){this.$body.css(\"padding-right\",\"\")},t.prototype.measureScrollbar=function(){var e=document.createElement(\"div\");e.className=\"modal-scrollbar-measure\",this.$body.append(e);var t=e.offsetWidth-e.clientWidth;return this.$body[0].removeChild(e),t};var n=e.fn.modal;e.fn.modal=function(n,i){return this.each(function(){var r=e(this),o=r.data(\"bs.modal\"),a=e.extend({},t.DEFAULTS,r.data(),\"object\"==typeof n&&n);o||r.data(\"bs.modal\",o=new t(this,a)),\"string\"==typeof n?o[n](i):a.show&&o.show(i)})},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on(\"click.bs.modal.data-api\",'[data-toggle=\"modal\"]',function(t){var n=e(this),i=n.attr(\"href\"),r=e(n.attr(\"data-target\")||i&&i.replace(/.*(?=#[^\\s]+$)/,\"\")),o=r.data(\"bs.modal\")?\"toggle\":e.extend({remote:!/#/.test(i)&&i},r.data(),n.data());n.is(\"a\")&&t.preventDefault(),r.modal(o,this).one(\"hide\",function(){n.is(\":visible\")&&n.trigger(\"focus\")})})}(jQuery),/* ========================================================================\n * Bootstrap: tooltip.js v3.1.1\n * http://getbootstrap.com/javascript/#tooltip\n * Inspired by the original jQuery.tipsy by Jason Frame\n * ========================================================================\n * Copyright 2011-2014 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n+function(e){\"use strict\";var t=function(e,t){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init(\"tooltip\",e,t)};t.DEFAULTS={animation:!0,placement:\"top\",selector:!1,template:'
    ',trigger:\"hover focus\",title:\"\",delay:0,html:!1,container:!1,viewport:{selector:\"body\",padding:0}},t.prototype.init=function(t,n,i){this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&e(this.options.viewport.selector||this.options.viewport);for(var r=this.options.trigger.split(\" \"),o=r.length;o--;){var a=r[o];if(\"click\"==a)this.$element.on(\"click.\"+this.type,this.options.selector,e.proxy(this.toggle,this));else if(\"manual\"!=a){var s=\"hover\"==a?\"mouseenter\":\"focusin\",l=\"hover\"==a?\"mouseleave\":\"focusout\";this.$element.on(s+\".\"+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(l+\".\"+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:\"manual\",selector:\"\"}):this.fixTitle()},t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.getOptions=function(t){return t=e.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&\"number\"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t},t.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,function(e,i){n[e]!=i&&(t[e]=i)}),t},t.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data(\"bs.\"+this.type);return clearTimeout(n.timeout),n.hoverState=\"in\",n.options.delay&&n.options.delay.show?void(n.timeout=setTimeout(function(){\"in\"==n.hoverState&&n.show()},n.options.delay.show)):n.show()},t.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data(\"bs.\"+this.type);return clearTimeout(n.timeout),n.hoverState=\"out\",n.options.delay&&n.options.delay.hide?void(n.timeout=setTimeout(function(){\"out\"==n.hoverState&&n.hide()},n.options.delay.hide)):n.hide()},t.prototype.show=function(){var t=e.Event(\"show.bs.\"+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(t),t.isDefaultPrevented())return;var n=this,i=this.tip();this.setContent(),this.options.animation&&i.addClass(\"fade\");var r=\"function\"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,o=/\\s?auto?\\s?/i,a=o.test(r);a&&(r=r.replace(o,\"\")||\"top\"),i.detach().css({top:0,left:0,display:\"block\"}).addClass(r),this.options.container?i.appendTo(this.options.container):i.insertAfter(this.$element);var s=this.getPosition(),l=i[0].offsetWidth,u=i[0].offsetHeight;if(a){var c=r,d=this.$element.parent(),p=this.getPosition(d);r=\"bottom\"==r&&s.top+s.height+u-p.scroll>p.height?\"top\":\"top\"==r&&s.top-p.scroll-u<0?\"bottom\":\"right\"==r&&s.right+l>p.width?\"left\":\"left\"==r&&s.left-la.top+a.height&&(r.top=a.top+a.height-l)}else{var u=t.left-o,c=t.left+o+n;ua.width&&(r.left=a.left+a.width-c)}return r},t.prototype.getTitle=function(){var e,t=this.$element,n=this.options;return e=t.attr(\"data-original-title\")||(\"function\"==typeof n.title?n.title.call(t[0]):n.title)},t.prototype.tip=function(){return this.$tip=this.$tip||e(this.options.template)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(\".tooltip-arrow\")},t.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},t.prototype.enable=function(){this.enabled=!0},t.prototype.disable=function(){this.enabled=!1},t.prototype.toggleEnabled=function(){this.enabled=!this.enabled},t.prototype.toggle=function(t){var n=t?e(t.currentTarget)[this.type](this.getDelegateOptions()).data(\"bs.\"+this.type):this;n.tip().hasClass(\"in\")?n.leave(n):n.enter(n)},t.prototype.destroy=function(){clearTimeout(this.timeout),this.hide().$element.off(\".\"+this.type).removeData(\"bs.\"+this.type)};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var i=e(this),r=i.data(\"bs.tooltip\"),o=\"object\"==typeof n&&n;(r||\"destroy\"!=n)&&(r||i.data(\"bs.tooltip\",r=new t(this,o)),\"string\"==typeof n&&r[n]())})},e.fn.tooltip.Constructor=t,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}(jQuery),/* ========================================================================\n * Bootstrap: popover.js v3.1.1\n * http://getbootstrap.com/javascript/#popovers\n * ========================================================================\n * Copyright 2011-2014 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n+function(e){\"use strict\";var t=function(e,t){this.init(\"popover\",e,t)};if(!e.fn.tooltip)throw new Error(\"Popover requires tooltip.js\");t.DEFAULTS=e.extend({},e.fn.tooltip.Constructor.DEFAULTS,{placement:\"right\",trigger:\"click\",content:\"\",template:'

    '}),t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype),t.prototype.constructor=t,t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(\".popover-title\")[this.options.html?\"html\":\"text\"](t),e.find(\".popover-content\").empty()[this.options.html?\"string\"==typeof n?\"html\":\"append\":\"text\"](n),e.removeClass(\"fade top bottom left right in\"),e.find(\".popover-title\").html()||e.find(\".popover-title\").hide()},t.prototype.hasContent=function(){return this.getTitle()||this.getContent()},t.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr(\"data-content\")||(\"function\"==typeof t.content?t.content.call(e[0]):t.content)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(\".arrow\")},t.prototype.tip=function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip};var n=e.fn.popover;e.fn.popover=function(n){return this.each(function(){var i=e(this),r=i.data(\"bs.popover\"),o=\"object\"==typeof n&&n;(r||\"destroy\"!=n)&&(r||i.data(\"bs.popover\",r=new t(this,o)),\"string\"==typeof n&&r[n]())})},e.fn.popover.Constructor=t,e.fn.popover.noConflict=function(){return e.fn.popover=n,this}}(jQuery),/*\n * jQuery.appear\n * https://github.com/bas2k/jquery.appear/\n * http://code.google.com/p/jquery-appear/\n *\n * Copyright (c) 2009 Michael Hixson\n * Copyright (c) 2012 Alexander Brovikov\n * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)\n */\nfunction(e){e.fn.appear=function(t,n){var i=e.extend({data:void 0,one:!0,accX:0,accY:0},n);return this.each(function(){var n=e(this);if(n.appeared=!1,!t)return void n.trigger(\"appear\",i.data);var r=e(window),o=function(){if(!n.is(\":visible\"))return void(n.appeared=!1);var e=r.scrollLeft(),t=r.scrollTop(),o=n.offset(),a=o.left,s=o.top,l=i.accX,u=i.accY,c=n.height(),d=r.height(),p=n.width(),f=r.width();s+c+u>=t&&t+d+u>=s&&a+p+l>=e&&e+f+l>=a?n.appeared||n.trigger(\"appear\",i.data):n.appeared=!1},a=function(){if(n.appeared=!0,i.one){r.unbind(\"scroll\",o);var a=e.inArray(o,e.fn.appear.checks);a>=0&&e.fn.appear.checks.splice(a,1)}t.apply(this,arguments)};i.one?n.one(\"appear\",i.data,a):n.bind(\"appear\",i.data,a),r.scroll(o),e.fn.appear.checks.push(o),o()})},e.extend(e.fn.appear,{checks:[],timeout:null,checkAll:function(){var t=e.fn.appear.checks.length;if(t>0)for(;t--;)e.fn.appear.checks[t]()},run:function(){e.fn.appear.timeout&&clearTimeout(e.fn.appear.timeout),e.fn.appear.timeout=setTimeout(e.fn.appear.checkAll,20)}}),e.each([\"append\",\"prepend\",\"after\",\"before\",\"attr\",\"removeAttr\",\"addClass\",\"removeClass\",\"toggleClass\",\"remove\",\"css\",\"show\",\"hide\"],function(t,n){var i=e.fn[n];i&&(e.fn[n]=function(){var t=i.apply(this,arguments);return e.fn.appear.run(),t})})}(jQuery),function(e){e.fn.countTo=function(t){t=e.extend({},e.fn.countTo.defaults,t||{});var n=Math.ceil(t.speed/t.refreshInterval),i=(t.to-t.from)/n;return e(this).each(function(){function r(){s+=i,a++,e(o).html(s.toFixed(t.decimals)),\"function\"==typeof t.onUpdate&&t.onUpdate.call(o,s),a>=n&&(clearInterval(l),s=t.to,\"function\"==typeof t.onComplete&&t.onComplete.call(o,s))}var o=this,a=0,s=t.from,l=setInterval(r,t.refreshInterval)})},e.fn.countTo.defaults={from:0,to:100,speed:1e3,refreshInterval:100,decimals:0,onUpdate:null,onComplete:null}}(jQuery),function(e){e(document).ready(function(){e(\"#contact-form\").find(\"input,textarea\").jqBootstrapValidation({preventSubmit:!0,submitError:function(){},submitSuccess:function(t,n){n.preventDefault();var i=e(\"#contact-form submit\"),r=e(\"#contact-response\"),o=e(\"input#cname\").val(),a=e(\"input#cemail\").val(),s=e(\"textarea#cmessage\").val();e.ajax({type:\"POST\",url:\"assets/php/contact.php\",dataType:\"json\",data:{name:o,email:a,message:s},cache:!1,beforeSend:function(){i.empty(),i.append(' Wait...')},success:function(e){1==e.sendstatus?(r.html(e.message),t.fadeOut(500)):r.html(e.message)}})}})})}(jQuery),/*!\n * imagesLoaded PACKAGED v3.0.2\n * JavaScript is all like \"You images are done yet or what?\"\n */\n/*!\n * EventEmitter v4.1.0 - git.io/ee\n * Oliver Caldwell\n * MIT license\n * @preserve\n */\nfunction(e){\"use strict\";function t(){}function n(e,t){if(r)return t.indexOf(e);for(var n=t.length;n--;)if(t[n]===e)return n;return-1}var i=t.prototype,r=Array.prototype.indexOf?!0:!1;i._getEvents=function(){return this._events||(this._events={})},i.getListeners=function(e){var t,n,i=this._getEvents();if(\"object\"==typeof e){t={};for(n in i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n])}else t=i[e]||(i[e]=[]);return t},i.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},i.addListener=function(e,t){var i,r=this.getListenersAsObject(e);for(i in r)r.hasOwnProperty(i)&&-1===n(t,r[i])&&r[i].push(t);return this},i.on=i.addListener,i.defineEvent=function(e){return this.getListeners(e),this},i.defineEvents=function(e){for(var t=0;ti;i++)t.push(e[i]);else t.push(e);return t}function r(e,n){function r(e,n,a){if(!(this instanceof r))return new r(e,n);\"string\"==typeof e&&(e=document.querySelectorAll(e)),this.elements=i(e),this.options=t({},this.options),\"function\"==typeof n?a=n:t(this.options,n),a&&this.on(\"always\",a),this.getImages(),o&&(this.jqDeferred=new o.Deferred);var s=this;setTimeout(function(){s.check()})}function l(e){this.img=e}r.prototype=new e,r.prototype.options={},r.prototype.getImages=function(){this.images=[];for(var e=0,t=this.elements.length;t>e;e++){var n=this.elements[e];\"IMG\"===n.nodeName&&this.addImage(n);for(var i=n.querySelectorAll(\"img\"),r=0,o=i.length;o>r;r++){var a=i[r];this.addImage(a)}}},r.prototype.addImage=function(e){var t=new l(e);this.images.push(t)},r.prototype.check=function(){function e(e,r){return t.options.debug&&s&&a.log(\"confirm\",e,r),t.progress(e),n++,n===i&&t.complete(),!0}var t=this,n=0,i=this.images.length;if(this.hasAnyBroken=!1,!i)return void this.complete();for(var r=0;i>r;r++){var o=this.images[r];o.on(\"confirm\",e),o.check()}},r.prototype.progress=function(e){this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emit(\"progress\",this,e),this.jqDeferred&&this.jqDeferred.notify(this,e)},r.prototype.complete=function(){var e=this.hasAnyBroken?\"fail\":\"done\";if(this.isComplete=!0,this.emit(e,this),this.emit(\"always\",this),this.jqDeferred){var t=this.hasAnyBroken?\"reject\":\"resolve\";this.jqDeferred[t](this)}},o&&(o.fn.imagesLoaded=function(e,t){var n=new r(this,e,t);return n.jqDeferred.promise(o(this))});var u={};return l.prototype=new e,l.prototype.check=function(){var e=u[this.img.src];if(e)return void this.useCached(e);if(u[this.img.src]=this,this.img.complete&&void 0!==this.img.naturalWidth)return void this.confirm(0!==this.img.naturalWidth,\"naturalWidth\");var t=this.proxyImage=new Image;n.bind(t,\"load\",this),n.bind(t,\"error\",this),t.src=this.img.src},l.prototype.useCached=function(e){if(e.isConfirmed)this.confirm(e.isLoaded,\"cached was confirmed\");else{var t=this;e.on(\"confirm\",function(e){return t.confirm(e.isLoaded,\"cache emitted confirmed\"),!0})}},l.prototype.confirm=function(e,t){this.isConfirmed=!0,this.isLoaded=e,this.emit(\"confirm\",this,t)},l.prototype.handleEvent=function(e){var t=\"on\"+e.type;this[t]&&this[t](e)},l.prototype.onload=function(){this.confirm(!0,\"onload\"),this.unbindProxyEvents()},l.prototype.onerror=function(){this.confirm(!1,\"onerror\"),this.unbindProxyEvents()},l.prototype.unbindProxyEvents=function(){n.unbind(this.proxyImage,\"load\",this),n.unbind(this.proxyImage,\"error\",this)},r}var o=e.jQuery,a=e.console,s=\"undefined\"!=typeof a,l=Object.prototype.toString;\"function\"==typeof define&&define.amd?define([\"eventEmitter\",\"eventie\"],r):e.imagesLoaded=r(e.EventEmitter,e.eventie)}(window),/*!\n * Isotope PACKAGED v2.1.0\n * Filter & sort magical layouts\n * http://isotope.metafizzy.co\n */\nfunction(e){function t(){}function n(e){function n(t){t.prototype.option||(t.prototype.option=function(t){e.isPlainObject(t)&&(this.options=e.extend(!0,this.options,t))})}function r(t,n){e.fn[t]=function(r){if(\"string\"==typeof r){for(var a=i.call(arguments,1),s=0,l=this.length;l>s;s++){var u=this[s],c=e.data(u,t);if(c)if(e.isFunction(c[r])&&\"_\"!==r.charAt(0)){var d=c[r].apply(c,a);if(void 0!==d)return d}else o(\"no such method '\"+r+\"' for \"+t+\" instance\");else o(\"cannot call methods on \"+t+\" prior to initialization; attempted to call '\"+r+\"'\")}return this}return this.each(function(){var i=e.data(this,t);i?(i.option(r),i._init()):(i=new n(this,r),e.data(this,t,i))})}}if(e){var o=\"undefined\"==typeof console?t:function(e){console.error(e)};return e.bridget=function(e,t){n(t),r(e,t)},e.bridget}}var i=Array.prototype.slice;\"function\"==typeof define&&define.amd?define(\"jquery-bridget/jquery.bridget\",[\"jquery\"],n):n(\"object\"==typeof exports?require(\"jquery\"):e.jQuery)}(window),/*!\n * eventie v1.0.5\n * event binding helper\n * eventie.bind( elem, 'click', myFn )\n * eventie.unbind( elem, 'click', myFn )\n * MIT license\n */\nfunction(e){function t(t){var n=e.event;return n.target=n.target||n.srcElement||t,n}var n=document.documentElement,i=function(){};n.addEventListener?i=function(e,t,n){e.addEventListener(t,n,!1)}:n.attachEvent&&(i=function(e,n,i){e[n+i]=i.handleEvent?function(){var n=t(e);i.handleEvent.call(i,n)}:function(){var n=t(e);i.call(e,n)},e.attachEvent(\"on\"+n,e[n+i])});var r=function(){};n.removeEventListener?r=function(e,t,n){e.removeEventListener(t,n,!1)}:n.detachEvent&&(r=function(e,t,n){e.detachEvent(\"on\"+t,e[t+n]);try{delete e[t+n]}catch(i){e[t+n]=void 0}});var o={bind:i,unbind:r};\"function\"==typeof define&&define.amd?define(\"eventie/eventie\",o):\"object\"==typeof exports?module.exports=o:e.eventie=o}(this),/*!\n * docReady v1.0.4\n * Cross browser DOMContentLoaded event emitter\n * MIT license\n */\nfunction(e){function t(e){\"function\"==typeof e&&(t.isReady?e():a.push(e))}function n(e){var n=\"readystatechange\"===e.type&&\"complete\"!==o.readyState;t.isReady||n||i()}function i(){t.isReady=!0;for(var e=0,n=a.length;n>e;e++){var i=a[e];i()}}function r(r){return\"complete\"===o.readyState?i():(r.bind(o,\"DOMContentLoaded\",n),r.bind(o,\"readystatechange\",n),r.bind(e,\"load\",n)),t}var o=e.document,a=[];t.isReady=!1,\"function\"==typeof define&&define.amd?define(\"doc-ready/doc-ready\",[\"eventie/eventie\"],r):\"object\"==typeof exports?module.exports=r(require(\"eventie\")):e.docReady=r(e.eventie)}(window),/*!\n * EventEmitter v4.2.9 - git.io/ee\n * Oliver Caldwell\n * MIT license\n * @preserve\n */\nfunction(){function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype,r=this,o=r.EventEmitter;i.getListeners=function(e){var t,n,i=this._getEvents();if(e instanceof RegExp){t={};for(n in i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n])}else t=i[e]||(i[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;tr;r++)if(t=n[r]+e,\"string\"==typeof i[t])return t}}var n=\"Webkit Moz ms Ms O\".split(\" \"),i=document.documentElement.style;\"function\"==typeof define&&define.amd?define(\"get-style-property/get-style-property\",[],function(){return t}):\"object\"==typeof exports?module.exports=t:e.getStyleProperty=t}(window),/*!\n * getSize v1.2.2\n * measure size of elements\n * MIT license\n */\nfunction(e){function t(e){var t=parseFloat(e),n=-1===e.indexOf(\"%\")&&!isNaN(t);return n&&t}function n(){}function i(){for(var e={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},t=0,n=a.length;n>t;t++){var i=a[t];e[i]=0}return e}function r(n){function r(){if(!p){p=!0;var i=e.getComputedStyle;if(u=function(){var e=i?function(e){return i(e,null)}:function(e){return e.currentStyle};return function(t){var n=e(t);return n||o(\"Style returned \"+n+\". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1\"),n}}(),c=n(\"boxSizing\")){var r=document.createElement(\"div\");r.style.width=\"200px\",r.style.padding=\"1px 2px 3px 4px\",r.style.borderStyle=\"solid\",r.style.borderWidth=\"1px 2px 3px 4px\",r.style[c]=\"border-box\";var a=document.body||document.documentElement;a.appendChild(r);var s=u(r);d=200===t(s.width),a.removeChild(r)}}}function s(e){if(r(),\"string\"==typeof e&&(e=document.querySelector(e)),e&&\"object\"==typeof e&&e.nodeType){var n=u(e);if(\"none\"===n.display)return i();var o={};o.width=e.offsetWidth,o.height=e.offsetHeight;for(var s=o.isBorderBox=!(!c||!n[c]||\"border-box\"!==n[c]),p=0,f=a.length;f>p;p++){var h=a[p],m=n[h];m=l(e,m);var v=parseFloat(m);o[h]=isNaN(v)?0:v}var g=o.paddingLeft+o.paddingRight,y=o.paddingTop+o.paddingBottom,b=o.marginLeft+o.marginRight,w=o.marginTop+o.marginBottom,T=o.borderLeftWidth+o.borderRightWidth,x=o.borderTopWidth+o.borderBottomWidth,C=s&&d,P=t(n.width);P!==!1&&(o.width=P+(C?0:g+T));var S=t(n.height);return S!==!1&&(o.height=S+(C?0:y+x)),o.innerWidth=o.width-(g+T),o.innerHeight=o.height-(y+x),o.outerWidth=o.width+b,o.outerHeight=o.height+w,o}}function l(t,n){if(e.getComputedStyle||-1===n.indexOf(\"%\"))return n;var i=t.style,r=i.left,o=t.runtimeStyle,a=o&&o.left;return a&&(o.left=t.currentStyle.left),i.left=n,n=i.pixelLeft,i.left=r,a&&(o.left=a),n}var u,c,d,p=!1;return s}var o=\"undefined\"==typeof console?n:function(e){console.error(e)},a=[\"paddingLeft\",\"paddingRight\",\"paddingTop\",\"paddingBottom\",\"marginLeft\",\"marginRight\",\"marginTop\",\"marginBottom\",\"borderLeftWidth\",\"borderRightWidth\",\"borderTopWidth\",\"borderBottomWidth\"];\"function\"==typeof define&&define.amd?define(\"get-size/get-size\",[\"get-style-property/get-style-property\"],r):\"object\"==typeof exports?module.exports=r(require(\"desandro-get-style-property\")):e.getSize=r(e.getStyleProperty)}(window),function(e){function t(e,t){return e[a](t)}function n(e){if(!e.parentNode){var t=document.createDocumentFragment();t.appendChild(e)}}function i(e,t){n(e);for(var i=e.parentNode.querySelectorAll(t),r=0,o=i.length;o>r;r++)if(i[r]===e)return!0;return!1}function r(e,i){return n(e),t(e,i)}var o,a=function(){if(e.matchesSelector)return\"matchesSelector\";for(var t=[\"webkit\",\"moz\",\"ms\",\"o\"],n=0,i=t.length;i>n;n++){var r=t[n],o=r+\"MatchesSelector\";if(e[o])return o}}();if(a){var s=document.createElement(\"div\"),l=t(s,\"div\");o=l?t:r}else o=i;\"function\"==typeof define&&define.amd?define(\"matches-selector/matches-selector\",[],function(){return o}):\"object\"==typeof exports?module.exports=o:window.matchesSelector=o}(Element.prototype),function(e){function t(e,t){for(var n in t)e[n]=t[n];return e}function n(e){for(var t in e)return!1;return t=null,!0}function i(e){return e.replace(/([A-Z])/g,function(e){return\"-\"+e.toLowerCase()})}function r(e,r,o){function s(e,t){e&&(this.element=e,this.layout=t,this.position={x:0,y:0},this._create())}var l=o(\"transition\"),u=o(\"transform\"),c=l&&u,d=!!o(\"perspective\"),p={WebkitTransition:\"webkitTransitionEnd\",MozTransition:\"transitionend\",OTransition:\"otransitionend\",transition:\"transitionend\"}[l],f=[\"transform\",\"transition\",\"transitionDuration\",\"transitionProperty\"],h=function(){for(var e={},t=0,n=f.length;n>t;t++){var i=f[t],r=o(i);r&&r!==i&&(e[i]=r)}return e}();t(s.prototype,e.prototype),s.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:\"absolute\"})},s.prototype.handleEvent=function(e){var t=\"on\"+e.type;this[t]&&this[t](e)},s.prototype.getSize=function(){this.size=r(this.element)},s.prototype.css=function(e){var t=this.element.style;for(var n in e){var i=h[n]||n;t[i]=e[n]}},s.prototype.getPosition=function(){var e=a(this.element),t=this.layout.options,n=t.isOriginLeft,i=t.isOriginTop,r=parseInt(e[n?\"left\":\"right\"],10),o=parseInt(e[i?\"top\":\"bottom\"],10);r=isNaN(r)?0:r,o=isNaN(o)?0:o;var s=this.layout.size;r-=n?s.paddingLeft:s.paddingRight,o-=i?s.paddingTop:s.paddingBottom,this.position.x=r,this.position.y=o},s.prototype.layoutPosition=function(){var e=this.layout.size,t=this.layout.options,n={};t.isOriginLeft?(n.left=this.position.x+e.paddingLeft+\"px\",n.right=\"\"):(n.right=this.position.x+e.paddingRight+\"px\",n.left=\"\"),t.isOriginTop?(n.top=this.position.y+e.paddingTop+\"px\",n.bottom=\"\"):(n.bottom=this.position.y+e.paddingBottom+\"px\",n.top=\"\"),this.css(n),this.emitEvent(\"layout\",[this])};var m=d?function(e,t){return\"translate3d(\"+e+\"px, \"+t+\"px, 0)\"}:function(e,t){return\"translate(\"+e+\"px, \"+t+\"px)\"};s.prototype._transitionTo=function(e,t){this.getPosition();var n=this.position.x,i=this.position.y,r=parseInt(e,10),o=parseInt(t,10),a=r===this.position.x&&o===this.position.y;if(this.setPosition(e,t),a&&!this.isTransitioning)return void this.layoutPosition();var s=e-n,l=t-i,u={},c=this.layout.options;s=c.isOriginLeft?s:-s,l=c.isOriginTop?l:-l,u.transform=m(s,l),this.transition({to:u,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},s.prototype.goTo=function(e,t){this.setPosition(e,t),this.layoutPosition()},s.prototype.moveTo=c?s.prototype._transitionTo:s.prototype.goTo,s.prototype.setPosition=function(e,t){this.position.x=parseInt(e,10),this.position.y=parseInt(t,10)},s.prototype._nonTransition=function(e){this.css(e.to),e.isCleaning&&this._removeStyles(e.to);for(var t in e.onTransitionEnd)e.onTransitionEnd[t].call(this)},s.prototype._transition=function(e){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(e);var t=this._transn;for(var n in e.onTransitionEnd)t.onEnd[n]=e.onTransitionEnd[n];for(n in e.to)t.ingProperties[n]=!0,e.isCleaning&&(t.clean[n]=!0);if(e.from){this.css(e.from);var i=this.element.offsetHeight;i=null}this.enableTransition(e.to),this.css(e.to),this.isTransitioning=!0};var v=u&&i(u)+\",opacity\";s.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:v,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(p,this,!1))},s.prototype.transition=s.prototype[l?\"_transition\":\"_nonTransition\"],s.prototype.onwebkitTransitionEnd=function(e){this.ontransitionend(e)},s.prototype.onotransitionend=function(e){this.ontransitionend(e)};var g={\"-webkit-transform\":\"transform\",\"-moz-transform\":\"transform\",\"-o-transform\":\"transform\"};s.prototype.ontransitionend=function(e){if(e.target===this.element){var t=this._transn,i=g[e.propertyName]||e.propertyName;if(delete t.ingProperties[i],n(t.ingProperties)&&this.disableTransition(),i in t.clean&&(this.element.style[e.propertyName]=\"\",delete t.clean[i]),i in t.onEnd){var r=t.onEnd[i];r.call(this),delete t.onEnd[i]}this.emitEvent(\"transitionEnd\",[this])}},s.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(p,this,!1),this.isTransitioning=!1},s.prototype._removeStyles=function(e){var t={};for(var n in e)t[n]=\"\";this.css(t)};var y={transitionProperty:\"\",transitionDuration:\"\"};return s.prototype.removeTransitionStyles=function(){this.css(y)},s.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.emitEvent(\"remove\",[this])},s.prototype.remove=function(){if(!l||!parseFloat(this.layout.options.transitionDuration))return void this.removeElem();var e=this;this.on(\"transitionEnd\",function(){return e.removeElem(),!0}),this.hide()},s.prototype.reveal=function(){delete this.isHidden,this.css({display:\"\"});var e=this.layout.options;this.transition({from:e.hiddenStyle,to:e.visibleStyle,isCleaning:!0})},s.prototype.hide=function(){this.isHidden=!0,this.css({display:\"\"});var e=this.layout.options;this.transition({from:e.visibleStyle,to:e.hiddenStyle,isCleaning:!0,onTransitionEnd:{opacity:function(){this.isHidden&&this.css({display:\"none\"})}}})},s.prototype.destroy=function(){this.css({position:\"\",left:\"\",right:\"\",top:\"\",bottom:\"\",transition:\"\",transform:\"\"})},s}var o=e.getComputedStyle,a=o?function(e){return o(e,null)}:function(e){return e.currentStyle};\"function\"==typeof define&&define.amd?define(\"outlayer/item\",[\"eventEmitter/EventEmitter\",\"get-size/get-size\",\"get-style-property/get-style-property\"],r):\"object\"==typeof exports?module.exports=r(require(\"wolfy87-eventemitter\"),require(\"get-size\"),require(\"desandro-get-style-property\")):(e.Outlayer={},e.Outlayer.Item=r(e.EventEmitter,e.getSize,e.getStyleProperty))}(window),/*!\n * Outlayer v1.3.0\n * the brains and guts of a layout library\n * MIT license\n */\nfunction(e){function t(e,t){for(var n in t)e[n]=t[n];return e}function n(e){return\"[object Array]\"===d.call(e)}function i(e){var t=[];if(n(e))t=e;else if(e&&\"number\"==typeof e.length)for(var i=0,r=e.length;r>i;i++)t.push(e[i]);else t.push(e);return t}function r(e,t){var n=f(t,e);-1!==n&&t.splice(n,1)}function o(e){return e.replace(/(.)([A-Z])/g,function(e,t,n){return t+\"-\"+n}).toLowerCase()}function a(n,a,d,f,h,m){function v(e,n){if(\"string\"==typeof e&&(e=s.querySelector(e)),!e||!p(e))return void(l&&l.error(\"Bad \"+this.constructor.namespace+\" element: \"+e));this.element=e,this.options=t({},this.constructor.defaults),this.option(n);var i=++g;this.element.outlayerGUID=i,y[i]=this,this._create(),this.options.isInitLayout&&this.layout()}var g=0,y={};return v.namespace=\"outlayer\",v.Item=m,v.defaults={containerStyle:{position:\"relative\"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:\"0.4s\",hiddenStyle:{opacity:0,transform:\"scale(0.001)\"},visibleStyle:{opacity:1,transform:\"scale(1)\"}},t(v.prototype,d.prototype),v.prototype.option=function(e){t(this.options,e)},v.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),t(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},v.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},v.prototype._itemize=function(e){for(var t=this._filterFindItemElements(e),n=this.constructor.Item,i=[],r=0,o=t.length;o>r;r++){var a=t[r],s=new n(a,this);i.push(s)}return i},v.prototype._filterFindItemElements=function(e){e=i(e);for(var t=this.options.itemSelector,n=[],r=0,o=e.length;o>r;r++){var a=e[r];if(p(a))if(t){h(a,t)&&n.push(a);for(var s=a.querySelectorAll(t),l=0,u=s.length;u>l;l++)n.push(s[l])}else n.push(a)}return n},v.prototype.getItemElements=function(){for(var e=[],t=0,n=this.items.length;n>t;t++)e.push(this.items[t].element);return e},v.prototype.layout=function(){this._resetLayout(),this._manageStamps();var e=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,e),this._isLayoutInited=!0},v.prototype._init=v.prototype.layout,v.prototype._resetLayout=function(){this.getSize()},v.prototype.getSize=function(){this.size=f(this.element)},v.prototype._getMeasurement=function(e,t){var n,i=this.options[e];i?(\"string\"==typeof i?n=this.element.querySelector(i):p(i)&&(n=i),this[e]=n?f(n)[t]:i):this[e]=0},v.prototype.layoutItems=function(e,t){e=this._getItemsForLayout(e),this._layoutItems(e,t),this._postLayout()},v.prototype._getItemsForLayout=function(e){for(var t=[],n=0,i=e.length;i>n;n++){var r=e[n];r.isIgnored||t.push(r)}return t},v.prototype._layoutItems=function(e,t){function n(){i.emitEvent(\"layoutComplete\",[i,e])}var i=this;if(!e||!e.length)return void n();this._itemsOn(e,\"layout\",n);for(var r=[],o=0,a=e.length;a>o;o++){var s=e[o],l=this._getItemLayoutPosition(s);l.item=s,l.isInstant=t||s.isLayoutInstant,r.push(l)}this._processLayoutQueue(r)},v.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},v.prototype._processLayoutQueue=function(e){for(var t=0,n=e.length;n>t;t++){var i=e[t];this._positionItem(i.item,i.x,i.y,i.isInstant)}},v.prototype._positionItem=function(e,t,n,i){i?e.goTo(t,n):e.moveTo(t,n)},v.prototype._postLayout=function(){this.resizeContainer()},v.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var e=this._getContainerSize();e&&(this._setContainerMeasure(e.width,!0),this._setContainerMeasure(e.height,!1))}},v.prototype._getContainerSize=c,v.prototype._setContainerMeasure=function(e,t){if(void 0!==e){var n=this.size;n.isBorderBox&&(e+=t?n.paddingLeft+n.paddingRight+n.borderLeftWidth+n.borderRightWidth:n.paddingBottom+n.paddingTop+n.borderTopWidth+n.borderBottomWidth),e=Math.max(e,0),this.element.style[t?\"width\":\"height\"]=e+\"px\"}},v.prototype._itemsOn=function(e,t,n){function i(){return r++,r===o&&n.call(a),!0}for(var r=0,o=e.length,a=this,s=0,l=e.length;l>s;s++){var u=e[s];u.on(t,i)}},v.prototype.ignore=function(e){var t=this.getItem(e);t&&(t.isIgnored=!0)},v.prototype.unignore=function(e){var t=this.getItem(e);t&&delete t.isIgnored},v.prototype.stamp=function(e){if(e=this._find(e)){this.stamps=this.stamps.concat(e);for(var t=0,n=e.length;n>t;t++){var i=e[t];this.ignore(i)}}},v.prototype.unstamp=function(e){if(e=this._find(e))for(var t=0,n=e.length;n>t;t++){var i=e[t];r(i,this.stamps),this.unignore(i)}},v.prototype._find=function(e){return e?(\"string\"==typeof e&&(e=this.element.querySelectorAll(e)),e=i(e)):void 0},v.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var e=0,t=this.stamps.length;t>e;e++){var n=this.stamps[e];this._manageStamp(n)}}},v.prototype._getBoundingRect=function(){var e=this.element.getBoundingClientRect(),t=this.size;this._boundingRect={left:e.left+t.paddingLeft+t.borderLeftWidth,top:e.top+t.paddingTop+t.borderTopWidth,right:e.right-(t.paddingRight+t.borderRightWidth),bottom:e.bottom-(t.paddingBottom+t.borderBottomWidth)}},v.prototype._manageStamp=c,v.prototype._getElementOffset=function(e){var t=e.getBoundingClientRect(),n=this._boundingRect,i=f(e),r={left:t.left-n.left-i.marginLeft,top:t.top-n.top-i.marginTop,right:n.right-t.right-i.marginRight,bottom:n.bottom-t.bottom-i.marginBottom};return r},v.prototype.handleEvent=function(e){var t=\"on\"+e.type;this[t]&&this[t](e)},v.prototype.bindResize=function(){this.isResizeBound||(n.bind(e,\"resize\",this),this.isResizeBound=!0)},v.prototype.unbindResize=function(){this.isResizeBound&&n.unbind(e,\"resize\",this),this.isResizeBound=!1},v.prototype.onresize=function(){function e(){t.resize(),delete t.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var t=this;this.resizeTimeout=setTimeout(e,100)},v.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},v.prototype.needsResizeLayout=function(){var e=f(this.element),t=this.size&&e;return t&&e.innerWidth!==this.size.innerWidth},v.prototype.addItems=function(e){var t=this._itemize(e);return t.length&&(this.items=this.items.concat(t)),t},v.prototype.appended=function(e){var t=this.addItems(e);t.length&&(this.layoutItems(t,!0),this.reveal(t))},v.prototype.prepended=function(e){var t=this._itemize(e);if(t.length){var n=this.items.slice(0);this.items=t.concat(n),this._resetLayout(),this._manageStamps(),this.layoutItems(t,!0),this.reveal(t),this.layoutItems(n)}},v.prototype.reveal=function(e){var t=e&&e.length;if(t)for(var n=0;t>n;n++){var i=e[n];i.reveal()}},v.prototype.hide=function(e){var t=e&&e.length;if(t)for(var n=0;t>n;n++){var i=e[n];i.hide()}},v.prototype.getItem=function(e){for(var t=0,n=this.items.length;n>t;t++){var i=this.items[t];if(i.element===e)return i}},v.prototype.getItems=function(e){if(e&&e.length){for(var t=[],n=0,i=e.length;i>n;n++){var r=e[n],o=this.getItem(r);o&&t.push(o)}return t}},v.prototype.remove=function(e){e=i(e);var t=this.getItems(e);if(t&&t.length){this._itemsOn(t,\"remove\",function(){this.emitEvent(\"removeComplete\",[this,t])});for(var n=0,o=t.length;o>n;n++){var a=t[n];a.remove(),r(a,this.items)}}},v.prototype.destroy=function(){var e=this.element.style;e.height=\"\",e.position=\"\",e.width=\"\";for(var t=0,n=this.items.length;n>t;t++){var i=this.items[t];i.destroy()}this.unbindResize();var r=this.element.outlayerGUID;delete y[r],delete this.element.outlayerGUID,u&&u.removeData(this.element,this.constructor.namespace)},v.data=function(e){var t=e&&e.outlayerGUID;return t&&y[t]},v.create=function(e,n){function i(){v.apply(this,arguments)}return Object.create?i.prototype=Object.create(v.prototype):t(i.prototype,v.prototype),i.prototype.constructor=i,i.defaults=t({},v.defaults),t(i.defaults,n),i.prototype.settings={},i.namespace=e,i.data=v.data,i.Item=function(){m.apply(this,arguments)},i.Item.prototype=new m,a(function(){for(var t=o(e),n=s.querySelectorAll(\".js-\"+t),r=\"data-\"+t+\"-options\",a=0,c=n.length;c>a;a++){var d,p=n[a],f=p.getAttribute(r);try{d=f&&JSON.parse(f)}catch(h){l&&l.error(\"Error parsing \"+r+\" on \"+p.nodeName.toLowerCase()+(p.id?\"#\"+p.id:\"\")+\": \"+h);continue}var m=new i(p,d);u&&u.data(p,e,m)}}),u&&u.bridget&&u.bridget(e,i),i},v.Item=m,v}var s=e.document,l=e.console,u=e.jQuery,c=function(){},d=Object.prototype.toString,p=\"function\"==typeof HTMLElement||\"object\"==typeof HTMLElement?function(e){return e instanceof HTMLElement}:function(e){return e&&\"object\"==typeof e&&1===e.nodeType&&\"string\"==typeof e.nodeName},f=Array.prototype.indexOf?function(e,t){return e.indexOf(t)}:function(e,t){for(var n=0,i=e.length;i>n;n++)if(e[n]===t)return n;return-1};\"function\"==typeof define&&define.amd?define(\"outlayer/outlayer\",[\"eventie/eventie\",\"doc-ready/doc-ready\",\"eventEmitter/EventEmitter\",\"get-size/get-size\",\"matches-selector/matches-selector\",\"./item\"],a):\"object\"==typeof exports?module.exports=a(require(\"eventie\"),require(\"doc-ready\"),require(\"wolfy87-eventemitter\"),require(\"get-size\"),require(\"desandro-matches-selector\"),require(\"./item\")):e.Outlayer=a(e.eventie,e.docReady,e.EventEmitter,e.getSize,e.matchesSelector,e.Outlayer.Item)}(window),function(e){function t(e){function t(){e.Item.apply(this,arguments)}t.prototype=new e.Item,t.prototype._create=function(){this.id=this.layout.itemGUID++,e.Item.prototype._create.call(this),this.sortData={}},t.prototype.updateSortData=function(){if(!this.isIgnored){this.sortData.id=this.id,this.sortData[\"original-order\"]=this.id,this.sortData.random=Math.random();var e=this.layout.options.getSortData,t=this.layout._sorters;for(var n in e){var i=t[n];this.sortData[n]=i(this.element,this)}}};var n=t.prototype.destroy;return t.prototype.destroy=function(){n.apply(this,arguments),this.css({display:\"\"})},t}\"function\"==typeof define&&define.amd?define(\"isotope/js/item\",[\"outlayer/outlayer\"],t):\"object\"==typeof exports?module.exports=t(require(\"outlayer\")):(e.Isotope=e.Isotope||{},e.Isotope.Item=t(e.Outlayer))}(window),function(e){function t(e,t){function n(e){this.isotope=e,e&&(this.options=e.options[this.namespace],this.element=e.element,this.items=e.filteredItems,this.size=e.size)}return function(){function e(e){return function(){return t.prototype[e].apply(this.isotope,arguments)}}for(var i=[\"_resetLayout\",\"_getItemLayoutPosition\",\"_manageStamp\",\"_getContainerSize\",\"_getElementOffset\",\"needsResizeLayout\"],r=0,o=i.length;o>r;r++){var a=i[r];n.prototype[a]=e(a)}}(),n.prototype.needsVerticalResizeLayout=function(){var t=e(this.isotope.element),n=this.isotope.size&&t;return n&&t.innerHeight!==this.isotope.size.innerHeight},n.prototype._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},n.prototype.getColumnWidth=function(){this.getSegmentSize(\"column\",\"Width\")},n.prototype.getRowHeight=function(){this.getSegmentSize(\"row\",\"Height\")},n.prototype.getSegmentSize=function(e,t){var n=e+t,i=\"outer\"+t;if(this._getMeasurement(n,i),!this[n]){var r=this.getFirstItemSize();this[n]=r&&r[i]||this.isotope.size[\"inner\"+t]}},n.prototype.getFirstItemSize=function(){var t=this.isotope.filteredItems[0];return t&&t.element&&e(t.element)},n.prototype.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},n.prototype.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},n.modes={},n.create=function(e,t){function i(){n.apply(this,arguments)}return i.prototype=new n,t&&(i.options=t),i.prototype.namespace=e,n.modes[e]=i,i},n}\"function\"==typeof define&&define.amd?define(\"isotope/js/layout-mode\",[\"get-size/get-size\",\"outlayer/outlayer\"],t):\"object\"==typeof exports?module.exports=t(require(\"get-size\"),require(\"outlayer\")):(e.Isotope=e.Isotope||{},e.Isotope.LayoutMode=t(e.getSize,e.Outlayer))}(window),/*!\n * Masonry v3.2.1\n * Cascading grid layout library\n * http://masonry.desandro.com\n * MIT License\n * by David DeSandro\n */\nfunction(e){function t(e,t){var i=e.create(\"masonry\");return i.prototype._resetLayout=function(){this.getSize(),this._getMeasurement(\"columnWidth\",\"outerWidth\"),this._getMeasurement(\"gutter\",\"outerWidth\"),this.measureColumns();var e=this.cols;for(this.colYs=[];e--;)this.colYs.push(0);this.maxY=0},i.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var e=this.items[0],n=e&&e.element;this.columnWidth=n&&t(n).outerWidth||this.containerWidth}this.columnWidth+=this.gutter,this.cols=Math.floor((this.containerWidth+this.gutter)/this.columnWidth),this.cols=Math.max(this.cols,1)},i.prototype.getContainerWidth=function(){var e=this.options.isFitWidth?this.element.parentNode:this.element,n=t(e);this.containerWidth=n&&n.innerWidth},i.prototype._getItemLayoutPosition=function(e){e.getSize();var t=e.size.outerWidth%this.columnWidth,i=t&&1>t?\"round\":\"ceil\",r=Math[i](e.size.outerWidth/this.columnWidth);r=Math.min(r,this.cols);for(var o=this._getColGroup(r),a=Math.min.apply(Math,o),s=n(o,a),l={x:this.columnWidth*s,y:a},u=a+e.size.outerHeight,c=this.cols+1-o.length,d=0;c>d;d++)this.colYs[s+d]=u;return l},i.prototype._getColGroup=function(e){if(2>e)return this.colYs;for(var t=[],n=this.cols+1-e,i=0;n>i;i++){var r=this.colYs.slice(i,i+e);t[i]=Math.max.apply(Math,r)}return t},i.prototype._manageStamp=function(e){var n=t(e),i=this._getElementOffset(e),r=this.options.isOriginLeft?i.left:i.right,o=r+n.outerWidth,a=Math.floor(r/this.columnWidth);a=Math.max(0,a);var s=Math.floor(o/this.columnWidth);s-=o%this.columnWidth?0:1,s=Math.min(this.cols-1,s);for(var l=(this.options.isOriginTop?i.top:i.bottom)+n.outerHeight,u=a;s>=u;u++)this.colYs[u]=Math.max(l,this.colYs[u])},i.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var e={height:this.maxY};return this.options.isFitWidth&&(e.width=this._getContainerFitWidth()),e},i.prototype._getContainerFitWidth=function(){for(var e=0,t=this.cols;--t&&0===this.colYs[t];)e++;return(this.cols-e)*this.columnWidth-this.gutter},i.prototype.needsResizeLayout=function(){var e=this.containerWidth;return this.getContainerWidth(),e!==this.containerWidth},i}var n=Array.prototype.indexOf?function(e,t){return e.indexOf(t)}:function(e,t){for(var n=0,i=e.length;i>n;n++){var r=e[n];if(r===t)return n}return-1};\"function\"==typeof define&&define.amd?define(\"masonry/masonry\",[\"outlayer/outlayer\",\"get-size/get-size\"],t):\"object\"==typeof exports?module.exports=t(require(\"outlayer\"),require(\"get-size\")):e.Masonry=t(e.Outlayer,e.getSize)}(window),/*!\n * Masonry layout mode\n * sub-classes Masonry\n * http://masonry.desandro.com\n */\nfunction(e){function t(e,t){for(var n in t)e[n]=t[n];return e}function n(e,n){var i=e.create(\"masonry\"),r=i.prototype._getElementOffset,o=i.prototype.layout,a=i.prototype._getMeasurement;t(i.prototype,n.prototype),i.prototype._getElementOffset=r,i.prototype.layout=o,i.prototype._getMeasurement=a;var s=i.prototype.measureColumns;i.prototype.measureColumns=function(){this.items=this.isotope.filteredItems,s.call(this)};var l=i.prototype._manageStamp;return i.prototype._manageStamp=function(){this.options.isOriginLeft=this.isotope.options.isOriginLeft,this.options.isOriginTop=this.isotope.options.isOriginTop,l.apply(this,arguments)},i}\"function\"==typeof define&&define.amd?define(\"isotope/js/layout-modes/masonry\",[\"../layout-mode\",\"masonry/masonry\"],n):\"object\"==typeof exports?module.exports=n(require(\"../layout-mode\"),require(\"masonry-layout\")):n(e.Isotope.LayoutMode,e.Masonry)}(window),function(e){function t(e){var t=e.create(\"fitRows\");return t.prototype._resetLayout=function(){this.x=0,this.y=0,this.maxY=0,this._getMeasurement(\"gutter\",\"outerWidth\")},t.prototype._getItemLayoutPosition=function(e){e.getSize();var t=e.size.outerWidth+this.gutter,n=this.isotope.size.innerWidth+this.gutter;0!==this.x&&t+this.x>n&&(this.x=0,this.y=this.maxY);var i={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+e.size.outerHeight),this.x+=t,i},t.prototype._getContainerSize=function(){return{height:this.maxY}},t}\"function\"==typeof define&&define.amd?define(\"isotope/js/layout-modes/fit-rows\",[\"../layout-mode\"],t):\"object\"==typeof exports?module.exports=t(require(\"../layout-mode\")):t(e.Isotope.LayoutMode)}(window),function(e){function t(e){var t=e.create(\"vertical\",{horizontalAlignment:0});return t.prototype._resetLayout=function(){this.y=0},t.prototype._getItemLayoutPosition=function(e){e.getSize();var t=(this.isotope.size.innerWidth-e.size.outerWidth)*this.options.horizontalAlignment,n=this.y;return this.y+=e.size.outerHeight,{x:t,y:n}},t.prototype._getContainerSize=function(){return{height:this.y}},t}\"function\"==typeof define&&define.amd?define(\"isotope/js/layout-modes/vertical\",[\"../layout-mode\"],t):\"object\"==typeof exports?module.exports=t(require(\"../layout-mode\")):t(e.Isotope.LayoutMode)}(window),/*!\n * Isotope v2.1.0\n * Filter & sort magical layouts\n * http://isotope.metafizzy.co\n */\nfunction(e){function t(e,t){for(var n in t)e[n]=t[n];return e}function n(e){return\"[object Array]\"===c.call(e)}function i(e){var t=[];if(n(e))t=e;else if(e&&\"number\"==typeof e.length)for(var i=0,r=e.length;r>i;i++)t.push(e[i]);else t.push(e);return t}function r(e,t){var n=d(t,e);-1!==n&&t.splice(n,1)}function o(e,n,o,l,c){function d(e,t){return function(n,i){for(var r=0,o=e.length;o>r;r++){var a=e[r],s=n.sortData[a],l=i.sortData[a];if(s>l||l>s){var u=void 0!==t[a]?t[a]:t,c=u?1:-1;return(s>l?1:-1)*c}}return 0}}var p=e.create(\"isotope\",{layoutMode:\"masonry\",isJQueryFiltering:!0,sortAscending:!0});p.Item=l,p.LayoutMode=c,p.prototype._create=function(){this.itemGUID=0,this._sorters={},this._getSorters(),e.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=[\"original-order\"];for(var t in c.modes)this._initLayoutMode(t)},p.prototype.reloadItems=function(){this.itemGUID=0,e.prototype.reloadItems.call(this)},p.prototype._itemize=function(){for(var t=e.prototype._itemize.apply(this,arguments),n=0,i=t.length;i>n;n++){var r=t[n];r.id=this.itemGUID++}return this._updateItemsSortData(t),t},p.prototype._initLayoutMode=function(e){var n=c.modes[e],i=this.options[e]||{};this.options[e]=n.options?t(n.options,i):i,this.modes[e]=new n(this)},p.prototype.layout=function(){return!this._isLayoutInited&&this.options.isInitLayout?void this.arrange():void this._layout()},p.prototype._layout=function(){var e=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,e),this._isLayoutInited=!0},p.prototype.arrange=function(e){this.option(e),this._getIsInstant(),this.filteredItems=this._filter(this.items),this._sort(),this._layout()},p.prototype._init=p.prototype.arrange,p.prototype._getIsInstant=function(){var e=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;return this._isInstant=e,e},p.prototype._filter=function(e){function t(){d.reveal(r),d.hide(o)}var n=this.options.filter;n=n||\"*\";for(var i=[],r=[],o=[],a=this._getFilterTest(n),s=0,l=e.length;l>s;s++){var u=e[s];if(!u.isIgnored){var c=a(u);c&&i.push(u),c&&u.isHidden?r.push(u):c||u.isHidden||o.push(u)}}var d=this;return this._isInstant?this._noTransition(t):t(),i},p.prototype._getFilterTest=function(e){return a&&this.options.isJQueryFiltering?function(t){return a(t.element).is(e)}:\"function\"==typeof e?function(t){return e(t.element)}:function(t){return o(t.element,e)}},p.prototype.updateSortData=function(e){var t;e?(e=i(e),t=this.getItems(e)):t=this.items,this._getSorters(),this._updateItemsSortData(t)},p.prototype._getSorters=function(){var e=this.options.getSortData;for(var t in e){var n=e[t];this._sorters[t]=f(n)}},p.prototype._updateItemsSortData=function(e){for(var t=e&&e.length,n=0;t&&t>n;n++){var i=e[n];i.updateSortData()}};var f=function(){function e(e){if(\"string\"!=typeof e)return e;var n=s(e).split(\" \"),i=n[0],r=i.match(/^\\[(.+)\\]$/),o=r&&r[1],a=t(o,i),l=p.sortDataParsers[n[1]];return e=l?function(e){return e&&l(a(e))}:function(e){return e&&a(e)}}function t(e,t){var n;return n=e?function(t){return t.getAttribute(e)}:function(e){var n=e.querySelector(t);return n&&u(n)}}return e}();p.sortDataParsers={parseInt:function(e){return parseInt(e,10)},parseFloat:function(e){return parseFloat(e)}},p.prototype._sort=function(){var e=this.options.sortBy;if(e){var t=[].concat.apply(e,this.sortHistory),n=d(t,this.options.sortAscending);this.filteredItems.sort(n),e!==this.sortHistory[0]&&this.sortHistory.unshift(e)}},p.prototype._mode=function(){var e=this.options.layoutMode,t=this.modes[e];if(!t)throw new Error(\"No layout mode: \"+e);return t.options=this.options[e],t},p.prototype._resetLayout=function(){e.prototype._resetLayout.call(this),this._mode()._resetLayout()},p.prototype._getItemLayoutPosition=function(e){return this._mode()._getItemLayoutPosition(e)},p.prototype._manageStamp=function(e){this._mode()._manageStamp(e)},p.prototype._getContainerSize=function(){return this._mode()._getContainerSize()},p.prototype.needsResizeLayout=function(){return this._mode().needsResizeLayout()},p.prototype.appended=function(e){var t=this.addItems(e);if(t.length){var n=this._filterRevealAdded(t);this.filteredItems=this.filteredItems.concat(n)}},p.prototype.prepended=function(e){var t=this._itemize(e);if(t.length){var n=this.items.slice(0);this.items=t.concat(n),this._resetLayout(),this._manageStamps();var i=this._filterRevealAdded(t);this.layoutItems(n),this.filteredItems=i.concat(this.filteredItems)}},p.prototype._filterRevealAdded=function(e){var t=this._noTransition(function(){return this._filter(e)});return this.layoutItems(t,!0),this.reveal(t),e},p.prototype.insert=function(e){var t=this.addItems(e);if(t.length){var n,i,r=t.length;for(n=0;r>n;n++)i=t[n],this.element.appendChild(i.element);var o=this._filter(t);for(this._noTransition(function(){this.hide(o)}),n=0;r>n;n++)t[n].isLayoutInstant=!0;for(this.arrange(),n=0;r>n;n++)delete t[n].isLayoutInstant;this.reveal(o)}};var h=p.prototype.remove;return p.prototype.remove=function(e){e=i(e);var t=this.getItems(e);if(h.call(this,e),t&&t.length)for(var n=0,o=t.length;o>n;n++){var a=t[n];r(a,this.filteredItems)}},p.prototype.shuffle=function(){for(var e=0,t=this.items.length;t>e;e++){var n=this.items[e];n.sortData.random=Math.random()}this.options.sortBy=\"random\",this._sort(),this._layout()},p.prototype._noTransition=function(e){var t=this.options.transitionDuration;this.options.transitionDuration=0;var n=e.call(this);return this.options.transitionDuration=t,n},p.prototype.getFilteredItemElements=function(){for(var e=[],t=0,n=this.filteredItems.length;n>t;t++)e.push(this.filteredItems[t].element);return e},p}var a=e.jQuery,s=String.prototype.trim?function(e){return e.trim()}:function(e){return e.replace(/^\\s+|\\s+$/g,\"\")},l=document.documentElement,u=l.textContent?function(e){return e.textContent}:function(e){return e.innerText},c=Object.prototype.toString,d=Array.prototype.indexOf?function(e,t){return e.indexOf(t)}:function(e,t){for(var n=0,i=e.length;i>n;n++)if(e[n]===t)return n;return-1};\"function\"==typeof define&&define.amd?define([\"outlayer/outlayer\",\"get-size/get-size\",\"matches-selector/matches-selector\",\"isotope/js/item\",\"isotope/js/layout-mode\",\"isotope/js/layout-modes/masonry\",\"isotope/js/layout-modes/fit-rows\",\"isotope/js/layout-modes/vertical\"],o):\"object\"==typeof exports?module.exports=o(require(\"outlayer\"),require(\"get-size\"),require(\"desandro-matches-selector\"),require(\"./item\"),require(\"./layout-mode\"),require(\"./layout-modes/masonry\"),require(\"./layout-modes/fit-rows\"),require(\"./layout-modes/vertical\")):e.Isotope=o(e.Outlayer,e.getSize,e.matchesSelector,e.Isotope.Item,e.Isotope.LayoutMode)}(window),function(e){function t(e){return new RegExp(\"^\"+e+\"$\")}function n(e,t){for(var n=Array.prototype.slice.call(arguments).splice(2),i=e.split(\".\"),r=i.pop(),o=0;o'),r.find(\".controls\").append(s),i.push(s[0])),n.options.sniffHtml){var c=\"\";if(void 0!==t.attr(\"pattern\")&&(c=\"Not in the expected format\",t.data(\"validationPatternMessage\")&&(c=t.data(\"validationPatternMessage\")),t.data(\"validationPatternMessage\",c),t.data(\"validationPatternRegex\",t.attr(\"pattern\"))),void 0!==t.attr(\"max\")||void 0!==t.attr(\"aria-valuemax\")){var d=t.attr(void 0!==t.attr(\"max\")?\"max\":\"aria-valuemax\");c=\"Too high: Maximum of '\"+d+\"'\",t.data(\"validationMaxMessage\")&&(c=t.data(\"validationMaxMessage\")),t.data(\"validationMaxMessage\",c),t.data(\"validationMaxMax\",d)}if(void 0!==t.attr(\"min\")||void 0!==t.attr(\"aria-valuemin\")){var p=t.attr(void 0!==t.attr(\"min\")?\"min\":\"aria-valuemin\");c=\"Too low: Minimum of '\"+p+\"'\",t.data(\"validationMinMessage\")&&(c=t.data(\"validationMinMessage\")),t.data(\"validationMinMessage\",c),t.data(\"validationMinMin\",p)}void 0!==t.attr(\"maxlength\")&&(c=\"Too long: Maximum of '\"+t.attr(\"maxlength\")+\"' characters\",t.data(\"validationMaxlengthMessage\")&&(c=t.data(\"validationMaxlengthMessage\")),t.data(\"validationMaxlengthMessage\",c),t.data(\"validationMaxlengthMaxlength\",t.attr(\"maxlength\"))),void 0!==t.attr(\"minlength\")&&(c=\"Too short: Minimum of '\"+t.attr(\"minlength\")+\"' characters\",t.data(\"validationMinlengthMessage\")&&(c=t.data(\"validationMinlengthMessage\")),t.data(\"validationMinlengthMessage\",c),t.data(\"validationMinlengthMinlength\",t.attr(\"minlength\"))),(void 0!==t.attr(\"required\")||void 0!==t.attr(\"aria-required\"))&&(c=n.builtInValidators.required.message,t.data(\"validationRequiredMessage\")&&(c=t.data(\"validationRequiredMessage\")),t.data(\"validationRequiredMessage\",c)),void 0!==t.attr(\"type\")&&\"number\"===t.attr(\"type\").toLowerCase()&&(c=n.builtInValidators.number.message,t.data(\"validationNumberMessage\")&&(c=t.data(\"validationNumberMessage\")),t.data(\"validationNumberMessage\",c)),void 0!==t.attr(\"type\")&&\"email\"===t.attr(\"type\").toLowerCase()&&(c=\"Not a valid email address\",t.data(\"validationValidemailMessage\")?c=t.data(\"validationValidemailMessage\"):t.data(\"validationEmailMessage\")&&(c=t.data(\"validationEmailMessage\")),t.data(\"validationValidemailMessage\",c)),void 0!==t.attr(\"minchecked\")&&(c=\"Not enough options checked; Minimum of '\"+t.attr(\"minchecked\")+\"' required\",t.data(\"validationMincheckedMessage\")&&(c=t.data(\"validationMincheckedMessage\")),t.data(\"validationMincheckedMessage\",c),t.data(\"validationMincheckedMinchecked\",t.attr(\"minchecked\"))),void 0!==t.attr(\"maxchecked\")&&(c=\"Too many options checked; Maximum of '\"+t.attr(\"maxchecked\")+\"' required\",t.data(\"validationMaxcheckedMessage\")&&(c=t.data(\"validationMaxcheckedMessage\")),t.data(\"validationMaxcheckedMessage\",c),t.data(\"validationMaxcheckedMaxchecked\",t.attr(\"maxchecked\")))}void 0!==t.data(\"validation\")&&(u=t.data(\"validation\").split(\",\")),e.each(t.data(),function(e){var t=e.replace(/([A-Z])/g,\",$1\").split(\",\");\"validation\"===t[0]&&t[1]&&u.push(t[1])});var f=u,h=[];do e.each(u,function(e,t){u[e]=o(t)}),u=e.unique(u),h=[],e.each(f,function(i,r){if(void 0!==t.data(\"validation\"+r+\"Shortcut\"))e.each(t.data(\"validation\"+r+\"Shortcut\").split(\",\"),function(e,t){h.push(t)});else if(n.builtInValidators[r.toLowerCase()]){var a=n.builtInValidators[r.toLowerCase()];\"shortcut\"===a.type.toLowerCase()&&e.each(a.shortcut.split(\",\"),function(e,t){t=o(t),h.push(t),u.push(t)})}}),f=h;while(f.length>0);var m={};e.each(u,function(i,r){var a=t.data(\"validation\"+r+\"Message\"),s=void 0!==a,l=!1;if(a=a?a:\"'\"+r+\"' validation failed \",e.each(n.validatorTypes,function(n,i){void 0===m[n]&&(m[n]=[]),l||void 0===t.data(\"validation\"+r+o(i.name))||(m[n].push(e.extend(!0,{name:o(i.name),message:a},i.init(t,r))),l=!0)}),!l&&n.builtInValidators[r.toLowerCase()]){var u=e.extend(!0,{},n.builtInValidators[r.toLowerCase()]);s&&(u.message=a);var c=u.type.toLowerCase();\"shortcut\"===c?l=!0:e.each(n.validatorTypes,function(n,i){void 0===m[n]&&(m[n]=[]),l||c!==n.toLowerCase()||(t.data(\"validation\"+r+o(i.name),u[i.name.toLowerCase()]),m[c].push(e.extend(u,i.init(t,r))),l=!0)})}l||e.error(\"Cannot find validation info for '\"+r+\"'\")}),s.data(\"original-contents\",s.data(\"original-contents\")?s.data(\"original-contents\"):s.html()),s.data(\"original-role\",s.data(\"original-role\")?s.data(\"original-role\"):s.attr(\"role\")),r.data(\"original-classes\",r.data(\"original-clases\")?r.data(\"original-classes\"):r.attr(\"class\")),t.data(\"original-aria-invalid\",t.data(\"original-aria-invalid\")?t.data(\"original-aria-invalid\"):t.attr(\"aria-invalid\")),t.bind(\"validation.validation\",function(i,r){var o=a(t),s=[];return e.each(m,function(i,a){(o||o.length||r&&r.includeEmpty||n.validatorTypes[i].blockSubmit&&r&&r.submitting)&&e.each(a,function(e,r){n.validatorTypes[i].validate(t,o,r)&&s.push(r.message)})}),s}),t.bind(\"getValidators.validation\",function(){return m}),t.bind(\"submit.validation\",function(){return t.triggerHandler(\"change.validation\",{submitting:!0})}),t.bind([\"keyup\",\"focus\",\"blur\",\"click\",\"keydown\",\"keypress\",\"change\"].join(\".validation \")+\".validation\",function(i,o){var u=a(t),c=[];r.find(\"input,textarea,select\").each(function(n,i){var r=c.length;if(e.each(e(i).triggerHandler(\"validation.validation\",o),function(e,t){c.push(t)}),c.length>r)e(i).attr(\"aria-invalid\",\"true\");else{var a=t.data(\"original-aria-invalid\");e(i).attr(\"aria-invalid\",void 0!==a?a:!1)}}),l.find(\"input,select,textarea\").not(t).not('[name=\"'+t.attr(\"name\")+'\"]').trigger(\"validationLostFocus.validation\"),c=e.unique(c.sort()),c.length?(r.removeClass(\"success error\").addClass(\"warning\"),s.html(n.options.semanticallyStrict&&1===c.length?c[0]+(n.options.prependExistingHelpBlock?s.data(\"original-contents\"):\"\"):'
    • '+c.join(\"
    • \")+\"
    \"+(n.options.prependExistingHelpBlock?s.data(\"original-contents\"):\"\"))):(r.removeClass(\"warning error success\"),u.length>0&&r.addClass(\"success\"),s.html(s.data(\"original-contents\"))),\"blur\"===i.type&&r.removeClass(\"success\")}),t.bind(\"validationLostFocus.validation\",function(){r.removeClass(\"success\")})})},destroy:function(){return this.each(function(){var t=e(this),n=t.parents(\".form-group\").first(),r=n.find(\".help-block\").first();t.unbind(\".validation\"),r.html(r.data(\"original-contents\")),n.attr(\"class\",n.data(\"original-classes\")),t.attr(\"aria-invalid\",t.data(\"original-aria-invalid\")),r.attr(\"role\",t.data(\"original-role\")),i.indexOf(r[0])>-1&&r.remove()})},collectErrors:function(){var t={};return this.each(function(n,i){var r=e(i),o=r.attr(\"name\"),a=r.triggerHandler(\"validation.validation\",{includeEmpty:!0});t[o]=e.extend(!0,a,t[o])}),e.each(t,function(e,n){0===n.length&&delete t[e]}),t},hasErrors:function(){var t=[];return this.each(function(n,i){t=t.concat(e(i).triggerHandler(\"getValidators.validation\")?e(i).triggerHandler(\"validation.validation\",{submitting:!0}):[])}),t.length>0},override:function(t){r=e.extend(!0,r,t)}},validatorTypes:{callback:{name:\"callback\",init:function(e,t){return{validatorName:t,callback:e.data(\"validation\"+t+\"Callback\"),lastValue:e.val(),lastValid:!0,lastFinished:!0}},validate:function(e,t,i){if(i.lastValue===t&&i.lastFinished)return!i.lastValid;if(i.lastFinished===!0){i.lastValue=t,i.lastValid=!0,i.lastFinished=!1;var r=i,o=e;n(i.callback,window,e,t,function(e){r.lastValue===e.value&&(r.lastValid=e.valid,e.message&&(r.message=e.message),r.lastFinished=!0,o.data(\"validation\"+r.validatorName+\"Message\",r.message),setTimeout(function(){o.trigger(\"change.validation\")},1))})}return!1}},ajax:{name:\"ajax\",init:function(e,t){return{validatorName:t,url:e.data(\"validation\"+t+\"Ajax\"),lastValue:e.val(),lastValid:!0,lastFinished:!0}},validate:function(t,n,i){return\"\"+i.lastValue==\"\"+n&&i.lastFinished===!0?i.lastValid===!1:(i.lastFinished===!0&&(i.lastValue=n,i.lastValid=!0,i.lastFinished=!1,e.ajax({url:i.url,data:\"value=\"+n+\"&field=\"+t.attr(\"name\"),dataType:\"json\",success:function(e){\"\"+i.lastValue==\"\"+e.value&&(i.lastValid=!!e.valid,e.message&&(i.message=e.message),i.lastFinished=!0,t.data(\"validation\"+i.validatorName+\"Message\",i.message),setTimeout(function(){t.trigger(\"change.validation\")},1))},failure:function(){i.lastValid=!0,i.message=\"ajax call failed\",i.lastFinished=!0,t.data(\"validation\"+i.validatorName+\"Message\",i.message),setTimeout(function(){t.trigger(\"change.validation\")},1)}})),!1)}},regex:{name:\"regex\",init:function(e,n){return{regex:t(e.data(\"validation\"+n+\"Regex\"))}},validate:function(e,t,n){return!n.regex.test(t)&&!n.negative||n.regex.test(t)&&n.negative}},required:{name:\"required\",init:function(){return{}},validate:function(e,t,n){return!(0!==t.length||n.negative)||!!(t.length>0&&n.negative)},blockSubmit:!0},match:{name:\"match\",init:function(e,t){var n=e.parents(\"form\").first().find('[name=\"'+e.data(\"validation\"+t+\"Match\")+'\"]').first();return n.bind(\"validation.validation\",function(){e.trigger(\"change.validation\",{submitting:!0})}),{element:n}},validate:function(e,t,n){return t!==n.element.val()&&!n.negative||t===n.element.val()&&n.negative},blockSubmit:!0},max:{name:\"max\",init:function(e,t){return{max:e.data(\"validation\"+t+\"Max\")}},validate:function(e,t,n){return parseFloat(t,10)>parseFloat(n.max,10)&&!n.negative||parseFloat(t,10)<=parseFloat(n.max,10)&&n.negative}},min:{name:\"min\",init:function(e,t){return{min:e.data(\"validation\"+t+\"Min\")}},validate:function(e,t,n){return parseFloat(t)=parseFloat(n.min)&&n.negative}},maxlength:{name:\"maxlength\",init:function(e,t){return{maxlength:e.data(\"validation\"+t+\"Maxlength\")}},validate:function(e,t,n){return t.length>n.maxlength&&!n.negative||t.length<=n.maxlength&&n.negative}},minlength:{name:\"minlength\",init:function(e,t){return{minlength:e.data(\"validation\"+t+\"Minlength\")}},validate:function(e,t,n){return t.length=n.minlength&&n.negative}},maxchecked:{name:\"maxchecked\",init:function(e,t){var n=e.parents(\"form\").first().find('[name=\"'+e.attr(\"name\")+'\"]');return n.bind(\"click.validation\",function(){e.trigger(\"change.validation\",{includeEmpty:!0})}),{maxchecked:e.data(\"validation\"+t+\"Maxchecked\"),elements:n}},validate:function(e,t,n){return n.elements.filter(\":checked\").length>n.maxchecked&&!n.negative||n.elements.filter(\":checked\").length<=n.maxchecked&&n.negative},blockSubmit:!0},minchecked:{name:\"minchecked\",init:function(e,t){var n=e.parents(\"form\").first().find('[name=\"'+e.attr(\"name\")+'\"]');return n.bind(\"click.validation\",function(){e.trigger(\"change.validation\",{includeEmpty:!0})}),{minchecked:e.data(\"validation\"+t+\"Minchecked\"),elements:n}},validate:function(e,t,n){return n.elements.filter(\":checked\").length=n.minchecked&&n.negative},blockSubmit:!0}},builtInValidators:{email:{name:\"Email\",type:\"shortcut\",shortcut:\"validemail\"},validemail:{name:\"Validemail\",type:\"regex\",regex:\"[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\\\.[A-Za-z]{2,4}\",message:\"Not a valid email address\"},passwordagain:{name:\"Passwordagain\",type:\"match\",match:\"password\",message:\"Does not match the given password\"},positive:{name:\"Positive\",type:\"shortcut\",shortcut:\"number,positivenumber\"},negative:{name:\"Negative\",type:\"shortcut\",shortcut:\"number,negativenumber\"},number:{name:\"Number\",type:\"regex\",regex:\"([+-]?\\\\d+(\\\\.\\\\d*)?([eE][+-]?[0-9]+)?)?\",message:\"Must be a number\"},integer:{name:\"Integer\",type:\"regex\",regex:\"[+-]?\\\\d+\",message:\"No decimal places allowed\"},positivenumber:{name:\"Positivenumber\",type:\"min\",min:0,message:\"Must be a positive number\"},negativenumber:{name:\"Negativenumber\",type:\"max\",max:0,message:\"Must be a negative number\"},required:{name:\"Required\",type:\"required\",message:\"This is required\"},checkone:{name:\"Checkone\",type:\"minchecked\",minchecked:1,message:\"Check at least one option\"}}},o=function(e){return e.toLowerCase().replace(/(^|\\s)([a-z])/g,function(e,t,n){return t+n.toUpperCase()})},a=function(t){var n=t.val(),i=t.attr(\"type\");return\"checkbox\"===i&&(n=t.is(\":checked\")?n:\"\"),\"radio\"===i&&(n=e('input[name=\"'+t.attr(\"name\")+'\"]:checked').length>0?n:\"\"),n};e.fn.jqBootstrapValidation=function(t){return r.methods[t]?r.methods[t].apply(this,Array.prototype.slice.call(arguments,1)):\"object\"!=typeof t&&t?(e.error(\"Method \"+t+\" does not exist on jQuery.jqBootstrapValidation\"),null):r.methods.init.apply(this,arguments)},e.jqBootstrapValidation=function(){e(\":input\").not(\"[type=image],[type=submit]\").jqBootstrapValidation.apply(this,arguments)}}(jQuery),/*!\n* FitVids 1.1\n*\n* Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com\n* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/\n* Released under the WTFPL license - http://sam.zoy.org/wtfpl/\n*\n*/\nfunction(e){\"use strict\";e.fn.fitVids=function(t){var n={customSelector:null,ignore:null};if(!document.getElementById(\"fit-vids-style\")){var i=document.head||document.getElementsByTagName(\"head\")[0],r=\".fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}\",o=document.createElement(\"div\");o.innerHTML='

    x

    \",i.appendChild(o.childNodes[1])}return t&&e.extend(n,t),this.each(function(){var t=[\"iframe[src*='player.vimeo.com']\",\"iframe[src*='youtube.com']\",\"iframe[src*='youtube-nocookie.com']\",\"iframe[src*='kickstarter.com'][src*='video.html']\",\"object\",\"embed\"];n.customSelector&&t.push(n.customSelector);var i=\".fitvidsignore\";n.ignore&&(i=i+\", \"+n.ignore);var r=e(this).find(t.join(\",\"));r=r.not(\"object object\"),r=r.not(i),r.each(function(){var t=e(this);if(!(t.parents(i).length>0||\"embed\"===this.tagName.toLowerCase()&&t.parent(\"object\").length||t.parent(\".fluid-width-video-wrapper\").length)){t.css(\"height\")||t.css(\"width\")||!isNaN(t.attr(\"height\"))&&!isNaN(t.attr(\"width\"))||(t.attr(\"height\",9),t.attr(\"width\",16));var n=\"object\"===this.tagName.toLowerCase()||t.attr(\"height\")&&!isNaN(parseInt(t.attr(\"height\"),10))?parseInt(t.attr(\"height\"),10):t.height(),r=isNaN(parseInt(t.attr(\"width\"),10))?t.width():parseInt(t.attr(\"width\"),10),o=n/r;if(!t.attr(\"id\")){var a=\"fitvid\"+Math.floor(999999*Math.random());t.attr(\"id\",a)}t.wrap('
    ').parent(\".fluid-width-video-wrapper\").css(\"padding-top\",100*o+\"%\"),t.removeAttr(\"height\").removeAttr(\"width\")}})})}}(window.jQuery||window.Zepto),function(e){e.flexslider=function(t,n){var i=e(t);i.vars=e.extend({},e.flexslider.defaults,n);var r,o=i.vars.namespace,a=window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture,s=(\"ontouchstart\"in window||a||window.DocumentTouch&&document instanceof DocumentTouch)&&i.vars.touch,l=\"click touchend MSPointerUp keyup\",u=\"\",c=\"vertical\"===i.vars.direction,d=i.vars.reverse,p=i.vars.itemWidth>0,f=\"fade\"===i.vars.animation,h=\"\"!==i.vars.asNavFor,m={},v=!0;e.data(t,\"flexslider\",i),m={init:function(){i.animating=!1,i.currentSlide=parseInt(i.vars.startAt?i.vars.startAt:0,10),isNaN(i.currentSlide)&&(i.currentSlide=0),i.animatingTo=i.currentSlide,i.atEnd=0===i.currentSlide||i.currentSlide===i.last,i.containerSelector=i.vars.selector.substr(0,i.vars.selector.search(\" \")),i.slides=e(i.vars.selector,i),i.container=e(i.containerSelector,i),i.count=i.slides.length,i.syncExists=e(i.vars.sync).length>0,\"slide\"===i.vars.animation&&(i.vars.animation=\"swing\"),i.prop=c?\"top\":\"marginLeft\",i.args={},i.manualPause=!1,i.stopped=!1,i.started=!1,i.startTimeout=null,i.transitions=!i.vars.video&&!f&&i.vars.useCSS&&function(){var e=document.createElement(\"div\"),t=[\"perspectiveProperty\",\"WebkitPerspective\",\"MozPerspective\",\"OPerspective\",\"msPerspective\"];for(var n in t)if(void 0!==e.style[t[n]])return i.pfx=t[n].replace(\"Perspective\",\"\").toLowerCase(),i.prop=\"-\"+i.pfx+\"-transform\",!0;return!1}(),i.ensureAnimationEnd=\"\",\"\"!==i.vars.controlsContainer&&(i.controlsContainer=e(i.vars.controlsContainer).length>0&&e(i.vars.controlsContainer)),\"\"!==i.vars.manualControls&&(i.manualControls=e(i.vars.manualControls).length>0&&e(i.vars.manualControls)),i.vars.randomize&&(i.slides.sort(function(){return Math.round(Math.random())-.5}),i.container.empty().append(i.slides)),i.doMath(),i.setup(\"init\"),i.vars.controlNav&&m.controlNav.setup(),i.vars.directionNav&&m.directionNav.setup(),i.vars.keyboard&&(1===e(i.containerSelector).length||i.vars.multipleKeyboard)&&e(document).bind(\"keyup\",function(e){var t=e.keyCode;if(!i.animating&&(39===t||37===t)){var n=39===t?i.getTarget(\"next\"):37===t?i.getTarget(\"prev\"):!1;i.flexAnimate(n,i.vars.pauseOnAction)}}),i.vars.mousewheel&&i.bind(\"mousewheel\",function(e,t){e.preventDefault();var n=i.getTarget(0>t?\"next\":\"prev\");i.flexAnimate(n,i.vars.pauseOnAction)}),i.vars.pausePlay&&m.pausePlay.setup(),i.vars.slideshow&&i.vars.pauseInvisible&&m.pauseInvisible.init(),i.vars.slideshow&&(i.vars.pauseOnHover&&i.hover(function(){i.manualPlay||i.manualPause||i.pause()},function(){i.manualPause||i.manualPlay||i.stopped||i.play()}),i.vars.pauseInvisible&&m.pauseInvisible.isHidden()||(i.vars.initDelay>0?i.startTimeout=setTimeout(i.play,i.vars.initDelay):i.play())),h&&m.asNav.setup(),s&&i.vars.touch&&m.touch(),(!f||f&&i.vars.smoothHeight)&&e(window).bind(\"resize orientationchange focus\",m.resize),i.find(\"img\").attr(\"draggable\",\"false\"),setTimeout(function(){i.vars.start(i)},200)},asNav:{setup:function(){i.asNav=!0,i.animatingTo=Math.floor(i.currentSlide/i.move),i.currentItem=i.currentSlide,i.slides.removeClass(o+\"active-slide\").eq(i.currentItem).addClass(o+\"active-slide\"),a?(t._slider=i,i.slides.each(function(){var t=this;t._gesture=new MSGesture,t._gesture.target=t,t.addEventListener(\"MSPointerDown\",function(e){e.preventDefault(),e.currentTarget._gesture&&e.currentTarget._gesture.addPointer(e.pointerId)},!1),t.addEventListener(\"MSGestureTap\",function(t){t.preventDefault();var n=e(this),r=n.index();e(i.vars.asNavFor).data(\"flexslider\").animating||n.hasClass(\"active\")||(i.direction=i.currentItem=a&&n.hasClass(o+\"active-slide\")?i.flexAnimate(i.getTarget(\"prev\"),!0):e(i.vars.asNavFor).data(\"flexslider\").animating||n.hasClass(o+\"active-slide\")||(i.direction=i.currentItem'),i.pagingCount>1)for(var s=0;s':\"\"+a+\"\",\"thumbnails\"===i.vars.controlNav&&!0===i.vars.thumbCaptions){var c=n.attr(\"data-thumbcaption\");\"\"!=c&&void 0!=c&&(t+=''+c+\"\")}i.controlNavScaffold.append(\"
  • \"+t+\"
  • \"),a++}i.controlsContainer?e(i.controlsContainer).append(i.controlNavScaffold):i.append(i.controlNavScaffold),m.controlNav.set(),m.controlNav.active(),i.controlNavScaffold.delegate(\"a, img\",l,function(t){if(t.preventDefault(),\"\"===u||u===t.type){var n=e(this),r=i.controlNav.index(n);n.hasClass(o+\"active\")||(i.direction=r>i.currentSlide?\"next\":\"prev\",i.flexAnimate(r,i.vars.pauseOnAction))}\"\"===u&&(u=t.type),m.setToClearWatchedEvent()})},setupManual:function(){i.controlNav=i.manualControls,m.controlNav.active(),i.controlNav.bind(l,function(t){if(t.preventDefault(),\"\"===u||u===t.type){var n=e(this),r=i.controlNav.index(n);n.hasClass(o+\"active\")||(i.direction=r>i.currentSlide?\"next\":\"prev\",i.flexAnimate(r,i.vars.pauseOnAction))}\"\"===u&&(u=t.type),m.setToClearWatchedEvent()})},set:function(){var t=\"thumbnails\"===i.vars.controlNav?\"img\":\"a\";i.controlNav=e(\".\"+o+\"control-nav li \"+t,i.controlsContainer?i.controlsContainer:i)},active:function(){i.controlNav.removeClass(o+\"active\").eq(i.animatingTo).addClass(o+\"active\")},update:function(t,n){i.pagingCount>1&&\"add\"===t?i.controlNavScaffold.append(e(\"
  • \"+i.count+\"
  • \")):1===i.pagingCount?i.controlNavScaffold.find(\"li\").remove():i.controlNav.eq(n).closest(\"li\").remove(),m.controlNav.set(),i.pagingCount>1&&i.pagingCount!==i.controlNav.length?i.update(n,t):m.controlNav.active()}},directionNav:{setup:function(){var t=e('\");i.controlsContainer?(e(i.controlsContainer).append(t),i.directionNav=e(\".\"+o+\"direction-nav li a\",i.controlsContainer)):(i.append(t),i.directionNav=e(\".\"+o+\"direction-nav li a\",i)),m.directionNav.update(),i.directionNav.bind(l,function(t){t.preventDefault();var n;(\"\"===u||u===t.type)&&(n=i.getTarget(e(this).hasClass(o+\"next\")?\"next\":\"prev\"),i.flexAnimate(n,i.vars.pauseOnAction)),\"\"===u&&(u=t.type),m.setToClearWatchedEvent()})},update:function(){var e=o+\"disabled\";1===i.pagingCount?i.directionNav.addClass(e).attr(\"tabindex\",\"-1\"):i.vars.animationLoop?i.directionNav.removeClass(e).removeAttr(\"tabindex\"):0===i.animatingTo?i.directionNav.removeClass(e).filter(\".\"+o+\"prev\").addClass(e).attr(\"tabindex\",\"-1\"):i.animatingTo===i.last?i.directionNav.removeClass(e).filter(\".\"+o+\"next\").addClass(e).attr(\"tabindex\",\"-1\"):i.directionNav.removeClass(e).removeAttr(\"tabindex\")}},pausePlay:{setup:function(){var t=e('
    ');i.controlsContainer?(i.controlsContainer.append(t),i.pausePlay=e(\".\"+o+\"pauseplay a\",i.controlsContainer)):(i.append(t),i.pausePlay=e(\".\"+o+\"pauseplay a\",i)),m.pausePlay.update(i.vars.slideshow?o+\"pause\":o+\"play\"),i.pausePlay.bind(l,function(t){t.preventDefault(),(\"\"===u||u===t.type)&&(e(this).hasClass(o+\"pause\")?(i.manualPause=!0,i.manualPlay=!1,i.pause()):(i.manualPause=!1,i.manualPlay=!0,i.play())),\"\"===u&&(u=t.type),m.setToClearWatchedEvent()})},update:function(e){\"play\"===e?i.pausePlay.removeClass(o+\"pause\").addClass(o+\"play\").html(i.vars.playText):i.pausePlay.removeClass(o+\"play\").addClass(o+\"pause\").html(i.vars.pauseText)}},touch:function(){function e(e){i.animating?e.preventDefault():(window.navigator.msPointerEnabled||1===e.touches.length)&&(i.pause(),v=c?i.h:i.w,y=Number(new Date),w=e.touches[0].pageX,T=e.touches[0].pageY,m=p&&d&&i.animatingTo===i.last?0:p&&d?i.limit-(i.itemW+i.vars.itemMargin)*i.move*i.animatingTo:p&&i.currentSlide===i.last?i.limit:p?(i.itemW+i.vars.itemMargin)*i.move*i.currentSlide:d?(i.last-i.currentSlide+i.cloneOffset)*v:(i.currentSlide+i.cloneOffset)*v,u=c?T:w,h=c?w:T,t.addEventListener(\"touchmove\",n,!1),t.addEventListener(\"touchend\",r,!1))}function n(e){w=e.touches[0].pageX,T=e.touches[0].pageY,g=c?u-T:u-w,b=c?Math.abs(g)t)&&(e.preventDefault(),!f&&i.transitions&&(i.vars.animationLoop||(g/=0===i.currentSlide&&0>g||i.currentSlide===i.last&&g>0?Math.abs(g)/v+2:1),i.setProps(m+g,\"setTouch\")))}function r(){if(t.removeEventListener(\"touchmove\",n,!1),i.animatingTo===i.currentSlide&&!b&&null!==g){var e=d?-g:g,o=i.getTarget(e>0?\"next\":\"prev\");i.canAdvance(o)&&(Number(new Date)-y<550&&Math.abs(e)>50||Math.abs(e)>v/2)?i.flexAnimate(o,i.vars.pauseOnAction):f||i.flexAnimate(i.currentSlide,i.vars.pauseOnAction,!0)}t.removeEventListener(\"touchend\",r,!1),u=null,h=null,g=null,m=null}function o(e){e.stopPropagation(),i.animating?e.preventDefault():(i.pause(),t._gesture.addPointer(e.pointerId),x=0,v=c?i.h:i.w,y=Number(new Date),m=p&&d&&i.animatingTo===i.last?0:p&&d?i.limit-(i.itemW+i.vars.itemMargin)*i.move*i.animatingTo:p&&i.currentSlide===i.last?i.limit:p?(i.itemW+i.vars.itemMargin)*i.move*i.currentSlide:d?(i.last-i.currentSlide+i.cloneOffset)*v:(i.currentSlide+i.cloneOffset)*v)}function s(e){e.stopPropagation();var n=e.target._slider;if(n){var i=-e.translationX,r=-e.translationY;return x+=c?r:i,g=x,b=c?Math.abs(x)500)&&(e.preventDefault(),!f&&n.transitions&&(n.vars.animationLoop||(g=x/(0===n.currentSlide&&0>x||n.currentSlide===n.last&&x>0?Math.abs(x)/v+2:1)),n.setProps(m+g,\"setTouch\"))))}}function l(e){e.stopPropagation();var t=e.target._slider;if(t){if(t.animatingTo===t.currentSlide&&!b&&null!==g){var n=d?-g:g,i=t.getTarget(n>0?\"next\":\"prev\");t.canAdvance(i)&&(Number(new Date)-y<550&&Math.abs(n)>50||Math.abs(n)>v/2)?t.flexAnimate(i,t.vars.pauseOnAction):f||t.flexAnimate(t.currentSlide,t.vars.pauseOnAction,!0)}u=null,h=null,g=null,m=null,x=0}}var u,h,m,v,g,y,b=!1,w=0,T=0,x=0;a?(t.style.msTouchAction=\"none\",t._gesture=new MSGesture,t._gesture.target=t,t.addEventListener(\"MSPointerDown\",o,!1),t._slider=i,t.addEventListener(\"MSGestureChange\",s,!1),t.addEventListener(\"MSGestureEnd\",l,!1)):t.addEventListener(\"touchstart\",e,!1)},resize:function(){!i.animating&&i.is(\":visible\")&&(p||i.doMath(),f?m.smoothHeight():p?(i.slides.width(i.computedW),i.update(i.pagingCount),i.setProps()):c?(i.viewport.height(i.h),i.setProps(i.h,\"setTotal\")):(i.vars.smoothHeight&&m.smoothHeight(),i.newSlides.width(i.computedW),i.setProps(i.computedW,\"setTotal\")))},smoothHeight:function(e){if(!c||f){var t=f?i:i.viewport;e?t.animate({height:i.slides.eq(i.animatingTo).height()},e):t.height(i.slides.eq(i.animatingTo).height())}},sync:function(t){var n=e(i.vars.sync).data(\"flexslider\"),r=i.animatingTo;switch(t){case\"animate\":n.flexAnimate(r,i.vars.pauseOnAction,!1,!0);break;case\"play\":n.playing||n.asNav||n.play();break;case\"pause\":n.pause()}},uniqueID:function(t){return t.filter(\"[id]\").add(t.find(\"[id]\")).each(function(){var t=e(this);t.attr(\"id\",t.attr(\"id\")+\"_clone\")}),t},pauseInvisible:{visProp:null,init:function(){var e=[\"webkit\",\"moz\",\"ms\",\"o\"];if(\"hidden\"in document)return\"hidden\";for(var t=0;t0?setTimeout(i.play,i.vars.initDelay):i.play()})}},isHidden:function(){return document[m.pauseInvisible.visProp]||!1}},setToClearWatchedEvent:function(){clearTimeout(r),r=setTimeout(function(){u=\"\"},3e3)}},i.flexAnimate=function(t,n,r,a,l){if(i.vars.animationLoop||t===i.currentSlide||(i.direction=t>i.currentSlide?\"next\":\"prev\"),h&&1===i.pagingCount&&(i.direction=i.currentItemi.limit&&1!==i.visible?i.limit:y):g=0===i.currentSlide&&t===i.count-1&&i.vars.animationLoop&&\"next\"!==i.direction?d?(i.count+i.cloneOffset)*b:0:i.currentSlide===i.last&&0===t&&i.vars.animationLoop&&\"prev\"!==i.direction?d?0:(i.count+1)*b:d?(i.count-1-t+i.cloneOffset)*b:(t+i.cloneOffset)*b,i.setProps(g,\"\",i.vars.animationSpeed),i.transitions?(i.vars.animationLoop&&i.atEnd||(i.animating=!1,i.currentSlide=i.animatingTo),i.container.unbind(\"webkitTransitionEnd transitionend\"),i.container.bind(\"webkitTransitionEnd transitionend\",function(){clearTimeout(i.ensureAnimationEnd),i.wrapup(b)}),clearTimeout(i.ensureAnimationEnd),i.ensureAnimationEnd=setTimeout(function(){i.wrapup(b)},i.vars.animationSpeed+100)):i.container.animate(i.args,i.vars.animationSpeed,i.vars.easing,function(){i.wrapup(b)})}i.vars.smoothHeight&&m.smoothHeight(i.vars.animationSpeed)}},i.wrapup=function(e){f||p||(0===i.currentSlide&&i.animatingTo===i.last&&i.vars.animationLoop?i.setProps(e,\"jumpEnd\"):i.currentSlide===i.last&&0===i.animatingTo&&i.vars.animationLoop&&i.setProps(e,\"jumpStart\")),i.animating=!1,i.currentSlide=i.animatingTo,i.vars.after(i)},i.animateSlides=function(){!i.animating&&v&&i.flexAnimate(i.getTarget(\"next\"))},i.pause=function(){clearInterval(i.animatedSlides),i.animatedSlides=null,i.playing=!1,i.vars.pausePlay&&m.pausePlay.update(\"play\"),i.syncExists&&m.sync(\"pause\")},i.play=function(){i.playing&&clearInterval(i.animatedSlides),i.animatedSlides=i.animatedSlides||setInterval(i.animateSlides,i.vars.slideshowSpeed),i.started=i.playing=!0,i.vars.pausePlay&&m.pausePlay.update(\"pause\"),i.syncExists&&m.sync(\"play\")},i.stop=function(){i.pause(),i.stopped=!0},i.canAdvance=function(e,t){var n=h?i.pagingCount-1:i.last;return t?!0:h&&i.currentItem===i.count-1&&0===e&&\"prev\"===i.direction?!0:h&&0===i.currentItem&&e===i.pagingCount-1&&\"next\"!==i.direction?!1:e!==i.currentSlide||h?i.vars.animationLoop?!0:i.atEnd&&0===i.currentSlide&&e===n&&\"next\"!==i.direction?!1:i.atEnd&&i.currentSlide===n&&0===e&&\"next\"===i.direction?!1:!0:!1},i.getTarget=function(e){return i.direction=e,\"next\"===e?i.currentSlide===i.last?0:i.currentSlide+1:0===i.currentSlide?i.last:i.currentSlide-1},i.setProps=function(e,t,n){var r=function(){var n=e?e:(i.itemW+i.vars.itemMargin)*i.move*i.animatingTo,r=function(){if(p)return\"setTouch\"===t?e:d&&i.animatingTo===i.last?0:d?i.limit-(i.itemW+i.vars.itemMargin)*i.move*i.animatingTo:i.animatingTo===i.last?i.limit:n;switch(t){case\"setTotal\":return d?(i.count-1-i.currentSlide+i.cloneOffset)*e:(i.currentSlide+i.cloneOffset)*e;case\"setTouch\":return d?e:e;case\"jumpEnd\":return d?e:i.count*e;case\"jumpStart\":return d?i.count*e:e;default:return e}}();return-1*r+\"px\"}();i.transitions&&(r=c?\"translate3d(0,\"+r+\",0)\":\"translate3d(\"+r+\",0,0)\",n=void 0!==n?n/1e3+\"s\":\"0s\",i.container.css(\"-\"+i.pfx+\"-transition-duration\",n),i.container.css(\"transition-duration\",n)),i.args[i.prop]=r,(i.transitions||void 0===n)&&i.container.css(i.args),i.container.css(\"transform\",r)},i.setup=function(t){if(f)i.slides.css({width:\"100%\",\"float\":\"left\",marginRight:\"-100%\",position:\"relative\"}),\"init\"===t&&(s?i.slides.css({opacity:0,display:\"block\",webkitTransition:\"opacity \"+i.vars.animationSpeed/1e3+\"s ease\",zIndex:1}).eq(i.currentSlide).css({opacity:1,zIndex:2}):0==i.vars.fadeFirstSlide?i.slides.css({opacity:0,display:\"block\",zIndex:1}).eq(i.currentSlide).css({zIndex:2}).css({opacity:1}):i.slides.css({opacity:0,display:\"block\",zIndex:1}).eq(i.currentSlide).css({zIndex:2}).animate({opacity:1},i.vars.animationSpeed,i.vars.easing)),i.vars.smoothHeight&&m.smoothHeight();else{var n,r;\"init\"===t&&(i.viewport=e('
    ').css({overflow:\"hidden\",position:\"relative\"}).appendTo(i).append(i.container),i.cloneCount=0,i.cloneOffset=0,d&&(r=e.makeArray(i.slides).reverse(),i.slides=e(r),i.container.empty().append(i.slides))),i.vars.animationLoop&&!p&&(i.cloneCount=2,i.cloneOffset=1,\"init\"!==t&&i.container.find(\".clone\").remove(),i.container.append(m.uniqueID(i.slides.first().clone().addClass(\"clone\")).attr(\"aria-hidden\",\"true\")).prepend(m.uniqueID(i.slides.last().clone().addClass(\"clone\")).attr(\"aria-hidden\",\"true\"))),i.newSlides=e(i.vars.selector,i),n=d?i.count-1-i.currentSlide+i.cloneOffset:i.currentSlide+i.cloneOffset,c&&!p?(i.container.height(200*(i.count+i.cloneCount)+\"%\").css(\"position\",\"absolute\").width(\"100%\"),setTimeout(function(){i.newSlides.css({display:\"block\"}),i.doMath(),i.viewport.height(i.h),i.setProps(n*i.h,\"init\")},\"init\"===t?100:0)):(i.container.width(200*(i.count+i.cloneCount)+\"%\"),i.setProps(n*i.computedW,\"init\"),setTimeout(function(){i.doMath(),i.newSlides.css({width:i.computedW,\"float\":\"left\",display:\"block\"}),i.vars.smoothHeight&&m.smoothHeight()},\"init\"===t?100:0))}p||i.slides.removeClass(o+\"active-slide\").eq(i.currentSlide).addClass(o+\"active-slide\"),i.vars.init(i)},i.doMath=function(){var e=i.slides.first(),t=i.vars.itemMargin,n=i.vars.minItems,r=i.vars.maxItems;i.w=void 0===i.viewport?i.width():i.viewport.width(),i.h=e.height(),i.boxPadding=e.outerWidth()-e.width(),p?(i.itemT=i.vars.itemWidth+t,i.minW=n?n*i.itemT:i.w,i.maxW=r?r*i.itemT-t:i.w,i.itemW=i.minW>i.w?(i.w-t*(n-1))/n:i.maxWi.w?i.w:i.vars.itemWidth,i.visible=Math.floor(i.w/i.itemW),i.move=i.vars.move>0&&i.vars.movei.w?i.itemW*(i.count-1)+t*(i.count-1):(i.itemW+t)*i.count-i.w-t):(i.itemW=i.w,i.pagingCount=i.count,i.last=i.count-1),i.computedW=i.itemW-i.boxPadding},i.update=function(e,t){i.doMath(),p||(ei.controlNav.length?m.controlNav.update(\"add\"):(\"remove\"===t&&!p||i.pagingCounti.last&&(i.currentSlide-=1,i.animatingTo-=1),m.controlNav.update(\"remove\",i.last))),i.vars.directionNav&&m.directionNav.update()},i.addSlide=function(t,n){var r=e(t);i.count+=1,i.last=i.count-1,c&&d?void 0!==n?i.slides.eq(i.count-n).after(r):i.container.prepend(r):void 0!==n?i.slides.eq(n).before(r):i.container.append(r),i.update(n,\"add\"),i.slides=e(i.vars.selector+\":not(.clone)\",i),i.setup(),i.vars.added(i)},i.removeSlide=function(t){var n=isNaN(t)?i.slides.index(e(t)):t;i.count-=1,i.last=i.count-1,isNaN(t)?e(t,i.slides).remove():c&&d?i.slides.eq(i.last).remove():i.slides.eq(t).remove(),i.doMath(),i.update(n,\"remove\"),i.slides=e(i.vars.selector+\":not(.clone)\",i),i.setup(),i.vars.removed(i)},m.init()},e(window).blur(function(){focused=!1}).focus(function(){focused=!0}),e.flexslider.defaults={namespace:\"flex-\",selector:\".slides > li\",animation:\"fade\",easing:\"swing\",direction:\"horizontal\",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7e3,animationSpeed:600,initDelay:0,randomize:!1,fadeFirstSlide:!0,thumbCaptions:!1,pauseOnAction:!0,pauseOnHover:!1,pauseInvisible:!0,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:\"Previous\",nextText:\"Next\",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:\"Pause\",playText:\"Play\",controlsContainer:\"\",manualControls:\"\",sync:\"\",asNavFor:\"\",itemWidth:0,itemMargin:0,minItems:1,maxItems:0,move:0,allowOneSlide:!0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){},init:function(){}},e.fn.flexslider=function(t){if(void 0===t&&(t={}),\"object\"==typeof t)return this.each(function(){var n=e(this),i=t.selector?t.selector:\".slides > li\",r=n.find(i);1===r.length&&t.allowOneSlide===!0||0===r.length?(r.fadeIn(400),t.start&&t.start(n)):void 0===n.data(\"flexslider\")&&new e.flexslider(this,t)});var n=e(this).data(\"flexslider\");switch(t){case\"play\":n.play();break;case\"pause\":n.pause();break;case\"stop\":n.stop();break;case\"next\":n.flexAnimate(n.getTarget(\"next\"),!0);break;case\"prev\":case\"previous\":n.flexAnimate(n.getTarget(\"prev\"),!0);break;default:\"number\"==typeof t&&n.flexAnimate(t,!0)}}}(jQuery),function(e){var t,n,i,r,o,a,s,l=\"Close\",u=\"BeforeClose\",c=\"AfterClose\",d=\"BeforeAppend\",p=\"MarkupParse\",f=\"Open\",h=\"Change\",m=\"mfp\",v=\".\"+m,g=\"mfp-ready\",y=\"mfp-removing\",b=\"mfp-prevent-close\",w=function(){},T=!!window.jQuery,x=e(window),C=function(e,n){t.ev.on(m+e+v,n)},P=function(t,n,i,r){var o=document.createElement(\"div\");return o.className=\"mfp-\"+t,i&&(o.innerHTML=i),r?n&&n.appendChild(o):(o=e(o),n&&o.appendTo(n)),o},S=function(n,i){t.ev.triggerHandler(m+n,i),t.st.callbacks&&(n=n.charAt(0).toLowerCase()+n.slice(1),t.st.callbacks[n]&&t.st.callbacks[n].apply(t,e.isArray(i)?i:[i]))},k=function(n){return n===s&&t.currTemplate.closeBtn||(t.currTemplate.closeBtn=e(t.st.closeMarkup.replace(\"%title%\",t.st.tClose)),s=n),t.currTemplate.closeBtn},E=function(){e.magnificPopup.instance||(t=new w,t.init(),e.magnificPopup.instance=t)},I=function(){var e=document.createElement(\"p\").style,t=[\"ms\",\"O\",\"Moz\",\"Webkit\"];if(void 0!==e.transition)return!0;for(;t.length;)if(t.pop()+\"Transition\"in e)return!0;return!1};w.prototype={constructor:w,init:function(){var n=navigator.appVersion;t.isIE7=-1!==n.indexOf(\"MSIE 7.\"),t.isIE8=-1!==n.indexOf(\"MSIE 8.\"),t.isLowIE=t.isIE7||t.isIE8,t.isAndroid=/android/gi.test(n),t.isIOS=/iphone|ipad|ipod/gi.test(n),t.supportsTransition=I(),t.probablyMobile=t.isAndroid||t.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),r=e(document),t.popupsCache={}},open:function(n){i||(i=e(document.body));var o;if(n.isObj===!1){t.items=n.items.toArray(),t.index=0;var s,l=n.items;for(o=0;o(e||x.height())},_setFocus:function(){(t.st.focus?t.content.find(t.st.focus).eq(0):t.wrap).focus()},_onFocusIn:function(n){return n.target===t.wrap[0]||e.contains(t.wrap[0],n.target)?void 0:(t._setFocus(),!1)},_parseMarkup:function(t,n,i){var r;i.data&&(n=e.extend(i.data,n)),S(p,[t,n,i]),e.each(n,function(e,n){if(void 0===n||n===!1)return!0;if(r=e.split(\"_\"),r.length>1){var i=t.find(v+\"-\"+r[0]);if(i.length>0){var o=r[1];\"replaceWith\"===o?i[0]!==n[0]&&i.replaceWith(n):\"img\"===o?i.is(\"img\")?i.attr(\"src\",n):i.replaceWith(''):i.attr(r[1],n)}}else t.find(v+\"-\"+e).html(n)})},_getScrollbarSize:function(){if(void 0===t.scrollbarSize){var e=document.createElement(\"div\");e.id=\"mfp-sbm\",e.style.cssText=\"width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;\",document.body.appendChild(e),t.scrollbarSize=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return t.scrollbarSize}},e.magnificPopup={instance:null,proto:w.prototype,modules:[],open:function(t,n){return E(),t=t?e.extend(!0,{},t):{},t.isObj=!0,t.index=n||0,this.instance.open(t)},close:function(){return e.magnificPopup.instance&&e.magnificPopup.instance.close()},registerModule:function(t,n){n.options&&(e.magnificPopup.defaults[t]=n.options),e.extend(this.proto,n.proto),this.modules.push(t)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:\"\",preloader:!0,focus:\"\",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:\"auto\",fixedBgPos:\"auto\",overflowY:\"auto\",closeMarkup:'',tClose:\"Close (Esc)\",tLoading:\"Loading...\"}},e.fn.magnificPopup=function(n){E();\nvar i=e(this);if(\"string\"==typeof n)if(\"open\"===n){var r,o=T?i.data(\"magnificPopup\"):i[0].magnificPopup,a=parseInt(arguments[1],10)||0;o.items?r=o.items[a]:(r=i,o.delegate&&(r=r.find(o.delegate)),r=r.eq(a)),t._openClick({mfpEl:r},i,o)}else t.isOpen&&t[n].apply(t,Array.prototype.slice.call(arguments,1));else n=e.extend(!0,{},n),T?i.data(\"magnificPopup\",n):i[0].magnificPopup=n,t.addGroup(i,n);return i};var j,A,_,Y=\"inline\",L=function(){_&&(A.after(_.addClass(j)).detach(),_=null)};e.magnificPopup.registerModule(Y,{options:{hiddenClass:\"hide\",markup:\"\",tNotFound:\"Content not found\"},proto:{initInline:function(){t.types.push(Y),C(l+\".\"+Y,function(){L()})},getInline:function(n,i){if(L(),n.src){var r=t.st.inline,o=e(n.src);if(o.length){var a=o[0].parentNode;a&&a.tagName&&(A||(j=r.hiddenClass,A=P(j),j=\"mfp-\"+j),_=o.after(A).detach().removeClass(j)),t.updateStatus(\"ready\")}else t.updateStatus(\"error\",r.tNotFound),o=e(\"
    \");return n.inlineElement=o,o}return t.updateStatus(\"ready\"),t._parseMarkup(i,{},n),i}}});var D,M=\"ajax\",N=function(){D&&i.removeClass(D)},$=function(){N(),t.req&&t.req.abort()};e.magnificPopup.registerModule(M,{options:{settings:null,cursor:\"mfp-ajax-cur\",tError:'The content could not be loaded.'},proto:{initAjax:function(){t.types.push(M),D=t.st.ajax.cursor,C(l+\".\"+M,$),C(\"BeforeChange.\"+M,$)},getAjax:function(n){D&&i.addClass(D),t.updateStatus(\"loading\");var r=e.extend({url:n.src,success:function(i,r,o){var a={data:i,xhr:o};S(\"ParseAjax\",a),t.appendContent(e(a.data),M),n.finished=!0,N(),t._setFocus(),setTimeout(function(){t.wrap.addClass(g)},16),t.updateStatus(\"ready\"),S(\"AjaxContentAdded\")},error:function(){N(),n.finished=n.loadError=!0,t.updateStatus(\"error\",t.st.ajax.tError.replace(\"%url%\",n.src))}},t.st.ajax.settings);return t.req=e.ajax(r),\"\"}}});var O,W=function(n){if(n.data&&void 0!==n.data.title)return n.data.title;var i=t.st.image.titleSrc;if(i){if(e.isFunction(i))return i.call(t,n);if(n.el)return n.el.attr(i)||\"\"}return\"\"};e.magnificPopup.registerModule(\"image\",{options:{markup:'
    ',cursor:\"mfp-zoom-out-cur\",titleSrc:\"title\",verticalFit:!0,tError:'The image could not be loaded.'},proto:{initImage:function(){var e=t.st.image,n=\".image\";t.types.push(\"image\"),C(f+n,function(){\"image\"===t.currItem.type&&e.cursor&&i.addClass(e.cursor)}),C(l+n,function(){e.cursor&&i.removeClass(e.cursor),x.off(\"resize\"+v)}),C(\"Resize\"+n,t.resizeImage),t.isLowIE&&C(\"AfterChange\",t.resizeImage)},resizeImage:function(){var e=t.currItem;if(e&&e.img&&t.st.image.verticalFit){var n=0;t.isLowIE&&(n=parseInt(e.img.css(\"padding-top\"),10)+parseInt(e.img.css(\"padding-bottom\"),10)),e.img.css(\"max-height\",t.wH-n)}},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,O&&clearInterval(O),e.isCheckingImgSize=!1,S(\"ImageHasSize\",e),e.imgHidden&&(t.content&&t.content.removeClass(\"mfp-loading\"),e.imgHidden=!1))},findImageSize:function(e){var n=0,i=e.img[0],r=function(o){O&&clearInterval(O),O=setInterval(function(){return i.naturalWidth>0?void t._onImageHasSize(e):(n>200&&clearInterval(O),n++,void(3===n?r(10):40===n?r(50):100===n&&r(500)))},o)};r(1)},getImage:function(n,i){var r=0,o=function(){n&&(n.img[0].complete?(n.img.off(\".mfploader\"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus(\"ready\")),n.hasSize=!0,n.loaded=!0,S(\"ImageLoadComplete\")):(r++,200>r?setTimeout(o,100):a()))},a=function(){n&&(n.img.off(\".mfploader\"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus(\"error\",s.tError.replace(\"%url%\",n.src))),n.hasSize=!0,n.loaded=!0,n.loadError=!0)},s=t.st.image,l=i.find(\".mfp-img\");if(l.length){var u=document.createElement(\"img\");u.className=\"mfp-img\",n.img=e(u).on(\"load.mfploader\",o).on(\"error.mfploader\",a),u.src=n.src,l.is(\"img\")&&(n.img=n.img.clone()),u=n.img[0],u.naturalWidth>0?n.hasSize=!0:u.width||(n.hasSize=!1)}return t._parseMarkup(i,{title:W(n),img_replaceWith:n.img},n),t.resizeImage(),n.hasSize?(O&&clearInterval(O),n.loadError?(i.addClass(\"mfp-loading\"),t.updateStatus(\"error\",s.tError.replace(\"%url%\",n.src))):(i.removeClass(\"mfp-loading\"),t.updateStatus(\"ready\")),i):(t.updateStatus(\"loading\"),n.loading=!0,n.hasSize||(n.imgHidden=!0,i.addClass(\"mfp-loading\"),t.findImageSize(n)),i)}}});var z,Q=function(){return void 0===z&&(z=void 0!==document.createElement(\"p\").style.MozTransform),z};e.magnificPopup.registerModule(\"zoom\",{options:{enabled:!1,easing:\"ease-in-out\",duration:300,opener:function(e){return e.is(\"img\")?e:e.find(\"img\")}},proto:{initZoom:function(){var e,n=t.st.zoom,i=\".zoom\";if(n.enabled&&t.supportsTransition){var r,o,a=n.duration,s=function(e){var t=e.clone().removeAttr(\"style\").removeAttr(\"class\").addClass(\"mfp-animated-image\"),i=\"all \"+n.duration/1e3+\"s \"+n.easing,r={position:\"fixed\",zIndex:9999,left:0,top:0,\"-webkit-backface-visibility\":\"hidden\"},o=\"transition\";return r[\"-webkit-\"+o]=r[\"-moz-\"+o]=r[\"-o-\"+o]=r[o]=i,t.css(r),t},c=function(){t.content.css(\"visibility\",\"visible\")};C(\"BuildControls\"+i,function(){if(t._allowZoom()){if(clearTimeout(r),t.content.css(\"visibility\",\"hidden\"),e=t._getItemToZoom(),!e)return void c();o=s(e),o.css(t._getOffset()),t.wrap.append(o),r=setTimeout(function(){o.css(t._getOffset(!0)),r=setTimeout(function(){c(),setTimeout(function(){o.remove(),e=o=null,S(\"ZoomAnimationEnded\")},16)},a)},16)}}),C(u+i,function(){if(t._allowZoom()){if(clearTimeout(r),t.st.removalDelay=a,!e){if(e=t._getItemToZoom(),!e)return;o=s(e)}o.css(t._getOffset(!0)),t.wrap.append(o),t.content.css(\"visibility\",\"hidden\"),setTimeout(function(){o.css(t._getOffset())},16)}}),C(l+i,function(){t._allowZoom()&&(c(),o&&o.remove(),e=null)})}},_allowZoom:function(){return\"image\"===t.currItem.type},_getItemToZoom:function(){return t.currItem.hasSize?t.currItem.img:!1},_getOffset:function(n){var i;i=n?t.currItem.img:t.st.zoom.opener(t.currItem.el||t.currItem);var r=i.offset(),o=parseInt(i.css(\"padding-top\"),10),a=parseInt(i.css(\"padding-bottom\"),10);r.top-=e(window).scrollTop()-o;var s={width:i.width(),height:(T?i.innerHeight():i[0].offsetHeight)-a-o};return Q()?s[\"-moz-transform\"]=s.transform=\"translate(\"+r.left+\"px,\"+r.top+\"px)\":(s.left=r.left,s.top=r.top),s}}});var B=\"iframe\",R=\"//about:blank\",F=function(e){if(t.currTemplate[B]){var n=t.currTemplate[B].find(\"iframe\");n.length&&(e||(n[0].src=R),t.isIE8&&n.css(\"display\",e?\"block\":\"none\"))}};e.magnificPopup.registerModule(B,{options:{markup:'
    ',srcAction:\"iframe_src\",patterns:{youtube:{index:\"youtube.com\",id:\"v=\",src:\"//www.youtube.com/embed/%id%?autoplay=1\"},vimeo:{index:\"vimeo.com/\",id:\"/\",src:\"//player.vimeo.com/video/%id%?autoplay=1\"},gmaps:{index:\"//maps.google.\",src:\"%id%&output=embed\"}}},proto:{initIframe:function(){t.types.push(B),C(\"BeforeChange\",function(e,t,n){t!==n&&(t===B?F():n===B&&F(!0))}),C(l+\".\"+B,function(){F()})},getIframe:function(n,i){var r=n.src,o=t.st.iframe;e.each(o.patterns,function(){return r.indexOf(this.index)>-1?(this.id&&(r=\"string\"==typeof this.id?r.substr(r.lastIndexOf(this.id)+this.id.length,r.length):this.id.call(this,r)),r=this.src.replace(\"%id%\",r),!1):void 0});var a={};return o.srcAction&&(a[o.srcAction]=r),t._parseMarkup(i,a,n),t.updateStatus(\"ready\"),i}}});var q=function(e){var n=t.items.length;return e>n-1?e-n:0>e?n+e:e},H=function(e,t,n){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,n)};e.magnificPopup.registerModule(\"gallery\",{options:{enabled:!1,arrowMarkup:'',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:\"Previous (Left arrow key)\",tNext:\"Next (Right arrow key)\",tCounter:\"%curr% of %total%\"},proto:{initGallery:function(){var n=t.st.gallery,i=\".mfp-gallery\",o=Boolean(e.fn.mfpFastClick);return t.direction=!0,n&&n.enabled?(a+=\" mfp-gallery\",C(f+i,function(){n.navigateByImgClick&&t.wrap.on(\"click\"+i,\".mfp-img\",function(){return t.items.length>1?(t.next(),!1):void 0}),r.on(\"keydown\"+i,function(e){37===e.keyCode?t.prev():39===e.keyCode&&t.next()})}),C(\"UpdateStatus\"+i,function(e,n){n.text&&(n.text=H(n.text,t.currItem.index,t.items.length))}),C(p+i,function(e,i,r,o){var a=t.items.length;r.counter=a>1?H(n.tCounter,o.index,a):\"\"}),C(\"BuildControls\"+i,function(){if(t.items.length>1&&n.arrows&&!t.arrowLeft){var i=n.arrowMarkup,r=t.arrowLeft=e(i.replace(/%title%/gi,n.tPrev).replace(/%dir%/gi,\"left\")).addClass(b),a=t.arrowRight=e(i.replace(/%title%/gi,n.tNext).replace(/%dir%/gi,\"right\")).addClass(b),s=o?\"mfpFastClick\":\"click\";r[s](function(){t.prev()}),a[s](function(){t.next()}),t.isIE7&&(P(\"b\",r[0],!1,!0),P(\"a\",r[0],!1,!0),P(\"b\",a[0],!1,!0),P(\"a\",a[0],!1,!0)),t.container.append(r.add(a))}}),C(h+i,function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout),t._preloadTimeout=setTimeout(function(){t.preloadNearbyImages(),t._preloadTimeout=null},16)}),void C(l+i,function(){r.off(i),t.wrap.off(\"click\"+i),t.arrowLeft&&o&&t.arrowLeft.add(t.arrowRight).destroyMfpFastClick(),t.arrowRight=t.arrowLeft=null})):!1},next:function(){t.direction=!0,t.index=q(t.index+1),t.updateItemHTML()},prev:function(){t.direction=!1,t.index=q(t.index-1),t.updateItemHTML()},goTo:function(e){t.direction=e>=t.index,t.index=e,t.updateItemHTML()},preloadNearbyImages:function(){var e,n=t.st.gallery.preload,i=Math.min(n[0],t.items.length),r=Math.min(n[1],t.items.length);for(e=1;e<=(t.direction?r:i);e++)t._preloadItem(t.index+e);for(e=1;e<=(t.direction?i:r);e++)t._preloadItem(t.index-e)},_preloadItem:function(n){if(n=q(n),!t.items[n].preloaded){var i=t.items[n];i.parsed||(i=t.parseEl(n)),S(\"LazyLoad\",i),\"image\"===i.type&&(i.img=e('').on(\"load.mfploader\",function(){i.hasSize=!0}).on(\"error.mfploader\",function(){i.hasSize=!0,i.loadError=!0,S(\"LazyLoadError\",i)}).attr(\"src\",i.src)),i.preloaded=!0}}}});var V=\"retina\";e.magnificPopup.registerModule(V,{options:{replaceSrc:function(e){return e.src.replace(/\\.\\w+$/,function(e){return\"@2x\"+e})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var e=t.st.retina,n=e.ratio;n=isNaN(n)?n():n,n>1&&(C(\"ImageHasSize.\"+V,function(e,t){t.img.css({\"max-width\":t.img[0].naturalWidth/n,width:\"100%\"})}),C(\"ElementParse.\"+V,function(t,i){i.src=e.replaceSrc(i,n)}))}}}}),function(){var t=1e3,n=\"ontouchstart\"in window,i=function(){x.off(\"touchmove\"+o+\" touchend\"+o)},r=\"mfpFastClick\",o=\".\"+r;e.fn.mfpFastClick=function(r){return e(this).each(function(){var a,s=e(this);if(n){var l,u,c,d,p,f;s.on(\"touchstart\"+o,function(e){d=!1,f=1,p=e.originalEvent?e.originalEvent.touches[0]:e.touches[0],u=p.clientX,c=p.clientY,x.on(\"touchmove\"+o,function(e){p=e.originalEvent?e.originalEvent.touches:e.touches,f=p.length,p=p[0],(Math.abs(p.clientX-u)>10||Math.abs(p.clientY-c)>10)&&(d=!0,i())}).on(\"touchend\"+o,function(e){i(),d||f>1||(a=!0,e.preventDefault(),clearTimeout(l),l=setTimeout(function(){a=!1},t),r())})})}s.on(\"click\"+o,function(){a||r()})})},e.fn.destroyMfpFastClick=function(){e(this).off(\"touchstart\"+o+\" click\"+o),n&&x.off(\"touchmove\"+o+\" touchend\"+o)}}(),E()}(window.jQuery||window.Zepto);/*___________________________________________________________________________________________________________________________________________________\n _ jquery.mb.components _\n _ _\n _ file: jquery.mb.YTPlayer.js _\n _ last modified: 19/08/14 20.13 _\n _ _\n _ Open Lab s.r.l., Florence - Italy _\n _ _\n _ email: matteo@open-lab.com _\n _ site: http://pupunzi.com _\n _ http://open-lab.com _\n _ blog: http://pupunzi.open-lab.com _\n _ Q&A: http://jquery.pupunzi.com _\n _ _\n _ Licences: MIT, GPL _\n _ http://www.opensource.org/licenses/mit-license.php _\n _ http://www.gnu.org/licenses/gpl.html _\n _ _\n _ Copyright (c) 2001-2014. Matteo Bicocchi (Pupunzi); _\n ___________________________________________________________________________________________________________________________________________________*/\nvar ytp=ytp||{};!function(jQuery,ytp){var nAgt=navigator.userAgent;if(!jQuery.browser){jQuery.browser={},jQuery.browser.mozilla=!1,jQuery.browser.webkit=!1,jQuery.browser.opera=!1,jQuery.browser.safari=!1,jQuery.browser.chrome=!1,jQuery.browser.msie=!1,jQuery.browser.ua=nAgt,jQuery.browser.name=navigator.appName,jQuery.browser.fullVersion=\"\"+parseFloat(navigator.appVersion),jQuery.browser.majorVersion=parseInt(navigator.appVersion,10);var nameOffset,verOffset,ix;if(-1!=(verOffset=nAgt.indexOf(\"Opera\")))jQuery.browser.opera=!0,jQuery.browser.name=\"Opera\",jQuery.browser.fullVersion=nAgt.substring(verOffset+6),-1!=(verOffset=nAgt.indexOf(\"Version\"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8));else if(-1!=(verOffset=nAgt.indexOf(\"MSIE\")))jQuery.browser.msie=!0,jQuery.browser.name=\"Microsoft Internet Explorer\",jQuery.browser.fullVersion=nAgt.substring(verOffset+5);else if(-1!=nAgt.indexOf(\"Trident\")){jQuery.browser.msie=!0,jQuery.browser.name=\"Microsoft Internet Explorer\";var start=nAgt.indexOf(\"rv:\")+3,end=start+4;jQuery.browser.fullVersion=nAgt.substring(start,end)}else-1!=(verOffset=nAgt.indexOf(\"Chrome\"))?(jQuery.browser.webkit=!0,jQuery.browser.chrome=!0,jQuery.browser.name=\"Chrome\",jQuery.browser.fullVersion=nAgt.substring(verOffset+7)):-1!=(verOffset=nAgt.indexOf(\"Safari\"))?(jQuery.browser.webkit=!0,jQuery.browser.safari=!0,jQuery.browser.name=\"Safari\",jQuery.browser.fullVersion=nAgt.substring(verOffset+7),-1!=(verOffset=nAgt.indexOf(\"Version\"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8))):-1!=(verOffset=nAgt.indexOf(\"AppleWebkit\"))?(jQuery.browser.webkit=!0,jQuery.browser.name=\"Safari\",jQuery.browser.fullVersion=nAgt.substring(verOffset+7),-1!=(verOffset=nAgt.indexOf(\"Version\"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8))):-1!=(verOffset=nAgt.indexOf(\"Firefox\"))?(jQuery.browser.mozilla=!0,jQuery.browser.name=\"Firefox\",jQuery.browser.fullVersion=nAgt.substring(verOffset+8)):(nameOffset=nAgt.lastIndexOf(\" \")+1)<(verOffset=nAgt.lastIndexOf(\"/\"))&&(jQuery.browser.name=nAgt.substring(nameOffset,verOffset),jQuery.browser.fullVersion=nAgt.substring(verOffset+1),jQuery.browser.name.toLowerCase()==jQuery.browser.name.toUpperCase()&&(jQuery.browser.name=navigator.appName));-1!=(ix=jQuery.browser.fullVersion.indexOf(\";\"))&&(jQuery.browser.fullVersion=jQuery.browser.fullVersion.substring(0,ix)),-1!=(ix=jQuery.browser.fullVersion.indexOf(\" \"))&&(jQuery.browser.fullVersion=jQuery.browser.fullVersion.substring(0,ix)),jQuery.browser.majorVersion=parseInt(\"\"+jQuery.browser.fullVersion,10),isNaN(jQuery.browser.majorVersion)&&(jQuery.browser.fullVersion=\"\"+parseFloat(navigator.appVersion),jQuery.browser.majorVersion=parseInt(navigator.appVersion,10)),jQuery.browser.version=jQuery.browser.majorVersion}jQuery.browser.android=/Android/i.test(nAgt),jQuery.browser.blackberry=/BlackBerry|BB|PlayBook/i.test(nAgt),jQuery.browser.ios=/iPhone|iPad|iPod|webOS/i.test(nAgt),jQuery.browser.operaMobile=/Opera Mini/i.test(nAgt),jQuery.browser.kindle=/Kindle|Silk/i.test(nAgt),jQuery.browser.windowsMobile=/IEMobile|Windows Phone/i.test(nAgt),jQuery.browser.mobile=jQuery.browser.android||jQuery.browser.blackberry||jQuery.browser.ios||jQuery.browser.windowsMobile||jQuery.browser.operaMobile||jQuery.browser.kindle,jQuery.fn.CSSAnimate=function(e,t,n,i,r){function o(e){return e.replace(/([A-Z])/g,function(e){return\"-\"+e.toLowerCase()})}function a(e,t){return\"string\"!=typeof e||e.match(/^[\\-0-9\\.]+$/)?\"\"+e+t:e}return jQuery.support.CSStransition=function(){var e=(document.body||document.documentElement).style;return void 0!==e.transition||void 0!==e.WebkitTransition||void 0!==e.MozTransition||void 0!==e.MsTransition||void 0!==e.OTransition}(),this.each(function(){var s=this,l=jQuery(this);s.id=s.id||\"CSSA_\"+(new Date).getTime();var u=u||{type:\"noEvent\"};if(s.CSSAIsRunning&&s.eventType==u.type)s.CSSqueue=function(){l.CSSAnimate(e,t,n,i,r)};else if(s.CSSqueue=null,s.eventType=u.type,0!==l.length&&e){if(s.CSSAIsRunning=!0,\"function\"==typeof t&&(r=t,t=jQuery.fx.speeds._default),\"function\"==typeof n&&(r=n,n=0),\"function\"==typeof i&&(r=i,i=\"cubic-bezier(0.65,0.03,0.36,0.72)\"),\"string\"==typeof t)for(var c in jQuery.fx.speeds){if(t==c){t=jQuery.fx.speeds[c];break}t=jQuery.fx.speeds._default}if(t||(t=jQuery.fx.speeds._default),jQuery.support.CSStransition){u={\"default\":\"ease\",\"in\":\"ease-in\",out:\"ease-out\",\"in-out\":\"ease-in-out\",snap:\"cubic-bezier(0,1,.5,1)\",easeOutCubic:\"cubic-bezier(.215,.61,.355,1)\",easeInOutCubic:\"cubic-bezier(.645,.045,.355,1)\",easeInCirc:\"cubic-bezier(.6,.04,.98,.335)\",easeOutCirc:\"cubic-bezier(.075,.82,.165,1)\",easeInOutCirc:\"cubic-bezier(.785,.135,.15,.86)\",easeInExpo:\"cubic-bezier(.95,.05,.795,.035)\",easeOutExpo:\"cubic-bezier(.19,1,.22,1)\",easeInOutExpo:\"cubic-bezier(1,0,0,1)\",easeInQuad:\"cubic-bezier(.55,.085,.68,.53)\",easeOutQuad:\"cubic-bezier(.25,.46,.45,.94)\",easeInOutQuad:\"cubic-bezier(.455,.03,.515,.955)\",easeInQuart:\"cubic-bezier(.895,.03,.685,.22)\",easeOutQuart:\"cubic-bezier(.165,.84,.44,1)\",easeInOutQuart:\"cubic-bezier(.77,0,.175,1)\",easeInQuint:\"cubic-bezier(.755,.05,.855,.06)\",easeOutQuint:\"cubic-bezier(.23,1,.32,1)\",easeInOutQuint:\"cubic-bezier(.86,0,.07,1)\",easeInSine:\"cubic-bezier(.47,0,.745,.715)\",easeOutSine:\"cubic-bezier(.39,.575,.565,1)\",easeInOutSine:\"cubic-bezier(.445,.05,.55,.95)\",easeInBack:\"cubic-bezier(.6,-.28,.735,.045)\",easeOutBack:\"cubic-bezier(.175, .885,.32,1.275)\",easeInOutBack:\"cubic-bezier(.68,-.55,.265,1.55)\"},u[i]&&(i=u[i]);var d=\"\",p=\"transitionEnd\";jQuery.browser.webkit?(d=\"-webkit-\",p=\"webkitTransitionEnd\"):jQuery.browser.mozilla?(d=\"-moz-\",p=\"transitionend\"):jQuery.browser.opera?(d=\"-o-\",p=\"otransitionend\"):jQuery.browser.msie&&(d=\"-ms-\",p=\"msTransitionEnd\"),u=[];for(f in e)c=f,\"transform\"===c&&(c=d+\"transform\",e[c]=e[f],delete e[f]),\"filter\"===c&&(c=d+\"filter\",e[c]=e[f],delete e[f]),(\"transform-origin\"===c||\"origin\"===c)&&(c=d+\"transform-origin\",e[c]=e[f],delete e[f]),\"x\"===c&&(c=d+\"transform\",e[c]=e[c]||\"\",e[c]+=\" translateX(\"+a(e[f],\"px\")+\")\",delete e[f]),\"y\"===c&&(c=d+\"transform\",e[c]=e[c]||\"\",e[c]+=\" translateY(\"+a(e[f],\"px\")+\")\",delete e[f]),\"z\"===c&&(c=d+\"transform\",e[c]=e[c]||\"\",e[c]+=\" translateZ(\"+a(e[f],\"px\")+\")\",delete e[f]),\"rotate\"===c&&(c=d+\"transform\",e[c]=e[c]||\"\",e[c]+=\" rotate(\"+a(e[f],\"deg\")+\")\",delete e[f]),\"rotateX\"===c&&(c=d+\"transform\",e[c]=e[c]||\"\",e[c]+=\" rotateX(\"+a(e[f],\"deg\")+\")\",delete e[f]),\"rotateY\"===c&&(c=d+\"transform\",e[c]=e[c]||\"\",e[c]+=\" rotateY(\"+a(e[f],\"deg\")+\")\",delete e[f]),\"rotateZ\"===c&&(c=d+\"transform\",e[c]=e[c]||\"\",e[c]+=\" rotateZ(\"+a(e[f],\"deg\")+\")\",delete e[f]),\"scale\"===c&&(c=d+\"transform\",e[c]=e[c]||\"\",e[c]+=\" scale(\"+a(e[f],\"\")+\")\",delete e[f]),\"scaleX\"===c&&(c=d+\"transform\",e[c]=e[c]||\"\",e[c]+=\" scaleX(\"+a(e[f],\"\")+\")\",delete e[f]),\"scaleY\"===c&&(c=d+\"transform\",e[c]=e[c]||\"\",e[c]+=\" scaleY(\"+a(e[f],\"\")+\")\",delete e[f]),\"scaleZ\"===c&&(c=d+\"transform\",e[c]=e[c]||\"\",e[c]+=\" scaleZ(\"+a(e[f],\"\")+\")\",delete e[f]),\"skew\"===c&&(c=d+\"transform\",e[c]=e[c]||\"\",e[c]+=\" skew(\"+a(e[f],\"deg\")+\")\",delete e[f]),\"skewX\"===c&&(c=d+\"transform\",e[c]=e[c]||\"\",e[c]+=\" skewX(\"+a(e[f],\"deg\")+\")\",delete e[f]),\"skewY\"===c&&(c=d+\"transform\",e[c]=e[c]||\"\",e[c]+=\" skewY(\"+a(e[f],\"deg\")+\")\",delete e[f]),\"perspective\"===c&&(c=d+\"transform\",e[c]=e[c]||\"\",e[c]+=\" perspective(\"+a(e[f],\"px\")+\")\",delete e[f]),0>u.indexOf(c)&&u.push(o(c));var f=u.join(\",\"),h=function(){l.off(p+\".\"+s.id),clearTimeout(s.timeout),l.css(d+\"transition\",\"\"),\"function\"==typeof r&&r(l),s.called=!0,s.CSSAIsRunning=!1,\"function\"==typeof s.CSSqueue&&(s.CSSqueue(),s.CSSqueue=null)},m={};jQuery.extend(m,e),m[d+\"transition-property\"]=f,m[d+\"transition-duration\"]=t+\"ms\",m[d+\"transition-delay\"]=n+\"ms\",m[d+\"transition-style\"]=\"preserve-3d\",m[d+\"transition-timing-function\"]=i,setTimeout(function(){l.one(p+\".\"+s.id,h),l.css(m)},1),s.timeout=setTimeout(function(){l.called||!r?(l.called=!1,s.CSSAIsRunning=!1):(l.css(d+\"transition\",\"\"),r(l),s.CSSAIsRunning=!1,\"function\"==typeof s.CSSqueue&&(s.CSSqueue(),s.CSSqueue=null))},t+n+100)}else{for(var f in e)\"transform\"===f&&delete e[f],\"filter\"===f&&delete e[f],\"transform-origin\"===f&&delete e[f],\"auto\"===e[f]&&delete e[f];r&&\"string\"!=typeof r||(r=\"linear\"),l.animate(e,t,r)}}})};var getYTPVideoID=function(e){var t,n;return e.indexOf(\"youtu.be\")>0?(t=e.substr(e.lastIndexOf(\"/\")+1,e.length),n=t.indexOf(\"?list=\")>0?t.substr(t.lastIndexOf(\"=\"),t.length):null,t=n?t.substr(0,t.lastIndexOf(\"?\")):t):e.indexOf(\"http\")>-1?(t=e.match(/[\\\\?&]v=([^&#]*)/)[1],n=e.indexOf(\"list=\")>0?e.match(/[\\\\?&]list=([^&#]*)/)[1]:null):(t=e.length>15?null:e,n=t?null:e),{videoID:t,playlistID:n}};jQuery.mbYTPlayer={name:\"jquery.mb.YTPlayer\",version:\"2.8.1\",author:\"Matteo Bicocchi\",defaults:{containment:\"body\",ratio:\"auto\",videoURL:null,playlistURL:null,startAt:0,stopAt:0,autoPlay:!0,vol:100,addRaster:!1,opacity:1,quality:\"default\",mute:!1,loop:!0,showControls:!0,showAnnotations:!1,showYTLogo:!0,stopMovieOnClick:!1,stopMovieOnBlur:!0,realfullscreen:!0,gaTrack:!0,optimizeDisplay:!0,onReady:function(){}},controls:{play:\"P\",pause:\"p\",mute:\"M\",unmute:\"A\",onlyYT:\"O\",showSite:\"R\",ytLogo:\"Y\"},locationProtocol:\"https:\",buildPlayer:function(options){return this.each(function(){var YTPlayer=this,$YTPlayer=jQuery(YTPlayer);YTPlayer.loop=0,YTPlayer.opt={},$YTPlayer.addClass(\"mb_YTPlayer\");var property=$YTPlayer.data(\"property\")&&\"string\"==typeof $YTPlayer.data(\"property\")?eval(\"(\"+$YTPlayer.data(\"property\")+\")\"):$YTPlayer.data(\"property\");\"undefined\"!=typeof property&&\"undefined\"!=typeof property.vol&&(property.vol=0==property.vol?property.vol=1:property.vol),jQuery.extend(YTPlayer.opt,jQuery.mbYTPlayer.defaults,options,property),YTPlayer.isRetina=window.retina||window.devicePixelRatio>1;var isIframe=function(){var e=!1;try{self.location.href!=top.location.href&&(e=!0)}catch(t){e=!0}return e};YTPlayer.canGoFullScreen=!(jQuery.browser.msie||jQuery.browser.opera||isIframe()),YTPlayer.canGoFullScreen||(YTPlayer.opt.realfullscreen=!1),$YTPlayer.attr(\"id\")||$YTPlayer.attr(\"id\",\"video_\"+(new Date).getTime());var playerID=\"mbYTP_\"+YTPlayer.id;YTPlayer.isAlone=!1,YTPlayer.hasFocus=!0;var videoID=this.opt.videoURL?getYTPVideoID(this.opt.videoURL).videoID:$YTPlayer.attr(\"href\")?getYTPVideoID($YTPlayer.attr(\"href\")).videoID:!1,playlistID=this.opt.videoURL?getYTPVideoID(this.opt.videoURL).playlistID:$YTPlayer.attr(\"href\")?getYTPVideoID($YTPlayer.attr(\"href\")).playlistID:!1;YTPlayer.videoID=videoID,YTPlayer.playlistID=playlistID,YTPlayer.opt.showAnnotations=YTPlayer.opt.showAnnotations?\"0\":\"3\";var playerVars={autoplay:0,modestbranding:1,controls:0,showinfo:0,rel:0,enablejsapi:1,version:3,playerapiid:playerID,origin:\"*\",allowfullscreen:!0,wmode:\"transparent\",iv_load_policy:YTPlayer.opt.showAnnotations};document.createElement(\"video\").canPlayType&&jQuery.extend(playerVars,{html5:1}),jQuery.browser.msie&&jQuery.browser.version<9&&(this.opt.opacity=1);var playerBox=jQuery(\"
    \").attr(\"id\",playerID).addClass(\"playerBox\"),overlay=jQuery(\"
    \").css({position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\"}).addClass(\"YTPOverlay\");if(YTPlayer.isSelf=\"self\"==YTPlayer.opt.containment,YTPlayer.opt.containment=jQuery(\"self\"==YTPlayer.opt.containment?this:YTPlayer.opt.containment),YTPlayer.isBackground=\"body\"==YTPlayer.opt.containment.get(0).tagName.toLowerCase(),!YTPlayer.isBackground||!ytp.backgroundIsInited){var isPlayer=YTPlayer.opt.containment.is(jQuery(this));if(YTPlayer.canPlayOnMobile=isPlayer&&0==jQuery(this).children().length,isPlayer?YTPlayer.isPlayer=!0:$YTPlayer.hide(),jQuery.browser.mobile&&!YTPlayer.canPlayOnMobile)return void $YTPlayer.remove();if(YTPlayer.opt.addRaster){var classN=\"dot\"==YTPlayer.opt.addRaster?\"raster-dot\":\"raster\";overlay.addClass(YTPlayer.isRetina?classN+\" retina\":classN)}else overlay.removeClass(function(e,t){var n=t.split(\" \"),i=[];return jQuery.each(n,function(e,t){/raster-.*/.test(t)&&i.push(t)}),i.push(\"retina\"),i.join(\" \")});var wrapper=jQuery(\"
    \").addClass(\"mbYTP_wrapper\").attr(\"id\",\"wrapper_\"+playerID);if(wrapper.css({position:\"absolute\",zIndex:0,minWidth:\"100%\",minHeight:\"100%\",left:0,top:0,overflow:\"hidden\",opacity:0}),playerBox.css({position:\"absolute\",zIndex:0,width:\"100%\",height:\"100%\",top:0,left:0,overflow:\"hidden\"}),wrapper.append(playerBox),YTPlayer.opt.containment.children().not(\"script, style\").each(function(){\"static\"==jQuery(this).css(\"position\")&&jQuery(this).css(\"position\",\"relative\")}),YTPlayer.isBackground?(jQuery(\"body\").css({boxSizing:\"border-box\"}),wrapper.css({position:\"fixed\",top:0,left:0,zIndex:0,webkitTransform:\"translateZ(0)\"}),$YTPlayer.hide()):\"static\"==YTPlayer.opt.containment.css(\"position\")&&YTPlayer.opt.containment.css({position:\"relative\"}),YTPlayer.opt.containment.prepend(wrapper),YTPlayer.wrapper=wrapper,playerBox.css({opacity:1}),jQuery.browser.mobile||(playerBox.after(overlay),YTPlayer.overlay=overlay),YTPlayer.isBackground||overlay.on(\"mouseenter\",function(){$YTPlayer.find(\".mb_YTPBar\").addClass(\"visible\")}).on(\"mouseleave\",function(){$YTPlayer.find(\".mb_YTPBar\").removeClass(\"visible\")}),ytp.YTAPIReady)setTimeout(function(){jQuery(document).trigger(\"YTAPIReady\")},100);else{jQuery(\"#YTAPI\").remove();var tag=jQuery(\"\").attr({src:jQuery.mbYTPlayer.locationProtocol+\"//www.youtube.com/player_api?v=\"+jQuery.mbYTPlayer.version,id:\"YTAPI\"});jQuery(\"head title\").after(tag)}jQuery(document).on(\"YTAPIReady\",function(){YTPlayer.isBackground&&ytp.backgroundIsInited||YTPlayer.isInit||(YTPlayer.isBackground&&YTPlayer.opt.stopMovieOnClick&&jQuery(document).off(\"mousedown.ytplayer\").on(\"mousedown.ytplayer\",function(e){var t=jQuery(e.target);(t.is(\"a\")||t.parents().is(\"a\"))&&$YTPlayer.pauseYTP()}),YTPlayer.isBackground&&(ytp.backgroundIsInited=!0),YTPlayer.opt.autoPlay=\"undefined\"==typeof YTPlayer.opt.autoPlay?YTPlayer.isBackground?!0:!1:YTPlayer.opt.autoPlay,YTPlayer.opt.vol=YTPlayer.opt.vol?YTPlayer.opt.vol:100,jQuery.mbYTPlayer.getDataFromFeed(YTPlayer),jQuery(YTPlayer).on(\"YTPChanged\",function(){return YTPlayer.isInit?void 0:(YTPlayer.isInit=!0,jQuery.browser.mobile&&YTPlayer.canPlayOnMobile?void new YT.Player(playerID,{videoId:YTPlayer.videoID.toString(),height:\"100%\",width:\"100%\",videoId:YTPlayer.videoID,events:{onReady:function(e){YTPlayer.player=e.target,playerBox.css({opacity:1}),YTPlayer.wrapper.css({opacity:YTPlayer.opt.opacity}),$YTPlayer.optimizeDisplay()},onStateChange:function(){}}}):void new YT.Player(playerID,{videoId:YTPlayer.videoID.toString(),playerVars:playerVars,events:{onReady:function(e){if(YTPlayer.player=e.target,!YTPlayer.isReady){YTPlayer.isReady=!0,YTPlayer.playerEl=YTPlayer.player.getIframe(),$YTPlayer.optimizeDisplay(),YTPlayer.videoID=videoID,jQuery(window).on(\"resize.YTP\",function(){$YTPlayer.optimizeDisplay()}),YTPlayer.opt.showControls&&jQuery(YTPlayer).buildYTPControls();var t=YTPlayer.opt.startAt?YTPlayer.opt.startAt:1;YTPlayer.player.setVolume(0),jQuery(YTPlayer).muteYTPVolume(),jQuery.mbYTPlayer.checkForState(YTPlayer),YTPlayer.checkForStartAt=setInterval(function(){var e=YTPlayer.player.getVideoLoadedFraction()>t/YTPlayer.player.getDuration();YTPlayer.player.getDuration()>0&&YTPlayer.player.getCurrentTime()>=t&&e?(clearInterval(YTPlayer.checkForStartAt),YTPlayer.player.setVolume(0),jQuery(YTPlayer).muteYTPVolume(),\"function\"==typeof YTPlayer.opt.onReady&&YTPlayer.opt.onReady(YTPlayer),YTPlayer.opt.mute||jQuery(YTPlayer).unmuteYTP(),YTPlayer.player.pauseVideo(),setTimeout(function(){YTPlayer.canTrigger=!0,YTPlayer.opt.autoPlay?($YTPlayer.playYTP(),$YTPlayer.css(\"background-image\",\"none\"),YTPlayer.wrapper.CSSAnimate({opacity:YTPlayer.isAlone?1:YTPlayer.opt.opacity},2e3)):YTPlayer.player.pauseVideo()},100)):(YTPlayer.player.playVideo(),YTPlayer.player.seekTo(t,!0));var n=jQuery.Event(\"YTPReady\");jQuery(YTPlayer).trigger(n)},1e3)}},onStateChange:function(event){if(\"function\"==typeof event.target.getPlayerState){var state=event.target.getPlayerState();if(YTPlayer.state!=state){YTPlayer.state=state;var controls=jQuery(\"#controlBar_\"+YTPlayer.id),eventType;switch(state){case-1:eventType=\"YTPUnstarted\";break;case 0:eventType=\"YTPEnd\";break;case 1:eventType=\"YTPStart\",controls.find(\".mb_YTPPlaypause\").html(jQuery.mbYTPlayer.controls.pause),\"undefined\"!=typeof _gaq&&eval(YTPlayer.opt.gaTrack)&&_gaq.push([\"_trackEvent\",\"YTPlayer\",\"Play\",YTPlayer.videoTitle||YTPlayer.videoID.toString()]),\"undefined\"!=typeof ga&&eval(YTPlayer.opt.gaTrack)&&ga(\"send\",\"event\",\"YTPlayer\",\"play\",YTPlayer.videoTitle||YTPlayer.videoID.toString());break;case 2:eventType=\"YTPPause\",controls.find(\".mb_YTPPlaypause\").html(jQuery.mbYTPlayer.controls.play);break;case 3:jQuery.browser.chrome||YTPlayer.player.setPlaybackQuality(YTPlayer.opt.quality),eventType=\"YTPBuffering\",jQuery.browser.chrome||YTPlayer.player.setPlaybackQuality(YTPlayer.opt.quality),controls.find(\".mb_YTPPlaypause\").html(jQuery.mbYTPlayer.controls.play),setTimeout(function(){controls.show(1e3)},2e3);break;case 5:eventType=\"YTPCued\"}var YTPevent=jQuery.Event(eventType);YTPevent.time=YTPlayer.player.time,YTPlayer.canTrigger&&jQuery(YTPlayer).trigger(YTPevent)}}},onPlaybackQualityChange:function(e){var t=e.target.getPlaybackQuality(),n=jQuery.Event(\"YTPQualityChange\");n.quality=t,jQuery(YTPlayer).trigger(n)},onError:function(e){150==e.data&&(console.log(\"Embedding this video is restricted by Youtube.\"),YTPlayer.isPlayList&&jQuery(YTPlayer).playNext()),2==e.data&&YTPlayer.isPlayList&&jQuery(YTPlayer).playNext(),\"function\"==typeof YTPlayer.opt.onError&&YTPlayer.opt.onError($YTPlayer,e)}}}))}))})}})},getDataFromFeed:function(e){jQuery.browser.msie&&jQuery.browser.version<=9?(\"auto\"==e.opt.ratio?e.opt.ratio=\"16/9\":e.opt.ratio,e.hasData||(e.hasData=!0,setTimeout(function(){jQuery(e).trigger(\"YTPChanged\")},100))):(jQuery.getJSON(jQuery.mbYTPlayer.locationProtocol+\"//gdata.youtube.com/feeds/api/videos/\"+e.videoID+\"?v=2&alt=jsonc\",function(t){e.dataReceived=!0,e.videoData=t.data,jQuery(e).trigger(\"YTPChanged\");var n=jQuery.Event(\"YTPData\");n.prop={};for(var i in e.videoData)n.prop[i]=e.videoData[i];if(jQuery(e).trigger(n),e.videoTitle=e.videoData.title,\"auto\"==e.opt.ratio&&(e.opt.ratio=e.videoData.aspectRatio&&\"widescreen\"===e.videoData.aspectRatio?\"16/9\":\"4/3\"),!e.hasData&&(e.hasData=!0,e.isPlayer)){var r=e.videoData.thumbnail.hqDefault;e.opt.containment.css({background:\"rgba(0,0,0,0.5) url(\"+r+\") center center\",backgroundSize:\"cover\"})}}),setTimeout(function(){e.dataReceived||e.hasData||(e.hasData=!0,jQuery(e).trigger(\"YTPChanged\"))},1500))},getVideoData:function(){var e=this.get(0);return e.videoData},getVideoID:function(){var e=this.get(0);return e.videoID||!1},setVideoQuality:function(e){var t=this.get(0);jQuery.browser.chrome||t.player.setPlaybackQuality(e)},YTPlaylist:function(e,t,n){var i=this.get(0);i.isPlayList=!0,t&&(e=jQuery.shuffle(e)),i.videoID||(i.videos=e,i.videoCounter=0,i.videoLength=e.length,jQuery(i).data(\"property\",e[0]),jQuery(i).mb_YTPlayer()),\"function\"==typeof n&&jQuery(i).on(\"YTPChanged\",function(){n(i)}),jQuery(i).on(\"YTPEnd\",function(){jQuery(i).playNext()})},playNext:function(){var e=this.get(0);e.videoCounter++,e.videoCounter>=e.videoLength&&(e.videoCounter=0),jQuery(e.playerEl).css({opacity:0}),jQuery(e).changeMovie(e.videos[e.videoCounter])},playPrev:function(){var e=this.get(0);e.videoCounter--,e.videoCounter<0&&(e.videoCounter=e.videoLength-1),jQuery(e.playerEl).css({opacity:0}),jQuery(e).changeMovie(e.videos[e.videoCounter])},changeMovie:function(e){var t=this.get(0);t.opt.startAt=0,t.opt.stopAt=0,t.opt.mute=!0,e&&jQuery.extend(t.opt,e),t.videoID=getYTPVideoID(t.opt.videoURL).videoID,jQuery(t).pauseYTP();var n=jQuery.browser.msie?1e3:0;jQuery(t.playerEl).CSSAnimate({opacity:0},n),setTimeout(function(){var e=jQuery.browser.chrome?\"default\":t.opt.quality;jQuery(t).getPlayer().cueVideoByUrl(encodeURI(jQuery.mbYTPlayer.locationProtocol+\"//www.youtube.com/v/\"+t.videoID),1,e),jQuery(t).playYTP(),jQuery(t).one(\"YTPStart\",function(){t.wrapper.CSSAnimate({opacity:t.isAlone?1:t.opt.opacity},1e3),jQuery(t.playerEl).CSSAnimate({opacity:1},n),t.opt.startAt&&t.player.seekTo(t.opt.startAt),jQuery.mbYTPlayer.checkForState(t),t.opt.autoPlay||jQuery(t).pauseYTP()}),t.opt.mute?jQuery(t).muteYTPVolume():jQuery(t).unmuteYTP()},n),t.opt.addRaster?t.overlay.addClass(t.isRetina?\"raster retina\":\"raster\"):t.overlay.removeClass(\"raster\").removeClass(\"retina\"),jQuery(\"#controlBar_\"+t.id).remove(),t.opt.showControls&&jQuery(t).buildYTPControls(),jQuery.mbYTPlayer.getDataFromFeed(t),jQuery(t).optimizeDisplay()},getPlayer:function(){return jQuery(this).get(0).player},playerDestroy:function(){var e=this.get(0);ytp.YTAPIReady=!1,ytp.backgroundIsInited=!1,e.isInit=!1,e.videoID=null;var t=e.wrapper;t.remove(),jQuery(\"#controlBar_\"+e.id).remove(),clearInterval(e.checkForStartAt)},fullscreen:function(real){function RunPrefixMethod(e,t){for(var n,i,r=[\"webkit\",\"moz\",\"ms\",\"o\",\"\"],o=0;o0||e&&t.player.getVolume()==e?jQuery(t).muteYTPVolume():t.opt.vol=e:jQuery(t).unmuteYTP(),t.player.setVolume(t.opt.vol)},muteYTP:function(){var e=this.get(0);e.player.mute(),e.player.setVolume(0);var t=jQuery(\"#controlBar_\"+e.id),n=t.find(\".mb_YTPMuteUnmute\");n.html(jQuery.mbYTPlayer.controls.unmute),jQuery(e).addClass(\"isMuted\"),jQuery(e).trigger(\"YTPMuted\")},unmuteYTP:function(){var e=this.get(0);e.player.unMute(),e.player.setVolume(e.opt.vol);var t=jQuery(\"#controlBar_\"+e.id),n=t.find(\".mb_YTPMuteUnmute\");n.html(jQuery.mbYTPlayer.controls.mute),jQuery(e).removeClass(\"isMuted\"),jQuery(e).trigger(\"YTPUnmuted\")},manageYTPProgress:function(){var e=this.get(0),t=jQuery(\"#controlBar_\"+e.id),n=t.find(\".mb_YTPProgress\"),i=t.find(\".mb_YTPLoaded\"),r=t.find(\".mb_YTPseekbar\"),o=n.outerWidth(),a=Math.floor(e.player.getCurrentTime()),s=Math.floor(e.player.getDuration()),l=a*o/s,u=0,c=100*e.player.getVideoLoadedFraction();return i.css({left:u,width:c+\"%\"}),r.css({left:0,width:l}),{totalTime:s,currentTime:a}},buildYTPControls:function(){var YTPlayer=this.get(0),data=YTPlayer.opt;if(data.showYTLogo=data.showYTLogo||data.printUrl,!jQuery(\"#controlBar_\"+YTPlayer.id).length){var controlBar=jQuery(\"\").attr(\"id\",\"controlBar_\"+YTPlayer.id).addClass(\"mb_YTPBar\").css({whiteSpace:\"noWrap\",position:YTPlayer.isBackground?\"fixed\":\"absolute\",zIndex:YTPlayer.isBackground?1e4:1e3}).hide();YTPlayer.controlBar=controlBar;var buttonBar=jQuery(\"
    \").addClass(\"buttonBar\"),playpause=jQuery(\"\"+jQuery.mbYTPlayer.controls.play+\"\").addClass(\"mb_YTPPlaypause ytpicon\").click(function(){1==YTPlayer.player.getPlayerState()?jQuery(YTPlayer).pauseYTP():jQuery(YTPlayer).playYTP()}),MuteUnmute=jQuery(\"\"+jQuery.mbYTPlayer.controls.mute+\"\").addClass(\"mb_YTPMuteUnmute ytpicon\").click(function(){0==YTPlayer.player.getVolume()?jQuery(YTPlayer).unmuteYTP():jQuery(YTPlayer).muteYTP()}),idx=jQuery(\"\").addClass(\"mb_YTPTime\"),vURL=data.videoURL?data.videoURL:\"\";vURL.indexOf(\"http\")<0&&(vURL=jQuery.mbYTPlayer.locationProtocol+\"//www.youtube.com/watch?v=\"+data.videoURL);var movieUrl=jQuery(\"\").html(jQuery.mbYTPlayer.controls.ytLogo).addClass(\"mb_YTPUrl ytpicon\").attr(\"title\",\"view on YouTube\").on(\"click\",function(){window.open(vURL,\"viewOnYT\")}),onlyVideo=jQuery(\"\").html(jQuery.mbYTPlayer.controls.onlyYT).addClass(\"mb_OnlyYT ytpicon\").on(\"click\",function(){jQuery(YTPlayer).fullscreen(data.realfullscreen)}),progressBar=jQuery(\"
    \").addClass(\"mb_YTPProgress\").css(\"position\",\"absolute\").click(function(e){timeBar.css({width:e.clientX-timeBar.offset().left}),YTPlayer.timeW=e.clientX-timeBar.offset().left,controlBar.find(\".mb_YTPLoaded\").css({width:0});var t=Math.floor(YTPlayer.player.getDuration());YTPlayer[\"goto\"]=timeBar.outerWidth()*t/progressBar.outerWidth(),YTPlayer.player.seekTo(parseFloat(YTPlayer[\"goto\"]),!0),controlBar.find(\".mb_YTPLoaded\").css({width:0})}),loadedBar=jQuery(\"
    \").addClass(\"mb_YTPLoaded\").css(\"position\",\"absolute\"),timeBar=jQuery(\"
    \").addClass(\"mb_YTPseekbar\").css(\"position\",\"absolute\");progressBar.append(loadedBar).append(timeBar),buttonBar.append(playpause).append(MuteUnmute).append(idx),data.showYTLogo&&buttonBar.append(movieUrl),(YTPlayer.isBackground||eval(YTPlayer.opt.realfullscreen)&&!YTPlayer.isBackground)&&buttonBar.append(onlyVideo),controlBar.append(buttonBar).append(progressBar),YTPlayer.isBackground?jQuery(\"body\").after(controlBar):(controlBar.addClass(\"inlinePlayer\"),YTPlayer.wrapper.before(controlBar))}},checkForState:function(YTPlayer){var interval=YTPlayer.opt.showControls?10:1e3;clearInterval(YTPlayer.getState),YTPlayer.getState=setInterval(function(){var prog=jQuery(YTPlayer).manageYTPProgress(),$YTPlayer=jQuery(YTPlayer),controlBar=jQuery(\"#controlBar_\"+YTPlayer.id),data=YTPlayer.opt,startAt=YTPlayer.opt.startAt?YTPlayer.opt.startAt:1,stopAt=YTPlayer.opt.stopAt>YTPlayer.opt.startAt?YTPlayer.opt.stopAt:0;if(stopAt=stopAt0&&parseFloat(YTPlayer.player.getCurrentTime())>stopAt)){if(YTPlayer.isEnded)return;if(YTPlayer.isEnded=!0,setTimeout(function(){YTPlayer.isEnded=!1},2e3),YTPlayer.isPlayList){clearInterval(YTPlayer.getState);var YTPEnd=jQuery.Event(\"YTPEnd\");return YTPEnd.time=YTPlayer.player.time,void jQuery(YTPlayer).trigger(YTPEnd)}data.loop?YTPlayer.player.seekTo(startAt,!0):(YTPlayer.player.pauseVideo(),YTPlayer.wrapper.CSSAnimate({opacity:0},1e3,function(){var e=jQuery.Event(\"YTPEnd\");if(e.time=YTPlayer.player.time,jQuery(YTPlayer).trigger(e),YTPlayer.player.seekTo(startAt,!0),!YTPlayer.isBackground){var t=YTPlayer.videoData.thumbnail.hqDefault;jQuery(YTPlayer).css({background:\"rgba(0,0,0,0.5) url(\"+t+\") center center\",backgroundSize:\"cover\"})}}))}},interval)},formatTime:function(e){var t=Math.floor(e/60),n=Math.floor(e-60*t);return(9>=t?\"0\"+t:t)+\" : \"+(9>=n?\"0\"+n:n)}},jQuery.fn.toggleVolume=function(){var e=this.get(0);if(e)return e.player.isMuted()?(jQuery(e).unmuteYTP(),!0):(jQuery(e).muteYTP(),!1)},jQuery.fn.optimizeDisplay=function(){var e=this.get(0),t=e.opt,n=jQuery(e.playerEl),i={},r=e.wrapper;i.width=r.outerWidth(),i.height=r.outerHeight();var o=24,a=100,s={};t.optimizeDisplay?(s.width=i.width+i.width*o/100,s.height=Math.ceil(\"16/9\"==t.ratio?9*i.width/16:3*i.width/4),s.marginTop=-((s.height-i.height)/2),s.marginLeft=-(i.width*(o/2)/100),s.height0&&t.html(t.find(\".back\").html());var r=t.text(),o=e.inArray(r,n);o+1==n.length&&(o=-1),t.html(\"\"),e(\"\"+r+\"\").appendTo(t),e(\"\"+n[o+1]+\"\").appendTo(t),t.wrapInner(\"\").find(\".rotating\").hide().addClass(\"flip\").show().css({\"-webkit-transform\":\" rotateY(-180deg)\",\"-moz-transform\":\" rotateY(-180deg)\",\"-o-transform\":\" rotateY(-180deg)\",transform:\" rotateY(-180deg)\"});break;case\"flipUp\":t.find(\".back\").length>0&&t.html(t.find(\".back\").html());var r=t.text(),o=e.inArray(r,n);o+1==n.length&&(o=-1),t.html(\"\"),e(\"\"+r+\"\").appendTo(t),e(\"\"+n[o+1]+\"\").appendTo(t),t.wrapInner(\"\").find(\".rotating\").hide().addClass(\"flip up\").show().css({\"-webkit-transform\":\" rotateX(-180deg)\",\"-moz-transform\":\" rotateX(-180deg)\",\"-o-transform\":\" rotateX(-180deg)\",transform:\" rotateX(-180deg)\"});break;case\"flipCube\":t.find(\".back\").length>0&&t.html(t.find(\".back\").html());var r=t.text(),o=e.inArray(r,n);o+1==n.length&&(o=-1),t.html(\"\"),e(\"\"+r+\"\").appendTo(t),e(\"\"+n[o+1]+\"\").appendTo(t),t.wrapInner(\"\").find(\".rotating\").hide().addClass(\"flip cube\").show().css({\"-webkit-transform\":\" rotateY(180deg)\",\"-moz-transform\":\" rotateY(180deg)\",\"-o-transform\":\" rotateY(180deg)\",transform:\" rotateY(180deg)\"});break;case\"flipCubeUp\":t.find(\".back\").length>0&&t.html(t.find(\".back\").html());var r=t.text(),o=e.inArray(r,n);o+1==n.length&&(o=-1),t.html(\"\"),e(\"\"+r+\"\").appendTo(t),e(\"\"+n[o+1]+\"\").appendTo(t),t.wrapInner(\"\").find(\".rotating\").hide().addClass(\"flip cube up\").show().css({\"-webkit-transform\":\" rotateX(180deg)\",\"-moz-transform\":\" rotateX(180deg)\",\"-o-transform\":\" rotateX(180deg)\",transform:\" rotateX(180deg)\"});break;case\"spin\":t.find(\".rotating\").length>0&&t.html(t.find(\".rotating\").html()),o=e.inArray(t.text(),n),o+1==n.length&&(o=-1),t.wrapInner(\"\").find(\".rotating\").hide().text(n[o+1]).show().css({\"-webkit-transform\":\" rotate(0) scale(1)\",\"-moz-transform\":\"rotate(0) scale(1)\",\"-o-transform\":\"rotate(0) scale(1)\",transform:\"rotate(0) scale(1)\"});break;case\"fade\":t.fadeOut(i.speed,function(){o=e.inArray(t.text(),n),o+1==n.length&&(o=-1),t.text(n[o+1]).fadeIn(i.speed)})}};setInterval(r,i.speed)})}}(window.jQuery),!function(e){var t={animation:\"dissolve\",separator:\",\",speed:2e3};e.fx.step.textShadowBlur=function(t){e(t.elem).prop(\"textShadowBlur\",t.now).css({textShadow:\"0 0 \"+Math.floor(t.now)+\"px black\"})},e.fn.textrotator=function(n){var i=e.extend({},t,n);return this.each(function(){var t=e(this),n=[];e.each(t.text().split(i.separator),function(e,t){n.push(t)}),t.text(n[0]);var r=function(){switch(i.animation){case\"dissolve\":t.animate({textShadowBlur:20,opacity:0},500,function(){o=e.inArray(t.text(),n),o+1==n.length&&(o=-1),t.text(n[o+1]).animate({textShadowBlur:0,opacity:1},500)});break;case\"flip\":t.find(\".back\").length>0&&t.html(t.find(\".back\").html());var r=t.text(),o=e.inArray(r,n);o+1==n.length&&(o=-1),t.html(\"\"),e(\"\"+r+\"\").appendTo(t),e(\"\"+n[o+1]+\"\").appendTo(t),t.wrapInner(\"\").find(\".rotating\").hide().addClass(\"flip\").show().css({\"-webkit-transform\":\" rotateY(-180deg)\",\"-moz-transform\":\" rotateY(-180deg)\",\"-o-transform\":\" rotateY(-180deg)\",transform:\" rotateY(-180deg)\"});break;case\"flipUp\":t.find(\".back\").length>0&&t.html(t.find(\".back\").html());var r=t.text(),o=e.inArray(r,n);o+1==n.length&&(o=-1),t.html(\"\"),e(\"\"+r+\"\").appendTo(t),e(\"\"+n[o+1]+\"\").appendTo(t),t.wrapInner(\"\").find(\".rotating\").hide().addClass(\"flip up\").show().css({\"-webkit-transform\":\" rotateX(-180deg)\",\"-moz-transform\":\" rotateX(-180deg)\",\"-o-transform\":\" rotateX(-180deg)\",transform:\" rotateX(-180deg)\"});break;case\"flipCube\":t.find(\".back\").length>0&&t.html(t.find(\".back\").html());var r=t.text(),o=e.inArray(r,n);o+1==n.length&&(o=-1),t.html(\"\"),e(\"\"+r+\"\").appendTo(t),e(\"\"+n[o+1]+\"\").appendTo(t),t.wrapInner(\"\").find(\".rotating\").hide().addClass(\"flip cube\").show().css({\"-webkit-transform\":\" rotateY(180deg)\",\"-moz-transform\":\" rotateY(180deg)\",\"-o-transform\":\" rotateY(180deg)\",transform:\" rotateY(180deg)\"});break;case\"flipCubeUp\":t.find(\".back\").length>0&&t.html(t.find(\".back\").html());var r=t.text(),o=e.inArray(r,n);o+1==n.length&&(o=-1),t.html(\"\"),e(\"\"+r+\"\").appendTo(t),e(\"\"+n[o+1]+\"\").appendTo(t),t.wrapInner(\"\").find(\".rotating\").hide().addClass(\"flip cube up\").show().css({\"-webkit-transform\":\" rotateX(180deg)\",\"-moz-transform\":\" rotateX(180deg)\",\"-o-transform\":\" rotateX(180deg)\",transform:\" rotateX(180deg)\"});break;case\"spin\":t.find(\".rotating\").length>0&&t.html(t.find(\".rotating\").html()),o=e.inArray(t.text(),n),o+1==n.length&&(o=-1),t.wrapInner(\"\").find(\".rotating\").hide().text(n[o+1]).show().css({\"-webkit-transform\":\" rotate(0) scale(1)\",\"-moz-transform\":\"rotate(0) scale(1)\",\"-o-transform\":\"rotate(0) scale(1)\",transform:\"rotate(0) scale(1)\"});break;case\"fade\":t.fadeOut(i.speed,function(){o=e.inArray(t.text(),n),o+1==n.length&&(o=-1),t.text(n[o+1]).fadeIn(i.speed)})}};setInterval(r,i.speed)})}}(window.jQuery),/*\n * jQuery OwlCarousel v1.3.3\n *\n * Copyright (c) 2013 Bartosz Wojciechowski\n * http://www.owlgraphic.com/owlcarousel/\n *\n * Licensed under MIT\n *\n */\n\"function\"!=typeof Object.create&&(Object.create=function(e){function t(){}return t.prototype=e,new t}),function(e,t,n){var i={init:function(t,n){var i=this;i.$elem=e(n),i.options=e.extend({},e.fn.owlCarousel.options,i.$elem.data(),t),i.userOptions=t,i.loadContent()},loadContent:function(){function t(e){var t,n=\"\";if(\"function\"==typeof i.options.jsonSuccess)i.options.jsonSuccess.apply(this,[e]);else{for(t in e.owl)e.owl.hasOwnProperty(t)&&(n+=e.owl[t].item);i.$elem.html(n)}i.logIn()}var n,i=this;\"function\"==typeof i.options.beforeInit&&i.options.beforeInit.apply(this,[i.$elem]),\"string\"==typeof i.options.jsonPath?(n=i.options.jsonPath,e.getJSON(n,t)):i.logIn()},logIn:function(){var e=this;e.$elem.data(\"owl-originalStyles\",e.$elem.attr(\"style\")),e.$elem.data(\"owl-originalClasses\",e.$elem.attr(\"class\")),e.$elem.css({opacity:0}),e.orignalItems=e.options.items,e.checkBrowser(),e.wrapperWidth=0,e.checkVisible=null,e.setVars()},setVars:function(){var e=this;return 0===e.$elem.children().length?!1:(e.baseClass(),e.eventTypes(),e.$userItems=e.$elem.children(),e.itemsAmount=e.$userItems.length,e.wrapItems(),e.$owlItems=e.$elem.find(\".owl-item\"),e.$owlWrapper=e.$elem.find(\".owl-wrapper\"),e.playDirection=\"next\",e.prevItem=0,e.prevArr=[0],e.currentItem=0,e.customEvents(),void e.onStartup())},onStartup:function(){var e=this;e.updateItems(),e.calculateAll(),e.buildControls(),e.updateControls(),e.response(),e.moveEvents(),e.stopOnHover(),e.owlStatus(),e.options.transitionStyle!==!1&&e.transitionTypes(e.options.transitionStyle),e.options.autoPlay===!0&&(e.options.autoPlay=5e3),e.play(),e.$elem.find(\".owl-wrapper\").css(\"display\",\"block\"),e.$elem.is(\":visible\")?e.$elem.css(\"opacity\",1):e.watchVisibility(),e.onstartup=!1,e.eachMoveUpdate(),\"function\"==typeof e.options.afterInit&&e.options.afterInit.apply(this,[e.$elem])},eachMoveUpdate:function(){var e=this;e.options.lazyLoad===!0&&e.lazyLoad(),e.options.autoHeight===!0&&e.autoHeight(),e.onVisibleItems(),\"function\"==typeof e.options.afterAction&&e.options.afterAction.apply(this,[e.$elem])},updateVars:function(){var e=this;\"function\"==typeof e.options.beforeUpdate&&e.options.beforeUpdate.apply(this,[e.$elem]),e.watchVisibility(),e.updateItems(),e.calculateAll(),e.updatePosition(),e.updateControls(),e.eachMoveUpdate(),\"function\"==typeof e.options.afterUpdate&&e.options.afterUpdate.apply(this,[e.$elem])},reload:function(){var e=this;t.setTimeout(function(){e.updateVars()},0)},watchVisibility:function(){var e=this;return e.$elem.is(\":visible\")!==!1?!1:(e.$elem.css({opacity:0}),t.clearInterval(e.autoPlayInterval),t.clearInterval(e.checkVisible),void(e.checkVisible=t.setInterval(function(){e.$elem.is(\":visible\")&&(e.reload(),e.$elem.animate({opacity:1},200),t.clearInterval(e.checkVisible))},500)))},wrapItems:function(){var e=this;e.$userItems.wrapAll('
    ').wrap('
    '),e.$elem.find(\".owl-wrapper\").wrap('
    '),e.wrapperOuter=e.$elem.find(\".owl-wrapper-outer\"),e.$elem.css(\"display\",\"block\")},baseClass:function(){var e=this,t=e.$elem.hasClass(e.options.baseClass),n=e.$elem.hasClass(e.options.theme);t||e.$elem.addClass(e.options.baseClass),n||e.$elem.addClass(e.options.theme)},updateItems:function(){var t,n,i=this;if(i.options.responsive===!1)return!1;if(i.options.singleItem===!0)return i.options.items=i.orignalItems=1,i.options.itemsCustom=!1,i.options.itemsDesktop=!1,i.options.itemsDesktopSmall=!1,i.options.itemsTablet=!1,i.options.itemsTabletSmall=!1,i.options.itemsMobile=!1,!1;if(t=e(i.options.responsiveBaseWidth).width(),t>(i.options.itemsDesktop[0]||i.orignalItems)&&(i.options.items=i.orignalItems),i.options.itemsCustom!==!1)for(i.options.itemsCustom.sort(function(e,t){return e[0]-t[0]}),n=0;ni.itemsAmount&&i.options.itemsScaleUp===!0&&(i.options.items=i.itemsAmount)},response:function(){var n,i,r=this;return r.options.responsive!==!0?!1:(i=e(t).width(),r.resizer=function(){e(t).width()!==i&&(r.options.autoPlay!==!1&&t.clearInterval(r.autoPlayInterval),t.clearTimeout(n),n=t.setTimeout(function(){i=e(t).width(),r.updateVars()},r.options.responsiveRefreshRate))},void e(t).resize(r.resizer))},updatePosition:function(){var e=this;e.jumpTo(e.currentItem),e.options.autoPlay!==!1&&e.checkAp()},appendItemsSizes:function(){var t=this,n=0,i=t.itemsAmount-t.options.items;t.$owlItems.each(function(r){var o=e(this);o.css({width:t.itemWidth}).data(\"owl-item\",Number(r)),(r%t.options.items===0||r===i)&&(r>i||(n+=1)),o.data(\"owl-roundPages\",n)})},appendWrapperSizes:function(){var e=this,t=e.$owlItems.length*e.itemWidth;e.$owlWrapper.css({width:2*t,left:0}),e.appendItemsSizes()},calculateAll:function(){var e=this;e.calculateWidth(),e.appendWrapperSizes(),e.loops(),e.max()},calculateWidth:function(){var e=this;e.itemWidth=Math.round(e.$elem.width()/e.options.items)},max:function(){var e=this,t=-1*(e.itemsAmount*e.itemWidth-e.options.items*e.itemWidth);return e.options.items>e.itemsAmount?(e.maximumItem=0,t=0,e.maximumPixels=0):(e.maximumItem=e.itemsAmount-e.options.items,e.maximumPixels=t),t},min:function(){return 0},loops:function(){var t,n,i,r=this,o=0,a=0;for(r.positionsInArray=[0],r.pagesInArray=[],t=0;t').toggleClass(\"clickable\",!t.browser.isTouch).appendTo(t.$elem)),t.options.pagination===!0&&t.buildPagination(),t.options.navigation===!0&&t.buildButtons()},buildButtons:function(){var t=this,n=e('
    ');t.owlControls.append(n),t.buttonPrev=e(\"
    \",{\"class\":\"owl-prev\",html:t.options.navigationText[0]||\"\"}),t.buttonNext=e(\"
    \",{\"class\":\"owl-next\",html:t.options.navigationText[1]||\"\"}),n.append(t.buttonPrev).append(t.buttonNext),n.on(\"touchstart.owlControls mousedown.owlControls\",'div[class^=\"owl\"]',function(e){e.preventDefault()}),n.on(\"touchend.owlControls mouseup.owlControls\",'div[class^=\"owl\"]',function(n){n.preventDefault(),e(this).hasClass(\"owl-next\")?t.next():t.prev()})},buildPagination:function(){var t=this;t.paginationWrapper=e('
    '),t.owlControls.append(t.paginationWrapper),t.paginationWrapper.on(\"touchend.owlControls mouseup.owlControls\",\".owl-page\",function(n){n.preventDefault(),Number(e(this).data(\"owl-page\"))!==t.currentItem&&t.goTo(Number(e(this).data(\"owl-page\")),!0)})},updatePagination:function(){var t,n,i,r,o,a,s=this;if(s.options.pagination===!1)return!1;for(s.paginationWrapper.html(\"\"),t=0,n=s.itemsAmount-s.itemsAmount%s.options.items,r=0;r\",{\"class\":\"owl-page\"}),a=e(\"\",{text:s.options.paginationNumbers===!0?t:\"\",\"class\":s.options.paginationNumbers===!0?\"owl-numbers\":\"\"}),o.append(a),o.data(\"owl-page\",n===r?i:r),o.data(\"owl-roundPages\",t),s.paginationWrapper.append(o));s.checkPagination()},checkPagination:function(){var t=this;return t.options.pagination===!1?!1:void t.paginationWrapper.find(\".owl-page\").each(function(){e(this).data(\"owl-roundPages\")===e(t.$owlItems[t.currentItem]).data(\"owl-roundPages\")&&(t.paginationWrapper.find(\".owl-page\").removeClass(\"active\"),e(this).addClass(\"active\"))})},checkNavigation:function(){var e=this;return e.options.navigation===!1?!1:void(e.options.rewindNav===!1&&(0===e.currentItem&&0===e.maximumItem?(e.buttonPrev.addClass(\"disabled\"),e.buttonNext.addClass(\"disabled\")):0===e.currentItem&&0!==e.maximumItem?(e.buttonPrev.addClass(\"disabled\"),e.buttonNext.removeClass(\"disabled\")):e.currentItem===e.maximumItem?(e.buttonPrev.removeClass(\"disabled\"),e.buttonNext.addClass(\"disabled\")):0!==e.currentItem&&e.currentItem!==e.maximumItem&&(e.buttonPrev.removeClass(\"disabled\"),e.buttonNext.removeClass(\"disabled\"))))},updateControls:function(){var e=this;e.updatePagination(),e.checkNavigation(),e.owlControls&&(e.options.items>=e.itemsAmount?e.owlControls.hide():e.owlControls.show())},destroyControls:function(){var e=this;e.owlControls&&e.owlControls.remove()},next:function(e){var t=this;if(t.isTransition)return!1;if(t.currentItem+=t.options.scrollPerPage===!0?t.options.items:1,t.currentItem>t.maximumItem+(t.options.scrollPerPage===!0?t.options.items-1:0)){if(t.options.rewindNav!==!0)return t.currentItem=t.maximumItem,!1;t.currentItem=0,e=\"rewind\"}t.goTo(t.currentItem,e)},prev:function(e){var t=this;if(t.isTransition)return!1;if(t.options.scrollPerPage===!0&&t.currentItem>0&&t.currentItem=o.maximumItem?e=o.maximumItem:0>=e&&(e=0),o.currentItem=o.owl.currentItem=e,o.options.transitionStyle!==!1&&\"drag\"!==i&&1===o.options.items&&o.browser.support3d===!0?(o.swapSpeed(0),o.browser.support3d===!0?o.transition3d(o.positionsInArray[e]):o.css2slide(o.positionsInArray[e],1),o.afterGo(),o.singleItemTransition(),!1):(r=o.positionsInArray[e],o.browser.support3d===!0?(o.isCss3Finish=!1,n===!0?(o.swapSpeed(\"paginationSpeed\"),t.setTimeout(function(){o.isCss3Finish=!0},o.options.paginationSpeed)):\"rewind\"===n?(o.swapSpeed(o.options.rewindSpeed),t.setTimeout(function(){o.isCss3Finish=!0},o.options.rewindSpeed)):(o.swapSpeed(\"slideSpeed\"),t.setTimeout(function(){o.isCss3Finish=!0},o.options.slideSpeed)),o.transition3d(r)):n===!0?o.css2slide(r,o.options.paginationSpeed):\"rewind\"===n?o.css2slide(r,o.options.rewindSpeed):o.css2slide(r,o.options.slideSpeed),void o.afterGo()))},jumpTo:function(e){var t=this;\"function\"==typeof t.options.beforeMove&&t.options.beforeMove.apply(this,[t.$elem]),e>=t.maximumItem||-1===e?e=t.maximumItem:0>=e&&(e=0),t.swapSpeed(0),t.browser.support3d===!0?t.transition3d(t.positionsInArray[e]):t.css2slide(t.positionsInArray[e],1),t.currentItem=t.owl.currentItem=e,t.afterGo()},afterGo:function(){var e=this;e.prevArr.push(e.currentItem),e.prevItem=e.owl.prevItem=e.prevArr[e.prevArr.length-2],e.prevArr.shift(0),e.prevItem!==e.currentItem&&(e.checkPagination(),e.checkNavigation(),e.eachMoveUpdate(),e.options.autoPlay!==!1&&e.checkAp()),\"function\"==typeof e.options.afterMove&&e.prevItem!==e.currentItem&&e.options.afterMove.apply(this,[e.$elem])},stop:function(){var e=this;e.apStatus=\"stop\",t.clearInterval(e.autoPlayInterval)},checkAp:function(){var e=this;\"stop\"!==e.apStatus&&e.play()},play:function(){var e=this;return e.apStatus=\"play\",e.options.autoPlay===!1?!1:(t.clearInterval(e.autoPlayInterval),void(e.autoPlayInterval=t.setInterval(function(){e.next(!0)},e.options.autoPlay)))},swapSpeed:function(e){var t=this;\"slideSpeed\"===e?t.$owlWrapper.css(t.addCssSpeed(t.options.slideSpeed)):\"paginationSpeed\"===e?t.$owlWrapper.css(t.addCssSpeed(t.options.paginationSpeed)):\"string\"!=typeof e&&t.$owlWrapper.css(t.addCssSpeed(e))},addCssSpeed:function(e){return{\"-webkit-transition\":\"all \"+e+\"ms ease\",\"-moz-transition\":\"all \"+e+\"ms ease\",\"-o-transition\":\"all \"+e+\"ms ease\",transition:\"all \"+e+\"ms ease\"}},removeTransition:function(){return{\"-webkit-transition\":\"\",\"-moz-transition\":\"\",\"-o-transition\":\"\",transition:\"\"}},doTranslate:function(e){return{\"-webkit-transform\":\"translate3d(\"+e+\"px, 0px, 0px)\",\"-moz-transform\":\"translate3d(\"+e+\"px, 0px, 0px)\",\"-o-transform\":\"translate3d(\"+e+\"px, 0px, 0px)\",\"-ms-transform\":\"translate3d(\"+e+\"px, 0px, 0px)\",transform:\"translate3d(\"+e+\"px, 0px,0px)\"}},transition3d:function(e){var t=this;t.$owlWrapper.css(t.doTranslate(e))},css2move:function(e){var t=this;t.$owlWrapper.css({left:e})},css2slide:function(e,t){var n=this;n.isCssFinish=!1,n.$owlWrapper.stop(!0,!0).animate({left:e},{duration:t||n.options.slideSpeed,complete:function(){n.isCssFinish=!0}})},checkBrowser:function(){var e,i,r,o,a=this,s=\"translate3d(0px, 0px, 0px)\",l=n.createElement(\"div\");l.style.cssText=\" -moz-transform:\"+s+\"; -ms-transform:\"+s+\"; -o-transform:\"+s+\"; -webkit-transform:\"+s+\"; transform:\"+s,e=/translate3d\\(0px, 0px, 0px\\)/g,i=l.style.cssText.match(e),r=null!==i&&1===i.length,o=\"ontouchstart\"in t||t.navigator.msMaxTouchPoints,a.browser={support3d:r,isTouch:o}},moveEvents:function(){var e=this;(e.options.mouseDrag!==!1||e.options.touchDrag!==!1)&&(e.gestures(),e.disabledEvents())},eventTypes:function(){var e=this,t=[\"s\",\"e\",\"x\"];e.ev_types={},e.options.mouseDrag===!0&&e.options.touchDrag===!0?t=[\"touchstart.owl mousedown.owl\",\"touchmove.owl mousemove.owl\",\"touchend.owl touchcancel.owl mouseup.owl\"]:e.options.mouseDrag===!1&&e.options.touchDrag===!0?t=[\"touchstart.owl\",\"touchmove.owl\",\"touchend.owl touchcancel.owl\"]:e.options.mouseDrag===!0&&e.options.touchDrag===!1&&(t=[\"mousedown.owl\",\"mousemove.owl\",\"mouseup.owl\"]),e.ev_types.start=t[0],e.ev_types.move=t[1],e.ev_types.end=t[2]},disabledEvents:function(){var t=this;t.$elem.on(\"dragstart.owl\",function(e){e.preventDefault()}),t.$elem.on(\"mousedown.disableTextSelect\",function(t){return e(t.target).is(\"input, textarea, select, option\")})},gestures:function(){function i(e){if(void 0!==e.touches)return{x:e.touches[0].pageX,y:e.touches[0].pageY};if(void 0===e.touches){if(void 0!==e.pageX)return{x:e.pageX,y:e.pageY};if(void 0===e.pageX)return{x:e.clientX,y:e.clientY}}}function r(t){\"on\"===t?(e(n).on(l.ev_types.move,a),e(n).on(l.ev_types.end,s)):\"off\"===t&&(e(n).off(l.ev_types.move),e(n).off(l.ev_types.end))}function o(n){var o,a=n.originalEvent||n||t.event;if(3===a.which)return!1;if(!(l.itemsAmount<=l.options.items)){if(l.isCssFinish===!1&&!l.options.dragBeforeAnimFinish)return!1;if(l.isCss3Finish===!1&&!l.options.dragBeforeAnimFinish)return!1;l.options.autoPlay!==!1&&t.clearInterval(l.autoPlayInterval),l.browser.isTouch===!0||l.$owlWrapper.hasClass(\"grabbing\")||l.$owlWrapper.addClass(\"grabbing\"),l.newPosX=0,l.newRelativeX=0,e(this).css(l.removeTransition()),o=e(this).position(),u.relativePos=o.left,u.offsetX=i(a).x-o.left,u.offsetY=i(a).y-o.top,r(\"on\"),u.sliding=!1,u.targetElement=a.target||a.srcElement}}function a(r){var o,a,s=r.originalEvent||r||t.event;l.newPosX=i(s).x-u.offsetX,l.newPosY=i(s).y-u.offsetY,l.newRelativeX=l.newPosX-u.relativePos,\"function\"==typeof l.options.startDragging&&u.dragging!==!0&&0!==l.newRelativeX&&(u.dragging=!0,l.options.startDragging.apply(l,[l.$elem])),(l.newRelativeX>8||l.newRelativeX<-8)&&l.browser.isTouch===!0&&(void 0!==s.preventDefault?s.preventDefault():s.returnValue=!1,u.sliding=!0),(l.newPosY>10||l.newPosY<-10)&&u.sliding===!1&&e(n).off(\"touchmove.owl\"),o=function(){return l.newRelativeX/5},a=function(){return l.maximumPixels+l.newRelativeX/5},l.newPosX=Math.max(Math.min(l.newPosX,o()),a()),l.browser.support3d===!0?l.transition3d(l.newPosX):l.css2move(l.newPosX)}function s(n){var i,o,a,s=n.originalEvent||n||t.event;s.target=s.target||s.srcElement,u.dragging=!1,l.browser.isTouch!==!0&&l.$owlWrapper.removeClass(\"grabbing\"),l.dragDirection=l.owl.dragDirection=l.newRelativeX<0?\"left\":\"right\",0!==l.newRelativeX&&(i=l.getNewPosition(),l.goTo(i,!1,\"drag\"),u.targetElement===s.target&&l.browser.isTouch!==!0&&(e(s.target).on(\"click.disable\",function(t){t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault(),e(t.target).off(\"click.disable\")}),o=e._data(s.target,\"events\").click,a=o.pop(),o.splice(0,0,a))),r(\"off\")}var l=this,u={offsetX:0,offsetY:0,baseElWidth:0,relativePos:0,position:null,minSwipe:null,maxSwipe:null,sliding:null,dargging:null,targetElement:null};l.isCssFinish=!0,l.$elem.on(l.ev_types.start,\".owl-wrapper\",o)},getNewPosition:function(){var e=this,t=e.closestItem();return t>e.maximumItem?(e.currentItem=e.maximumItem,t=e.maximumItem):e.newPosX>=0&&(t=0,e.currentItem=0),t},closestItem:function(){var t=this,n=t.options.scrollPerPage===!0?t.pagesInArray:t.positionsInArray,i=t.newPosX,r=null;return e.each(n,function(o,a){i-t.itemWidth/20>n[o+1]&&i-t.itemWidth/20(n[o+1]||n[o]-t.itemWidth)&&\"right\"===t.moveDirection()&&(t.options.scrollPerPage===!0?(r=n[o+1]||n[n.length-1],t.currentItem=e.inArray(r,t.positionsInArray)):(r=n[o+1],t.currentItem=o+1))}),t.currentItem},moveDirection:function(){var e,t=this;return t.newRelativeX<0?(e=\"right\",t.playDirection=\"next\"):(e=\"left\",t.playDirection=\"prev\"),e},customEvents:function(){var e=this;e.$elem.on(\"owl.next\",function(){e.next()}),e.$elem.on(\"owl.prev\",function(){e.prev()}),e.$elem.on(\"owl.play\",function(t,n){e.options.autoPlay=n,e.play(),e.hoverStatus=\"play\"}),e.$elem.on(\"owl.stop\",function(){e.stop(),e.hoverStatus=\"stop\"}),e.$elem.on(\"owl.goTo\",function(t,n){e.goTo(n)}),e.$elem.on(\"owl.jumpTo\",function(t,n){e.jumpTo(n)})},stopOnHover:function(){var e=this;e.options.stopOnHover===!0&&e.browser.isTouch!==!0&&e.options.autoPlay!==!1&&(e.$elem.on(\"mouseover\",function(){e.stop()}),e.$elem.on(\"mouseout\",function(){\"stop\"!==e.hoverStatus&&e.play()}))},lazyLoad:function(){var t,n,i,r,o,a=this;if(a.options.lazyLoad===!1)return!1;for(t=0;t=a.currentItem:!0,o&&i=s?t.setTimeout(r,100):i()}var o,a=this,s=0;\"DIV\"===n.prop(\"tagName\")?(n.css(\"background-image\",\"url(\"+n.data(\"src\")+\")\"),o=!0):n[0].src=n.data(\"src\"),r()},autoHeight:function(){function n(){var n=e(o.$owlItems[o.currentItem]).height();o.wrapperOuter.css(\"height\",n+\"px\"),o.wrapperOuter.hasClass(\"autoHeight\")||t.setTimeout(function(){o.wrapperOuter.addClass(\"autoHeight\")},0)}function i(){r+=1,o.completeImg(a.get(0))?n():100>=r?t.setTimeout(i,100):o.wrapperOuter.css(\"height\",\"\")}var r,o=this,a=e(o.$owlItems[o.currentItem]).find(\"img\");void 0!==a.get(0)?(r=0,i()):n()},completeImg:function(e){var t;return e.complete?(t=typeof e.naturalWidth,\"undefined\"!==t&&0===e.naturalWidth?!1:!0):!1},onVisibleItems:function(){var t,n=this;for(n.options.addClassActive===!0&&n.$owlItems.removeClass(\"active\"),n.visibleItems=[],t=n.currentItem;t=i.$userItems.length||-1===n?i.$userItems.eq(-1).after(e):i.$userItems.eq(n).before(e),void i.setVars()):!1},removeItem:function(e){var t,n=this;return 0===n.$elem.children().length?!1:(t=void 0===e||-1===e?-1:e,n.unWrap(),n.$userItems.eq(t).remove(),void n.setVars())}};e.fn.owlCarousel=function(t){return this.each(function(){if(e(this).data(\"owl-init\")===!0)return!1;e(this).data(\"owl-init\",!0);var n=Object.create(i);n.init(t,this),e.data(this,\"owlCarousel\",n)})},e.fn.owlCarousel.options={items:5,itemsCustom:!1,itemsDesktop:[1199,4],itemsDesktopSmall:[979,3],itemsTablet:[768,2],itemsTabletSmall:!1,itemsMobile:[479,1],singleItem:!1,itemsScaleUp:!1,slideSpeed:200,paginationSpeed:800,rewindSpeed:1e3,autoPlay:!1,stopOnHover:!1,navigation:!1,navigationText:[\"prev\",\"next\"],rewindNav:!0,scrollPerPage:!1,pagination:!0,paginationNumbers:!1,responsive:!0,responsiveRefreshRate:200,responsiveBaseWidth:t,baseClass:\"owl-carousel\",theme:\"owl-theme\",lazyLoad:!1,lazyFollow:!0,lazyEffect:\"fade\",autoHeight:!1,jsonPath:!1,jsonSuccess:!1,dragBeforeAnimFinish:!0,mouseDrag:!0,touchDrag:!0,addClassActive:!1,transitionStyle:!1,beforeUpdate:!1,afterUpdate:!1,beforeInit:!1,afterInit:!1,beforeMove:!1,afterMove:!1,afterAction:!1,startDragging:!1,afterLazyLoad:!1}}(jQuery,window,document),function(e){var t=\"../recorderWorker.js\",n=function(e,n){var i=n||{},r=i.bufferLen||4096;this.context=e.context,this.node=(this.context.createScriptProcessor||this.context.createJavaScriptNode).call(this.context,r,2,2);var o=new Worker(i.workerPath||t);o.postMessage({command:\"init\",config:{sampleRate:this.context.sampleRate}});var a,s=!1;this.node.onaudioprocess=function(e){s&&o.postMessage({command:\"record\",buffer:[e.inputBuffer.getChannelData(0),e.inputBuffer.getChannelData(1)]})},this.configure=function(e){for(var t in e)e.hasOwnProperty(t)&&(i[t]=e[t])},this.record=function(){s=!0},this.stop=function(){s=!1},this.clear=function(){o.postMessage({command:\"clear\"})},this.getBuffer=function(e){a=e||i.callback,o.postMessage({command:\"getBuffer\"})},this.exportWAV=function(e,t){if(a=e||i.callback,t=t||i.type||\"audio/wav\",!a)throw new Error(\"Callback not set\");o.postMessage({command:\"exportWAV\",type:t})},o.onmessage=function(e){var t=e.data;a(t)},e.connect(this.node),this.node.connect(this.context.destination)};n.forceDownload=function(t,n){var i=(e.URL||e.webkitURL).createObjectURL(t),r=e.document.createElement(\"a\");r.href=i,r.download=n||\"output.wav\";var o=document.createEvent(\"Event\");o.initEvent(\"click\",!0,!0),r.dispatchEvent(o)},e.Recorder=n}(window);var recLength=0,recBuffersL=[],recBuffersR=[],sampleRate;this.onmessage=function(e){switch(e.data.command){case\"init\":init(e.data.config);break;case\"record\":record(e.data.buffer);break;case\"exportWAV\":exportWAV(e.data.type);break;case\"getBuffer\":getBuffer();break;case\"clear\":clear()}};var ssc_framerate=150,ssc_animtime=500,ssc_stepsize=150,ssc_pulseAlgorithm=!0,ssc_pulseScale=6,ssc_pulseNormalize=1,ssc_keyboardsupport=!0,ssc_arrowscroll=50,ssc_frame=!1,ssc_direction={x:0,y:0},ssc_initdone=!1,ssc_fixedback=!0,ssc_root=document.documentElement,ssc_activeElement,ssc_key={left:37,up:38,right:39,down:40,spacebar:32,pageup:33,pagedown:34,end:35,home:36},ssc_que=[],ssc_pending=!1,ssc_cache={};setInterval(function(){ssc_cache={}},1e4);var ssc_uniqueID=function(){var e=0;return function(t){return t.ssc_uniqueID||(t.ssc_uniqueID=e++)}}(),ischrome=/chrome/.test(navigator.userAgent.toLowerCase());ischrome&&(ssc_addEvent(\"mousedown\",ssc_mousedown),ssc_addEvent(\"mousewheel\",ssc_wheel),ssc_addEvent(\"load\",ssc_init));var WaveSurfer={defaultParams:{height:128,waveColor:\"#999\",progressColor:\"#555\",cursorColor:\"#333\",cursorWidth:1,skipLength:2,minPxPerSec:20,pixelRatio:window.devicePixelRatio,fillParent:!0,scrollParent:!1,hideScrollbar:!1,normalize:!1,audioContext:null,container:null,dragSelection:!0,loopSelection:!0,audioRate:1,interact:!0,splitChannels:!1,renderer:\"Canvas\",backend:\"WebAudio\",mediaType:\"audio\"},init:function(e){if(this.params=WaveSurfer.util.extend({},this.defaultParams,e),this.container=\"string\"==typeof e.container?document.querySelector(this.params.container):this.params.container,!this.container)throw new Error(\"Container element not found\");if(this.mediaContainer=\"undefined\"==typeof this.params.mediaContainer?this.container:\"string\"==typeof this.params.mediaContainer?document.querySelector(this.params.mediaContainer):this.params.mediaContainer,!this.mediaContainer)throw new Error(\"Media Container element not found\");this.savedVolume=0,this.isMuted=!1,this.tmpEvents=[],this.createDrawer(),this.createBackend()},createDrawer:function(){var e=this;this.drawer=Object.create(WaveSurfer.Drawer[this.params.renderer]),this.drawer.init(this.container,this.params),this.drawer.on(\"redraw\",function(){e.drawBuffer(),e.drawer.progress(e.backend.getPlayedPercents())}),this.drawer.on(\"click\",function(t,n){setTimeout(function(){e.seekTo(n)},0)}),this.drawer.on(\"scroll\",function(t){e.fireEvent(\"scroll\",t)})},createBackend:function(){var e=this;this.backend&&this.backend.destroy(),\"AudioElement\"==this.params.backend&&(this.params.backend=\"MediaElement\"),\"WebAudio\"!=this.params.backend||WaveSurfer.WebAudio.supportsWebAudio()||(this.params.backend=\"MediaElement\"),this.backend=Object.create(WaveSurfer[this.params.backend]),this.backend.init(this.params),this.backend.on(\"finish\",function(){e.fireEvent(\"finish\")}),this.backend.on(\"audioprocess\",function(t){e.fireEvent(\"audioprocess\",t)})},restartAnimationLoop:function(){var e=this,t=window.requestAnimationFrame||window.webkitRequestAnimationFrame,n=function(){e.backend.isPaused()||(e.drawer.progress(e.backend.getPlayedPercents()),t(n))};n()},getDuration:function(){return this.backend.getDuration()},getCurrentTime:function(){return this.backend.getCurrentTime()},play:function(e,t){this.backend.play(e,t),this.restartAnimationLoop(),this.fireEvent(\"play\")},pause:function(){this.backend.pause(),this.fireEvent(\"pause\")},playPause:function(){this.backend.isPaused()?this.play():this.pause()},skipBackward:function(e){this.skip(-e||-this.params.skipLength)},skipForward:function(e){this.skip(e||this.params.skipLength)},skip:function(e){var t=this.getCurrentTime()||0,n=this.getDuration()||1;t=Math.max(0,Math.min(n,t+(e||0))),this.seekAndCenter(t/n)},seekAndCenter:function(e){this.seekTo(e),this.drawer.recenter(e)},seekTo:function(e){var t=this.backend.isPaused(),n=this.params.scrollParent;t&&(this.params.scrollParent=!1),this.backend.seekTo(e*this.getDuration()),this.drawer.progress(this.backend.getPlayedPercents()),t||(this.backend.pause(),this.backend.play()),this.params.scrollParent=n,this.fireEvent(\"seek\",e)},stop:function(){this.pause(),this.seekTo(0),this.drawer.progress(0)},setVolume:function(e){this.backend.setVolume(e)},setPlaybackRate:function(e){this.backend.setPlaybackRate(e)},toggleMute:function(){this.isMuted?(this.backend.setVolume(this.savedVolume),this.isMuted=!1):(this.savedVolume=this.backend.getVolume(),this.backend.setVolume(0),this.isMuted=!0)},toggleScroll:function(){this.params.scrollParent=!this.params.scrollParent,this.drawBuffer()},toggleInteraction:function(){this.params.interact=!this.params.interact},drawBuffer:function(){var e=Math.round(this.getDuration()*this.params.minPxPerSec*this.params.pixelRatio),t=this.drawer.getWidth(),n=e;this.params.fillParent&&(!this.params.scrollParent||t>e)&&(n=t);var i=this.backend.getPeaks(n);this.drawer.drawPeaks(i,n),this.fireEvent(\"redraw\",i,n)},loadArrayBuffer:function(e){this.decodeArrayBuffer(e,function(e){this.loadDecodedBuffer(e)}.bind(this))},loadDecodedBuffer:function(e){this.backend.load(e),this.drawBuffer(),this.fireEvent(\"ready\")},loadBlob:function(e){var t=this,n=new FileReader;n.addEventListener(\"progress\",function(e){t.onProgress(e)}),n.addEventListener(\"load\",function(e){t.loadArrayBuffer(e.target.result)}),n.addEventListener(\"error\",function(){t.fireEvent(\"error\",\"Error reading file\")}),n.readAsArrayBuffer(e),this.empty()},load:function(e,t){switch(this.params.backend){case\"WebAudio\":return this.loadBuffer(e);case\"MediaElement\":return this.loadMediaElement(e,t)}},loadBuffer:function(e){return this.empty(),this.getArrayBuffer(e,this.loadArrayBuffer.bind(this))},loadMediaElement:function(e,t){this.empty(),this.backend.load(e,this.mediaContainer,t),this.tmpEvents.push(this.backend.once(\"canplay\",function(){this.drawBuffer(),this.fireEvent(\"ready\")}.bind(this)),this.backend.once(\"error\",function(e){this.fireEvent(\"error\",e)}.bind(this))),!t&&this.backend.supportsWebAudio()&&this.getArrayBuffer(e,function(e){this.decodeArrayBuffer(e,function(e){this.backend.buffer=e,this.drawBuffer()}.bind(this))}.bind(this))},decodeArrayBuffer:function(e,t){this.backend.decodeArrayBuffer(e,this.fireEvent.bind(this,\"decoded\"),this.fireEvent.bind(this,\"error\",\"Error decoding audiobuffer\")),this.tmpEvents.push(this.once(\"decoded\",t))},getArrayBuffer:function(e,t){var n=this,i=WaveSurfer.util.ajax({url:e,responseType:\"arraybuffer\"});return this.tmpEvents.push(i.on(\"progress\",function(e){n.onProgress(e)}),i.on(\"success\",t),i.on(\"error\",function(e){n.fireEvent(\"error\",\"XHR error: \"+e.target.statusText)})),i},onProgress:function(e){if(e.lengthComputable)var t=e.loaded/e.total;else t=e.loaded/(e.loaded+1e6);this.fireEvent(\"loading\",Math.round(100*t),e.target)},exportPCM:function(e,t,n){e=e||1024,t=t||1e4,n=n||!1;var i=this.backend.getPeaks(e,t),r=[].map.call(i,function(e){return Math.round(e*t)/t}),o=JSON.stringify(r);return n||window.open(\"data:application/json;charset=utf-8,\"+encodeURIComponent(o)),o},clearTmpEvents:function(){this.tmpEvents.forEach(function(e){e.un()})},empty:function(){this.backend.isPaused()||(this.stop(),this.backend.disconnectSource()),this.clearTmpEvents(),this.drawer.progress(0),this.drawer.setWidth(0),this.drawer.drawPeaks({length:this.drawer.getWidth()},0)},destroy:function(){this.fireEvent(\"destroy\"),this.clearTmpEvents(),this.unAll(),this.backend.destroy(),this.drawer.destroy()}};WaveSurfer.create=function(e){var t=Object.create(WaveSurfer);return t.init(e),t},WaveSurfer.util={extend:function(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach(function(t){Object.keys(t).forEach(function(n){e[n]=t[n]})}),e},getId:function(){return\"wavesurfer_\"+Math.random().toString(32).substring(2)},ajax:function(e){var t=Object.create(WaveSurfer.Observer),n=new XMLHttpRequest,i=!1;return n.open(e.method||\"GET\",e.url,!0),n.responseType=e.responseType||\"json\",n.addEventListener(\"progress\",function(e){t.fireEvent(\"progress\",e),e.lengthComputable&&e.loaded==e.total&&(i=!0)}),n.addEventListener(\"load\",function(e){i||t.fireEvent(\"progress\",e),t.fireEvent(\"load\",e),200==n.status||206==n.status?t.fireEvent(\"success\",n.response,e):t.fireEvent(\"error\",e)}),n.addEventListener(\"error\",function(e){t.fireEvent(\"error\",e)}),n.send(),t.xhr=n,t}},WaveSurfer.Observer={on:function(e,t){this.handlers||(this.handlers={});var n=this.handlers[e];return n||(n=this.handlers[e]=[]),n.push(t),{name:e,callback:t,un:this.un.bind(this,e,t)}},un:function(e,t){if(this.handlers){var n=this.handlers[e];\nif(n)if(t)for(var i=n.length-1;i>=0;i--)n[i]==t&&n.splice(i,1);else n.length=0}},unAll:function(){this.handlers=null},once:function(e,t){var n=this,i=function(){t.apply(this,arguments),setTimeout(function(){n.un(e,i)},0)};return this.on(e,i)},fireEvent:function(e){if(this.handlers){var t=this.handlers[e],n=Array.prototype.slice.call(arguments,1);t&&t.forEach(function(e){e.apply(null,n)})}}},WaveSurfer.util.extend(WaveSurfer,WaveSurfer.Observer),WaveSurfer.WebAudio={scriptBufferSize:256,PLAYING_STATE:0,PAUSED_STATE:1,FINISHED_STATE:2,supportsWebAudio:function(){return!(!window.AudioContext&&!window.webkitAudioContext)},getAudioContext:function(){return WaveSurfer.WebAudio.audioContext||(WaveSurfer.WebAudio.audioContext=new(window.AudioContext||window.webkitAudioContext)),WaveSurfer.WebAudio.audioContext},getOfflineAudioContext:function(e){return WaveSurfer.WebAudio.offlineAudioContext||(WaveSurfer.WebAudio.offlineAudioContext=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,2,e)),WaveSurfer.WebAudio.offlineAudioContext},init:function(e){this.params=e,this.ac=e.audioContext||this.getAudioContext(),this.lastPlay=this.ac.currentTime,this.startPosition=0,this.scheduledPause=null,this.states=[Object.create(WaveSurfer.WebAudio.state.playing),Object.create(WaveSurfer.WebAudio.state.paused),Object.create(WaveSurfer.WebAudio.state.finished)],this.setState(this.PAUSED_STATE),this.createVolumeNode(),this.createScriptNode(),this.createAnalyserNode(),this.setPlaybackRate(this.params.audioRate)},disconnectFilters:function(){this.filters&&(this.filters.forEach(function(e){e&&e.disconnect()}),this.filters=null,this.analyser.connect(this.gainNode))},setState:function(e){this.state!==this.states[e]&&(this.state=this.states[e],this.state.init.call(this))},setFilter:function(){this.setFilters([].slice.call(arguments))},setFilters:function(e){this.disconnectFilters(),e&&e.length&&(this.filters=e,this.analyser.disconnect(),e.reduce(function(e,t){return e.connect(t),t},this.analyser).connect(this.gainNode))},createScriptNode:function(){var e=this,t=this.scriptBufferSize;this.scriptNode=this.ac.createScriptProcessor?this.ac.createScriptProcessor(t):this.ac.createJavaScriptNode(t),this.scriptNode.connect(this.ac.destination),this.scriptNode.onaudioprocess=function(){var t=e.getCurrentTime();e.buffer&&t>e.getDuration()?e.setState(e.FINISHED_STATE):e.buffer&&t>=e.scheduledPause?e.setState(e.PAUSED_STATE):e.state===e.states[e.PLAYING_STATE]&&e.fireEvent(\"audioprocess\",t)}},createAnalyserNode:function(){this.analyser=this.ac.createAnalyser(),this.analyser.connect(this.gainNode)},createVolumeNode:function(){this.gainNode=this.ac.createGain?this.ac.createGain():this.ac.createGainNode(),this.gainNode.connect(this.ac.destination)},setVolume:function(e){this.gainNode.gain.value=e},getVolume:function(){return this.gainNode.gain.value},decodeArrayBuffer:function(e,t,n){this.offlineAc||(this.offlineAc=this.getOfflineAudioContext(this.ac?this.ac.sampleRate:44100)),this.offlineAc.decodeAudioData(e,function(e){t(e)}.bind(this),n)},getPeaks:function(e){for(var t=this.buffer.length/e,n=~~(t/10)||1,i=this.buffer.numberOfChannels,r=[],o=[],a=0;i>a;a++)for(var s=r[a]=[],l=this.buffer.getChannelData(a),u=0;e>u;u++){for(var c=~~(u*t),d=~~(c+t),p=0,f=c;d>f;f+=n){var h=l[f];h>p?p=h:-h>p&&(p=-h)}s[u]=p,(0==a||p>o[u])&&(o[u]=p)}return this.params.splitChannels?r:o},getPlayedPercents:function(){return this.state.getPlayedPercents.call(this)},disconnectSource:function(){this.source&&this.source.disconnect()},destroy:function(){this.isPaused()||this.pause(),this.unAll(),this.buffer=null,this.disconnectFilters(),this.disconnectSource(),this.gainNode.disconnect(),this.scriptNode.disconnect(),this.analyser.disconnect()},load:function(e){this.startPosition=0,this.lastPlay=this.ac.currentTime,this.buffer=e,this.createSource()},createSource:function(){this.disconnectSource(),this.source=this.ac.createBufferSource(),this.source.start=this.source.start||this.source.noteGrainOn,this.source.stop=this.source.stop||this.source.noteOff,this.source.playbackRate.value=this.playbackRate,this.source.buffer=this.buffer,this.source.connect(this.analyser)},isPaused:function(){return this.state!==this.states[this.PLAYING_STATE]},getDuration:function(){return this.buffer?this.buffer.duration:0},seekTo:function(e,t){return this.scheduledPause=null,null==e&&(e=this.getCurrentTime(),e>=this.getDuration()&&(e=0)),null==t&&(t=this.getDuration()),this.startPosition=e,this.lastPlay=this.ac.currentTime,this.state===this.states[this.FINISHED_STATE]&&this.setState(this.PAUSED_STATE),{start:e,end:t}},getPlayedTime:function(){return(this.ac.currentTime-this.lastPlay)*this.playbackRate},play:function(e,t){this.createSource();var n=this.seekTo(e,t);e=n.start,t=n.end,this.scheduledPause=t,this.source.start(0,e,t-e),this.setState(this.PLAYING_STATE)},pause:function(){this.scheduledPause=null,this.startPosition+=this.getPlayedTime(),this.source&&this.source.stop(0),this.setState(this.PAUSED_STATE)},getCurrentTime:function(){return this.state.getCurrentTime.call(this)},setPlaybackRate:function(e){e=e||1,this.isPaused()?this.playbackRate=e:(this.pause(),this.playbackRate=e,this.play())}},WaveSurfer.WebAudio.state={},WaveSurfer.WebAudio.state.playing={init:function(){},getPlayedPercents:function(){var e=this.getDuration();return this.getCurrentTime()/e||0},getCurrentTime:function(){return this.startPosition+this.getPlayedTime()}},WaveSurfer.WebAudio.state.paused={init:function(){},getPlayedPercents:function(){var e=this.getDuration();return this.getCurrentTime()/e||0},getCurrentTime:function(){return this.startPosition}},WaveSurfer.WebAudio.state.finished={init:function(){this.fireEvent(\"finish\")},getPlayedPercents:function(){return 1},getCurrentTime:function(){return this.getDuration()}},WaveSurfer.util.extend(WaveSurfer.WebAudio,WaveSurfer.Observer),WaveSurfer.MediaElement=Object.create(WaveSurfer.WebAudio),WaveSurfer.util.extend(WaveSurfer.MediaElement,{init:function(e){this.params=e,this.media={currentTime:0,duration:0,paused:!0,playbackRate:1,play:function(){},pause:function(){}},this.mediaType=e.mediaType.toLowerCase(),this.elementPosition=e.elementPosition},load:function(e,t,n){var i=this,r=document.createElement(this.mediaType);r.controls=!1,r.autoplay=!1,r.preload=\"auto\",r.src=e,r.addEventListener(\"error\",function(){i.fireEvent(\"error\",\"Error loading media element\")}),r.addEventListener(\"canplay\",function(){i.fireEvent(\"canplay\")}),r.addEventListener(\"ended\",function(){i.fireEvent(\"finish\")}),r.addEventListener(\"timeupdate\",function(){i.fireEvent(\"audioprocess\",i.getCurrentTime())});var o=t.querySelector(this.mediaType);o&&t.removeChild(o),t.appendChild(r),this.media=r,this.peaks=n,this.onPlayEnd=null,this.buffer=null,this.setPlaybackRate(this.playbackRate)},isPaused:function(){return this.media.paused},getDuration:function(){var e=this.media.duration;return e>=1/0&&(e=this.media.seekable.end()),e},getCurrentTime:function(){return this.media.currentTime},getPlayedPercents:function(){return this.getCurrentTime()/this.getDuration()||0},setPlaybackRate:function(e){this.playbackRate=e||1,this.media.playbackRate=this.playbackRate},seekTo:function(e){null!=e&&(this.media.currentTime=e),this.clearPlayEnd()},play:function(e,t){this.seekTo(e),this.media.play(),t&&this.setPlayEnd(t)},pause:function(){this.media.pause(),this.clearPlayEnd()},setPlayEnd:function(e){var t=this;this.onPlayEnd=function(n){n>=e&&(t.pause(),t.seekTo(e))},this.on(\"audioprocess\",this.onPlayEnd)},clearPlayEnd:function(){this.onPlayEnd&&(this.un(\"audioprocess\",this.onPlayEnd),this.onPlayEnd=null)},getPeaks:function(e){return this.buffer?WaveSurfer.WebAudio.getPeaks.call(this,e):this.peaks||[]},getVolume:function(){return this.media.volume},setVolume:function(e){this.media.volume=e},destroy:function(){this.pause(),this.unAll(),this.media.parentNode&&this.media.parentNode.removeChild(this.media),this.media=null}}),WaveSurfer.AudioElement=WaveSurfer.MediaElement,WaveSurfer.Drawer={init:function(e,t){this.container=e,this.params=t,this.width=0,this.height=t.height*this.params.pixelRatio,this.lastPos=0,this.createWrapper(),this.createElements()},createWrapper:function(){this.wrapper=this.container.appendChild(document.createElement(\"wave\")),this.style(this.wrapper,{display:\"block\",position:\"relative\",userSelect:\"none\",webkitUserSelect:\"none\",height:this.params.height+\"px\"}),(this.params.fillParent||this.params.scrollParent)&&this.style(this.wrapper,{width:\"100%\",overflowX:this.params.hideScrollbar?\"hidden\":\"auto\",overflowY:\"hidden\"}),this.setupWrapperEvents()},handleEvent:function(e){e.preventDefault();var t=this.wrapper.getBoundingClientRect();return(e.clientX-t.left+this.wrapper.scrollLeft)/this.wrapper.scrollWidth||0},setupWrapperEvents:function(){var e=this;this.wrapper.addEventListener(\"click\",function(t){var n=e.wrapper.offsetHeight-e.wrapper.clientHeight;if(0!=n){var i=e.wrapper.getBoundingClientRect();if(t.clientY>=i.bottom-n)return}e.params.interact&&e.fireEvent(\"click\",t,e.handleEvent(t))}),this.wrapper.addEventListener(\"scroll\",function(t){e.fireEvent(\"scroll\",t)})},drawPeaks:function(e,t){this.resetScroll(),this.setWidth(t),this.drawWave(e)},style:function(e,t){return Object.keys(t).forEach(function(n){e.style[n]!=t[n]&&(e.style[n]=t[n])}),e},resetScroll:function(){null!==this.wrapper&&(this.wrapper.scrollLeft=0)},recenter:function(e){var t=this.wrapper.scrollWidth*e;this.recenterOnPosition(t,!0)},recenterOnPosition:function(e,t){var n=this.wrapper.scrollLeft,i=~~(this.wrapper.clientWidth/2),r=e-i,o=r-n,a=this.wrapper.scrollWidth-this.wrapper.clientWidth;if(0!=a){if(!t&&o>=-i&&i>o){var s=5;o=Math.max(-s,Math.min(s,o)),r=n+o}r=Math.max(0,Math.min(a,r)),r!=n&&(this.wrapper.scrollLeft=r)}},getWidth:function(){return Math.round(this.container.clientWidth*this.params.pixelRatio)},setWidth:function(e){e!=this.width&&(this.width=e,this.params.fillParent||this.params.scrollParent?this.style(this.wrapper,{width:\"\"}):this.style(this.wrapper,{width:~~(this.width/this.params.pixelRatio)+\"px\"}),this.updateSize())},setHeight:function(e){e!=this.height&&(this.height=e,this.style(this.wrapper,{height:~~(this.height/this.params.pixelRatio)+\"px\"}),this.updateSize())},progress:function(e){var t=1/this.params.pixelRatio,n=Math.round(e*this.width)*t;if(n=t){if(this.lastPos=n,this.params.scrollParent){var i=~~(this.wrapper.scrollWidth*e);this.recenterOnPosition(i)}this.updateProgress(e)}},destroy:function(){this.unAll(),this.wrapper&&(this.container.removeChild(this.wrapper),this.wrapper=null)},createElements:function(){},updateSize:function(){},drawWave:function(){},clearWave:function(){},updateProgress:function(){}},WaveSurfer.util.extend(WaveSurfer.Drawer,WaveSurfer.Observer),WaveSurfer.Drawer.Canvas=Object.create(WaveSurfer.Drawer),WaveSurfer.util.extend(WaveSurfer.Drawer.Canvas,{createElements:function(){var e=this.wrapper.appendChild(this.style(document.createElement(\"canvas\"),{position:\"absolute\",zIndex:1,top:0,bottom:0}));if(this.waveCc=e.getContext(\"2d\"),this.progressWave=this.wrapper.appendChild(this.style(document.createElement(\"wave\"),{position:\"absolute\",zIndex:2,top:0,bottom:0,overflow:\"hidden\",width:\"0\",display:\"none\",boxSizing:\"border-box\",borderRightStyle:\"solid\",borderRightWidth:this.params.cursorWidth+\"px\",borderRightColor:this.params.cursorColor})),this.params.waveColor!=this.params.progressColor){var t=this.progressWave.appendChild(document.createElement(\"canvas\"));this.progressCc=t.getContext(\"2d\")}},updateSize:function(){var e=Math.round(this.width/this.params.pixelRatio);this.waveCc.canvas.width=this.width,this.waveCc.canvas.height=this.height,this.style(this.waveCc.canvas,{width:e+\"px\"}),this.style(this.progressWave,{display:\"block\"}),this.progressCc&&(this.progressCc.canvas.width=this.width,this.progressCc.canvas.height=this.height,this.style(this.progressCc.canvas,{width:e+\"px\"})),this.clearWave()},clearWave:function(){this.waveCc.clearRect(0,0,this.width,this.height),this.progressCc&&this.progressCc.clearRect(0,0,this.width,this.height)},drawWave:function(e,t){if(e[0]instanceof Array){var n=e;if(this.params.splitChannels)return this.setHeight(n.length*this.params.height*this.params.pixelRatio),void n.forEach(this.drawWave,this);e=n[0]}var i=.5/this.params.pixelRatio,r=this.params.height*this.params.pixelRatio,o=r*t||0,a=r/2,s=e.length,l=1;this.params.fillParent&&this.width!=s&&(l=this.width/s);var u=1;this.params.normalize&&(u=Math.max.apply(Math,e)),this.waveCc.fillStyle=this.params.waveColor,this.progressCc&&(this.progressCc.fillStyle=this.params.progressColor),[this.waveCc,this.progressCc].forEach(function(t){if(t){t.beginPath(),t.moveTo(i,a+o);for(var n=0;s>n;n++){var r=Math.round(e[n]/u*a);t.lineTo(n*l+i,a+r+o)}t.lineTo(this.width+i,a+o),t.moveTo(i,a+o);for(var n=0;s>n;n++){var r=Math.round(e[n]/u*a);t.lineTo(n*l+i,a-r+o)}t.lineTo(this.width+i,a+o),t.closePath(),t.fill(),t.fillRect(0,a+o-i,this.width,i)}},this)},updateProgress:function(e){var t=Math.round(this.width*e)/this.params.pixelRatio;this.style(this.progressWave,{width:t+\"px\"})}}),function(e,t){\"function\"==typeof define&&define.amd?define([\"wavesurfer\"],t):e.WaveSurfer.Microphone=t(e.WaveSurfer)}(this,function(e){\"use strict\";return e.Microphone={init:function(e){this.params=e;this.wavesurfer=e.wavesurfer;if(!this.wavesurfer)throw new Error(\"No WaveSurfer instance provided\");this.active=!1,this.paused=!1,this.getUserMedia=(navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia).bind(navigator),this.bufferSize=this.params.bufferSize||4096,this.numberOfInputChannels=this.params.numberOfInputChannels||1,this.numberOfOutputChannels=this.params.numberOfOutputChannels||1,this.micContext=this.wavesurfer.backend.getAudioContext()},start:function(){this.getUserMedia({video:!1,audio:!0},this.gotStream.bind(this),this.deviceError.bind(this))},togglePlay:function(){this.active?(this.paused=!this.paused,this.paused?this.disconnect():this.connect()):this.start()},stop:function(){this.active&&(this.active=!1,this.stream&&this.stream.stop(),this.disconnect(),this.wavesurfer.empty())},connect:function(){void 0!==this.stream&&(this.mediaStreamSource=this.micContext.createMediaStreamSource(this.stream),this.levelChecker=this.micContext.createScriptProcessor(this.bufferSize,this.numberOfInputChannels,this.numberOfOutputChannels),this.mediaStreamSource.connect(this.levelChecker),this.levelChecker.connect(this.micContext.destination),this.levelChecker.onaudioprocess=this.reloadBuffer.bind(this))},disconnect:function(){void 0!==this.mediaStreamSource&&this.mediaStreamSource.disconnect(),void 0!==this.levelChecker&&this.levelChecker.disconnect()},reloadBuffer:function(e){this.paused||(this.wavesurfer.empty(),this.wavesurfer.loadDecodedBuffer(e.inputBuffer))},gotStream:function(e){this.stream=e,this.active=!0,this.connect(),this.fireEvent(\"deviceReady\",e)},destroy:function(){this.stop()},deviceError:function(e){this.fireEvent(\"deviceError\",e)}},e.util.extend(e.Microphone,e.Observer),e.Microphone}),function(){var e,t,n=function(e,t){return function(){return e.apply(t,arguments)}};e=function(){function e(){}return e.prototype.extend=function(e,t){var n,i;for(n in e)i=e[n],null!=i&&(t[n]=i);return t},e.prototype.isMobile=function(e){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e)},e}(),t=this.WeakMap||(t=function(){function e(){this.keys=[],this.values=[]}return e.prototype.get=function(e){var t,n,i,r,o;for(o=this.keys,t=i=0,r=o.length;r>i;t=++i)if(n=o[t],n===e)return this.values[t]},e.prototype.set=function(e,t){var n,i,r,o,a;for(a=this.keys,n=r=0,o=a.length;o>r;n=++r)if(i=a[n],i===e)return void(this.values[n]=t);return this.keys.push(e),this.values.push(t)},e}()),this.WOW=function(){function i(e){null==e&&(e={}),this.scrollCallback=n(this.scrollCallback,this),this.scrollHandler=n(this.scrollHandler,this),this.start=n(this.start,this),this.scrolled=!0,this.config=this.util().extend(e,this.defaults),this.animationNameCache=new t}return i.prototype.defaults={boxClass:\"wow\",animateClass:\"animated\",offset:0,mobile:!0},i.prototype.init=function(){var e;return this.element=window.document.documentElement,\"interactive\"===(e=document.readyState)||\"complete\"===e?this.start():document.addEventListener(\"DOMContentLoaded\",this.start)},i.prototype.start=function(){var e,t,n,i;if(this.boxes=this.element.getElementsByClassName(this.config.boxClass),this.boxes.length){if(this.disabled())return this.resetStyle();for(i=this.boxes,t=0,n=i.length;n>t;t++)e=i[t],this.applyStyle(e,!0);return window.addEventListener(\"scroll\",this.scrollHandler,!1),window.addEventListener(\"resize\",this.scrollHandler,!1),this.interval=setInterval(this.scrollCallback,50)}},i.prototype.stop=function(){return window.removeEventListener(\"scroll\",this.scrollHandler,!1),window.removeEventListener(\"resize\",this.scrollHandler,!1),null!=this.interval?clearInterval(this.interval):void 0},i.prototype.show=function(e){return this.applyStyle(e),e.className=\"\"+e.className+\" \"+this.config.animateClass},i.prototype.applyStyle=function(e,t){var n,i,r;return i=e.getAttribute(\"data-wow-duration\"),n=e.getAttribute(\"data-wow-delay\"),r=e.getAttribute(\"data-wow-iteration\"),this.animate(function(o){return function(){return o.customStyle(e,t,i,n,r)}}(this))},i.prototype.animate=function(){return\"requestAnimationFrame\"in window?function(e){return window.requestAnimationFrame(e)}:function(e){return e()}}(),i.prototype.resetStyle=function(){var e,t,n,i,r;for(i=this.boxes,r=[],t=0,n=i.length;n>t;t++)e=i[t],r.push(e.setAttribute(\"style\",\"visibility: visible;\"));return r},i.prototype.customStyle=function(e,t,n,i,r){return t&&this.cacheAnimationName(e),e.style.visibility=t?\"hidden\":\"visible\",n&&this.vendorSet(e.style,{animationDuration:n}),i&&this.vendorSet(e.style,{animationDelay:i}),r&&this.vendorSet(e.style,{animationIterationCount:r}),this.vendorSet(e.style,{animationName:t?\"none\":this.cachedAnimationName(e)}),e},i.prototype.vendors=[\"moz\",\"webkit\"],i.prototype.vendorSet=function(e,t){var n,i,r,o;o=[];for(n in t)i=t[n],e[\"\"+n]=i,o.push(function(){var t,o,a,s;for(a=this.vendors,s=[],t=0,o=a.length;o>t;t++)r=a[t],s.push(e[\"\"+r+n.charAt(0).toUpperCase()+n.substr(1)]=i);return s}.call(this));return o},i.prototype.vendorCSS=function(e,t){var n,i,r,o,a,s;for(i=window.getComputedStyle(e),n=i.getPropertyCSSValue(t),s=this.vendors,o=0,a=s.length;a>o;o++)r=s[o],n=n||i.getPropertyCSSValue(\"-\"+r+\"-\"+t);return n},i.prototype.animationName=function(e){var t;try{t=this.vendorCSS(e,\"animation-name\").cssText}catch(n){t=window.getComputedStyle(e).getPropertyValue(\"animation-name\")}return\"none\"===t?\"\":t},i.prototype.cacheAnimationName=function(e){return this.animationNameCache.set(e,this.animationName(e))},i.prototype.cachedAnimationName=function(e){return this.animationNameCache.get(e)},i.prototype.scrollHandler=function(){return this.scrolled=!0},i.prototype.scrollCallback=function(){var e;return this.scrolled&&(this.scrolled=!1,this.boxes=function(){var t,n,i,r;for(i=this.boxes,r=[],t=0,n=i.length;n>t;t++)e=i[t],e&&(this.isVisible(e)?this.show(e):r.push(e));return r}.call(this),!this.boxes.length)?this.stop():void 0},i.prototype.offsetTop=function(e){for(var t;void 0===e.offsetTop;)e=e.parentNode;for(t=e.offsetTop;e=e.offsetParent;)t+=e.offsetTop;return t},i.prototype.isVisible=function(e){var t,n,i,r,o;return n=e.getAttribute(\"data-wow-offset\")||this.config.offset,o=window.pageYOffset,r=o+this.element.clientHeight-n,i=this.offsetTop(e),t=i+e.clientHeight,r>=i&&t>=o},i.prototype.util=function(){return this._util||(this._util=new e)},i.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},i}()}.call(this),function(){}.call(this),$(document).ready(function(){$(\"#comments\").hide(),$(\"#comment-count\").click(function(){$(\"#comments\").is(\":visible\")?$(\"#comments\").slideUp():$(\"#comments\").slideDown()}),$(\"#new_comment\").on(\"submit\",function(){$(\"#comments\").show()})}),$(document).ready(function(){$(\"#new-user-form\").hide(),$(\"#login-button\").on(\"click\",function(e){e.preventDefault(),$(\"#global-modal\").modal({keyboard:!0})}),$(\"#login-link\").on(\"click\",function(e){e.preventDefault(),$(\"#global-modal\").modal({keyboard:!0})}),$(\"#new-project-link\").on(\"click\",function(e){e.preventDefault(),$(\"#new-project-modal\").modal({keyboard:!0})}),$(\"#start-new-button\").on(\"click\",function(e){e.preventDefault(),$(\"#new-project-modal\").modal({keyboard:!0})}),$(\"#twitter-log-in-button\").on(\"click\",function(){window.location=\"/auth/twitter\"}),$(\"button#switch-to-sign-up-button\").on(\"click\",function(){$(\"div#log-in-form\").hide(),$(\"div#new-user-form\").fadeIn(500)}),$(\"#switch-to-log-in-button\").on(\"click\",function(){$(\"div#new-user-form\").hide(),$(\"div#log-in-form\").fadeIn(500)})}),$(document).ready(function(){$(\"#collab-btn\").on(\"submit\",function(e){e.preventDefault();var t=$(this).attr(\"action\"),n=$(this).children().last().val();$.ajax({type:\"PATCH\",dataType:\"script\",url:t,data:{completed:n}})})}),function(){}.call(this),function(){}.call(this),$(document).ready(function(){showMicVisualizer(),$(\"div[id^=wavesurfer-set-]\").each(function(){makeWavesurfer($(this))}),$(\"#all-tracks\").on(\"DOMNodeInserted\",function(e){makeWavesurfer($(e.target))}),$(\"#controls\").on(\"click\",\"#recorderStart\",function(e){recorderStart(),$(this).text(\" Stop \"),$(this).attr(\"id\",\"recorderStop\"),$(this).prepend(''),e.stopPropagation()}),$(\"#controls\").on(\"click\",\"#recorderStop\",function(e){recorderStop(),$(this).text(\" Record\"),$(this).attr(\"id\",\"recorderStart\"),$(this).prepend(''),e.stopPropagation()}),$(\"#all-tracks\").on(\"click\",\".track-delete-btn\",function(e){e.preventDefault(),id=$(this).attr(\"id\"),$.ajax({type:\"delete\",url:\"/tracks/\"+id})}),$(\"#playAll\").on(\"click\",function(e){playAll(),e.stopPropagation()})});var navigator=window.navigator,Context=window.AudioContext||window.webkitAudioContext,context=new Context,mediaStream,rec;navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia,function(){}.call(this),function(){}.call(this);"}}},{"rowIdx":458,"cells":{"target":{"kind":"string","value":"ajax/libs/video.js/5.0.0-rc.9/video.js"},"feat_repo_name":{"kind":"string","value":"ahocevar/cdnjs"},"text":{"kind":"string","value":"/**\n * @license\n * Video.js 5.0.0-rc.9 \n * Copyright Brightcove, Inc. \n * Available under Apache License Version 2.0\n * \n *\n * Includes vtt.js \n * Available under Apache License Version 2.0\n * \n */\n(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 1 ? ', & ' : '') + _.last(names);\n * });\n *\n * say('hello', 'fred', 'barney', 'pebbles');\n * // => 'hello fred, barney, & pebbles'\n */\nfunction restParam(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n rest = Array(length);\n\n while (++index < length) {\n rest[index] = args[start + index];\n }\n switch (start) {\n case 0: return func.call(this, rest);\n case 1: return func.call(this, args[0], rest);\n case 2: return func.call(this, args[0], args[1], rest);\n }\n var otherArgs = Array(start + 1);\n index = -1;\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = rest;\n return func.apply(this, otherArgs);\n };\n}\n\nmodule.exports = restParam;\n\n},{}],5:[function(_dereq_,module,exports){\n/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction arrayCopy(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = arrayCopy;\n\n},{}],6:[function(_dereq_,module,exports){\n/**\n * A specialized version of `_.forEach` for arrays without support for callback\n * shorthands and `this` binding.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n\n},{}],7:[function(_dereq_,module,exports){\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property names to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @returns {Object} Returns `object`.\n */\nfunction baseCopy(source, props, object) {\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n object[key] = source[key];\n }\n return object;\n}\n\nmodule.exports = baseCopy;\n\n},{}],8:[function(_dereq_,module,exports){\nvar createBaseFor = _dereq_('./createBaseFor');\n\n/**\n * The base implementation of `baseForIn` and `baseForOwn` which iterates\n * over `object` properties returned by `keysFunc` invoking `iteratee` for\n * each property. Iteratee functions may exit iteration early by explicitly\n * returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n\n},{\"./createBaseFor\":17}],9:[function(_dereq_,module,exports){\nvar baseFor = _dereq_('./baseFor'),\n keysIn = _dereq_('../object/keysIn');\n\n/**\n * The base implementation of `_.forIn` without support for callback\n * shorthands and `this` binding.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForIn(object, iteratee) {\n return baseFor(object, iteratee, keysIn);\n}\n\nmodule.exports = baseForIn;\n\n},{\"../object/keysIn\":39,\"./baseFor\":8}],10:[function(_dereq_,module,exports){\n/**\n * The base implementation of `_.isFunction` without support for environments\n * with incorrect `typeof` results.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n */\nfunction baseIsFunction(value) {\n // Avoid a Chakra JIT bug in compatibility modes of IE 11.\n // See https://github.com/jashkenas/underscore/issues/1621 for more details.\n return typeof value == 'function' || false;\n}\n\nmodule.exports = baseIsFunction;\n\n},{}],11:[function(_dereq_,module,exports){\nvar arrayEach = _dereq_('./arrayEach'),\n baseMergeDeep = _dereq_('./baseMergeDeep'),\n isArray = _dereq_('../lang/isArray'),\n isArrayLike = _dereq_('./isArrayLike'),\n isObject = _dereq_('../lang/isObject'),\n isObjectLike = _dereq_('./isObjectLike'),\n isTypedArray = _dereq_('../lang/isTypedArray'),\n keys = _dereq_('../object/keys');\n\n/**\n * The base implementation of `_.merge` without support for argument juggling,\n * multiple sources, and `this` binding `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {Function} [customizer] The function to customize merging properties.\n * @param {Array} [stackA=[]] Tracks traversed source objects.\n * @param {Array} [stackB=[]] Associates values with source counterparts.\n * @returns {Object} Returns `object`.\n */\nfunction baseMerge(object, source, customizer, stackA, stackB) {\n if (!isObject(object)) {\n return object;\n }\n var isSrcArr = isArrayLike(source) && (isArray(source) || isTypedArray(source)),\n props = isSrcArr ? null : keys(source);\n\n arrayEach(props || source, function(srcValue, key) {\n if (props) {\n key = srcValue;\n srcValue = source[key];\n }\n if (isObjectLike(srcValue)) {\n stackA || (stackA = []);\n stackB || (stackB = []);\n baseMergeDeep(object, source, key, baseMerge, customizer, stackA, stackB);\n }\n else {\n var value = object[key],\n result = customizer ? customizer(value, srcValue, key, object, source) : undefined,\n isCommon = result === undefined;\n\n if (isCommon) {\n result = srcValue;\n }\n if ((result !== undefined || (isSrcArr && !(key in object))) &&\n (isCommon || (result === result ? (result !== value) : (value === value)))) {\n object[key] = result;\n }\n }\n });\n return object;\n}\n\nmodule.exports = baseMerge;\n\n},{\"../lang/isArray\":30,\"../lang/isObject\":33,\"../lang/isTypedArray\":36,\"../object/keys\":38,\"./arrayEach\":6,\"./baseMergeDeep\":12,\"./isArrayLike\":20,\"./isObjectLike\":25}],12:[function(_dereq_,module,exports){\nvar arrayCopy = _dereq_('./arrayCopy'),\n isArguments = _dereq_('../lang/isArguments'),\n isArray = _dereq_('../lang/isArray'),\n isArrayLike = _dereq_('./isArrayLike'),\n isPlainObject = _dereq_('../lang/isPlainObject'),\n isTypedArray = _dereq_('../lang/isTypedArray'),\n toPlainObject = _dereq_('../lang/toPlainObject');\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize merging properties.\n * @param {Array} [stackA=[]] Tracks traversed source objects.\n * @param {Array} [stackB=[]] Associates values with source counterparts.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseMergeDeep(object, source, key, mergeFunc, customizer, stackA, stackB) {\n var length = stackA.length,\n srcValue = source[key];\n\n while (length--) {\n if (stackA[length] == srcValue) {\n object[key] = stackB[length];\n return;\n }\n }\n var value = object[key],\n result = customizer ? customizer(value, srcValue, key, object, source) : undefined,\n isCommon = result === undefined;\n\n if (isCommon) {\n result = srcValue;\n if (isArrayLike(srcValue) && (isArray(srcValue) || isTypedArray(srcValue))) {\n result = isArray(value)\n ? value\n : (isArrayLike(value) ? arrayCopy(value) : []);\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n result = isArguments(value)\n ? toPlainObject(value)\n : (isPlainObject(value) ? value : {});\n }\n else {\n isCommon = false;\n }\n }\n // Add the source value to the stack of traversed objects and associate\n // it with its merged value.\n stackA.push(srcValue);\n stackB.push(result);\n\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n object[key] = mergeFunc(result, srcValue, customizer, stackA, stackB);\n } else if (result === result ? (result !== value) : (value === value)) {\n object[key] = result;\n }\n}\n\nmodule.exports = baseMergeDeep;\n\n},{\"../lang/isArguments\":29,\"../lang/isArray\":30,\"../lang/isPlainObject\":34,\"../lang/isTypedArray\":36,\"../lang/toPlainObject\":37,\"./arrayCopy\":5,\"./isArrayLike\":20}],13:[function(_dereq_,module,exports){\nvar toObject = _dereq_('./toObject');\n\n/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : toObject(object)[key];\n };\n}\n\nmodule.exports = baseProperty;\n\n},{\"./toObject\":28}],14:[function(_dereq_,module,exports){\n/**\n * Converts `value` to a string if it's not one. An empty string is returned\n * for `null` or `undefined` values.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n if (typeof value == 'string') {\n return value;\n }\n return value == null ? '' : (value + '');\n}\n\nmodule.exports = baseToString;\n\n},{}],15:[function(_dereq_,module,exports){\nvar identity = _dereq_('../utility/identity');\n\n/**\n * A specialized version of `baseCallback` which only supports `this` binding\n * and specifying the number of arguments to provide to `func`.\n *\n * @private\n * @param {Function} func The function to bind.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {number} [argCount] The number of arguments to provide to `func`.\n * @returns {Function} Returns the callback.\n */\nfunction bindCallback(func, thisArg, argCount) {\n if (typeof func != 'function') {\n return identity;\n }\n if (thisArg === undefined) {\n return func;\n }\n switch (argCount) {\n case 1: return function(value) {\n return func.call(thisArg, value);\n };\n case 3: return function(value, index, collection) {\n return func.call(thisArg, value, index, collection);\n };\n case 4: return function(accumulator, value, index, collection) {\n return func.call(thisArg, accumulator, value, index, collection);\n };\n case 5: return function(value, other, key, object, source) {\n return func.call(thisArg, value, other, key, object, source);\n };\n }\n return function() {\n return func.apply(thisArg, arguments);\n };\n}\n\nmodule.exports = bindCallback;\n\n},{\"../utility/identity\":43}],16:[function(_dereq_,module,exports){\nvar bindCallback = _dereq_('./bindCallback'),\n isIterateeCall = _dereq_('./isIterateeCall'),\n restParam = _dereq_('../function/restParam');\n\n/**\n * Creates a function that assigns properties of source object(s) to a given\n * destination object.\n *\n * **Note:** This function is used to create `_.assign`, `_.defaults`, and `_.merge`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return restParam(function(object, sources) {\n var index = -1,\n length = object == null ? 0 : sources.length,\n customizer = length > 2 ? sources[length - 2] : undefined,\n guard = length > 2 ? sources[2] : undefined,\n thisArg = length > 1 ? sources[length - 1] : undefined;\n\n if (typeof customizer == 'function') {\n customizer = bindCallback(customizer, thisArg, 5);\n length -= 2;\n } else {\n customizer = typeof thisArg == 'function' ? thisArg : undefined;\n length -= (customizer ? 1 : 0);\n }\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, customizer);\n }\n }\n return object;\n });\n}\n\nmodule.exports = createAssigner;\n\n},{\"../function/restParam\":4,\"./bindCallback\":15,\"./isIterateeCall\":23}],17:[function(_dereq_,module,exports){\nvar toObject = _dereq_('./toObject');\n\n/**\n * Creates a base function for `_.forIn` or `_.forInRight`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var iterable = toObject(object),\n props = keysFunc(object),\n length = props.length,\n index = fromRight ? length : -1;\n\n while ((fromRight ? index-- : ++index < length)) {\n var key = props[index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nmodule.exports = createBaseFor;\n\n},{\"./toObject\":28}],18:[function(_dereq_,module,exports){\nvar baseProperty = _dereq_('./baseProperty');\n\n/**\n * Gets the \"length\" property value of `object`.\n *\n * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)\n * that affects Safari on at least iOS 8.1-8.3 ARM64.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {*} Returns the \"length\" value.\n */\nvar getLength = baseProperty('length');\n\nmodule.exports = getLength;\n\n},{\"./baseProperty\":13}],19:[function(_dereq_,module,exports){\nvar isNative = _dereq_('../lang/isNative');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = object == null ? undefined : object[key];\n return isNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n\n},{\"../lang/isNative\":32}],20:[function(_dereq_,module,exports){\nvar getLength = _dereq_('./getLength'),\n isLength = _dereq_('./isLength');\n\n/**\n * Checks if `value` is array-like.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n */\nfunction isArrayLike(value) {\n return value != null && isLength(getLength(value));\n}\n\nmodule.exports = isArrayLike;\n\n},{\"./getLength\":18,\"./isLength\":24}],21:[function(_dereq_,module,exports){\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nvar isHostObject = (function() {\n try {\n Object({ 'toString': 0 } + '');\n } catch(e) {\n return function() { return false; };\n }\n return function(value) {\n // IE < 9 presents many host objects as `Object` objects that can coerce\n // to strings despite having improperly defined `toString` methods.\n return typeof value.toString != 'function' && typeof (value + '') == 'string';\n };\n}());\n\nmodule.exports = isHostObject;\n\n},{}],22:[function(_dereq_,module,exports){\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^\\d+$/;\n\n/**\n * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)\n * of an array-like value.\n */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;\n length = length == null ? MAX_SAFE_INTEGER : length;\n return value > -1 && value % 1 == 0 && value < length;\n}\n\nmodule.exports = isIndex;\n\n},{}],23:[function(_dereq_,module,exports){\nvar isArrayLike = _dereq_('./isArrayLike'),\n isIndex = _dereq_('./isIndex'),\n isObject = _dereq_('../lang/isObject');\n\n/**\n * Checks if the provided arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)) {\n var other = object[index];\n return value === value ? (value === other) : (other !== other);\n }\n return false;\n}\n\nmodule.exports = isIterateeCall;\n\n},{\"../lang/isObject\":33,\"./isArrayLike\":20,\"./isIndex\":22}],24:[function(_dereq_,module,exports){\n/**\n * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)\n * of an array-like value.\n */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n */\nfunction isLength(value) {\n return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n\n},{}],25:[function(_dereq_,module,exports){\n/**\n * Checks if `value` is object-like.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n\n},{}],26:[function(_dereq_,module,exports){\nvar baseForIn = _dereq_('./baseForIn'),\n isArguments = _dereq_('../lang/isArguments'),\n isHostObject = _dereq_('./isHostObject'),\n isObjectLike = _dereq_('./isObjectLike'),\n support = _dereq_('../support');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/**\n * A fallback implementation of `_.isPlainObject` which checks if `value`\n * is an object created by the `Object` constructor or has a `[[Prototype]]`\n * of `null`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n */\nfunction shimIsPlainObject(value) {\n var Ctor;\n\n // Exit early for non `Object` objects.\n if (!(isObjectLike(value) && objToString.call(value) == objectTag && !isHostObject(value)) ||\n (!hasOwnProperty.call(value, 'constructor') &&\n (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor))) ||\n (!support.argsTag && isArguments(value))) {\n return false;\n }\n // IE < 9 iterates inherited properties before own properties. If the first\n // iterated property is an object's own property then there are no inherited\n // enumerable properties.\n var result;\n if (support.ownLast) {\n baseForIn(value, function(subValue, key, object) {\n result = hasOwnProperty.call(object, key);\n return false;\n });\n return result !== false;\n }\n // In most environments an object's own properties are iterated before\n // its inherited properties. If the last iterated property is an object's\n // own property then there are no inherited enumerable properties.\n baseForIn(value, function(subValue, key) {\n result = key;\n });\n return result === undefined || hasOwnProperty.call(value, result);\n}\n\nmodule.exports = shimIsPlainObject;\n\n},{\"../lang/isArguments\":29,\"../support\":42,\"./baseForIn\":9,\"./isHostObject\":21,\"./isObjectLike\":25}],27:[function(_dereq_,module,exports){\nvar isArguments = _dereq_('../lang/isArguments'),\n isArray = _dereq_('../lang/isArray'),\n isIndex = _dereq_('./isIndex'),\n isLength = _dereq_('./isLength'),\n isString = _dereq_('../lang/isString'),\n keysIn = _dereq_('../object/keysIn');\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A fallback implementation of `Object.keys` which creates an array of the\n * own enumerable property names of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction shimKeys(object) {\n var props = keysIn(object),\n propsLength = props.length,\n length = propsLength && object.length;\n\n var allowIndexes = !!length && isLength(length) &&\n (isArray(object) || isArguments(object) || isString(object));\n\n var index = -1,\n result = [];\n\n while (++index < propsLength) {\n var key = props[index];\n if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = shimKeys;\n\n},{\"../lang/isArguments\":29,\"../lang/isArray\":30,\"../lang/isString\":35,\"../object/keysIn\":39,\"./isIndex\":22,\"./isLength\":24}],28:[function(_dereq_,module,exports){\nvar isObject = _dereq_('../lang/isObject'),\n isString = _dereq_('../lang/isString'),\n support = _dereq_('../support');\n\n/**\n * Converts `value` to an object if it's not one.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {Object} Returns the object.\n */\nfunction toObject(value) {\n if (support.unindexedChars && isString(value)) {\n var index = -1,\n length = value.length,\n result = Object(value);\n\n while (++index < length) {\n result[index] = value.charAt(index);\n }\n return result;\n }\n return isObject(value) ? value : Object(value);\n}\n\nmodule.exports = toObject;\n\n},{\"../lang/isObject\":33,\"../lang/isString\":35,\"../support\":42}],29:[function(_dereq_,module,exports){\nvar isArrayLike = _dereq_('../internal/isArrayLike'),\n isObjectLike = _dereq_('../internal/isObjectLike'),\n support = _dereq_('../support');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/** Native method references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is classified as an `arguments` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n return isObjectLike(value) && isArrayLike(value) && objToString.call(value) == argsTag;\n}\n// Fallback for environments without a `toStringTag` for `arguments` objects.\nif (!support.argsTag) {\n isArguments = function(value) {\n return isObjectLike(value) && isArrayLike(value) &&\n hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');\n };\n}\n\nmodule.exports = isArguments;\n\n},{\"../internal/isArrayLike\":20,\"../internal/isObjectLike\":25,\"../support\":42}],30:[function(_dereq_,module,exports){\nvar getNative = _dereq_('../internal/getNative'),\n isLength = _dereq_('../internal/isLength'),\n isObjectLike = _dereq_('../internal/isObjectLike');\n\n/** `Object#toString` result references. */\nvar arrayTag = '[object Array]';\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/* Native method references for those with the same name as other `lodash` methods. */\nvar nativeIsArray = getNative(Array, 'isArray');\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(function() { return arguments; }());\n * // => false\n */\nvar isArray = nativeIsArray || function(value) {\n return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag;\n};\n\nmodule.exports = isArray;\n\n},{\"../internal/getNative\":19,\"../internal/isLength\":24,\"../internal/isObjectLike\":25}],31:[function(_dereq_,module,exports){\n(function (global){\nvar baseIsFunction = _dereq_('../internal/baseIsFunction'),\n getNative = _dereq_('../internal/getNative');\n\n/** `Object#toString` result references. */\nvar funcTag = '[object Function]';\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/** Native method references. */\nvar Uint8Array = getNative(global, 'Uint8Array');\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nvar isFunction = !(baseIsFunction(/x/) || (Uint8Array && !baseIsFunction(Uint8Array))) ? baseIsFunction : function(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in older versions of Chrome and Safari which return 'function' for regexes\n // and Safari 8 equivalents which return 'object' for typed array constructors.\n return objToString.call(value) == funcTag;\n};\n\nmodule.exports = isFunction;\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"../internal/baseIsFunction\":10,\"../internal/getNative\":19}],32:[function(_dereq_,module,exports){\nvar escapeRegExp = _dereq_('../string/escapeRegExp'),\n isHostObject = _dereq_('../internal/isHostObject'),\n isObjectLike = _dereq_('../internal/isObjectLike');\n\n/** `Object#toString` result references. */\nvar funcTag = '[object Function]';\n\n/** Used to detect host constructors (Safari > 5). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar fnToString = Function.prototype.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n escapeRegExp(fnToString.call(hasOwnProperty))\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * Checks if `value` is a native function.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function, else `false`.\n * @example\n *\n * _.isNative(Array.prototype.push);\n * // => true\n *\n * _.isNative(_);\n * // => false\n */\nfunction isNative(value) {\n if (value == null) {\n return false;\n }\n if (objToString.call(value) == funcTag) {\n return reIsNative.test(fnToString.call(value));\n }\n return isObjectLike(value) && (isHostObject(value) ? reIsNative : reIsHostCtor).test(value);\n}\n\nmodule.exports = isNative;\n\n},{\"../internal/isHostObject\":21,\"../internal/isObjectLike\":25,\"../string/escapeRegExp\":41}],33:[function(_dereq_,module,exports){\n/**\n * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.\n * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(1);\n * // => false\n */\nfunction isObject(value) {\n // Avoid a V8 JIT bug in Chrome 19-20.\n // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n\n},{}],34:[function(_dereq_,module,exports){\nvar getNative = _dereq_('../internal/getNative'),\n isArguments = _dereq_('./isArguments'),\n shimIsPlainObject = _dereq_('../internal/shimIsPlainObject'),\n support = _dereq_('../support');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/** Native method references. */\nvar getPrototypeOf = getNative(Object, 'getPrototypeOf');\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * **Note:** This method assumes objects created by the `Object` constructor\n * have no inherited enumerable properties.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nvar isPlainObject = !getPrototypeOf ? shimIsPlainObject : function(value) {\n if (!(value && objToString.call(value) == objectTag) || (!support.argsTag && isArguments(value))) {\n return false;\n }\n var valueOf = getNative(value, 'valueOf'),\n objProto = valueOf && (objProto = getPrototypeOf(valueOf)) && getPrototypeOf(objProto);\n\n return objProto\n ? (value == objProto || getPrototypeOf(value) == objProto)\n : shimIsPlainObject(value);\n};\n\nmodule.exports = isPlainObject;\n\n},{\"../internal/getNative\":19,\"../internal/shimIsPlainObject\":26,\"../support\":42,\"./isArguments\":29}],35:[function(_dereq_,module,exports){\nvar isObjectLike = _dereq_('../internal/isObjectLike');\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag);\n}\n\nmodule.exports = isString;\n\n},{\"../internal/isObjectLike\":25}],36:[function(_dereq_,module,exports){\nvar isLength = _dereq_('../internal/isLength'),\n isObjectLike = _dereq_('../internal/isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dateTag] = typedArrayTags[errorTag] =\ntypedArrayTags[funcTag] = typedArrayTags[mapTag] =\ntypedArrayTags[numberTag] = typedArrayTags[objectTag] =\ntypedArrayTags[regexpTag] = typedArrayTags[setTag] =\ntypedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nfunction isTypedArray(value) {\n return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)];\n}\n\nmodule.exports = isTypedArray;\n\n},{\"../internal/isLength\":24,\"../internal/isObjectLike\":25}],37:[function(_dereq_,module,exports){\nvar baseCopy = _dereq_('../internal/baseCopy'),\n keysIn = _dereq_('../object/keysIn');\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable\n * properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return baseCopy(value, keysIn(value));\n}\n\nmodule.exports = toPlainObject;\n\n},{\"../internal/baseCopy\":7,\"../object/keysIn\":39}],38:[function(_dereq_,module,exports){\nvar getNative = _dereq_('../internal/getNative'),\n isArrayLike = _dereq_('../internal/isArrayLike'),\n isObject = _dereq_('../lang/isObject'),\n shimKeys = _dereq_('../internal/shimKeys'),\n support = _dereq_('../support');\n\n/* Native method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = getNative(Object, 'keys');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.keys)\n * for more details.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nvar keys = !nativeKeys ? shimKeys : function(object) {\n var Ctor = object == null ? null : object.constructor;\n if ((typeof Ctor == 'function' && Ctor.prototype === object) ||\n (typeof object == 'function' ? support.enumPrototypes : isArrayLike(object))) {\n return shimKeys(object);\n }\n return isObject(object) ? nativeKeys(object) : [];\n};\n\nmodule.exports = keys;\n\n},{\"../internal/getNative\":19,\"../internal/isArrayLike\":20,\"../internal/shimKeys\":27,\"../lang/isObject\":33,\"../support\":42}],39:[function(_dereq_,module,exports){\nvar arrayEach = _dereq_('../internal/arrayEach'),\n isArguments = _dereq_('../lang/isArguments'),\n isArray = _dereq_('../lang/isArray'),\n isFunction = _dereq_('../lang/isFunction'),\n isIndex = _dereq_('../internal/isIndex'),\n isLength = _dereq_('../internal/isLength'),\n isObject = _dereq_('../lang/isObject'),\n isString = _dereq_('../lang/isString'),\n support = _dereq_('../support');\n\n/** `Object#toString` result references. */\nvar arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n stringTag = '[object String]';\n\n/** Used to fix the JScript `[[DontEnum]]` bug. */\nvar shadowProps = [\n 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable',\n 'toLocaleString', 'toString', 'valueOf'\n];\n\n/** Used for native method references. */\nvar errorProto = Error.prototype,\n objectProto = Object.prototype,\n stringProto = String.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/** Used to avoid iterating over non-enumerable properties in IE < 9. */\nvar nonEnumProps = {};\nnonEnumProps[arrayTag] = nonEnumProps[dateTag] = nonEnumProps[numberTag] = { 'constructor': true, 'toLocaleString': true, 'toString': true, 'valueOf': true };\nnonEnumProps[boolTag] = nonEnumProps[stringTag] = { 'constructor': true, 'toString': true, 'valueOf': true };\nnonEnumProps[errorTag] = nonEnumProps[funcTag] = nonEnumProps[regexpTag] = { 'constructor': true, 'toString': true };\nnonEnumProps[objectTag] = { 'constructor': true };\n\narrayEach(shadowProps, function(key) {\n for (var tag in nonEnumProps) {\n if (hasOwnProperty.call(nonEnumProps, tag)) {\n var props = nonEnumProps[tag];\n props[key] = hasOwnProperty.call(props, key);\n }\n }\n});\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n if (object == null) {\n return [];\n }\n if (!isObject(object)) {\n object = Object(object);\n }\n var length = object.length;\n\n length = (length && isLength(length) &&\n (isArray(object) || isArguments(object) || isString(object)) && length) || 0;\n\n var Ctor = object.constructor,\n index = -1,\n proto = (isFunction(Ctor) && Ctor.prototype) || objectProto,\n isProto = proto === object,\n result = Array(length),\n skipIndexes = length > 0,\n skipErrorProps = support.enumErrorProps && (object === errorProto || object instanceof Error),\n skipProto = support.enumPrototypes && isFunction(object);\n\n while (++index < length) {\n result[index] = (index + '');\n }\n // lodash skips the `constructor` property when it infers it is iterating\n // over a `prototype` object because IE < 9 can't set the `[[Enumerable]]`\n // attribute of an existing property and the `constructor` property of a\n // prototype defaults to non-enumerable.\n for (var key in object) {\n if (!(skipProto && key == 'prototype') &&\n !(skipErrorProps && (key == 'message' || key == 'name')) &&\n !(skipIndexes && isIndex(key, length)) &&\n !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n if (support.nonEnumShadows && object !== objectProto) {\n var tag = object === stringProto ? stringTag : (object === errorProto ? errorTag : objToString.call(object)),\n nonEnums = nonEnumProps[tag] || nonEnumProps[objectTag];\n\n if (tag == objectTag) {\n proto = objectProto;\n }\n length = shadowProps.length;\n while (length--) {\n key = shadowProps[length];\n var nonEnum = nonEnums[key];\n if (!(isProto && nonEnum) &&\n (nonEnum ? hasOwnProperty.call(object, key) : object[key] !== proto[key])) {\n result.push(key);\n }\n }\n }\n return result;\n}\n\nmodule.exports = keysIn;\n\n},{\"../internal/arrayEach\":6,\"../internal/isIndex\":22,\"../internal/isLength\":24,\"../lang/isArguments\":29,\"../lang/isArray\":30,\"../lang/isFunction\":31,\"../lang/isObject\":33,\"../lang/isString\":35,\"../support\":42}],40:[function(_dereq_,module,exports){\nvar baseMerge = _dereq_('../internal/baseMerge'),\n createAssigner = _dereq_('../internal/createAssigner');\n\n/**\n * Recursively merges own enumerable properties of the source object(s), that\n * don't resolve to `undefined` into the destination object. Subsequent sources\n * overwrite property assignments of previous sources. If `customizer` is\n * provided it is invoked to produce the merged values of the destination and\n * source properties. If `customizer` returns `undefined` merging is handled\n * by the method instead. The `customizer` is bound to `thisArg` and invoked\n * with five arguments: (objectValue, sourceValue, key, object, source).\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {*} [thisArg] The `this` binding of `customizer`.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var users = {\n * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }]\n * };\n *\n * var ages = {\n * 'data': [{ 'age': 36 }, { 'age': 40 }]\n * };\n *\n * _.merge(users, ages);\n * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] }\n *\n * // using a customizer callback\n * var object = {\n * 'fruits': ['apple'],\n * 'vegetables': ['beet']\n * };\n *\n * var other = {\n * 'fruits': ['banana'],\n * 'vegetables': ['carrot']\n * };\n *\n * _.merge(object, other, function(a, b) {\n * if (_.isArray(a)) {\n * return a.concat(b);\n * }\n * });\n * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] }\n */\nvar merge = createAssigner(baseMerge);\n\nmodule.exports = merge;\n\n},{\"../internal/baseMerge\":11,\"../internal/createAssigner\":16}],41:[function(_dereq_,module,exports){\nvar baseToString = _dereq_('../internal/baseToString');\n\n/**\n * Used to match `RegExp` [special characters](http://www.regular-expressions.info/characters.html#special).\n * In addition to special characters the forward slash is escaped to allow for\n * easier `eval` use and `Function` compilation.\n */\nvar reRegExpChars = /[.*+?^${}()|[\\]\\/\\\\]/g,\n reHasRegExpChars = RegExp(reRegExpChars.source);\n\n/**\n * Escapes the `RegExp` special characters \"\\\", \"/\", \"^\", \"$\", \".\", \"|\", \"?\",\n * \"*\", \"+\", \"(\", \")\", \"[\", \"]\", \"{\" and \"}\" in `string`.\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escapeRegExp('[lodash](https://lodash.com/)');\n * // => '\\[lodash\\]\\(https:\\/\\/lodash\\.com\\/\\)'\n */\nfunction escapeRegExp(string) {\n string = baseToString(string);\n return (string && reHasRegExpChars.test(string))\n ? string.replace(reRegExpChars, '\\\\$&')\n : string;\n}\n\nmodule.exports = escapeRegExp;\n\n},{\"../internal/baseToString\":14}],42:[function(_dereq_,module,exports){\n(function (global){\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n objectTag = '[object Object]';\n\n/** Used for native method references. */\nvar arrayProto = Array.prototype,\n errorProto = Error.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect DOM support. */\nvar document = (document = global.window) ? document.document : null;\n\n/**\n * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/** Native method references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice;\n\n/**\n * An object environment feature flags.\n *\n * @static\n * @memberOf _\n * @type Object\n */\nvar support = {};\n\n(function(x) {\n var Ctor = function() { this.x = x; },\n object = { '0': x, 'length': x },\n props = [];\n\n Ctor.prototype = { 'valueOf': x, 'y': x };\n for (var key in new Ctor) { props.push(key); }\n\n /**\n * Detect if the `toStringTag` of `arguments` objects is resolvable\n * (all but Firefox < 4, IE < 9).\n *\n * @memberOf _.support\n * @type boolean\n */\n support.argsTag = objToString.call(arguments) == argsTag;\n\n /**\n * Detect if `name` or `message` properties of `Error.prototype` are\n * enumerable by default (IE < 9, Safari < 5.1).\n *\n * @memberOf _.support\n * @type boolean\n */\n support.enumErrorProps = propertyIsEnumerable.call(errorProto, 'message') ||\n propertyIsEnumerable.call(errorProto, 'name');\n\n /**\n * Detect if `prototype` properties are enumerable by default.\n *\n * Firefox < 3.6, Opera > 9.50 - Opera < 11.60, and Safari < 5.1\n * (if the prototype or a property on the prototype has been set)\n * incorrectly set the `[[Enumerable]]` value of a function's `prototype`\n * property to `true`.\n *\n * @memberOf _.support\n * @type boolean\n */\n support.enumPrototypes = propertyIsEnumerable.call(Ctor, 'prototype');\n\n /**\n * Detect if the `toStringTag` of DOM nodes is resolvable (all but IE < 9).\n *\n * @memberOf _.support\n * @type boolean\n */\n support.nodeTag = objToString.call(document) != objectTag;\n\n /**\n * Detect if properties shadowing those on `Object.prototype` are non-enumerable.\n *\n * In IE < 9 an object's own properties, shadowing non-enumerable ones,\n * are made non-enumerable as well (a.k.a the JScript `[[DontEnum]]` bug).\n *\n * @memberOf _.support\n * @type boolean\n */\n support.nonEnumShadows = !/valueOf/.test(props);\n\n /**\n * Detect if own properties are iterated after inherited properties (IE < 9).\n *\n * @memberOf _.support\n * @type boolean\n */\n support.ownLast = props[0] != 'x';\n\n /**\n * Detect if `Array#shift` and `Array#splice` augment array-like objects\n * correctly.\n *\n * Firefox < 10, compatibility modes of IE 8, and IE < 9 have buggy Array\n * `shift()` and `splice()` functions that fail to remove the last element,\n * `value[0]`, of array-like objects even though the \"length\" property is\n * set to `0`. The `shift()` method is buggy in compatibility modes of IE 8,\n * while `splice()` is buggy regardless of mode in IE < 9.\n *\n * @memberOf _.support\n * @type boolean\n */\n support.spliceObjects = (splice.call(object, 0, 1), !object[0]);\n\n /**\n * Detect lack of support for accessing string characters by index.\n *\n * IE < 8 can't access characters by index. IE 8 can only access characters\n * by index on string literals, not string objects.\n *\n * @memberOf _.support\n * @type boolean\n */\n support.unindexedChars = ('x'[0] + Object('x')[0]) != 'xx';\n\n /**\n * Detect if the DOM is supported.\n *\n * @memberOf _.support\n * @type boolean\n */\n try {\n support.dom = document.createDocumentFragment().nodeType === 11;\n } catch(e) {\n support.dom = false;\n }\n}(1, 0));\n\nmodule.exports = support;\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{}],43:[function(_dereq_,module,exports){\n/**\n * This method returns the first argument provided to it.\n *\n * @static\n * @memberOf _\n * @category Utility\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'user': 'fred' };\n *\n * _.identity(object) === object;\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n\n},{}],44:[function(_dereq_,module,exports){\n'use strict';\n\n// modified from https://github.com/es-shims/es6-shim\nvar keys = _dereq_('object-keys');\nvar canBeObject = function (obj) {\n\treturn typeof obj !== 'undefined' && obj !== null;\n};\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol() === 'symbol';\nvar defineProperties = _dereq_('define-properties');\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\nvar isEnumerableOn = function (obj) {\n\treturn function isEnumerable(prop) {\n\t\treturn propIsEnumerable.call(obj, prop);\n\t};\n};\n\nvar assignShim = function assign(target, source1) {\n\tif (!canBeObject(target)) { throw new TypeError('target must be an object'); }\n\tvar objTarget = Object(target);\n\tvar s, source, i, props;\n\tfor (s = 1; s < arguments.length; ++s) {\n\t\tsource = Object(arguments[s]);\n\t\tprops = keys(source);\n\t\tif (hasSymbols && Object.getOwnPropertySymbols) {\n\t\t\tprops.push.apply(props, Object.getOwnPropertySymbols(source).filter(isEnumerableOn(source)));\n\t\t}\n\t\tfor (i = 0; i < props.length; ++i) {\n\t\t\tobjTarget[props[i]] = source[props[i]];\n\t\t}\n\t}\n\treturn objTarget;\n};\n\nassignShim.shim = function shimObjectAssign() {\n\tif (Object.assign && Object.preventExtensions) {\n\t\tvar assignHasPendingExceptions = (function () {\n\t\t\t// Firefox 37 still has \"pending exception\" logic in its Object.assign implementation,\n\t\t\t// which is 72% slower than our shim, and Firefox 40's native implementation.\n\t\t\tvar thrower = Object.preventExtensions({ 1: 2 });\n\t\t\ttry {\n\t\t\t\tObject.assign(thrower, 'xy');\n\t\t\t} catch (e) {\n\t\t\t\treturn thrower[1] === 'y';\n\t\t\t}\n\t\t}());\n\t\tif (assignHasPendingExceptions) {\n\t\t\tdelete Object.assign;\n\t\t}\n\t}\n\tif (!Object.assign) {\n\t\tdefineProperties(Object, {\n\t\t\tassign: assignShim\n\t\t});\n\t}\n\treturn Object.assign || assignShim;\n};\n\nmodule.exports = assignShim;\n\n\n},{\"define-properties\":45,\"object-keys\":47}],45:[function(_dereq_,module,exports){\n'use strict';\n\nvar keys = _dereq_('object-keys');\nvar foreach = _dereq_('foreach');\n\nvar toStr = Object.prototype.toString;\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar arePropertyDescriptorsSupported = function () {\n\tvar obj = {};\n\ttry {\n\t\tObject.defineProperty(obj, 'x', { value: obj });\n\t\treturn obj.x === obj;\n\t} catch (e) { /* this is IE 8. */\n\t\treturn false;\n\t}\n};\nvar supportsDescriptors = Object.defineProperty && arePropertyDescriptorsSupported();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object && (!isFunction(predicate) || !predicate())) {\n\t\treturn;\n\t}\n\tif (supportsDescriptors) {\n\t\tObject.defineProperty(object, name, {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\twritable: true,\n\t\t\tvalue: value\n\t\t});\n\t} else {\n\t\tobject[name] = value;\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tforeach(keys(map), function (name) {\n\t\tdefineProperty(object, name, map[name], predicates[name]);\n\t});\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n\n},{\"foreach\":46,\"object-keys\":47}],46:[function(_dereq_,module,exports){\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toString = Object.prototype.toString;\n\nmodule.exports = function forEach (obj, fn, ctx) {\n if (toString.call(fn) !== '[object Function]') {\n throw new TypeError('iterator must be a function');\n }\n var l = obj.length;\n if (l === +l) {\n for (var i = 0; i < l; i++) {\n fn.call(ctx, obj[i], i, obj);\n }\n } else {\n for (var k in obj) {\n if (hasOwn.call(obj, k)) {\n fn.call(ctx, obj[k], k, obj);\n }\n }\n }\n};\n\n\n},{}],47:[function(_dereq_,module,exports){\n'use strict';\n\n// modified from https://github.com/es-shims/es5-shim\nvar has = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\nvar isArgs = _dereq_('./isArguments');\nvar hasDontEnumBug = !({ 'toString': null }).propertyIsEnumerable('toString');\nvar hasProtoEnumBug = function () {}.propertyIsEnumerable('prototype');\nvar dontEnums = [\n\t'toString',\n\t'toLocaleString',\n\t'valueOf',\n\t'hasOwnProperty',\n\t'isPrototypeOf',\n\t'propertyIsEnumerable',\n\t'constructor'\n];\n\nvar keysShim = function keys(object) {\n\tvar isObject = object !== null && typeof object === 'object';\n\tvar isFunction = toStr.call(object) === '[object Function]';\n\tvar isArguments = isArgs(object);\n\tvar isString = isObject && toStr.call(object) === '[object String]';\n\tvar theKeys = [];\n\n\tif (!isObject && !isFunction && !isArguments) {\n\t\tthrow new TypeError('Object.keys called on a non-object');\n\t}\n\n\tvar skipProto = hasProtoEnumBug && isFunction;\n\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\ttheKeys.push(String(i));\n\t\t}\n\t}\n\n\tif (isArguments && object.length > 0) {\n\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\ttheKeys.push(String(j));\n\t\t}\n\t} else {\n\t\tfor (var name in object) {\n\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\ttheKeys.push(String(name));\n\t\t\t}\n\t\t}\n\t}\n\n\tif (hasDontEnumBug) {\n\t\tvar ctor = object.constructor;\n\t\tvar skipConstructor = ctor && ctor.prototype === object;\n\n\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t}\n\t\t}\n\t}\n\treturn theKeys;\n};\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (!Object.keys) {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n\n},{\"./isArguments\":48}],48:[function(_dereq_,module,exports){\n'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]'\n\t\t\t&& value !== null\n\t\t\t&& typeof value === 'object'\n\t\t\t&& typeof value.length === 'number'\n\t\t\t&& value.length >= 0\n\t\t\t&& toStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n\n},{}],49:[function(_dereq_,module,exports){\nmodule.exports = SafeParseTuple\n\nfunction SafeParseTuple(obj, reviver) {\n var json\n var error = null\n\n try {\n json = JSON.parse(obj, reviver)\n } catch (err) {\n error = err\n }\n\n return [error, json]\n}\n\n},{}],50:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file big-play-button.js\n */\n\nvar _Button2 = _dereq_('./button.js');\n\nvar _Button3 = _interopRequireWildcard(_Button2);\n\nvar _Component = _dereq_('./component.js');\n\nvar _Component2 = _interopRequireWildcard(_Component);\n\n/**\n * Initial play button. Shows before the video has played. The hiding of the\n * big play button is done via CSS and player states.\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @extends Button\n * @class BigPlayButton\n */\n\nvar BigPlayButton = (function (_Button) {\n function BigPlayButton(player, options) {\n _classCallCheck(this, BigPlayButton);\n\n _Button.call(this, player, options);\n }\n\n _inherits(BigPlayButton, _Button);\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n\n BigPlayButton.prototype.buildCSSClass = function buildCSSClass() {\n return 'vjs-big-play-button';\n };\n\n /**\n * Handles click for play\n *\n * @method handleClick\n */\n\n BigPlayButton.prototype.handleClick = function handleClick() {\n this.player_.play();\n };\n\n return BigPlayButton;\n})(_Button3['default']);\n\nBigPlayButton.prototype.controlText_ = 'Play Video';\n\n_Component2['default'].registerComponent('BigPlayButton', BigPlayButton);\nexports['default'] = BigPlayButton;\nmodule.exports = exports['default'];\n\n},{\"./button.js\":51,\"./component.js\":52}],51:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file button.js\n */\n\nvar _Component2 = _dereq_('./component');\n\nvar _Component3 = _interopRequireWildcard(_Component2);\n\nvar _import = _dereq_('./utils/dom.js');\n\nvar Dom = _interopRequireWildcard(_import);\n\nvar _import2 = _dereq_('./utils/events.js');\n\nvar Events = _interopRequireWildcard(_import2);\n\nvar _import3 = _dereq_('./utils/fn.js');\n\nvar Fn = _interopRequireWildcard(_import3);\n\nvar _document = _dereq_('global/document');\n\nvar _document2 = _interopRequireWildcard(_document);\n\nvar _assign = _dereq_('object.assign');\n\nvar _assign2 = _interopRequireWildcard(_assign);\n\n/**\n * Base class for all buttons\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @extends Component\n * @class Button\n */\n\nvar Button = (function (_Component) {\n function Button(player, options) {\n _classCallCheck(this, Button);\n\n _Component.call(this, player, options);\n\n this.emitTapEvents();\n\n this.on('tap', this.handleClick);\n this.on('click', this.handleClick);\n this.on('focus', this.handleFocus);\n this.on('blur', this.handleBlur);\n }\n\n _inherits(Button, _Component);\n\n /**\n * Create the component's DOM element\n *\n * @param {String=} type Element's node type. e.g. 'div'\n * @param {Object=} props An object of element attributes that should be set on the element Tag name\n * @return {Element}\n * @method createEl\n */\n\n Button.prototype.createEl = function createEl() {\n var type = arguments[0] === undefined ? 'button' : arguments[0];\n var props = arguments[1] === undefined ? {} : arguments[1];\n\n // Add standard Aria and Tabindex info\n props = _assign2['default']({\n className: this.buildCSSClass(),\n role: 'button',\n 'aria-live': 'polite', // let the screen reader user know that the text of the button may change\n tabIndex: 0\n }, props);\n\n var el = _Component.prototype.createEl.call(this, type, props);\n\n this.controlTextEl_ = Dom.createEl('span', {\n className: 'vjs-control-text'\n });\n\n el.appendChild(this.controlTextEl_);\n\n this.controlText(this.controlText_);\n\n return el;\n };\n\n /**\n * Controls text - both request and localize\n *\n * @param {String} text Text for button\n * @return {String}\n * @method controlText\n */\n\n Button.prototype.controlText = function controlText(text) {\n if (!text) {\n return this.controlText_ || 'Need Text';\n }this.controlText_ = text;\n this.controlTextEl_.innerHTML = this.localize(this.controlText_);\n\n return this;\n };\n\n /**\n * Allows sub components to stack CSS class names\n *\n * @return {String}\n * @method buildCSSClass\n */\n\n Button.prototype.buildCSSClass = function buildCSSClass() {\n return 'vjs-control vjs-button ' + _Component.prototype.buildCSSClass.call(this);\n };\n\n /**\n * Handle Click - Override with specific functionality for button\n *\n * @method handleClick\n */\n\n Button.prototype.handleClick = function handleClick() {};\n\n /**\n * Handle Focus - Add keyboard functionality to element\n *\n * @method handleFocus\n */\n\n Button.prototype.handleFocus = function handleFocus() {\n Events.on(_document2['default'], 'keydown', Fn.bind(this, this.handleKeyPress));\n };\n\n /**\n * Handle KeyPress (document level) - Trigger click when keys are pressed\n *\n * @method handleKeyPress\n */\n\n Button.prototype.handleKeyPress = function handleKeyPress(event) {\n // Check for space bar (32) or enter (13) keys\n if (event.which === 32 || event.which === 13) {\n event.preventDefault();\n this.handleClick();\n }\n };\n\n /**\n * Handle Blur - Remove keyboard triggers\n *\n * @method handleBlur\n */\n\n Button.prototype.handleBlur = function handleBlur() {\n Events.off(_document2['default'], 'keydown', Fn.bind(this, this.handleKeyPress));\n };\n\n return Button;\n})(_Component3['default']);\n\n_Component3['default'].registerComponent('Button', Button);\nexports['default'] = Button;\nmodule.exports = exports['default'];\n\n},{\"./component\":52,\"./utils/dom.js\":110,\"./utils/events.js\":111,\"./utils/fn.js\":112,\"global/document\":1,\"object.assign\":44}],52:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nexports.__esModule = true;\n/**\n * @file component.js\n *\n * Player Component - Base class for all UI objects\n */\n\nvar _window = _dereq_('global/window');\n\nvar _window2 = _interopRequireWildcard(_window);\n\nvar _import = _dereq_('./utils/dom.js');\n\nvar Dom = _interopRequireWildcard(_import);\n\nvar _import2 = _dereq_('./utils/fn.js');\n\nvar Fn = _interopRequireWildcard(_import2);\n\nvar _import3 = _dereq_('./utils/guid.js');\n\nvar Guid = _interopRequireWildcard(_import3);\n\nvar _import4 = _dereq_('./utils/events.js');\n\nvar Events = _interopRequireWildcard(_import4);\n\nvar _log = _dereq_('./utils/log.js');\n\nvar _log2 = _interopRequireWildcard(_log);\n\nvar _toTitleCase = _dereq_('./utils/to-title-case.js');\n\nvar _toTitleCase2 = _interopRequireWildcard(_toTitleCase);\n\nvar _assign = _dereq_('object.assign');\n\nvar _assign2 = _interopRequireWildcard(_assign);\n\nvar _mergeOptions = _dereq_('./utils/merge-options.js');\n\nvar _mergeOptions2 = _interopRequireWildcard(_mergeOptions);\n\n/**\n * Base UI Component class\n * Components are embeddable UI objects that are represented by both a\n * javascript object and an element in the DOM. They can be children of other\n * components, and can have many children themselves.\n * ```js\n * // adding a button to the player\n * var button = player.addChild('button');\n * button.el(); // -> button element\n * ```\n * ```html\n *
    \n *
    Button
    \n *
    \n * ```\n * Components are also event emitters.\n * ```js\n * button.on('click', function(){\n * console.log('Button Clicked!');\n * });\n * button.trigger('customevent');\n * ```\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @class Component\n */\n\nvar Component = (function () {\n function Component(player, options, ready) {\n _classCallCheck(this, Component);\n\n // The component might be the player itself and we can't pass `this` to super\n if (!player && this.play) {\n this.player_ = player = this; // eslint-disable-line\n } else {\n this.player_ = player;\n }\n\n // Make a copy of prototype.options_ to protect against overriding defaults\n this.options_ = _mergeOptions2['default']({}, this.options_);\n\n // Updated options with supplied options\n options = this.options_ = _mergeOptions2['default'](this.options_, options);\n\n // Get ID from options or options element if one is supplied\n this.id_ = options.id || options.el && options.el.id;\n\n // If there was no ID from the options, generate one\n if (!this.id_) {\n // Don't require the player ID function in the case of mock players\n var id = player && player.id && player.id() || 'no_player';\n\n this.id_ = '' + id + '_component_' + Guid.newGUID();\n }\n\n this.name_ = options.name || null;\n\n // Create element if one wasn't provided in options\n if (options.el) {\n this.el_ = options.el;\n } else if (options.createEl !== false) {\n this.el_ = this.createEl();\n }\n\n this.children_ = [];\n this.childIndex_ = {};\n this.childNameIndex_ = {};\n\n // Add any child components in options\n if (options.initChildren !== false) {\n this.initChildren();\n }\n\n this.ready(ready);\n // Don't want to trigger ready here or it will before init is actually\n // finished for all children that run this constructor\n\n if (options.reportTouchActivity !== false) {\n this.enableTouchActivity();\n }\n }\n\n // Temp for ES6 class transition, remove before 5.0\n\n Component.prototype.init = function init() {\n // console.log('init called on Component');\n Component.apply(this, arguments);\n };\n\n /**\n * Dispose of the component and all child components\n *\n * @method dispose\n */\n\n Component.prototype.dispose = function dispose() {\n this.trigger({ type: 'dispose', bubbles: false });\n\n // Dispose all children.\n if (this.children_) {\n for (var i = this.children_.length - 1; i >= 0; i--) {\n if (this.children_[i].dispose) {\n this.children_[i].dispose();\n }\n }\n }\n\n // Delete child references\n this.children_ = null;\n this.childIndex_ = null;\n this.childNameIndex_ = null;\n\n // Remove all event listeners.\n this.off();\n\n // Remove element from DOM\n if (this.el_.parentNode) {\n this.el_.parentNode.removeChild(this.el_);\n }\n\n Dom.removeElData(this.el_);\n this.el_ = null;\n };\n\n /**\n * Return the component's player\n *\n * @return {Player}\n * @method player\n */\n\n Component.prototype.player = function player() {\n return this.player_;\n };\n\n /**\n * Deep merge of options objects\n * Whenever a property is an object on both options objects\n * the two properties will be merged using mergeOptions.\n * This is used for merging options for child components. We\n * want it to be easy to override individual options on a child\n * component without having to rewrite all the other default options.\n * ```js\n * Parent.prototype.options_ = {\n * children: {\n * 'childOne': { 'foo': 'bar', 'asdf': 'fdsa' },\n * 'childTwo': {},\n * 'childThree': {}\n * }\n * }\n * newOptions = {\n * children: {\n * 'childOne': { 'foo': 'baz', 'abc': '123' }\n * 'childTwo': null,\n * 'childFour': {}\n * }\n * }\n *\n * this.options(newOptions);\n * ```\n * RESULT\n * ```js\n * {\n * children: {\n * 'childOne': { 'foo': 'baz', 'asdf': 'fdsa', 'abc': '123' },\n * 'childTwo': null, // Disabled. Won't be initialized.\n * 'childThree': {},\n * 'childFour': {}\n * }\n * }\n * ```\n *\n * @param {Object} obj Object of new option values\n * @return {Object} A NEW object of this.options_ and obj merged\n * @method options\n */\n\n Component.prototype.options = function options(obj) {\n _log2['default'].warn('this.options() has been deprecated and will be moved to the constructor in 6.0');\n\n if (!obj) {\n return this.options_;\n }\n\n this.options_ = _mergeOptions2['default'](this.options_, obj);\n return this.options_;\n };\n\n /**\n * Get the component's DOM element\n * ```js\n * var domEl = myComponent.el();\n * ```\n *\n * @return {Element}\n * @method el\n */\n\n Component.prototype.el = function el() {\n return this.el_;\n };\n\n /**\n * Create the component's DOM element\n *\n * @param {String=} tagName Element's node type. e.g. 'div'\n * @param {Object=} attributes An object of element attributes that should be set on the element\n * @return {Element}\n * @method createEl\n */\n\n Component.prototype.createEl = function createEl(tagName, attributes) {\n return Dom.createEl(tagName, attributes);\n };\n\n Component.prototype.localize = function localize(string) {\n var code = this.player_.language && this.player_.language();\n var languages = this.player_.languages && this.player_.languages();\n\n if (!code || !languages) {\n return string;\n }\n\n var language = languages[code];\n\n if (language && language[string]) {\n return language[string];\n }\n\n var primaryCode = code.split('-')[0];\n var primaryLang = languages[primaryCode];\n\n if (primaryLang && primaryLang[string]) {\n return primaryLang[string];\n }\n\n return string;\n };\n\n /**\n * Return the component's DOM element where children are inserted.\n * Will either be the same as el() or a new element defined in createEl().\n *\n * @return {Element}\n * @method contentEl\n */\n\n Component.prototype.contentEl = function contentEl() {\n return this.contentEl_ || this.el_;\n };\n\n /**\n * Get the component's ID\n * ```js\n * var id = myComponent.id();\n * ```\n *\n * @return {String}\n * @method id\n */\n\n Component.prototype.id = function id() {\n return this.id_;\n };\n\n /**\n * Get the component's name. The name is often used to reference the component.\n * ```js\n * var name = myComponent.name();\n * ```\n *\n * @return {String}\n * @method name\n */\n\n Component.prototype.name = function name() {\n return this.name_;\n };\n\n /**\n * Get an array of all child components\n * ```js\n * var kids = myComponent.children();\n * ```\n *\n * @return {Array} The children\n * @method children\n */\n\n Component.prototype.children = function children() {\n return this.children_;\n };\n\n /**\n * Returns a child component with the provided ID\n *\n * @return {Component}\n * @method getChildById\n */\n\n Component.prototype.getChildById = function getChildById(id) {\n return this.childIndex_[id];\n };\n\n /**\n * Returns a child component with the provided name\n *\n * @return {Component}\n * @method getChild\n */\n\n Component.prototype.getChild = function getChild(name) {\n return this.childNameIndex_[name];\n };\n\n /**\n * Adds a child component inside this component\n * ```js\n * myComponent.el();\n * // ->
    \n * myComponent.children();\n * // [empty array]\n *\n * var myButton = myComponent.addChild('MyButton');\n * // ->
    myButton
    \n * // -> myButton === myComonent.children()[0];\n * ```\n * Pass in options for child constructors and options for children of the child\n * ```js\n * var myButton = myComponent.addChild('MyButton', {\n * text: 'Press Me',\n * children: {\n * buttonChildExample: {\n * buttonChildOption: true\n * }\n * }\n * });\n * ```\n *\n * @param {String|Component} child The class name or instance of a child to add\n * @param {Object=} options Options, including options to be passed to children of the child.\n * @return {Component} The child component (created by this process if a string was used)\n * @method addChild\n */\n\n Component.prototype.addChild = function addChild(child) {\n var options = arguments[1] === undefined ? {} : arguments[1];\n\n var component = undefined;\n var componentName = undefined;\n\n // If child is a string, create nt with options\n if (typeof child === 'string') {\n componentName = child;\n\n // Options can also be specified as a boolean, so convert to an empty object if false.\n if (!options) {\n options = {};\n }\n\n // Same as above, but true is deprecated so show a warning.\n if (options === true) {\n _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`.');\n options = {};\n }\n\n // If no componentClass in options, assume componentClass is the name lowercased\n // (e.g. playButton)\n var componentClassName = options.componentClass || _toTitleCase2['default'](componentName);\n\n // Set name through options\n options.name = componentName;\n\n // Create a new object & element for this controls set\n // If there's no .player_, this is a player\n var ComponentClass = Component.getComponent(componentClassName);\n\n component = new ComponentClass(this.player_ || this, options);\n\n // child is a component instance\n } else {\n component = child;\n }\n\n this.children_.push(component);\n\n if (typeof component.id === 'function') {\n this.childIndex_[component.id()] = component;\n }\n\n // If a name wasn't used to create the component, check if we can use the\n // name function of the component\n componentName = componentName || component.name && component.name();\n\n if (componentName) {\n this.childNameIndex_[componentName] = component;\n }\n\n // Add the UI object's element to the container div (box)\n // Having an element is not required\n if (typeof component.el === 'function' && component.el()) {\n this.contentEl().appendChild(component.el());\n }\n\n // Return so it can stored on parent object if desired.\n return component;\n };\n\n /**\n * Remove a child component from this component's list of children, and the\n * child component's element from this component's element\n *\n * @param {Component} component Component to remove\n * @method removeChild\n */\n\n Component.prototype.removeChild = function removeChild(component) {\n if (typeof component === 'string') {\n component = this.getChild(component);\n }\n\n if (!component || !this.children_) {\n return;\n }\n\n var childFound = false;\n\n for (var i = this.children_.length - 1; i >= 0; i--) {\n if (this.children_[i] === component) {\n childFound = true;\n this.children_.splice(i, 1);\n break;\n }\n }\n\n if (!childFound) {\n return;\n }\n\n this.childIndex_[component.id()] = null;\n this.childNameIndex_[component.name()] = null;\n\n var compEl = component.el();\n\n if (compEl && compEl.parentNode === this.contentEl()) {\n this.contentEl().removeChild(component.el());\n }\n };\n\n /**\n * Add and initialize default child components from options\n * ```js\n * // when an instance of MyComponent is created, all children in options\n * // will be added to the instance by their name strings and options\n * MyComponent.prototype.options_.children = {\n * myChildComponent: {\n * myChildOption: true\n * }\n * }\n * ```\n * // Or when creating the component\n * ```js\n * var myComp = new MyComponent(player, {\n * children: {\n * myChildComponent: {\n * myChildOption: true\n * }\n * }\n * });\n * ```\n * The children option can also be an Array of child names or\n * child options objects (that also include a 'name' key).\n * ```js\n * var myComp = new MyComponent(player, {\n * children: [\n * 'button',\n * {\n * name: 'button',\n * someOtherOption: true\n * }\n * ]\n * });\n * ```\n *\n * @method initChildren\n */\n\n Component.prototype.initChildren = function initChildren() {\n var _this = this;\n\n var children = this.options_.children;\n\n if (children) {\n (function () {\n // `this` is `parent`\n var parentOptions = _this.options_;\n\n var handleAdd = function handleAdd(name, opts) {\n // Allow options for children to be set at the parent options\n // e.g. videojs(id, { controlBar: false });\n // instead of videojs(id, { children: { controlBar: false });\n if (parentOptions[name] !== undefined) {\n opts = parentOptions[name];\n }\n\n // Allow for disabling default components\n // e.g. options['children']['posterImage'] = false\n if (opts === false) {\n return;\n }\n\n // We also want to pass the original player options to each component as well so they don't need to\n // reach back into the player for options later.\n opts.playerOptions = _this.options_.playerOptions;\n\n // Create and add the child component.\n // Add a direct reference to the child by name on the parent instance.\n // If two of the same component are used, different names should be supplied\n // for each\n _this[name] = _this.addChild(name, opts);\n };\n\n // Allow for an array of children details to passed in the options\n if (Array.isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n var _name = undefined;\n var opts = undefined;\n\n if (typeof child === 'string') {\n // ['myComponent']\n _name = child;\n opts = {};\n } else {\n // [{ name: 'myComponent', otherOption: true }]\n _name = child.name;\n opts = child;\n }\n\n handleAdd(_name, opts);\n }\n } else {\n Object.getOwnPropertyNames(children).forEach(function (name) {\n handleAdd(name, children[name]);\n });\n }\n })();\n }\n };\n\n /**\n * Allows sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n\n Component.prototype.buildCSSClass = function buildCSSClass() {\n // Child classes can include a function that does:\n // return 'CLASS NAME' + this._super();\n return '';\n };\n\n /**\n * Add an event listener to this component's element\n * ```js\n * var myFunc = function(){\n * var myComponent = this;\n * // Do something when the event is fired\n * };\n *\n * myComponent.on('eventType', myFunc);\n * ```\n * The context of myFunc will be myComponent unless previously bound.\n * Alternatively, you can add a listener to another element or component.\n * ```js\n * myComponent.on(otherElement, 'eventName', myFunc);\n * myComponent.on(otherComponent, 'eventName', myFunc);\n * ```\n * The benefit of using this over `VjsEvents.on(otherElement, 'eventName', myFunc)`\n * and `otherComponent.on('eventName', myFunc)` is that this way the listeners\n * will be automatically cleaned up when either component is disposed.\n * It will also bind myComponent as the context of myFunc.\n * **NOTE**: When using this on elements in the page other than window\n * and document (both permanent), if you remove the element from the DOM\n * you need to call `myComponent.trigger(el, 'dispose')` on it to clean up\n * references to it and allow the browser to garbage collect it.\n *\n * @param {String|Component} first The event type or other component\n * @param {Function|String} second The event handler or event type\n * @param {Function} third The event handler\n * @return {Component} \n * @method on\n */\n\n Component.prototype.on = function on(first, second, third) {\n var _this2 = this;\n\n if (typeof first === 'string' || Array.isArray(first)) {\n Events.on(this.el_, first, Fn.bind(this, second));\n\n // Targeting another component or element\n } else {\n (function () {\n var target = first;\n var type = second;\n var fn = Fn.bind(_this2, third);\n\n // When this component is disposed, remove the listener from the other component\n var removeOnDispose = function removeOnDispose() {\n return _this2.off(target, type, fn);\n };\n\n // Use the same function ID so we can remove it later it using the ID\n // of the original listener\n removeOnDispose.guid = fn.guid;\n _this2.on('dispose', removeOnDispose);\n\n // If the other component is disposed first we need to clean the reference\n // to the other component in this component's removeOnDispose listener\n // Otherwise we create a memory leak.\n var cleanRemover = function cleanRemover() {\n return _this2.off('dispose', removeOnDispose);\n };\n\n // Add the same function ID so we can easily remove it later\n cleanRemover.guid = fn.guid;\n\n // Check if this is a DOM node\n if (first.nodeName) {\n // Add the listener to the other element\n Events.on(target, type, fn);\n Events.on(target, 'dispose', cleanRemover);\n\n // Should be a component\n // Not using `instanceof Component` because it makes mock players difficult\n } else if (typeof first.on === 'function') {\n // Add the listener to the other component\n target.on(type, fn);\n target.on('dispose', cleanRemover);\n }\n })();\n }\n\n return this;\n };\n\n /**\n * Remove an event listener from this component's element\n * ```js\n * myComponent.off('eventType', myFunc);\n * ```\n * If myFunc is excluded, ALL listeners for the event type will be removed.\n * If eventType is excluded, ALL listeners will be removed from the component.\n * Alternatively you can use `off` to remove listeners that were added to other\n * elements or components using `myComponent.on(otherComponent...`.\n * In this case both the event type and listener function are REQUIRED.\n * ```js\n * myComponent.off(otherElement, 'eventType', myFunc);\n * myComponent.off(otherComponent, 'eventType', myFunc);\n * ```\n *\n * @param {String=|Component} first The event type or other component\n * @param {Function=|String} second The listener function or event type\n * @param {Function=} third The listener for other component\n * @return {Component}\n * @method off\n */\n\n Component.prototype.off = function off(first, second, third) {\n if (!first || typeof first === 'string' || Array.isArray(first)) {\n Events.off(this.el_, first, second);\n } else {\n var target = first;\n var type = second;\n // Ensure there's at least a guid, even if the function hasn't been used\n var fn = Fn.bind(this, third);\n\n // Remove the dispose listener on this component,\n // which was given the same guid as the event listener\n this.off('dispose', fn);\n\n if (first.nodeName) {\n // Remove the listener\n Events.off(target, type, fn);\n // Remove the listener for cleaning the dispose listener\n Events.off(target, 'dispose', fn);\n } else {\n target.off(type, fn);\n target.off('dispose', fn);\n }\n }\n\n return this;\n };\n\n /**\n * Add an event listener to be triggered only once and then removed\n * ```js\n * myComponent.one('eventName', myFunc);\n * ```\n * Alternatively you can add a listener to another element or component\n * that will be triggered only once.\n * ```js\n * myComponent.one(otherElement, 'eventName', myFunc);\n * myComponent.one(otherComponent, 'eventName', myFunc);\n * ```\n *\n * @param {String|Component} first The event type or other component\n * @param {Function|String} second The listener function or event type\n * @param {Function=} third The listener function for other component\n * @return {Component}\n * @method one\n */\n\n Component.prototype.one = function one(first, second, third) {\n var _this3 = this;\n\n var _arguments = arguments;\n\n if (typeof first === 'string' || Array.isArray(first)) {\n Events.one(this.el_, first, Fn.bind(this, second));\n } else {\n (function () {\n var target = first;\n var type = second;\n var fn = Fn.bind(_this3, third);\n\n var newFunc = (function (_newFunc) {\n function newFunc() {\n return _newFunc.apply(this, arguments);\n }\n\n newFunc.toString = function () {\n return _newFunc.toString();\n };\n\n return newFunc;\n })(function () {\n _this3.off(target, type, newFunc);\n fn.apply(null, _arguments);\n });\n\n // Keep the same function ID so we can remove it later\n newFunc.guid = fn.guid;\n\n _this3.on(target, type, newFunc);\n })();\n }\n\n return this;\n };\n\n /**\n * Trigger an event on an element\n * ```js\n * myComponent.trigger('eventName');\n * myComponent.trigger({'type':'eventName'});\n * myComponent.trigger('eventName', {data: 'some data'});\n * myComponent.trigger({'type':'eventName'}, {data: 'some data'});\n * ```\n *\n * @param {Event|Object|String} event A string (the type) or an event object with a type attribute\n * @param {Object} [hash] data hash to pass along with the event\n * @return {Component} self\n * @method trigger\n */\n\n Component.prototype.trigger = function trigger(event, hash) {\n Events.trigger(this.el_, event, hash);\n return this;\n };\n\n /**\n * Bind a listener to the component's ready state.\n * Different from event listeners in that if the ready event has already happened\n * it will trigger the function immediately.\n *\n * @param {Function} fn Ready listener\n * @return {Component}\n * @method ready\n */\n\n Component.prototype.ready = function ready(fn) {\n if (fn) {\n if (this.isReady_) {\n // Ensure function is always called asynchronously\n this.setTimeout(fn, 1);\n } else {\n this.readyQueue_ = this.readyQueue_ || [];\n this.readyQueue_.push(fn);\n }\n }\n return this;\n };\n\n /**\n * Trigger the ready listeners\n *\n * @return {Component}\n * @method triggerReady\n */\n\n Component.prototype.triggerReady = function triggerReady() {\n this.isReady_ = true;\n\n // Ensure ready is triggerd asynchronously\n this.setTimeout(function () {\n var readyQueue = this.readyQueue_;\n\n if (readyQueue && readyQueue.length > 0) {\n readyQueue.forEach(function (fn) {\n fn.call(this);\n }, this);\n\n // Reset Ready Queue\n this.readyQueue_ = [];\n }\n\n // Allow for using event listeners also\n this.trigger('ready');\n }, 1);\n };\n\n /**\n * Check if a component's element has a CSS class name\n *\n * @param {String} classToCheck Classname to check\n * @return {Component}\n * @method hasClass\n */\n\n Component.prototype.hasClass = function hasClass(classToCheck) {\n return Dom.hasElClass(this.el_, classToCheck);\n };\n\n /**\n * Add a CSS class name to the component's element\n *\n * @param {String} classToAdd Classname to add\n * @return {Component}\n * @method addClass\n */\n\n Component.prototype.addClass = function addClass(classToAdd) {\n Dom.addElClass(this.el_, classToAdd);\n return this;\n };\n\n /**\n * Remove and return a CSS class name from the component's element\n *\n * @param {String} classToRemove Classname to remove\n * @return {Component}\n * @method removeClass\n */\n\n Component.prototype.removeClass = function removeClass(classToRemove) {\n Dom.removeElClass(this.el_, classToRemove);\n return this;\n };\n\n /**\n * Show the component element if hidden\n *\n * @return {Component}\n * @method show\n */\n\n Component.prototype.show = function show() {\n this.removeClass('vjs-hidden');\n return this;\n };\n\n /**\n * Hide the component element if currently showing\n *\n * @return {Component}\n * @method hide\n */\n\n Component.prototype.hide = function hide() {\n this.addClass('vjs-hidden');\n return this;\n };\n\n /**\n * Lock an item in its visible state\n * To be used with fadeIn/fadeOut.\n *\n * @return {Component}\n * @private\n * @method lockShowing\n */\n\n Component.prototype.lockShowing = function lockShowing() {\n this.addClass('vjs-lock-showing');\n return this;\n };\n\n /**\n * Unlock an item to be hidden\n * To be used with fadeIn/fadeOut.\n *\n * @return {Component}\n * @private\n * @method unlockShowing\n */\n\n Component.prototype.unlockShowing = function unlockShowing() {\n this.removeClass('vjs-lock-showing');\n return this;\n };\n\n /**\n * Set or get the width of the component (CSS values)\n * Setting the video tag dimension values only works with values in pixels.\n * Percent values will not work.\n * Some percents can be used, but width()/height() will return the number + %,\n * not the actual computed width/height.\n *\n * @param {Number|String=} num Optional width number\n * @param {Boolean} skipListeners Skip the 'resize' event trigger\n * @return {Component} This component, when setting the width\n * @return {Number|String} The width, when getting\n * @method width\n */\n\n Component.prototype.width = function width(num, skipListeners) {\n return this.dimension('width', num, skipListeners);\n };\n\n /**\n * Get or set the height of the component (CSS values)\n * Setting the video tag dimension values only works with values in pixels.\n * Percent values will not work.\n * Some percents can be used, but width()/height() will return the number + %,\n * not the actual computed width/height.\n *\n * @param {Number|String=} num New component height\n * @param {Boolean=} skipListeners Skip the resize event trigger\n * @return {Component} This component, when setting the height\n * @return {Number|String} The height, when getting\n * @method height\n */\n\n Component.prototype.height = function height(num, skipListeners) {\n return this.dimension('height', num, skipListeners);\n };\n\n /**\n * Set both width and height at the same time\n *\n * @param {Number|String} width Width of player\n * @param {Number|String} height Height of player\n * @return {Component} The component\n * @method dimensions\n */\n\n Component.prototype.dimensions = function dimensions(width, height) {\n // Skip resize listeners on width for optimization\n return this.width(width, true).height(height);\n };\n\n /**\n * Get or set width or height\n * This is the shared code for the width() and height() methods.\n * All for an integer, integer + 'px' or integer + '%';\n * Known issue: Hidden elements officially have a width of 0. We're defaulting\n * to the style.width value and falling back to computedStyle which has the\n * hidden element issue. Info, but probably not an efficient fix:\n * http://www.foliotek.com/devblog/getting-the-width-of-a-hidden-element-with-jquery-using-width/\n *\n * @param {String} widthOrHeight 'width' or 'height'\n * @param {Number|String=} num New dimension\n * @param {Boolean=} skipListeners Skip resize event trigger\n * @return {Component} The component if a dimension was set\n * @return {Number|String} The dimension if nothing was set\n * @private\n * @method dimension\n */\n\n Component.prototype.dimension = function dimension(widthOrHeight, num, skipListeners) {\n if (num !== undefined) {\n // Set to zero if null or literally NaN (NaN !== NaN)\n if (num === null || num !== num) {\n num = 0;\n }\n\n // Check if using css width/height (% or px) and adjust\n if (('' + num).indexOf('%') !== -1 || ('' + num).indexOf('px') !== -1) {\n this.el_.style[widthOrHeight] = num;\n } else if (num === 'auto') {\n this.el_.style[widthOrHeight] = '';\n } else {\n this.el_.style[widthOrHeight] = num + 'px';\n }\n\n // skipListeners allows us to avoid triggering the resize event when setting both width and height\n if (!skipListeners) {\n this.trigger('resize');\n }\n\n // Return component\n return this;\n }\n\n // Not setting a value, so getting it\n // Make sure element exists\n if (!this.el_) {\n return 0;\n }\n\n // Get dimension value from style\n var val = this.el_.style[widthOrHeight];\n var pxIndex = val.indexOf('px');\n\n if (pxIndex !== -1) {\n // Return the pixel value with no 'px'\n return parseInt(val.slice(0, pxIndex), 10);\n }\n\n // No px so using % or no style was set, so falling back to offsetWidth/height\n // If component has display:none, offset will return 0\n // TODO: handle display:none and no dimension style using px\n return parseInt(this.el_['offset' + _toTitleCase2['default'](widthOrHeight)], 10);\n };\n\n /**\n * Emit 'tap' events when touch events are supported\n * This is used to support toggling the controls through a tap on the video.\n * We're requiring them to be enabled because otherwise every component would\n * have this extra overhead unnecessarily, on mobile devices where extra\n * overhead is especially bad.\n *\n * @private\n * @method emitTapEvents\n */\n\n Component.prototype.emitTapEvents = function emitTapEvents() {\n // Track the start time so we can determine how long the touch lasted\n var touchStart = 0;\n var firstTouch = null;\n\n // Maximum movement allowed during a touch event to still be considered a tap\n // Other popular libs use anywhere from 2 (hammer.js) to 15, so 10 seems like a nice, round number.\n var tapMovementThreshold = 10;\n\n // The maximum length a touch can be while still being considered a tap\n var touchTimeThreshold = 200;\n\n var couldBeTap = undefined;\n\n this.on('touchstart', function (event) {\n // If more than one finger, don't consider treating this as a click\n if (event.touches.length === 1) {\n // Copy the touches object to prevent modifying the original\n firstTouch = _assign2['default']({}, event.touches[0]);\n // Record start time so we can detect a tap vs. \"touch and hold\"\n touchStart = new Date().getTime();\n // Reset couldBeTap tracking\n couldBeTap = true;\n }\n });\n\n this.on('touchmove', function (event) {\n // If more than one finger, don't consider treating this as a click\n if (event.touches.length > 1) {\n couldBeTap = false;\n } else if (firstTouch) {\n // Some devices will throw touchmoves for all but the slightest of taps.\n // So, if we moved only a small distance, this could still be a tap\n var xdiff = event.touches[0].pageX - firstTouch.pageX;\n var ydiff = event.touches[0].pageY - firstTouch.pageY;\n var touchDistance = Math.sqrt(xdiff * xdiff + ydiff * ydiff);\n\n if (touchDistance > tapMovementThreshold) {\n couldBeTap = false;\n }\n }\n });\n\n var noTap = function noTap() {\n couldBeTap = false;\n };\n\n // TODO: Listen to the original target. http://youtu.be/DujfpXOKUp8?t=13m8s\n this.on('touchleave', noTap);\n this.on('touchcancel', noTap);\n\n // When the touch ends, measure how long it took and trigger the appropriate\n // event\n this.on('touchend', function (event) {\n firstTouch = null;\n // Proceed only if the touchmove/leave/cancel event didn't happen\n if (couldBeTap === true) {\n // Measure how long the touch lasted\n var touchTime = new Date().getTime() - touchStart;\n\n // Make sure the touch was less than the threshold to be considered a tap\n if (touchTime < touchTimeThreshold) {\n // Don't let browser turn this into a click\n event.preventDefault();\n this.trigger('tap');\n // It may be good to copy the touchend event object and change the\n // type to tap, if the other event properties aren't exact after\n // Events.fixEvent runs (e.g. event.target)\n }\n }\n });\n };\n\n /**\n * Report user touch activity when touch events occur\n * User activity is used to determine when controls should show/hide. It's\n * relatively simple when it comes to mouse events, because any mouse event\n * should show the controls. So we capture mouse events that bubble up to the\n * player and report activity when that happens.\n * With touch events it isn't as easy. We can't rely on touch events at the\n * player level, because a tap (touchstart + touchend) on the video itself on\n * mobile devices is meant to turn controls off (and on). User activity is\n * checked asynchronously, so what could happen is a tap event on the video\n * turns the controls off, then the touchend event bubbles up to the player,\n * which if it reported user activity, would turn the controls right back on.\n * (We also don't want to completely block touch events from bubbling up)\n * Also a touchmove, touch+hold, and anything other than a tap is not supposed\n * to turn the controls back on on a mobile device.\n * Here we're setting the default component behavior to report user activity\n * whenever touch events happen, and this can be turned off by components that\n * want touch events to act differently.\n *\n * @method enableTouchActivity\n */\n\n Component.prototype.enableTouchActivity = function enableTouchActivity() {\n // Don't continue if the root player doesn't support reporting user activity\n if (!this.player() || !this.player().reportUserActivity) {\n return;\n }\n\n // listener for reporting that the user is active\n var report = Fn.bind(this.player(), this.player().reportUserActivity);\n\n var touchHolding = undefined;\n\n this.on('touchstart', function () {\n report();\n // For as long as the they are touching the device or have their mouse down,\n // we consider them active even if they're not moving their finger or mouse.\n // So we want to continue to update that they are active\n this.clearInterval(touchHolding);\n // report at the same interval as activityCheck\n touchHolding = this.setInterval(report, 250);\n });\n\n var touchEnd = function touchEnd(event) {\n report();\n // stop the interval that maintains activity if the touch is holding\n this.clearInterval(touchHolding);\n };\n\n this.on('touchmove', report);\n this.on('touchend', touchEnd);\n this.on('touchcancel', touchEnd);\n };\n\n /**\n * Creates timeout and sets up disposal automatically.\n *\n * @param {Function} fn The function to run after the timeout.\n * @param {Number} timeout Number of ms to delay before executing specified function.\n * @return {Number} Returns the timeout ID\n * @method setTimeout\n */\n\n Component.prototype.setTimeout = function setTimeout(fn, timeout) {\n fn = Fn.bind(this, fn);\n\n // window.setTimeout would be preferable here, but due to some bizarre issue with Sinon and/or Phantomjs, we can't.\n var timeoutId = _window2['default'].setTimeout(fn, timeout);\n\n var disposeFn = function disposeFn() {\n this.clearTimeout(timeoutId);\n };\n\n disposeFn.guid = 'vjs-timeout-' + timeoutId;\n\n this.on('dispose', disposeFn);\n\n return timeoutId;\n };\n\n /**\n * Clears a timeout and removes the associated dispose listener\n *\n * @param {Number} timeoutId The id of the timeout to clear\n * @return {Number} Returns the timeout ID\n * @method clearTimeout\n */\n\n Component.prototype.clearTimeout = function clearTimeout(timeoutId) {\n _window2['default'].clearTimeout(timeoutId);\n\n var disposeFn = function disposeFn() {};\n\n disposeFn.guid = 'vjs-timeout-' + timeoutId;\n\n this.off('dispose', disposeFn);\n\n return timeoutId;\n };\n\n /**\n * Creates an interval and sets up disposal automatically.\n *\n * @param {Function} fn The function to run every N seconds.\n * @param {Number} interval Number of ms to delay before executing specified function.\n * @return {Number} Returns the interval ID\n * @method setInterval\n */\n\n Component.prototype.setInterval = function setInterval(fn, interval) {\n fn = Fn.bind(this, fn);\n\n var intervalId = _window2['default'].setInterval(fn, interval);\n\n var disposeFn = function disposeFn() {\n this.clearInterval(intervalId);\n };\n\n disposeFn.guid = 'vjs-interval-' + intervalId;\n\n this.on('dispose', disposeFn);\n\n return intervalId;\n };\n\n /**\n * Clears an interval and removes the associated dispose listener\n *\n * @param {Number} intervalId The id of the interval to clear\n * @return {Number} Returns the interval ID\n * @method clearInterval\n */\n\n Component.prototype.clearInterval = function clearInterval(intervalId) {\n _window2['default'].clearInterval(intervalId);\n\n var disposeFn = function disposeFn() {};\n\n disposeFn.guid = 'vjs-interval-' + intervalId;\n\n this.off('dispose', disposeFn);\n\n return intervalId;\n };\n\n /**\n * Registers a component\n *\n * @param {String} name Name of the component to register\n * @param {Object} comp The component to register \n * @static\n * @method registerComponent\n */\n\n Component.registerComponent = function registerComponent(name, comp) {\n if (!Component.components_) {\n Component.components_ = {};\n }\n\n Component.components_[name] = comp;\n return comp;\n };\n\n /**\n * Gets a component by name\n *\n * @param {String} name Name of the component to get\n * @return {Component}\n * @static\n * @method getComponent\n */\n\n Component.getComponent = function getComponent(name) {\n if (Component.components_ && Component.components_[name]) {\n return Component.components_[name];\n }\n\n if (_window2['default'] && _window2['default'].videojs && _window2['default'].videojs[name]) {\n _log2['default'].warn('The ' + name + ' component was added to the videojs object when it should be registered using videojs.registerComponent(name, component)');\n return _window2['default'].videojs[name];\n }\n };\n\n /**\n * Sets up the constructor using the supplied init method\n * or uses the init of the parent object\n *\n * @param {Object} props An object of properties \n * @static\n * @method extend\n */\n\n Component.extend = function extend(props) {\n props = props || {};\n // Set up the constructor using the supplied init method\n // or using the init of the parent object\n // Make sure to check the unobfuscated version for external libs\n var init = props.init || props.init || this.prototype.init || this.prototype.init || function () {};\n // In Resig's simple class inheritance (previously used) the constructor\n // is a function that calls `this.init.apply(arguments)`\n // However that would prevent us from using `ParentObject.call(this);`\n // in a Child constructor because the `this` in `this.init`\n // would still refer to the Child and cause an infinite loop.\n // We would instead have to do\n // `ParentObject.prototype.init.apply(this, arguments);`\n // Bleh. We're not creating a _super() function, so it's good to keep\n // the parent constructor reference simple.\n var subObj = function subObj() {\n init.apply(this, arguments);\n };\n\n // Inherit from this object's prototype\n subObj.prototype = Object.create(this.prototype);\n // Reset the constructor property for subObj otherwise\n // instances of subObj would have the constructor of the parent Object\n subObj.prototype.constructor = subObj;\n\n // Make the class extendable\n subObj.extend = Component.extend;\n // Make a function for creating instances\n // subObj.create = CoreObject.create;\n\n // Extend subObj's prototype with functions and other properties from props\n for (var _name2 in props) {\n if (props.hasOwnProperty(_name2)) {\n subObj.prototype[_name2] = props[_name2];\n }\n }\n\n return subObj;\n };\n\n return Component;\n})();\n\nComponent.registerComponent('Component', Component);\nexports['default'] = Component;\nmodule.exports = exports['default'];\n\n},{\"./utils/dom.js\":110,\"./utils/events.js\":111,\"./utils/fn.js\":112,\"./utils/guid.js\":114,\"./utils/log.js\":115,\"./utils/merge-options.js\":116,\"./utils/to-title-case.js\":119,\"global/window\":2,\"object.assign\":44}],53:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file control-bar.js\n */\n\nvar _Component2 = _dereq_('../component.js');\n\nvar _Component3 = _interopRequireWildcard(_Component2);\n\n// Required children\n\nvar _PlayToggle = _dereq_('./play-toggle.js');\n\nvar _PlayToggle2 = _interopRequireWildcard(_PlayToggle);\n\nvar _CurrentTimeDisplay = _dereq_('./time-controls/current-time-display.js');\n\nvar _CurrentTimeDisplay2 = _interopRequireWildcard(_CurrentTimeDisplay);\n\nvar _DurationDisplay = _dereq_('./time-controls/duration-display.js');\n\nvar _DurationDisplay2 = _interopRequireWildcard(_DurationDisplay);\n\nvar _TimeDivider = _dereq_('./time-controls/time-divider.js');\n\nvar _TimeDivider2 = _interopRequireWildcard(_TimeDivider);\n\nvar _RemainingTimeDisplay = _dereq_('./time-controls/remaining-time-display.js');\n\nvar _RemainingTimeDisplay2 = _interopRequireWildcard(_RemainingTimeDisplay);\n\nvar _LiveDisplay = _dereq_('./live-display.js');\n\nvar _LiveDisplay2 = _interopRequireWildcard(_LiveDisplay);\n\nvar _ProgressControl = _dereq_('./progress-control/progress-control.js');\n\nvar _ProgressControl2 = _interopRequireWildcard(_ProgressControl);\n\nvar _FullscreenToggle = _dereq_('./fullscreen-toggle.js');\n\nvar _FullscreenToggle2 = _interopRequireWildcard(_FullscreenToggle);\n\nvar _VolumeControl = _dereq_('./volume-control/volume-control.js');\n\nvar _VolumeControl2 = _interopRequireWildcard(_VolumeControl);\n\nvar _VolumeMenuButton = _dereq_('./volume-menu-button.js');\n\nvar _VolumeMenuButton2 = _interopRequireWildcard(_VolumeMenuButton);\n\nvar _MuteToggle = _dereq_('./mute-toggle.js');\n\nvar _MuteToggle2 = _interopRequireWildcard(_MuteToggle);\n\nvar _ChaptersButton = _dereq_('./text-track-controls/chapters-button.js');\n\nvar _ChaptersButton2 = _interopRequireWildcard(_ChaptersButton);\n\nvar _SubtitlesButton = _dereq_('./text-track-controls/subtitles-button.js');\n\nvar _SubtitlesButton2 = _interopRequireWildcard(_SubtitlesButton);\n\nvar _CaptionsButton = _dereq_('./text-track-controls/captions-button.js');\n\nvar _CaptionsButton2 = _interopRequireWildcard(_CaptionsButton);\n\nvar _PlaybackRateMenuButton = _dereq_('./playback-rate-menu/playback-rate-menu-button.js');\n\nvar _PlaybackRateMenuButton2 = _interopRequireWildcard(_PlaybackRateMenuButton);\n\nvar _CustomControlSpacer = _dereq_('./spacer-controls/custom-control-spacer.js');\n\nvar _CustomControlSpacer2 = _interopRequireWildcard(_CustomControlSpacer);\n\n/**\n * Container of main controls\n *\n * @extends Component\n * @class ControlBar\n */\n\nvar ControlBar = (function (_Component) {\n function ControlBar() {\n _classCallCheck(this, ControlBar);\n\n if (_Component != null) {\n _Component.apply(this, arguments);\n }\n }\n\n _inherits(ControlBar, _Component);\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n\n ControlBar.prototype.createEl = function createEl() {\n return _Component.prototype.createEl.call(this, 'div', {\n className: 'vjs-control-bar'\n });\n };\n\n return ControlBar;\n})(_Component3['default']);\n\nControlBar.prototype.options_ = {\n loadEvent: 'play',\n children: ['playToggle', 'currentTimeDisplay', 'timeDivider', 'durationDisplay', 'progressControl', 'liveDisplay', 'remainingTimeDisplay', 'customControlSpacer', 'playbackRateMenuButton', 'muteToggle', 'volumeControl', 'chaptersButton', 'subtitlesButton', 'captionsButton', 'volumeMenuButton', 'fullscreenToggle']\n};\n\n_Component3['default'].registerComponent('ControlBar', ControlBar);\nexports['default'] = ControlBar;\nmodule.exports = exports['default'];\n\n},{\"../component.js\":52,\"./fullscreen-toggle.js\":54,\"./live-display.js\":55,\"./mute-toggle.js\":56,\"./play-toggle.js\":57,\"./playback-rate-menu/playback-rate-menu-button.js\":58,\"./progress-control/progress-control.js\":62,\"./spacer-controls/custom-control-spacer.js\":64,\"./text-track-controls/captions-button.js\":67,\"./text-track-controls/chapters-button.js\":68,\"./text-track-controls/subtitles-button.js\":71,\"./time-controls/current-time-display.js\":74,\"./time-controls/duration-display.js\":75,\"./time-controls/remaining-time-display.js\":76,\"./time-controls/time-divider.js\":77,\"./volume-control/volume-control.js\":79,\"./volume-menu-button.js\":81}],54:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file fullscreen-toggle.js\n */\n\nvar _Button2 = _dereq_('../button.js');\n\nvar _Button3 = _interopRequireWildcard(_Button2);\n\nvar _Component = _dereq_('../component.js');\n\nvar _Component2 = _interopRequireWildcard(_Component);\n\n/**\n * Toggle fullscreen video\n *\n * @extends Button\n * @class FullscreenToggle\n */\n\nvar FullscreenToggle = (function (_Button) {\n function FullscreenToggle() {\n _classCallCheck(this, FullscreenToggle);\n\n if (_Button != null) {\n _Button.apply(this, arguments);\n }\n }\n\n _inherits(FullscreenToggle, _Button);\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n\n FullscreenToggle.prototype.buildCSSClass = function buildCSSClass() {\n return 'vjs-fullscreen-control ' + _Button.prototype.buildCSSClass.call(this);\n };\n\n /**\n * Handles click for full screen\n *\n * @method handleClick\n */\n\n FullscreenToggle.prototype.handleClick = function handleClick() {\n if (!this.player_.isFullscreen()) {\n this.player_.requestFullscreen();\n this.controlText('Non-Fullscreen');\n } else {\n this.player_.exitFullscreen();\n this.controlText('Fullscreen');\n }\n };\n\n return FullscreenToggle;\n})(_Button3['default']);\n\nFullscreenToggle.prototype.controlText_ = 'Fullscreen';\n\n_Component2['default'].registerComponent('FullscreenToggle', FullscreenToggle);\nexports['default'] = FullscreenToggle;\nmodule.exports = exports['default'];\n\n},{\"../button.js\":51,\"../component.js\":52}],55:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file live-display.js\n */\n\nvar _Component2 = _dereq_('../component');\n\nvar _Component3 = _interopRequireWildcard(_Component2);\n\nvar _import = _dereq_('../utils/dom.js');\n\nvar Dom = _interopRequireWildcard(_import);\n\n/**\n * Displays the live indicator\n * TODO - Future make it click to snap to live\n * \n * @extends Component\n * @class LiveDisplay\n */\n\nvar LiveDisplay = (function (_Component) {\n function LiveDisplay() {\n _classCallCheck(this, LiveDisplay);\n\n if (_Component != null) {\n _Component.apply(this, arguments);\n }\n }\n\n _inherits(LiveDisplay, _Component);\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n\n LiveDisplay.prototype.createEl = function createEl() {\n var el = _Component.prototype.createEl.call(this, 'div', {\n className: 'vjs-live-control vjs-control'\n });\n\n this.contentEl_ = Dom.createEl('div', {\n className: 'vjs-live-display',\n innerHTML: '' + this.localize('Stream Type') + '' + this.localize('LIVE'),\n 'aria-live': 'off'\n });\n\n el.appendChild(this.contentEl_);\n\n return el;\n };\n\n return LiveDisplay;\n})(_Component3['default']);\n\n_Component3['default'].registerComponent('LiveDisplay', LiveDisplay);\nexports['default'] = LiveDisplay;\nmodule.exports = exports['default'];\n\n},{\"../component\":52,\"../utils/dom.js\":110}],56:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file mute-toggle.js\n */\n\nvar _Button2 = _dereq_('../button');\n\nvar _Button3 = _interopRequireWildcard(_Button2);\n\nvar _Component = _dereq_('../component');\n\nvar _Component2 = _interopRequireWildcard(_Component);\n\nvar _import = _dereq_('../utils/dom.js');\n\nvar Dom = _interopRequireWildcard(_import);\n\n/**\n * A button component for muting the audio \n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Button\n * @class MuteToggle\n */\n\nvar MuteToggle = (function (_Button) {\n function MuteToggle(player, options) {\n _classCallCheck(this, MuteToggle);\n\n _Button.call(this, player, options);\n\n this.on(player, 'volumechange', this.update);\n\n // hide mute toggle if the current tech doesn't support volume control\n if (player.tech && player.tech.featuresVolumeControl === false) {\n this.addClass('vjs-hidden');\n }\n\n this.on(player, 'loadstart', function () {\n if (player.tech.featuresVolumeControl === false) {\n this.addClass('vjs-hidden');\n } else {\n this.removeClass('vjs-hidden');\n }\n });\n }\n\n _inherits(MuteToggle, _Button);\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n\n MuteToggle.prototype.buildCSSClass = function buildCSSClass() {\n return 'vjs-mute-control ' + _Button.prototype.buildCSSClass.call(this);\n };\n\n /**\n * Handle click on mute\n *\n * @method handleClick\n */\n\n MuteToggle.prototype.handleClick = function handleClick() {\n this.player_.muted(this.player_.muted() ? false : true);\n };\n\n /**\n * Update volume\n *\n * @method update\n */\n\n MuteToggle.prototype.update = function update() {\n var vol = this.player_.volume(),\n level = 3;\n\n if (vol === 0 || this.player_.muted()) {\n level = 0;\n } else if (vol < 0.33) {\n level = 1;\n } else if (vol < 0.67) {\n level = 2;\n }\n\n // Don't rewrite the button text if the actual text doesn't change.\n // This causes unnecessary and confusing information for screen reader users.\n // This check is needed because this function gets called every time the volume level is changed.\n var toMute = this.player_.muted() ? 'Unmute' : 'Mute';\n var localizedMute = this.localize(toMute);\n if (this.controlText() !== localizedMute) {\n this.controlText(localizedMute);\n }\n\n /* TODO improve muted icon classes */\n for (var i = 0; i < 4; i++) {\n Dom.removeElClass(this.el_, 'vjs-vol-' + i);\n }\n Dom.addElClass(this.el_, 'vjs-vol-' + level);\n };\n\n return MuteToggle;\n})(_Button3['default']);\n\nMuteToggle.prototype.controlText_ = 'Mute';\n\n_Component2['default'].registerComponent('MuteToggle', MuteToggle);\nexports['default'] = MuteToggle;\nmodule.exports = exports['default'];\n\n},{\"../button\":51,\"../component\":52,\"../utils/dom.js\":110}],57:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file play-toggle.js\n */\n\nvar _Button2 = _dereq_('../button.js');\n\nvar _Button3 = _interopRequireWildcard(_Button2);\n\nvar _Component = _dereq_('../component.js');\n\nvar _Component2 = _interopRequireWildcard(_Component);\n\n/**\n * Button to toggle between play and pause\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Button\n * @class PlayToggle\n */\n\nvar PlayToggle = (function (_Button) {\n function PlayToggle(player, options) {\n _classCallCheck(this, PlayToggle);\n\n _Button.call(this, player, options);\n\n this.on(player, 'play', this.handlePlay);\n this.on(player, 'pause', this.handlePause);\n }\n\n _inherits(PlayToggle, _Button);\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n\n PlayToggle.prototype.buildCSSClass = function buildCSSClass() {\n return 'vjs-play-control ' + _Button.prototype.buildCSSClass.call(this);\n };\n\n /**\n * Handle click to toggle between play and pause\n *\n * @method handleClick\n */\n\n PlayToggle.prototype.handleClick = function handleClick() {\n if (this.player_.paused()) {\n this.player_.play();\n } else {\n this.player_.pause();\n }\n };\n\n /**\n * Add the vjs-playing class to the element so it can change appearance\n *\n * @method handlePlay\n */\n\n PlayToggle.prototype.handlePlay = function handlePlay() {\n this.removeClass('vjs-paused');\n this.addClass('vjs-playing');\n this.controlText('Pause'); // change the button text to \"Pause\"\n };\n\n /**\n * Add the vjs-paused class to the element so it can change appearance\n *\n * @method handlePause\n */\n\n PlayToggle.prototype.handlePause = function handlePause() {\n this.removeClass('vjs-playing');\n this.addClass('vjs-paused');\n this.controlText('Play'); // change the button text to \"Play\"\n };\n\n return PlayToggle;\n})(_Button3['default']);\n\nPlayToggle.prototype.controlText_ = 'Play';\n\n_Component2['default'].registerComponent('PlayToggle', PlayToggle);\nexports['default'] = PlayToggle;\nmodule.exports = exports['default'];\n\n},{\"../button.js\":51,\"../component.js\":52}],58:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file playback-rate-menu-button.js\n */\n\nvar _MenuButton2 = _dereq_('../../menu/menu-button.js');\n\nvar _MenuButton3 = _interopRequireWildcard(_MenuButton2);\n\nvar _Menu = _dereq_('../../menu/menu.js');\n\nvar _Menu2 = _interopRequireWildcard(_Menu);\n\nvar _PlaybackRateMenuItem = _dereq_('./playback-rate-menu-item.js');\n\nvar _PlaybackRateMenuItem2 = _interopRequireWildcard(_PlaybackRateMenuItem);\n\nvar _Component = _dereq_('../../component.js');\n\nvar _Component2 = _interopRequireWildcard(_Component);\n\nvar _import = _dereq_('../../utils/dom.js');\n\nvar Dom = _interopRequireWildcard(_import);\n\n/**\n * The component for controlling the playback rate\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends MenuButton\n * @class PlaybackRateMenuButton\n */\n\nvar PlaybackRateMenuButton = (function (_MenuButton) {\n function PlaybackRateMenuButton(player, options) {\n _classCallCheck(this, PlaybackRateMenuButton);\n\n _MenuButton.call(this, player, options);\n\n this.updateVisibility();\n this.updateLabel();\n\n this.on(player, 'loadstart', this.updateVisibility);\n this.on(player, 'ratechange', this.updateLabel);\n }\n\n _inherits(PlaybackRateMenuButton, _MenuButton);\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n\n PlaybackRateMenuButton.prototype.createEl = function createEl() {\n var el = _MenuButton.prototype.createEl.call(this);\n\n this.labelEl_ = Dom.createEl('div', {\n className: 'vjs-playback-rate-value',\n innerHTML: 1\n });\n\n el.appendChild(this.labelEl_);\n\n return el;\n };\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n\n PlaybackRateMenuButton.prototype.buildCSSClass = function buildCSSClass() {\n return 'vjs-playback-rate ' + _MenuButton.prototype.buildCSSClass.call(this);\n };\n\n /**\n * Create the playback rate menu\n *\n * @return {Menu} Menu object populated with items\n * @method createMenu\n */\n\n PlaybackRateMenuButton.prototype.createMenu = function createMenu() {\n var menu = new _Menu2['default'](this.player());\n var rates = this.playbackRates();\n\n if (rates) {\n for (var i = rates.length - 1; i >= 0; i--) {\n menu.addChild(new _PlaybackRateMenuItem2['default'](this.player(), { rate: rates[i] + 'x' }));\n }\n }\n\n return menu;\n };\n\n /**\n * Updates ARIA accessibility attributes\n *\n * @method updateARIAAttributes\n */\n\n PlaybackRateMenuButton.prototype.updateARIAAttributes = function updateARIAAttributes() {\n // Current playback rate\n this.el().setAttribute('aria-valuenow', this.player().playbackRate());\n };\n\n /**\n * Handle menu item click\n *\n * @method handleClick\n */\n\n PlaybackRateMenuButton.prototype.handleClick = function handleClick() {\n // select next rate option\n var currentRate = this.player().playbackRate();\n var rates = this.playbackRates();\n\n // this will select first one if the last one currently selected\n var newRate = rates[0];\n for (var i = 0; i < rates.length; i++) {\n if (rates[i] > currentRate) {\n newRate = rates[i];\n break;\n }\n }\n this.player().playbackRate(newRate);\n };\n\n /**\n * Get possible playback rates\n *\n * @return {Array} Possible playback rates\n * @method playbackRates\n */\n\n PlaybackRateMenuButton.prototype.playbackRates = function playbackRates() {\n return this.options_.playbackRates || this.options_.playerOptions && this.options_.playerOptions.playbackRates;\n };\n\n /**\n * Get supported playback rates\n *\n * @return {Array} Supported playback rates\n * @method playbackRateSupported\n */\n\n PlaybackRateMenuButton.prototype.playbackRateSupported = function playbackRateSupported() {\n return this.player().tech && this.player().tech.featuresPlaybackRate && this.playbackRates() && this.playbackRates().length > 0;\n };\n\n /**\n * Hide playback rate controls when they're no playback rate options to select\n *\n * @method updateVisibility\n */\n\n PlaybackRateMenuButton.prototype.updateVisibility = function updateVisibility() {\n if (this.playbackRateSupported()) {\n this.removeClass('vjs-hidden');\n } else {\n this.addClass('vjs-hidden');\n }\n };\n\n /**\n * Update button label when rate changed\n *\n * @method updateLabel\n */\n\n PlaybackRateMenuButton.prototype.updateLabel = function updateLabel() {\n if (this.playbackRateSupported()) {\n this.labelEl_.innerHTML = this.player().playbackRate() + 'x';\n }\n };\n\n return PlaybackRateMenuButton;\n})(_MenuButton3['default']);\n\nPlaybackRateMenuButton.prototype.controlText_ = 'Playback Rate';\n\n_Component2['default'].registerComponent('PlaybackRateMenuButton', PlaybackRateMenuButton);\nexports['default'] = PlaybackRateMenuButton;\nmodule.exports = exports['default'];\n\n},{\"../../component.js\":52,\"../../menu/menu-button.js\":89,\"../../menu/menu.js\":91,\"../../utils/dom.js\":110,\"./playback-rate-menu-item.js\":59}],59:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file playback-rate-menu-item.js\n */\n\nvar _MenuItem2 = _dereq_('../../menu/menu-item.js');\n\nvar _MenuItem3 = _interopRequireWildcard(_MenuItem2);\n\nvar _Component = _dereq_('../../component.js');\n\nvar _Component2 = _interopRequireWildcard(_Component);\n\n/**\n * The specific menu item type for selecting a playback rate\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends MenuItem\n * @class PlaybackRateMenuItem\n */\n\nvar PlaybackRateMenuItem = (function (_MenuItem) {\n function PlaybackRateMenuItem(player, options) {\n _classCallCheck(this, PlaybackRateMenuItem);\n\n var label = options.rate;\n var rate = parseFloat(label, 10);\n\n // Modify options for parent MenuItem class's init.\n options.label = label;\n options.selected = rate === 1;\n _MenuItem.call(this, player, options);\n\n this.label = label;\n this.rate = rate;\n\n this.on(player, 'ratechange', this.update);\n }\n\n _inherits(PlaybackRateMenuItem, _MenuItem);\n\n /**\n * Handle click on menu item\n *\n * @method handleClick\n */\n\n PlaybackRateMenuItem.prototype.handleClick = function handleClick() {\n _MenuItem.prototype.handleClick.call(this);\n this.player().playbackRate(this.rate);\n };\n\n /**\n * Update playback rate with selected rate\n *\n * @method update\n */\n\n PlaybackRateMenuItem.prototype.update = function update() {\n this.selected(this.player().playbackRate() === this.rate);\n };\n\n return PlaybackRateMenuItem;\n})(_MenuItem3['default']);\n\nPlaybackRateMenuItem.prototype.contentElType = 'button';\n\n_Component2['default'].registerComponent('PlaybackRateMenuItem', PlaybackRateMenuItem);\nexports['default'] = PlaybackRateMenuItem;\nmodule.exports = exports['default'];\n\n},{\"../../component.js\":52,\"../../menu/menu-item.js\":90}],60:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file load-progress-bar.js\n */\n\nvar _Component2 = _dereq_('../../component.js');\n\nvar _Component3 = _interopRequireWildcard(_Component2);\n\nvar _import = _dereq_('../../utils/dom.js');\n\nvar Dom = _interopRequireWildcard(_import);\n\n/**\n * Shows load progress\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class LoadProgressBar\n */\n\nvar LoadProgressBar = (function (_Component) {\n function LoadProgressBar(player, options) {\n _classCallCheck(this, LoadProgressBar);\n\n _Component.call(this, player, options);\n this.on(player, 'progress', this.update);\n }\n\n _inherits(LoadProgressBar, _Component);\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n\n LoadProgressBar.prototype.createEl = function createEl() {\n return _Component.prototype.createEl.call(this, 'div', {\n className: 'vjs-load-progress',\n innerHTML: '' + this.localize('Loaded') + ': 0%'\n });\n };\n\n /**\n * Update progress bar\n *\n * @method update\n */\n\n LoadProgressBar.prototype.update = function update() {\n var buffered = this.player_.buffered();\n var duration = this.player_.duration();\n var bufferedEnd = this.player_.bufferedEnd();\n var children = this.el_.children;\n\n // get the percent width of a time compared to the total end\n var percentify = function percentify(time, end) {\n var percent = time / end || 0; // no NaN\n return (percent >= 1 ? 1 : percent) * 100 + '%';\n };\n\n // update the width of the progress bar\n this.el_.style.width = percentify(bufferedEnd, duration);\n\n // add child elements to represent the individual buffered time ranges\n for (var i = 0; i < buffered.length; i++) {\n var start = buffered.start(i);\n var end = buffered.end(i);\n var part = children[i];\n\n if (!part) {\n part = this.el_.appendChild(Dom.createEl());\n }\n\n // set the percent based on the width of the progress bar (bufferedEnd)\n part.style.left = percentify(start, bufferedEnd);\n part.style.width = percentify(end - start, bufferedEnd);\n }\n\n // remove unused buffered range elements\n for (var i = children.length; i > buffered.length; i--) {\n this.el_.removeChild(children[i - 1]);\n }\n };\n\n return LoadProgressBar;\n})(_Component3['default']);\n\n_Component3['default'].registerComponent('LoadProgressBar', LoadProgressBar);\nexports['default'] = LoadProgressBar;\nmodule.exports = exports['default'];\n\n},{\"../../component.js\":52,\"../../utils/dom.js\":110}],61:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file play-progress-bar.js\n */\n\nvar _Component2 = _dereq_('../../component.js');\n\nvar _Component3 = _interopRequireWildcard(_Component2);\n\nvar _import = _dereq_('../../utils/fn.js');\n\nvar Fn = _interopRequireWildcard(_import);\n\nvar _formatTime = _dereq_('../../utils/format-time.js');\n\nvar _formatTime2 = _interopRequireWildcard(_formatTime);\n\n/**\n * Shows play progress\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class PlayProgressBar\n */\n\nvar PlayProgressBar = (function (_Component) {\n function PlayProgressBar(player, options) {\n _classCallCheck(this, PlayProgressBar);\n\n _Component.call(this, player, options);\n this.on(player, 'timeupdate', this.updateDataAttr);\n player.ready(Fn.bind(this, this.updateDataAttr));\n }\n\n _inherits(PlayProgressBar, _Component);\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n\n PlayProgressBar.prototype.createEl = function createEl() {\n return _Component.prototype.createEl.call(this, 'div', {\n className: 'vjs-play-progress',\n innerHTML: '' + this.localize('Progress') + ': 0%'\n });\n };\n\n PlayProgressBar.prototype.updateDataAttr = function updateDataAttr() {\n var time = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime();\n this.el_.setAttribute('data-current-time', _formatTime2['default'](time, this.player_.duration()));\n };\n\n return PlayProgressBar;\n})(_Component3['default']);\n\n_Component3['default'].registerComponent('PlayProgressBar', PlayProgressBar);\nexports['default'] = PlayProgressBar;\nmodule.exports = exports['default'];\n\n},{\"../../component.js\":52,\"../../utils/fn.js\":112,\"../../utils/format-time.js\":113}],62:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file progress-control.js\n */\n\nvar _Component2 = _dereq_('../../component.js');\n\nvar _Component3 = _interopRequireWildcard(_Component2);\n\nvar _SeekBar = _dereq_('./seek-bar.js');\n\nvar _SeekBar2 = _interopRequireWildcard(_SeekBar);\n\n/**\n * The Progress Control component contains the seek bar, load progress,\n * and play progress\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class ProgressControl\n */\n\nvar ProgressControl = (function (_Component) {\n function ProgressControl() {\n _classCallCheck(this, ProgressControl);\n\n if (_Component != null) {\n _Component.apply(this, arguments);\n }\n }\n\n _inherits(ProgressControl, _Component);\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n\n ProgressControl.prototype.createEl = function createEl() {\n return _Component.prototype.createEl.call(this, 'div', {\n className: 'vjs-progress-control vjs-control'\n });\n };\n\n return ProgressControl;\n})(_Component3['default']);\n\nProgressControl.prototype.options_ = {\n children: {\n seekBar: {}\n }\n};\n\n_Component3['default'].registerComponent('ProgressControl', ProgressControl);\nexports['default'] = ProgressControl;\nmodule.exports = exports['default'];\n\n},{\"../../component.js\":52,\"./seek-bar.js\":63}],63:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file seek-bar.js\n */\n\nvar _Slider2 = _dereq_('../../slider/slider.js');\n\nvar _Slider3 = _interopRequireWildcard(_Slider2);\n\nvar _Component = _dereq_('../../component.js');\n\nvar _Component2 = _interopRequireWildcard(_Component);\n\nvar _LoadProgressBar = _dereq_('./load-progress-bar.js');\n\nvar _LoadProgressBar2 = _interopRequireWildcard(_LoadProgressBar);\n\nvar _PlayProgressBar = _dereq_('./play-progress-bar.js');\n\nvar _PlayProgressBar2 = _interopRequireWildcard(_PlayProgressBar);\n\nvar _import = _dereq_('../../utils/fn.js');\n\nvar Fn = _interopRequireWildcard(_import);\n\nvar _formatTime = _dereq_('../../utils/format-time.js');\n\nvar _formatTime2 = _interopRequireWildcard(_formatTime);\n\nvar _roundFloat = _dereq_('../../utils/round-float.js');\n\nvar _roundFloat2 = _interopRequireWildcard(_roundFloat);\n\n/**\n * Seek Bar and holder for the progress bars\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Slider\n * @class SeekBar\n */\n\nvar SeekBar = (function (_Slider) {\n function SeekBar(player, options) {\n _classCallCheck(this, SeekBar);\n\n _Slider.call(this, player, options);\n this.on(player, 'timeupdate', this.updateARIAAttributes);\n player.ready(Fn.bind(this, this.updateARIAAttributes));\n }\n\n _inherits(SeekBar, _Slider);\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n\n SeekBar.prototype.createEl = function createEl() {\n return _Slider.prototype.createEl.call(this, 'div', {\n className: 'vjs-progress-holder',\n 'aria-label': 'video progress bar'\n });\n };\n\n /**\n * Update ARIA accessibility attributes\n *\n * @method updateARIAAttributes\n */\n\n SeekBar.prototype.updateARIAAttributes = function updateARIAAttributes() {\n // Allows for smooth scrubbing, when player can't keep up.\n var time = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime();\n this.el_.setAttribute('aria-valuenow', _roundFloat2['default'](this.getPercent() * 100, 2)); // machine readable value of progress bar (percentage complete)\n this.el_.setAttribute('aria-valuetext', _formatTime2['default'](time, this.player_.duration())); // human readable value of progress bar (time complete)\n };\n\n /**\n * Get percentage of video played\n *\n * @return {Number} Percentage played\n * @method getPercent\n */\n\n SeekBar.prototype.getPercent = function getPercent() {\n var percent = this.player_.currentTime() / this.player_.duration();\n return percent >= 1 ? 1 : percent;\n };\n\n /**\n * Handle mouse down on seek bar\n *\n * @method handleMouseDown\n */\n\n SeekBar.prototype.handleMouseDown = function handleMouseDown(event) {\n _Slider.prototype.handleMouseDown.call(this, event);\n\n this.player_.scrubbing(true);\n\n this.videoWasPlaying = !this.player_.paused();\n this.player_.pause();\n };\n\n /**\n * Handle mouse move on seek bar\n *\n * @method handleMouseMove\n */\n\n SeekBar.prototype.handleMouseMove = function handleMouseMove(event) {\n var newTime = this.calculateDistance(event) * this.player_.duration();\n\n // Don't let video end while scrubbing.\n if (newTime === this.player_.duration()) {\n newTime = newTime - 0.1;\n }\n\n // Set new time (tell player to seek to new time)\n this.player_.currentTime(newTime);\n };\n\n /**\n * Handle mouse up on seek bar\n *\n * @method handleMouseUp\n */\n\n SeekBar.prototype.handleMouseUp = function handleMouseUp(event) {\n _Slider.prototype.handleMouseUp.call(this, event);\n\n this.player_.scrubbing(false);\n if (this.videoWasPlaying) {\n this.player_.play();\n }\n };\n\n /**\n * Move more quickly fast forward for keyboard-only users\n *\n * @method stepForward\n */\n\n SeekBar.prototype.stepForward = function stepForward() {\n this.player_.currentTime(this.player_.currentTime() + 5); // more quickly fast forward for keyboard-only users\n };\n\n /**\n * Move more quickly rewind for keyboard-only users\n *\n * @method stepBack\n */\n\n SeekBar.prototype.stepBack = function stepBack() {\n this.player_.currentTime(this.player_.currentTime() - 5); // more quickly rewind for keyboard-only users\n };\n\n return SeekBar;\n})(_Slider3['default']);\n\nSeekBar.prototype.options_ = {\n children: {\n loadProgressBar: {},\n playProgressBar: {}\n },\n barName: 'playProgressBar'\n};\n\nSeekBar.prototype.playerEvent = 'timeupdate';\n\n_Component2['default'].registerComponent('SeekBar', SeekBar);\nexports['default'] = SeekBar;\nmodule.exports = exports['default'];\n\n},{\"../../component.js\":52,\"../../slider/slider.js\":96,\"../../utils/fn.js\":112,\"../../utils/format-time.js\":113,\"../../utils/round-float.js\":117,\"./load-progress-bar.js\":60,\"./play-progress-bar.js\":61}],64:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file custom-control-spacer.js\n */\n\nvar _Spacer2 = _dereq_('./spacer.js');\n\nvar _Spacer3 = _interopRequireWildcard(_Spacer2);\n\nvar _Component = _dereq_('../../component.js');\n\nvar _Component2 = _interopRequireWildcard(_Component);\n\n/**\n * Spacer specifically meant to be used as an insertion point for new plugins, etc.\n *\n * @extends Spacer\n * @class CustomControlSpacer\n */\n\nvar CustomControlSpacer = (function (_Spacer) {\n function CustomControlSpacer() {\n _classCallCheck(this, CustomControlSpacer);\n\n if (_Spacer != null) {\n _Spacer.apply(this, arguments);\n }\n }\n\n _inherits(CustomControlSpacer, _Spacer);\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n\n CustomControlSpacer.prototype.buildCSSClass = function buildCSSClass() {\n return 'vjs-custom-control-spacer ' + _Spacer.prototype.buildCSSClass.call(this);\n };\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n\n CustomControlSpacer.prototype.createEl = function createEl() {\n return _Spacer.prototype.createEl.call(this, {\n className: this.buildCSSClass()\n });\n };\n\n return CustomControlSpacer;\n})(_Spacer3['default']);\n\n_Component2['default'].registerComponent('CustomControlSpacer', CustomControlSpacer);\nexports['default'] = CustomControlSpacer;\nmodule.exports = exports['default'];\n\n},{\"../../component.js\":52,\"./spacer.js\":65}],65:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file spacer.js\n */\n\nvar _Component2 = _dereq_('../../component.js');\n\nvar _Component3 = _interopRequireWildcard(_Component2);\n\n/**\n * Just an empty spacer element that can be used as an append point for plugins, etc.\n * Also can be used to create space between elements when necessary.\n *\n * @extends Component\n * @class Spacer\n */\n\nvar Spacer = (function (_Component) {\n function Spacer() {\n _classCallCheck(this, Spacer);\n\n if (_Component != null) {\n _Component.apply(this, arguments);\n }\n }\n\n _inherits(Spacer, _Component);\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n\n Spacer.prototype.buildCSSClass = function buildCSSClass() {\n return 'vjs-spacer ' + _Component.prototype.buildCSSClass.call(this);\n };\n\n /**\n * Create the component's DOM element\n *\n * @param {Object} props An object of properties \n * @return {Element}\n * @method createEl\n */\n\n Spacer.prototype.createEl = function createEl(props) {\n return _Component.prototype.createEl.call(this, 'div', {\n className: this.buildCSSClass()\n });\n };\n\n return Spacer;\n})(_Component3['default']);\n\n_Component3['default'].registerComponent('Spacer', Spacer);\n\nexports['default'] = Spacer;\nmodule.exports = exports['default'];\n\n},{\"../../component.js\":52}],66:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file caption-settings-menu-item.js\n */\n\nvar _TextTrackMenuItem2 = _dereq_('./text-track-menu-item.js');\n\nvar _TextTrackMenuItem3 = _interopRequireWildcard(_TextTrackMenuItem2);\n\nvar _Component = _dereq_('../../component.js');\n\nvar _Component2 = _interopRequireWildcard(_Component);\n\n/**\n * The menu item for caption track settings menu\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends TextTrackMenuItem\n * @class CaptionSettingsMenuItem\n */\n\nvar CaptionSettingsMenuItem = (function (_TextTrackMenuItem) {\n function CaptionSettingsMenuItem(player, options) {\n _classCallCheck(this, CaptionSettingsMenuItem);\n\n options.track = {\n kind: options.kind,\n player: player,\n label: options.kind + ' settings',\n 'default': false,\n mode: 'disabled'\n };\n\n _TextTrackMenuItem.call(this, player, options);\n this.addClass('vjs-texttrack-settings');\n }\n\n _inherits(CaptionSettingsMenuItem, _TextTrackMenuItem);\n\n /**\n * Handle click on menu item\n *\n * @method handleClick\n */\n\n CaptionSettingsMenuItem.prototype.handleClick = function handleClick() {\n this.player().getChild('textTrackSettings').show();\n };\n\n return CaptionSettingsMenuItem;\n})(_TextTrackMenuItem3['default']);\n\n_Component2['default'].registerComponent('CaptionSettingsMenuItem', CaptionSettingsMenuItem);\nexports['default'] = CaptionSettingsMenuItem;\nmodule.exports = exports['default'];\n\n},{\"../../component.js\":52,\"./text-track-menu-item.js\":73}],67:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file captions-button.js\n */\n\nvar _TextTrackButton2 = _dereq_('./text-track-button.js');\n\nvar _TextTrackButton3 = _interopRequireWildcard(_TextTrackButton2);\n\nvar _Component = _dereq_('../../component.js');\n\nvar _Component2 = _interopRequireWildcard(_Component);\n\nvar _CaptionSettingsMenuItem = _dereq_('./caption-settings-menu-item.js');\n\nvar _CaptionSettingsMenuItem2 = _interopRequireWildcard(_CaptionSettingsMenuItem);\n\n/**\n * The button component for toggling and selecting captions\n *\n * @param {Object} player Player object\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends TextTrackButton\n * @class CaptionsButton\n */\n\nvar CaptionsButton = (function (_TextTrackButton) {\n function CaptionsButton(player, options, ready) {\n _classCallCheck(this, CaptionsButton);\n\n _TextTrackButton.call(this, player, options, ready);\n this.el_.setAttribute('aria-label', 'Captions Menu');\n }\n\n _inherits(CaptionsButton, _TextTrackButton);\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n\n CaptionsButton.prototype.buildCSSClass = function buildCSSClass() {\n return 'vjs-captions-button ' + _TextTrackButton.prototype.buildCSSClass.call(this);\n };\n\n /**\n * Update caption menu items\n *\n * @method update\n */\n\n CaptionsButton.prototype.update = function update() {\n var threshold = 2;\n _TextTrackButton.prototype.update.call(this);\n\n // if native, then threshold is 1 because no settings button\n if (this.player().tech && this.player().tech.featuresNativeTextTracks) {\n threshold = 1;\n }\n\n if (this.items && this.items.length > threshold) {\n this.show();\n } else {\n this.hide();\n }\n };\n\n /**\n * Create caption menu items\n *\n * @return {Array} Array of menu items\n * @method createItems\n */\n\n CaptionsButton.prototype.createItems = function createItems() {\n var items = [];\n\n if (!(this.player().tech && this.player().tech.featuresNativeTextTracks)) {\n items.push(new _CaptionSettingsMenuItem2['default'](this.player_, { kind: this.kind_ }));\n }\n\n return _TextTrackButton.prototype.createItems.call(this, items);\n };\n\n return CaptionsButton;\n})(_TextTrackButton3['default']);\n\nCaptionsButton.prototype.kind_ = 'captions';\nCaptionsButton.prototype.controlText_ = 'Captions';\n\n_Component2['default'].registerComponent('CaptionsButton', CaptionsButton);\nexports['default'] = CaptionsButton;\nmodule.exports = exports['default'];\n\n},{\"../../component.js\":52,\"./caption-settings-menu-item.js\":66,\"./text-track-button.js\":72}],68:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file chapters-button.js\n */\n\nvar _TextTrackButton2 = _dereq_('./text-track-button.js');\n\nvar _TextTrackButton3 = _interopRequireWildcard(_TextTrackButton2);\n\nvar _Component = _dereq_('../../component.js');\n\nvar _Component2 = _interopRequireWildcard(_Component);\n\nvar _TextTrackMenuItem = _dereq_('./text-track-menu-item.js');\n\nvar _TextTrackMenuItem2 = _interopRequireWildcard(_TextTrackMenuItem);\n\nvar _ChaptersTrackMenuItem = _dereq_('./chapters-track-menu-item.js');\n\nvar _ChaptersTrackMenuItem2 = _interopRequireWildcard(_ChaptersTrackMenuItem);\n\nvar _Menu = _dereq_('../../menu/menu.js');\n\nvar _Menu2 = _interopRequireWildcard(_Menu);\n\nvar _import = _dereq_('../../utils/dom.js');\n\nvar Dom = _interopRequireWildcard(_import);\n\nvar _import2 = _dereq_('../../utils/fn.js');\n\nvar Fn = _interopRequireWildcard(_import2);\n\nvar _toTitleCase = _dereq_('../../utils/to-title-case.js');\n\nvar _toTitleCase2 = _interopRequireWildcard(_toTitleCase);\n\nvar _window = _dereq_('global/window');\n\nvar _window2 = _interopRequireWildcard(_window);\n\n/**\n * The button component for toggling and selecting chapters\n * Chapters act much differently than other text tracks\n * Cues are navigation vs. other tracks of alternative languages\n *\n * @param {Object} player Player object\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends TextTrackButton\n * @class ChaptersButton\n */\n\nvar ChaptersButton = (function (_TextTrackButton) {\n function ChaptersButton(player, options, ready) {\n _classCallCheck(this, ChaptersButton);\n\n _TextTrackButton.call(this, player, options, ready);\n this.el_.setAttribute('aria-label', 'Chapters Menu');\n }\n\n _inherits(ChaptersButton, _TextTrackButton);\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n\n ChaptersButton.prototype.buildCSSClass = function buildCSSClass() {\n return 'vjs-chapters-button ' + _TextTrackButton.prototype.buildCSSClass.call(this);\n };\n\n /**\n * Create a menu item for each text track\n *\n * @return {Array} Array of menu items\n * @method createItems\n */\n\n ChaptersButton.prototype.createItems = function createItems() {\n var items = [];\n\n var tracks = this.player_.textTracks();\n\n if (!tracks) {\n return items;\n }\n\n for (var i = 0; i < tracks.length; i++) {\n var track = tracks[i];\n if (track.kind === this.kind_) {\n items.push(new _TextTrackMenuItem2['default'](this.player_, {\n track: track\n }));\n }\n }\n\n return items;\n };\n\n /**\n * Create menu from chapter buttons\n *\n * @return {Menu} Menu of chapter buttons\n * @method createMenu\n */\n\n ChaptersButton.prototype.createMenu = function createMenu() {\n var tracks = this.player_.textTracks() || [];\n var chaptersTrack = undefined;\n var items = this.items = [];\n\n for (var i = 0, l = tracks.length; i < l; i++) {\n var track = tracks[i];\n if (track.kind === this.kind_) {\n if (!track.cues) {\n track.mode = 'hidden';\n /* jshint loopfunc:true */\n // TODO see if we can figure out a better way of doing this https://github.com/videojs/video.js/issues/1864\n _window2['default'].setTimeout(Fn.bind(this, function () {\n this.createMenu();\n }), 100);\n /* jshint loopfunc:false */\n } else {\n chaptersTrack = track;\n break;\n }\n }\n }\n\n var menu = this.menu;\n if (menu === undefined) {\n menu = new _Menu2['default'](this.player_);\n menu.contentEl().appendChild(Dom.createEl('li', {\n className: 'vjs-menu-title',\n innerHTML: _toTitleCase2['default'](this.kind_),\n tabIndex: -1\n }));\n }\n\n if (chaptersTrack) {\n var cues = chaptersTrack.cues,\n cue = undefined;\n\n for (var i = 0, l = cues.length; i < l; i++) {\n cue = cues[i];\n\n var mi = new _ChaptersTrackMenuItem2['default'](this.player_, {\n track: chaptersTrack,\n cue: cue\n });\n\n items.push(mi);\n\n menu.addChild(mi);\n }\n this.addChild(menu);\n }\n\n if (this.items.length > 0) {\n this.show();\n }\n\n return menu;\n };\n\n return ChaptersButton;\n})(_TextTrackButton3['default']);\n\nChaptersButton.prototype.kind_ = 'chapters';\nChaptersButton.prototype.controlText_ = 'Chapters';\n\n_Component2['default'].registerComponent('ChaptersButton', ChaptersButton);\nexports['default'] = ChaptersButton;\nmodule.exports = exports['default'];\n\n},{\"../../component.js\":52,\"../../menu/menu.js\":91,\"../../utils/dom.js\":110,\"../../utils/fn.js\":112,\"../../utils/to-title-case.js\":119,\"./chapters-track-menu-item.js\":69,\"./text-track-button.js\":72,\"./text-track-menu-item.js\":73,\"global/window\":2}],69:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file chapters-track-menu-item.js\n */\n\nvar _MenuItem2 = _dereq_('../../menu/menu-item.js');\n\nvar _MenuItem3 = _interopRequireWildcard(_MenuItem2);\n\nvar _Component = _dereq_('../../component.js');\n\nvar _Component2 = _interopRequireWildcard(_Component);\n\nvar _import = _dereq_('../../utils/fn.js');\n\nvar Fn = _interopRequireWildcard(_import);\n\n/**\n * The chapter track menu item\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends MenuItem\n * @class ChaptersTrackMenuItem\n */\n\nvar ChaptersTrackMenuItem = (function (_MenuItem) {\n function ChaptersTrackMenuItem(player, options) {\n _classCallCheck(this, ChaptersTrackMenuItem);\n\n var track = options.track;\n var cue = options.cue;\n var currentTime = player.currentTime();\n\n // Modify options for parent MenuItem class's init.\n options.label = cue.text;\n options.selected = cue.startTime <= currentTime && currentTime < cue.endTime;\n _MenuItem.call(this, player, options);\n\n this.track = track;\n this.cue = cue;\n track.addEventListener('cuechange', Fn.bind(this, this.update));\n }\n\n _inherits(ChaptersTrackMenuItem, _MenuItem);\n\n /**\n * Handle click on menu item\n *\n * @method handleClick\n */\n\n ChaptersTrackMenuItem.prototype.handleClick = function handleClick() {\n _MenuItem.prototype.handleClick.call(this);\n this.player_.currentTime(this.cue.startTime);\n this.update(this.cue.startTime);\n };\n\n /**\n * Update chapter menu item\n *\n * @method update\n */\n\n ChaptersTrackMenuItem.prototype.update = function update() {\n var cue = this.cue;\n var currentTime = this.player_.currentTime();\n\n // vjs.log(currentTime, cue.startTime);\n this.selected(cue.startTime <= currentTime && currentTime < cue.endTime);\n };\n\n return ChaptersTrackMenuItem;\n})(_MenuItem3['default']);\n\n_Component2['default'].registerComponent('ChaptersTrackMenuItem', ChaptersTrackMenuItem);\nexports['default'] = ChaptersTrackMenuItem;\nmodule.exports = exports['default'];\n\n},{\"../../component.js\":52,\"../../menu/menu-item.js\":90,\"../../utils/fn.js\":112}],70:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file off-text-track-menu-item.js\n */\n\nvar _TextTrackMenuItem2 = _dereq_('./text-track-menu-item.js');\n\nvar _TextTrackMenuItem3 = _interopRequireWildcard(_TextTrackMenuItem2);\n\nvar _Component = _dereq_('../../component.js');\n\nvar _Component2 = _interopRequireWildcard(_Component);\n\n/**\n * A special menu item for turning of a specific type of text track\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends TextTrackMenuItem\n * @class OffTextTrackMenuItem\n */\n\nvar OffTextTrackMenuItem = (function (_TextTrackMenuItem) {\n function OffTextTrackMenuItem(player, options) {\n _classCallCheck(this, OffTextTrackMenuItem);\n\n // Create pseudo track info\n // Requires options['kind']\n options.track = {\n kind: options.kind,\n player: player,\n label: options.kind + ' off',\n 'default': false,\n mode: 'disabled'\n };\n\n _TextTrackMenuItem.call(this, player, options);\n this.selected(true);\n }\n\n _inherits(OffTextTrackMenuItem, _TextTrackMenuItem);\n\n /**\n * Handle text track change\n *\n * @param {Object} event Event object\n * @method handleTracksChange\n */\n\n OffTextTrackMenuItem.prototype.handleTracksChange = function handleTracksChange(event) {\n var tracks = this.player().textTracks();\n var selected = true;\n\n for (var i = 0, l = tracks.length; i < l; i++) {\n var track = tracks[i];\n if (track.kind === this.track.kind && track.mode === 'showing') {\n selected = false;\n break;\n }\n }\n\n this.selected(selected);\n };\n\n return OffTextTrackMenuItem;\n})(_TextTrackMenuItem3['default']);\n\n_Component2['default'].registerComponent('OffTextTrackMenuItem', OffTextTrackMenuItem);\nexports['default'] = OffTextTrackMenuItem;\nmodule.exports = exports['default'];\n\n},{\"../../component.js\":52,\"./text-track-menu-item.js\":73}],71:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file subtitles-button.js\n */\n\nvar _TextTrackButton2 = _dereq_('./text-track-button.js');\n\nvar _TextTrackButton3 = _interopRequireWildcard(_TextTrackButton2);\n\nvar _Component = _dereq_('../../component.js');\n\nvar _Component2 = _interopRequireWildcard(_Component);\n\n/**\n * The button component for toggling and selecting subtitles\n *\n * @param {Object} player Player object\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends TextTrackButton\n * @class SubtitlesButton\n */\n\nvar SubtitlesButton = (function (_TextTrackButton) {\n function SubtitlesButton(player, options, ready) {\n _classCallCheck(this, SubtitlesButton);\n\n _TextTrackButton.call(this, player, options, ready);\n this.el_.setAttribute('aria-label', 'Subtitles Menu');\n }\n\n _inherits(SubtitlesButton, _TextTrackButton);\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n\n SubtitlesButton.prototype.buildCSSClass = function buildCSSClass() {\n return 'vjs-subtitles-button ' + _TextTrackButton.prototype.buildCSSClass.call(this);\n };\n\n return SubtitlesButton;\n})(_TextTrackButton3['default']);\n\nSubtitlesButton.prototype.kind_ = 'subtitles';\nSubtitlesButton.prototype.controlText_ = 'Subtitles';\n\n_Component2['default'].registerComponent('SubtitlesButton', SubtitlesButton);\nexports['default'] = SubtitlesButton;\nmodule.exports = exports['default'];\n\n},{\"../../component.js\":52,\"./text-track-button.js\":72}],72:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file text-track-button.js\n */\n\nvar _MenuButton2 = _dereq_('../../menu/menu-button.js');\n\nvar _MenuButton3 = _interopRequireWildcard(_MenuButton2);\n\nvar _Component = _dereq_('../../component.js');\n\nvar _Component2 = _interopRequireWildcard(_Component);\n\nvar _import = _dereq_('../../utils/fn.js');\n\nvar Fn = _interopRequireWildcard(_import);\n\nvar _TextTrackMenuItem = _dereq_('./text-track-menu-item.js');\n\nvar _TextTrackMenuItem2 = _interopRequireWildcard(_TextTrackMenuItem);\n\nvar _OffTextTrackMenuItem = _dereq_('./off-text-track-menu-item.js');\n\nvar _OffTextTrackMenuItem2 = _interopRequireWildcard(_OffTextTrackMenuItem);\n\n/**\n * The base class for buttons that toggle specific text track types (e.g. subtitles)\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends MenuButton\n * @class TextTrackButton\n */\n\nvar TextTrackButton = (function (_MenuButton) {\n function TextTrackButton(player, options) {\n _classCallCheck(this, TextTrackButton);\n\n _MenuButton.call(this, player, options);\n\n var tracks = this.player_.textTracks();\n\n if (this.items.length <= 1) {\n this.hide();\n }\n\n if (!tracks) {\n return;\n }\n\n var updateHandler = Fn.bind(this, this.update);\n tracks.addEventListener('removetrack', updateHandler);\n tracks.addEventListener('addtrack', updateHandler);\n\n this.player_.on('dispose', function () {\n tracks.removeEventListener('removetrack', updateHandler);\n tracks.removeEventListener('addtrack', updateHandler);\n });\n }\n\n _inherits(TextTrackButton, _MenuButton);\n\n // Create a menu item for each text track\n\n TextTrackButton.prototype.createItems = function createItems() {\n var items = arguments[0] === undefined ? [] : arguments[0];\n\n // Add an OFF menu item to turn all tracks off\n items.push(new _OffTextTrackMenuItem2['default'](this.player_, { kind: this.kind_ }));\n\n var tracks = this.player_.textTracks();\n\n if (!tracks) {\n return items;\n }\n\n for (var i = 0; i < tracks.length; i++) {\n var track = tracks[i];\n\n // only add tracks that are of the appropriate kind and have a label\n if (track.kind === this.kind_) {\n items.push(new _TextTrackMenuItem2['default'](this.player_, {\n track: track\n }));\n }\n }\n\n return items;\n };\n\n return TextTrackButton;\n})(_MenuButton3['default']);\n\n_Component2['default'].registerComponent('TextTrackButton', TextTrackButton);\nexports['default'] = TextTrackButton;\nmodule.exports = exports['default'];\n\n},{\"../../component.js\":52,\"../../menu/menu-button.js\":89,\"../../utils/fn.js\":112,\"./off-text-track-menu-item.js\":70,\"./text-track-menu-item.js\":73}],73:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file text-track-menu-item.js\n */\n\nvar _MenuItem2 = _dereq_('../../menu/menu-item.js');\n\nvar _MenuItem3 = _interopRequireWildcard(_MenuItem2);\n\nvar _Component = _dereq_('../../component.js');\n\nvar _Component2 = _interopRequireWildcard(_Component);\n\nvar _import = _dereq_('../../utils/fn.js');\n\nvar Fn = _interopRequireWildcard(_import);\n\nvar _window = _dereq_('global/window');\n\nvar _window2 = _interopRequireWildcard(_window);\n\nvar _document = _dereq_('global/document');\n\nvar _document2 = _interopRequireWildcard(_document);\n\n/**\n * The specific menu item type for selecting a language within a text track kind\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends MenuItem\n * @class TextTrackMenuItem\n */\n\nvar TextTrackMenuItem = (function (_MenuItem) {\n function TextTrackMenuItem(player, options) {\n var _this = this;\n\n _classCallCheck(this, TextTrackMenuItem);\n\n var track = options.track;\n var tracks = player.textTracks();\n\n // Modify options for parent MenuItem class's init.\n options.label = track.label || track.language || 'Unknown';\n options.selected = track['default'] || track.mode === 'showing';\n _MenuItem.call(this, player, options);\n\n this.track = track;\n\n if (tracks) {\n (function () {\n var changeHandler = Fn.bind(_this, _this.handleTracksChange);\n\n tracks.addEventListener('change', changeHandler);\n _this.on('dispose', function () {\n tracks.removeEventListener('change', changeHandler);\n });\n })();\n }\n\n // iOS7 doesn't dispatch change events to TextTrackLists when an\n // associated track's mode changes. Without something like\n // Object.observe() (also not present on iOS7), it's not\n // possible to detect changes to the mode attribute and polyfill\n // the change event. As a poor substitute, we manually dispatch\n // change events whenever the controls modify the mode.\n if (tracks && tracks.onchange === undefined) {\n (function () {\n var event = undefined;\n\n _this.on(['tap', 'click'], function () {\n if (typeof _window2['default'].Event !== 'object') {\n // Android 2.3 throws an Illegal Constructor error for window.Event\n try {\n event = new _window2['default'].Event('change');\n } catch (err) {}\n }\n\n if (!event) {\n event = _document2['default'].createEvent('Event');\n event.initEvent('change', true, true);\n }\n\n tracks.dispatchEvent(event);\n });\n })();\n }\n }\n\n _inherits(TextTrackMenuItem, _MenuItem);\n\n /**\n * Handle click on text track\n *\n * @method handleClick\n */\n\n TextTrackMenuItem.prototype.handleClick = function handleClick(event) {\n var kind = this.track.kind;\n var tracks = this.player_.textTracks();\n\n _MenuItem.prototype.handleClick.call(this, event);\n\n if (!tracks) {\n return;\n }for (var i = 0; i < tracks.length; i++) {\n var track = tracks[i];\n\n if (track.kind !== kind) {\n continue;\n }\n\n if (track === this.track) {\n track.mode = 'showing';\n } else {\n track.mode = 'disabled';\n }\n }\n };\n\n /**\n * Handle text track change\n *\n * @method handleTracksChange\n */\n\n TextTrackMenuItem.prototype.handleTracksChange = function handleTracksChange(event) {\n this.selected(this.track.mode === 'showing');\n };\n\n return TextTrackMenuItem;\n})(_MenuItem3['default']);\n\n_Component2['default'].registerComponent('TextTrackMenuItem', TextTrackMenuItem);\nexports['default'] = TextTrackMenuItem;\nmodule.exports = exports['default'];\n\n},{\"../../component.js\":52,\"../../menu/menu-item.js\":90,\"../../utils/fn.js\":112,\"global/document\":1,\"global/window\":2}],74:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file current-time-display.js\n */\n\nvar _Component2 = _dereq_('../../component.js');\n\nvar _Component3 = _interopRequireWildcard(_Component2);\n\nvar _import = _dereq_('../../utils/dom.js');\n\nvar Dom = _interopRequireWildcard(_import);\n\nvar _formatTime = _dereq_('../../utils/format-time.js');\n\nvar _formatTime2 = _interopRequireWildcard(_formatTime);\n\n/**\n * Displays the current time\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class CurrentTimeDisplay\n */\n\nvar CurrentTimeDisplay = (function (_Component) {\n function CurrentTimeDisplay(player, options) {\n _classCallCheck(this, CurrentTimeDisplay);\n\n _Component.call(this, player, options);\n\n this.on(player, 'timeupdate', this.updateContent);\n }\n\n _inherits(CurrentTimeDisplay, _Component);\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n\n CurrentTimeDisplay.prototype.createEl = function createEl() {\n var el = _Component.prototype.createEl.call(this, 'div', {\n className: 'vjs-current-time vjs-time-control vjs-control'\n });\n\n this.contentEl_ = Dom.createEl('div', {\n className: 'vjs-current-time-display',\n innerHTML: 'Current Time ' + '0:00', // label the current time for screen reader users\n 'aria-live': 'off' // tell screen readers not to automatically read the time as it changes\n });\n\n el.appendChild(this.contentEl_);\n return el;\n };\n\n /**\n * Update current time display \n *\n * @method updateContent\n */\n\n CurrentTimeDisplay.prototype.updateContent = function updateContent() {\n // Allows for smooth scrubbing, when player can't keep up.\n var time = this.player_.scrubbing ? this.player_.getCache().currentTime : this.player_.currentTime();\n var localizedText = this.localize('Current Time');\n var formattedTime = _formatTime2['default'](time, this.player_.duration());\n this.contentEl_.innerHTML = '' + localizedText + ' ' + formattedTime;\n };\n\n return CurrentTimeDisplay;\n})(_Component3['default']);\n\n_Component3['default'].registerComponent('CurrentTimeDisplay', CurrentTimeDisplay);\nexports['default'] = CurrentTimeDisplay;\nmodule.exports = exports['default'];\n\n},{\"../../component.js\":52,\"../../utils/dom.js\":110,\"../../utils/format-time.js\":113}],75:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file duration-display.js\n */\n\nvar _Component2 = _dereq_('../../component.js');\n\nvar _Component3 = _interopRequireWildcard(_Component2);\n\nvar _import = _dereq_('../../utils/dom.js');\n\nvar Dom = _interopRequireWildcard(_import);\n\nvar _formatTime = _dereq_('../../utils/format-time.js');\n\nvar _formatTime2 = _interopRequireWildcard(_formatTime);\n\n/**\n * Displays the duration\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class DurationDisplay\n */\n\nvar DurationDisplay = (function (_Component) {\n function DurationDisplay(player, options) {\n _classCallCheck(this, DurationDisplay);\n\n _Component.call(this, player, options);\n\n // this might need to be changed to 'durationchange' instead of 'timeupdate' eventually,\n // however the durationchange event fires before this.player_.duration() is set,\n // so the value cannot be written out using this method.\n // Once the order of durationchange and this.player_.duration() being set is figured out,\n // this can be updated.\n this.on(player, 'timeupdate', this.updateContent);\n this.on(player, 'loadedmetadata', this.updateContent);\n }\n\n _inherits(DurationDisplay, _Component);\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n\n DurationDisplay.prototype.createEl = function createEl() {\n var el = _Component.prototype.createEl.call(this, 'div', {\n className: 'vjs-duration vjs-time-control vjs-control'\n });\n\n this.contentEl_ = Dom.createEl('div', {\n className: 'vjs-duration-display',\n innerHTML: '' + this.localize('Duration Time') + ' 0:00', // label the duration time for screen reader users\n 'aria-live': 'off' // tell screen readers not to automatically read the time as it changes\n });\n\n el.appendChild(this.contentEl_);\n return el;\n };\n\n /**\n * Update duration time display \n *\n * @method updateContent\n */\n\n DurationDisplay.prototype.updateContent = function updateContent() {\n var duration = this.player_.duration();\n if (duration) {\n var localizedText = this.localize('Duration Time');\n var formattedTime = _formatTime2['default'](duration);\n this.contentEl_.innerHTML = '' + localizedText + ' ' + formattedTime; // label the duration time for screen reader users\n }\n };\n\n return DurationDisplay;\n})(_Component3['default']);\n\n_Component3['default'].registerComponent('DurationDisplay', DurationDisplay);\nexports['default'] = DurationDisplay;\nmodule.exports = exports['default'];\n\n},{\"../../component.js\":52,\"../../utils/dom.js\":110,\"../../utils/format-time.js\":113}],76:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file remaining-time-display.js\n */\n\nvar _Component2 = _dereq_('../../component.js');\n\nvar _Component3 = _interopRequireWildcard(_Component2);\n\nvar _import = _dereq_('../../utils/dom.js');\n\nvar Dom = _interopRequireWildcard(_import);\n\nvar _formatTime = _dereq_('../../utils/format-time.js');\n\nvar _formatTime2 = _interopRequireWildcard(_formatTime);\n\n/**\n * Displays the time left in the video\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class RemainingTimeDisplay\n */\n\nvar RemainingTimeDisplay = (function (_Component) {\n function RemainingTimeDisplay(player, options) {\n _classCallCheck(this, RemainingTimeDisplay);\n\n _Component.call(this, player, options);\n\n this.on(player, 'timeupdate', this.updateContent);\n }\n\n _inherits(RemainingTimeDisplay, _Component);\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n\n RemainingTimeDisplay.prototype.createEl = function createEl() {\n var el = _Component.prototype.createEl.call(this, 'div', {\n className: 'vjs-remaining-time vjs-time-control vjs-control'\n });\n\n this.contentEl_ = Dom.createEl('div', {\n className: 'vjs-remaining-time-display',\n innerHTML: '' + this.localize('Remaining Time') + ' -0:00', // label the remaining time for screen reader users\n 'aria-live': 'off' // tell screen readers not to automatically read the time as it changes\n });\n\n el.appendChild(this.contentEl_);\n return el;\n };\n\n /**\n * Update remaining time display \n *\n * @method updateContent\n */\n\n RemainingTimeDisplay.prototype.updateContent = function updateContent() {\n if (this.player_.duration()) {\n var localizedText = this.localize('Remaining Time');\n var formattedTime = _formatTime2['default'](this.player_.remainingTime());\n this.contentEl_.innerHTML = '' + localizedText + ' -' + formattedTime;\n }\n\n // Allows for smooth scrubbing, when player can't keep up.\n // var time = (this.player_.scrubbing) ? this.player_.getCache().currentTime : this.player_.currentTime();\n // this.contentEl_.innerHTML = vjs.formatTime(time, this.player_.duration());\n };\n\n return RemainingTimeDisplay;\n})(_Component3['default']);\n\n_Component3['default'].registerComponent('RemainingTimeDisplay', RemainingTimeDisplay);\nexports['default'] = RemainingTimeDisplay;\nmodule.exports = exports['default'];\n\n},{\"../../component.js\":52,\"../../utils/dom.js\":110,\"../../utils/format-time.js\":113}],77:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file time-divider.js\n */\n\nvar _Component2 = _dereq_('../../component.js');\n\nvar _Component3 = _interopRequireWildcard(_Component2);\n\n/**\n * The separator between the current time and duration.\n * Can be hidden if it's not needed in the design.\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class TimeDivider\n */\n\nvar TimeDivider = (function (_Component) {\n function TimeDivider() {\n _classCallCheck(this, TimeDivider);\n\n if (_Component != null) {\n _Component.apply(this, arguments);\n }\n }\n\n _inherits(TimeDivider, _Component);\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n\n TimeDivider.prototype.createEl = function createEl() {\n return _Component.prototype.createEl.call(this, 'div', {\n className: 'vjs-time-control vjs-time-divider',\n innerHTML: '
    /
    '\n });\n };\n\n return TimeDivider;\n})(_Component3['default']);\n\n_Component3['default'].registerComponent('TimeDivider', TimeDivider);\nexports['default'] = TimeDivider;\nmodule.exports = exports['default'];\n\n},{\"../../component.js\":52}],78:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file volume-bar.js\n */\n\nvar _Slider2 = _dereq_('../../slider/slider.js');\n\nvar _Slider3 = _interopRequireWildcard(_Slider2);\n\nvar _Component = _dereq_('../../component.js');\n\nvar _Component2 = _interopRequireWildcard(_Component);\n\nvar _import = _dereq_('../../utils/fn.js');\n\nvar Fn = _interopRequireWildcard(_import);\n\nvar _roundFloat = _dereq_('../../utils/round-float.js');\n\nvar _roundFloat2 = _interopRequireWildcard(_roundFloat);\n\n// Required children\n\nvar _VolumeLevel = _dereq_('./volume-level.js');\n\nvar _VolumeLevel2 = _interopRequireWildcard(_VolumeLevel);\n\n/**\n * The bar that contains the volume level and can be clicked on to adjust the level\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Slider\n * @class VolumeBar\n */\n\nvar VolumeBar = (function (_Slider) {\n function VolumeBar(player, options) {\n _classCallCheck(this, VolumeBar);\n\n _Slider.call(this, player, options);\n this.on(player, 'volumechange', this.updateARIAAttributes);\n player.ready(Fn.bind(this, this.updateARIAAttributes));\n }\n\n _inherits(VolumeBar, _Slider);\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n\n VolumeBar.prototype.createEl = function createEl() {\n return _Slider.prototype.createEl.call(this, 'div', {\n className: 'vjs-volume-bar',\n 'aria-label': 'volume level'\n });\n };\n\n /**\n * Handle mouse move on volume bar\n *\n * @method handleMouseMove\n */\n\n VolumeBar.prototype.handleMouseMove = function handleMouseMove(event) {\n if (this.player_.muted()) {\n this.player_.muted(false);\n }\n\n this.player_.volume(this.calculateDistance(event));\n };\n\n /**\n * Get percent of volume level\n *\n * @retun {Number} Volume level percent\n * @method getPercent\n */\n\n VolumeBar.prototype.getPercent = function getPercent() {\n if (this.player_.muted()) {\n return 0;\n } else {\n return this.player_.volume();\n }\n };\n\n /**\n * Increase volume level for keyboard users\n *\n * @method stepForward\n */\n\n VolumeBar.prototype.stepForward = function stepForward() {\n this.player_.volume(this.player_.volume() + 0.1);\n };\n\n /**\n * Decrease volume level for keyboard users\n *\n * @method stepBack\n */\n\n VolumeBar.prototype.stepBack = function stepBack() {\n this.player_.volume(this.player_.volume() - 0.1);\n };\n\n /**\n * Update ARIA accessibility attributes\n *\n * @method updateARIAAttributes\n */\n\n VolumeBar.prototype.updateARIAAttributes = function updateARIAAttributes() {\n // Current value of volume bar as a percentage\n this.el_.setAttribute('aria-valuenow', _roundFloat2['default'](this.player_.volume() * 100, 2));\n this.el_.setAttribute('aria-valuetext', _roundFloat2['default'](this.player_.volume() * 100, 2) + '%');\n };\n\n return VolumeBar;\n})(_Slider3['default']);\n\nVolumeBar.prototype.options_ = {\n children: {\n volumeLevel: {}\n },\n barName: 'volumeLevel'\n};\n\nVolumeBar.prototype.playerEvent = 'volumechange';\n\n_Component2['default'].registerComponent('VolumeBar', VolumeBar);\nexports['default'] = VolumeBar;\nmodule.exports = exports['default'];\n\n},{\"../../component.js\":52,\"../../slider/slider.js\":96,\"../../utils/fn.js\":112,\"../../utils/round-float.js\":117,\"./volume-level.js\":80}],79:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file volume-control.js\n */\n\nvar _Component2 = _dereq_('../../component.js');\n\nvar _Component3 = _interopRequireWildcard(_Component2);\n\n// Required children\n\nvar _VolumeBar = _dereq_('./volume-bar.js');\n\nvar _VolumeBar2 = _interopRequireWildcard(_VolumeBar);\n\n/**\n * The component for controlling the volume level\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class VolumeControl\n */\n\nvar VolumeControl = (function (_Component) {\n function VolumeControl(player, options) {\n _classCallCheck(this, VolumeControl);\n\n _Component.call(this, player, options);\n\n // hide volume controls when they're not supported by the current tech\n if (player.tech && player.tech.featuresVolumeControl === false) {\n this.addClass('vjs-hidden');\n }\n this.on(player, 'loadstart', function () {\n if (player.tech.featuresVolumeControl === false) {\n this.addClass('vjs-hidden');\n } else {\n this.removeClass('vjs-hidden');\n }\n });\n }\n\n _inherits(VolumeControl, _Component);\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n\n VolumeControl.prototype.createEl = function createEl() {\n return _Component.prototype.createEl.call(this, 'div', {\n className: 'vjs-volume-control vjs-control'\n });\n };\n\n return VolumeControl;\n})(_Component3['default']);\n\nVolumeControl.prototype.options_ = {\n children: {\n volumeBar: {}\n }\n};\n\n_Component3['default'].registerComponent('VolumeControl', VolumeControl);\nexports['default'] = VolumeControl;\nmodule.exports = exports['default'];\n\n},{\"../../component.js\":52,\"./volume-bar.js\":78}],80:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file volume-level.js\n */\n\nvar _Component2 = _dereq_('../../component.js');\n\nvar _Component3 = _interopRequireWildcard(_Component2);\n\n/**\n * Shows volume level\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class VolumeLevel\n */\n\nvar VolumeLevel = (function (_Component) {\n function VolumeLevel() {\n _classCallCheck(this, VolumeLevel);\n\n if (_Component != null) {\n _Component.apply(this, arguments);\n }\n }\n\n _inherits(VolumeLevel, _Component);\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n\n VolumeLevel.prototype.createEl = function createEl() {\n return _Component.prototype.createEl.call(this, 'div', {\n className: 'vjs-volume-level',\n innerHTML: ''\n });\n };\n\n return VolumeLevel;\n})(_Component3['default']);\n\n_Component3['default'].registerComponent('VolumeLevel', VolumeLevel);\nexports['default'] = VolumeLevel;\nmodule.exports = exports['default'];\n\n},{\"../../component.js\":52}],81:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file volume-menu-button.js\n */\n\nvar _Button = _dereq_('../button.js');\n\nvar _Button2 = _interopRequireWildcard(_Button);\n\nvar _Component = _dereq_('../component.js');\n\nvar _Component2 = _interopRequireWildcard(_Component);\n\nvar _Menu = _dereq_('../menu/menu.js');\n\nvar _Menu2 = _interopRequireWildcard(_Menu);\n\nvar _MenuButton2 = _dereq_('../menu/menu-button.js');\n\nvar _MenuButton3 = _interopRequireWildcard(_MenuButton2);\n\nvar _MuteToggle = _dereq_('./mute-toggle.js');\n\nvar _MuteToggle2 = _interopRequireWildcard(_MuteToggle);\n\nvar _VolumeBar = _dereq_('./volume-control/volume-bar.js');\n\nvar _VolumeBar2 = _interopRequireWildcard(_VolumeBar);\n\n/**\n * Button for volume menu\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends MenuButton\n * @class VolumeMenuButton\n */\n\nvar VolumeMenuButton = (function (_MenuButton) {\n function VolumeMenuButton(player, options) {\n _classCallCheck(this, VolumeMenuButton);\n\n _MenuButton.call(this, player, options);\n\n // Same listeners as MuteToggle\n this.on(player, 'volumechange', this.volumeUpdate);\n\n // hide mute toggle if the current tech doesn't support volume control\n if (player.tech && player.tech.featuresVolumeControl === false) {\n this.addClass('vjs-hidden');\n }\n this.on(player, 'loadstart', function () {\n if (player.tech.featuresVolumeControl === false) {\n this.addClass('vjs-hidden');\n } else {\n this.removeClass('vjs-hidden');\n }\n });\n this.addClass('vjs-menu-button');\n }\n\n _inherits(VolumeMenuButton, _MenuButton);\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n\n VolumeMenuButton.prototype.buildCSSClass = function buildCSSClass() {\n return 'vjs-volume-menu-button ' + _MenuButton.prototype.buildCSSClass.call(this);\n };\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {Menu} The volume menu button\n * @method createMenu\n */\n\n VolumeMenuButton.prototype.createMenu = function createMenu() {\n var menu = new _Menu2['default'](this.player_, {\n contentElType: 'div'\n });\n\n // The volumeBar is vertical by default in the base theme when used with a VolumeMenuButton\n var options = this.options_.volumeBar || {};\n options.vertical = options.vertical || true;\n\n var vc = new _VolumeBar2['default'](this.player_, options);\n\n vc.on('focus', function () {\n menu.lockShowing();\n });\n vc.on('blur', function () {\n menu.unlockShowing();\n });\n menu.addChild(vc);\n return menu;\n };\n\n /**\n * Handle click on volume menu and calls super\n *\n * @method handleClick\n */\n\n VolumeMenuButton.prototype.handleClick = function handleClick() {\n _MuteToggle2['default'].prototype.handleClick.call(this);\n _MenuButton.prototype.handleClick.call(this);\n };\n\n return VolumeMenuButton;\n})(_MenuButton3['default']);\n\nVolumeMenuButton.prototype.volumeUpdate = _MuteToggle2['default'].prototype.update;\nVolumeMenuButton.prototype.controlText_ = 'Mute';\n\n_Component2['default'].registerComponent('VolumeMenuButton', VolumeMenuButton);\nexports['default'] = VolumeMenuButton;\nmodule.exports = exports['default'];\n\n},{\"../button.js\":51,\"../component.js\":52,\"../menu/menu-button.js\":89,\"../menu/menu.js\":91,\"./mute-toggle.js\":56,\"./volume-control/volume-bar.js\":78}],82:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file error-display.js\n */\n\nvar _Component2 = _dereq_('./component');\n\nvar _Component3 = _interopRequireWildcard(_Component2);\n\nvar _import = _dereq_('./utils/dom.js');\n\nvar Dom = _interopRequireWildcard(_import);\n\n/**\n * Display that an error has occurred making the video unplayable\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @extends Component\n * @class ErrorDisplay\n */\n\nvar ErrorDisplay = (function (_Component) {\n function ErrorDisplay(player, options) {\n _classCallCheck(this, ErrorDisplay);\n\n _Component.call(this, player, options);\n\n this.update();\n this.on(player, 'error', this.update);\n }\n\n _inherits(ErrorDisplay, _Component);\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n\n ErrorDisplay.prototype.createEl = function createEl() {\n var el = _Component.prototype.createEl.call(this, 'div', {\n className: 'vjs-error-display'\n });\n\n this.contentEl_ = Dom.createEl('div');\n el.appendChild(this.contentEl_);\n\n return el;\n };\n\n /**\n * Update the error message in localized language\n *\n * @method update\n */\n\n ErrorDisplay.prototype.update = function update() {\n if (this.player().error()) {\n this.contentEl_.innerHTML = this.localize(this.player().error().message);\n }\n };\n\n return ErrorDisplay;\n})(_Component3['default']);\n\n_Component3['default'].registerComponent('ErrorDisplay', ErrorDisplay);\nexports['default'] = ErrorDisplay;\nmodule.exports = exports['default'];\n\n},{\"./component\":52,\"./utils/dom.js\":110}],83:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nexports.__esModule = true;\n/**\n * @file event-emitter.js\n */\n\nvar _import = _dereq_('./utils/events.js');\n\nvar Events = _interopRequireWildcard(_import);\n\nvar EventEmitter = function EventEmitter() {};\n\nEventEmitter.prototype.allowedEvents_ = {};\n\nEventEmitter.prototype.on = function (type, fn) {\n // Remove the addEventListener alias before calling Events.on\n // so we don't get into an infinite type loop\n var ael = this.addEventListener;\n this.addEventListener = Function.prototype;\n Events.on(this, type, fn);\n this.addEventListener = ael;\n};\nEventEmitter.prototype.addEventListener = EventEmitter.prototype.on;\n\nEventEmitter.prototype.off = function (type, fn) {\n Events.off(this, type, fn);\n};\nEventEmitter.prototype.removeEventListener = EventEmitter.prototype.off;\n\nEventEmitter.prototype.one = function (type, fn) {\n Events.one(this, type, fn);\n};\n\nEventEmitter.prototype.trigger = function (event) {\n var type = event.type || event;\n\n if (typeof event === 'string') {\n event = {\n type: type\n };\n }\n event = Events.fixEvent(event);\n\n if (this.allowedEvents_[type] && this['on' + type]) {\n this['on' + type](event);\n }\n\n Events.trigger(this, event);\n};\n// The standard DOM EventTarget.dispatchEvent() is aliased to trigger()\nEventEmitter.prototype.dispatchEvent = EventEmitter.prototype.trigger;\n\nexports['default'] = EventEmitter;\nmodule.exports = exports['default'];\n\n},{\"./utils/events.js\":111}],84:[function(_dereq_,module,exports){\n'use strict';\n\nexports.__esModule = true;\n/*\n * @file extends.js\n *\n * A combination of node inherits and babel's inherits (after transpile).\n * Both work the same but node adds `super_` to the subClass\n * and Bable adds the superClass as __proto__. Both seem useful.\n */\nvar _inherits = function _inherits(subClass, superClass) {\n if (typeof superClass !== 'function' && superClass !== null) {\n throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n\n if (superClass) {\n // node\n subClass.super_ = superClass;\n }\n};\n\n/*\n * Function for subclassing using the same inheritance that\n * videojs uses internally\n * ```js\n * var Button = videojs.getComponent('Button');\n * ```\n * ```js\n * var MyButton = videojs.extends(Button, {\n * constructor: function(player, options) {\n * Button.call(this, player, options);\n * },\n * onClick: function() {\n * // doSomething\n * }\n * });\n * ```\n */\nvar extendsFn = function extendsFn(superClass) {\n var subClassMethods = arguments[1] === undefined ? {} : arguments[1];\n\n var subClass = function subClass() {\n superClass.apply(this, arguments);\n };\n var methods = {};\n\n if (subClassMethods.constructor !== Object.prototype.constructor) {\n subClass = subClassMethods.constructor;\n methods = subClassMethods;\n } else if (typeof subClassMethods === 'function') {\n subClass = subClassMethods;\n }\n\n _inherits(subClass, superClass);\n\n // Extend subObj's prototype with functions and other properties from props\n for (var name in methods) {\n if (methods.hasOwnProperty(name)) {\n subClass.prototype[name] = methods[name];\n }\n }\n\n return subClass;\n};\n\nexports['default'] = extendsFn;\nmodule.exports = exports['default'];\n\n},{}],85:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nexports.__esModule = true;\n/**\n * @file fullscreen-api.js\n */\n\nvar _document = _dereq_('global/document');\n\nvar _document2 = _interopRequireWildcard(_document);\n\n/*\n * Store the browser-specific methods for the fullscreen API\n * @type {Object|undefined}\n * @private\n */\nvar FullscreenApi = {};\n\n// browser API methods\n// map approach from Screenful.js - https://github.com/sindresorhus/screenfull.js\nvar apiMap = [\n// Spec: https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html\n['requestFullscreen', 'exitFullscreen', 'fullscreenElement', 'fullscreenEnabled', 'fullscreenchange', 'fullscreenerror'],\n// WebKit\n['webkitRequestFullscreen', 'webkitExitFullscreen', 'webkitFullscreenElement', 'webkitFullscreenEnabled', 'webkitfullscreenchange', 'webkitfullscreenerror'],\n// Old WebKit (Safari 5.1)\n['webkitRequestFullScreen', 'webkitCancelFullScreen', 'webkitCurrentFullScreenElement', 'webkitCancelFullScreen', 'webkitfullscreenchange', 'webkitfullscreenerror'],\n// Mozilla\n['mozRequestFullScreen', 'mozCancelFullScreen', 'mozFullScreenElement', 'mozFullScreenEnabled', 'mozfullscreenchange', 'mozfullscreenerror'],\n// Microsoft\n['msRequestFullscreen', 'msExitFullscreen', 'msFullscreenElement', 'msFullscreenEnabled', 'MSFullscreenChange', 'MSFullscreenError']];\n\nvar specApi = apiMap[0];\nvar browserApi = undefined;\n\n// determine the supported set of functions\nfor (var i = 0; i < apiMap.length; i++) {\n // check for exitFullscreen function\n if (apiMap[i][1] in _document2['default']) {\n browserApi = apiMap[i];\n break;\n }\n}\n\n// map the browser API names to the spec API names\nif (browserApi) {\n for (var i = 0; i < browserApi.length; i++) {\n FullscreenApi[specApi[i]] = browserApi[i];\n }\n}\n\nexports['default'] = FullscreenApi;\nmodule.exports = exports['default'];\n\n},{\"global/document\":1}],86:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nexports.__esModule = true;\n/**\n * @file global-options.js\n */\n\nvar _document = _dereq_('global/document');\n\nvar _document2 = _interopRequireWildcard(_document);\n\nvar _window = _dereq_('global/window');\n\nvar _window2 = _interopRequireWildcard(_window);\n\nvar navigator = _window2['default'].navigator;\n\n/*\n * Global Player instance options, surfaced from Player.prototype.options_\n * options = Player.prototype.options_\n * All options should use string keys so they avoid\n * renaming by closure compiler\n *\n * @type {Object}\n */\nexports['default'] = {\n // Default order of fallback technology\n techOrder: ['html5', 'flash'],\n // techOrder: ['flash','html5'],\n\n html5: {},\n flash: {},\n\n // defaultVolume: 0.85,\n defaultVolume: 0, // The freakin seaguls are driving me crazy!\n\n // default inactivity timeout\n inactivityTimeout: 2000,\n\n // default playback rates\n playbackRates: [],\n // Add playback rate selection by adding rates\n // 'playbackRates': [0.5, 1, 1.5, 2],\n\n // Included control sets\n children: {\n mediaLoader: {},\n posterImage: {},\n textTrackDisplay: {},\n loadingSpinner: {},\n bigPlayButton: {},\n controlBar: {},\n errorDisplay: {},\n textTrackSettings: {}\n },\n\n language: _document2['default'].getElementsByTagName('html')[0].getAttribute('lang') || navigator.languages && navigator.languages[0] || navigator.userLanguage || navigator.language || 'en',\n\n // locales and their language translations\n languages: {},\n\n // Default message to show when a video cannot be played.\n notSupportedMessage: 'No compatible source was found for this video.'\n};\nmodule.exports = exports['default'];\n\n},{\"global/document\":1,\"global/window\":2}],87:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file loading-spinner.js\n */\n\nvar _Component2 = _dereq_('./component');\n\nvar _Component3 = _interopRequireWildcard(_Component2);\n\n/* Loading Spinner\n================================================================================ */\n/**\n * Loading spinner for waiting events\n *\n * @extends Component\n * @class LoadingSpinner\n */\n\nvar LoadingSpinner = (function (_Component) {\n function LoadingSpinner() {\n _classCallCheck(this, LoadingSpinner);\n\n if (_Component != null) {\n _Component.apply(this, arguments);\n }\n }\n\n _inherits(LoadingSpinner, _Component);\n\n /**\n * Create the component's DOM element\n *\n * @method createEl\n */\n\n LoadingSpinner.prototype.createEl = function createEl() {\n return _Component.prototype.createEl.call(this, 'div', {\n className: 'vjs-loading-spinner'\n });\n };\n\n return LoadingSpinner;\n})(_Component3['default']);\n\n_Component3['default'].registerComponent('LoadingSpinner', LoadingSpinner);\nexports['default'] = LoadingSpinner;\nmodule.exports = exports['default'];\n\n},{\"./component\":52}],88:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nexports.__esModule = true;\n/**\n * @file media-error.js\n */\n\nvar _assign = _dereq_('object.assign');\n\nvar _assign2 = _interopRequireWildcard(_assign);\n\n/*\n * Custom MediaError to mimic the HTML5 MediaError\n *\n * @param {Number} code The media error code\n */\nvar MediaError = (function (_MediaError) {\n function MediaError(_x) {\n return _MediaError.apply(this, arguments);\n }\n\n MediaError.toString = function () {\n return _MediaError.toString();\n };\n\n return MediaError;\n})(function (code) {\n if (typeof code === 'number') {\n this.code = code;\n } else if (typeof code === 'string') {\n // default code is zero, so this is a custom error\n this.message = code;\n } else if (typeof code === 'object') {\n // object\n _assign2['default'](this, code);\n }\n\n if (!this.message) {\n this.message = MediaError.defaultMessages[this.code] || '';\n }\n});\n\n/*\n * The error code that refers two one of the defined\n * MediaError types\n *\n * @type {Number}\n */\nMediaError.prototype.code = 0;\n\n/*\n * An optional message to be shown with the error.\n * Message is not part of the HTML5 video spec\n * but allows for more informative custom errors.\n *\n * @type {String}\n */\nMediaError.prototype.message = '';\n\n/*\n * An optional status code that can be set by plugins\n * to allow even more detail about the error.\n * For example the HLS plugin might provide the specific\n * HTTP status code that was returned when the error\n * occurred, then allowing a custom error overlay\n * to display more information.\n *\n * @type {Array}\n */\nMediaError.prototype.status = null;\n\nMediaError.errorTypes = ['MEDIA_ERR_CUSTOM', // = 0\n'MEDIA_ERR_ABORTED', // = 1\n'MEDIA_ERR_NETWORK', // = 2\n'MEDIA_ERR_DECODE', // = 3\n'MEDIA_ERR_SRC_NOT_SUPPORTED', // = 4\n'MEDIA_ERR_ENCRYPTED' // = 5\n];\n\nMediaError.defaultMessages = {\n 1: 'You aborted the video playback',\n 2: 'A network error caused the video download to fail part-way.',\n 3: 'The video playback was aborted due to a corruption problem or because the video used features your browser did not support.',\n 4: 'The video could not be loaded, either because the server or network failed or because the format is not supported.',\n 5: 'The video is encrypted and we do not have the keys to decrypt it.'\n};\n\n// Add types as properties on MediaError\n// e.g. MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED = 4;\nfor (var errNum = 0; errNum < MediaError.errorTypes.length; errNum++) {\n MediaError[MediaError.errorTypes[errNum]] = errNum;\n // values should be accessible on both the class and instance\n MediaError.prototype[MediaError.errorTypes[errNum]] = errNum;\n}\n\nexports['default'] = MediaError;\nmodule.exports = exports['default'];\n\n},{\"object.assign\":44}],89:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file menu-button.js\n */\n\nvar _Button2 = _dereq_('../button.js');\n\nvar _Button3 = _interopRequireWildcard(_Button2);\n\nvar _Component = _dereq_('../component.js');\n\nvar _Component2 = _interopRequireWildcard(_Component);\n\nvar _Menu = _dereq_('./menu.js');\n\nvar _Menu2 = _interopRequireWildcard(_Menu);\n\nvar _import = _dereq_('../utils/dom.js');\n\nvar Dom = _interopRequireWildcard(_import);\n\nvar _import2 = _dereq_('../utils/fn.js');\n\nvar Fn = _interopRequireWildcard(_import2);\n\nvar _toTitleCase = _dereq_('../utils/to-title-case.js');\n\nvar _toTitleCase2 = _interopRequireWildcard(_toTitleCase);\n\n/**\n * A button class with a popup menu\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Button\n * @class MenuButton\n */\n\nvar MenuButton = (function (_Button) {\n function MenuButton(player, options) {\n _classCallCheck(this, MenuButton);\n\n _Button.call(this, player, options);\n\n this.update();\n\n this.on('keydown', this.handleKeyPress);\n this.el_.setAttribute('aria-haspopup', true);\n this.el_.setAttribute('role', 'button');\n }\n\n _inherits(MenuButton, _Button);\n\n /**\n * Update menu\n *\n * @method update\n */\n\n MenuButton.prototype.update = function update() {\n var menu = this.createMenu();\n\n if (this.menu) {\n this.removeChild(this.menu);\n }\n\n this.menu = menu;\n this.addChild(menu);\n\n /**\n * Track the state of the menu button\n *\n * @type {Boolean}\n * @private\n */\n this.buttonPressed_ = false;\n\n if (this.items && this.items.length === 0) {\n this.hide();\n } else if (this.items && this.items.length > 1) {\n this.show();\n }\n };\n\n /**\n * Create menu\n *\n * @return {Menu} The constructed menu\n * @method createMenu\n */\n\n MenuButton.prototype.createMenu = function createMenu() {\n var menu = new _Menu2['default'](this.player_);\n\n // Add a title list item to the top\n if (this.options_.title) {\n menu.contentEl().appendChild(Dom.createEl('li', {\n className: 'vjs-menu-title',\n innerHTML: _toTitleCase2['default'](this.options_.title),\n tabIndex: -1\n }));\n }\n\n this.items = this.createItems();\n\n if (this.items) {\n // Add menu items to the menu\n for (var i = 0; i < this.items.length; i++) {\n menu.addItem(this.items[i]);\n }\n }\n\n return menu;\n };\n\n /**\n * Create the list of menu items. Specific to each subclass.\n *\n * @method createItems\n */\n\n MenuButton.prototype.createItems = function createItems() {};\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n\n MenuButton.prototype.createEl = function createEl() {\n return _Button.prototype.createEl.call(this, 'div', {\n className: this.buildCSSClass()\n });\n };\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n\n MenuButton.prototype.buildCSSClass = function buildCSSClass() {\n return 'vjs-menu-button ' + _Button.prototype.buildCSSClass.call(this);\n };\n\n /**\n * Focus - Add keyboard functionality to element\n * This function is not needed anymore. Instead, the \n * keyboard functionality is handled by\n * treating the button as triggering a submenu. \n * When the button is pressed, the submenu\n * appears. Pressing the button again makes \n * the submenu disappear.\n *\n * @method handleFocus\n */\n\n MenuButton.prototype.handleFocus = function handleFocus() {};\n\n /**\n * Can't turn off list display that we turned\n * on with focus, because list would go away.\n *\n * @method handleBlur\n */\n\n MenuButton.prototype.handleBlur = function handleBlur() {};\n\n /**\n * When you click the button it adds focus, which \n * will show the menu indefinitely.\n * So we'll remove focus when the mouse leaves the button.\n * Focus is needed for tab navigation.\n * Allow sub components to stack CSS class names\n *\n * @method handleClick\n */\n\n MenuButton.prototype.handleClick = function handleClick() {\n this.one('mouseout', Fn.bind(this, function () {\n this.menu.unlockShowing();\n this.el_.blur();\n }));\n if (this.buttonPressed_) {\n this.unpressButton();\n } else {\n this.pressButton();\n }\n };\n\n /**\n * Handle key press on menu\n *\n * @param {Object} Key press event\n * @method handleKeyPress\n */\n\n MenuButton.prototype.handleKeyPress = function handleKeyPress(event) {\n\n // Check for space bar (32) or enter (13) keys\n if (event.which === 32 || event.which === 13) {\n if (this.buttonPressed_) {\n this.unpressButton();\n } else {\n this.pressButton();\n }\n event.preventDefault();\n // Check for escape (27) key\n } else if (event.which === 27) {\n if (this.buttonPressed_) {\n this.unpressButton();\n }\n event.preventDefault();\n }\n };\n\n /**\n * Makes changes based on button pressed\n *\n * @method pressButton\n */\n\n MenuButton.prototype.pressButton = function pressButton() {\n this.buttonPressed_ = true;\n this.menu.lockShowing();\n this.el_.setAttribute('aria-pressed', true);\n if (this.items && this.items.length > 0) {\n this.items[0].el().focus(); // set the focus to the title of the submenu\n }\n };\n\n /**\n * Makes changes based on button unpressed\n *\n * @method unpressButton\n */\n\n MenuButton.prototype.unpressButton = function unpressButton() {\n this.buttonPressed_ = false;\n this.menu.unlockShowing();\n this.el_.setAttribute('aria-pressed', false);\n };\n\n return MenuButton;\n})(_Button3['default']);\n\n_Component2['default'].registerComponent('MenuButton', MenuButton);\nexports['default'] = MenuButton;\nmodule.exports = exports['default'];\n\n},{\"../button.js\":51,\"../component.js\":52,\"../utils/dom.js\":110,\"../utils/fn.js\":112,\"../utils/to-title-case.js\":119,\"./menu.js\":91}],90:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file menu-item.js\n */\n\nvar _Button2 = _dereq_('../button.js');\n\nvar _Button3 = _interopRequireWildcard(_Button2);\n\nvar _Component = _dereq_('../component.js');\n\nvar _Component2 = _interopRequireWildcard(_Component);\n\nvar _assign = _dereq_('object.assign');\n\nvar _assign2 = _interopRequireWildcard(_assign);\n\n/**\n * The component for a menu item. `
  • `\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Button\n * @class MenuItem\n */\n\nvar MenuItem = (function (_Button) {\n function MenuItem(player, options) {\n _classCallCheck(this, MenuItem);\n\n _Button.call(this, player, options);\n this.selected(options.selected);\n }\n\n _inherits(MenuItem, _Button);\n\n /**\n * Create the component's DOM element\n *\n * @param {String=} type Desc\n * @param {Object=} props Desc \n * @return {Element}\n * @method createEl\n */\n\n MenuItem.prototype.createEl = function createEl(type, props) {\n return _Button.prototype.createEl.call(this, 'li', _assign2['default']({\n className: 'vjs-menu-item',\n innerHTML: this.localize(this.options_.label)\n }, props));\n };\n\n /**\n * Handle a click on the menu item, and set it to selected\n *\n * @method handleClick\n */\n\n MenuItem.prototype.handleClick = function handleClick() {\n this.selected(true);\n };\n\n /**\n * Set this menu item as selected or not\n *\n * @param {Boolean} selected\n * @method selected\n */\n\n MenuItem.prototype.selected = (function (_selected) {\n function selected(_x) {\n return _selected.apply(this, arguments);\n }\n\n selected.toString = function () {\n return _selected.toString();\n };\n\n return selected;\n })(function (selected) {\n if (selected) {\n this.addClass('vjs-selected');\n this.el_.setAttribute('aria-selected', true);\n } else {\n this.removeClass('vjs-selected');\n this.el_.setAttribute('aria-selected', false);\n }\n });\n\n return MenuItem;\n})(_Button3['default']);\n\n_Component2['default'].registerComponent('MenuItem', MenuItem);\nexports['default'] = MenuItem;\nmodule.exports = exports['default'];\n\n},{\"../button.js\":51,\"../component.js\":52,\"object.assign\":44}],91:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file menu.js\n */\n\nvar _Component2 = _dereq_('../component.js');\n\nvar _Component3 = _interopRequireWildcard(_Component2);\n\nvar _import = _dereq_('../utils/dom.js');\n\nvar Dom = _interopRequireWildcard(_import);\n\nvar _import2 = _dereq_('../utils/fn.js');\n\nvar Fn = _interopRequireWildcard(_import2);\n\nvar _import3 = _dereq_('../utils/events.js');\n\nvar Events = _interopRequireWildcard(_import3);\n\n/**\n * The Menu component is used to build pop up menus, including subtitle and\n * captions selection menus.\n *\n * @extends Component\n * @class Menu\n */\n\nvar Menu = (function (_Component) {\n function Menu() {\n _classCallCheck(this, Menu);\n\n if (_Component != null) {\n _Component.apply(this, arguments);\n }\n }\n\n _inherits(Menu, _Component);\n\n /**\n * Add a menu item to the menu\n *\n * @param {Object|String} component Component or component type to add\n * @method addItem\n */\n\n Menu.prototype.addItem = function addItem(component) {\n this.addChild(component);\n component.on('click', Fn.bind(this, function () {\n this.unlockShowing();\n }));\n };\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n\n Menu.prototype.createEl = function createEl() {\n var contentElType = this.options_.contentElType || 'ul';\n this.contentEl_ = Dom.createEl(contentElType, {\n className: 'vjs-menu-content'\n });\n var el = _Component.prototype.createEl.call(this, 'div', {\n append: this.contentEl_,\n className: 'vjs-menu'\n });\n el.appendChild(this.contentEl_);\n\n // Prevent clicks from bubbling up. Needed for Menu Buttons,\n // where a click on the parent is significant\n Events.on(el, 'click', function (event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n });\n\n return el;\n };\n\n return Menu;\n})(_Component3['default']);\n\n_Component3['default'].registerComponent('Menu', Menu);\nexports['default'] = Menu;\nmodule.exports = exports['default'];\n\n},{\"../component.js\":52,\"../utils/dom.js\":110,\"../utils/events.js\":111,\"../utils/fn.js\":112}],92:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file player.js\n */\n// Subclasses Component\n\nvar _Component2 = _dereq_('./component.js');\n\nvar _Component3 = _interopRequireWildcard(_Component2);\n\nvar _document = _dereq_('global/document');\n\nvar _document2 = _interopRequireWildcard(_document);\n\nvar _window = _dereq_('global/window');\n\nvar _window2 = _interopRequireWildcard(_window);\n\nvar _import = _dereq_('./utils/events.js');\n\nvar Events = _interopRequireWildcard(_import);\n\nvar _import2 = _dereq_('./utils/dom.js');\n\nvar Dom = _interopRequireWildcard(_import2);\n\nvar _import3 = _dereq_('./utils/fn.js');\n\nvar Fn = _interopRequireWildcard(_import3);\n\nvar _import4 = _dereq_('./utils/guid.js');\n\nvar Guid = _interopRequireWildcard(_import4);\n\nvar _import5 = _dereq_('./utils/browser.js');\n\nvar browser = _interopRequireWildcard(_import5);\n\nvar _log = _dereq_('./utils/log.js');\n\nvar _log2 = _interopRequireWildcard(_log);\n\nvar _toTitleCase = _dereq_('./utils/to-title-case.js');\n\nvar _toTitleCase2 = _interopRequireWildcard(_toTitleCase);\n\nvar _createTimeRange = _dereq_('./utils/time-ranges.js');\n\nvar _bufferedPercent2 = _dereq_('./utils/buffer.js');\n\nvar _FullscreenApi = _dereq_('./fullscreen-api.js');\n\nvar _FullscreenApi2 = _interopRequireWildcard(_FullscreenApi);\n\nvar _MediaError = _dereq_('./media-error.js');\n\nvar _MediaError2 = _interopRequireWildcard(_MediaError);\n\nvar _globalOptions = _dereq_('./global-options.js');\n\nvar _globalOptions2 = _interopRequireWildcard(_globalOptions);\n\nvar _safeParseTuple2 = _dereq_('safe-json-parse/tuple');\n\nvar _safeParseTuple3 = _interopRequireWildcard(_safeParseTuple2);\n\nvar _assign = _dereq_('object.assign');\n\nvar _assign2 = _interopRequireWildcard(_assign);\n\nvar _mergeOptions = _dereq_('./utils/merge-options.js');\n\nvar _mergeOptions2 = _interopRequireWildcard(_mergeOptions);\n\n// Include required child components (importing also registers them)\n\nvar _MediaLoader = _dereq_('./tech/loader.js');\n\nvar _MediaLoader2 = _interopRequireWildcard(_MediaLoader);\n\nvar _PosterImage = _dereq_('./poster-image.js');\n\nvar _PosterImage2 = _interopRequireWildcard(_PosterImage);\n\nvar _TextTrackDisplay = _dereq_('./tracks/text-track-display.js');\n\nvar _TextTrackDisplay2 = _interopRequireWildcard(_TextTrackDisplay);\n\nvar _LoadingSpinner = _dereq_('./loading-spinner.js');\n\nvar _LoadingSpinner2 = _interopRequireWildcard(_LoadingSpinner);\n\nvar _BigPlayButton = _dereq_('./big-play-button.js');\n\nvar _BigPlayButton2 = _interopRequireWildcard(_BigPlayButton);\n\nvar _ControlBar = _dereq_('./control-bar/control-bar.js');\n\nvar _ControlBar2 = _interopRequireWildcard(_ControlBar);\n\nvar _ErrorDisplay = _dereq_('./error-display.js');\n\nvar _ErrorDisplay2 = _interopRequireWildcard(_ErrorDisplay);\n\nvar _TextTrackSettings = _dereq_('./tracks/text-track-settings.js');\n\nvar _TextTrackSettings2 = _interopRequireWildcard(_TextTrackSettings);\n\n// Require html5 tech, at least for disposing the original video tag\n\nvar _Html5 = _dereq_('./tech/html5.js');\n\nvar _Html52 = _interopRequireWildcard(_Html5);\n\n/**\n * An instance of the `Player` class is created when any of the Video.js setup methods are used to initialize a video.\n * ```js\n * var myPlayer = videojs('example_video_1');\n * ```\n * In the following example, the `data-setup` attribute tells the Video.js library to create a player instance when the library is ready.\n * ```html\n * \n * ```\n * After an instance has been created it can be accessed globally using `Video('example_video_1')`.\n *\n * @param {Element} tag The original video tag used for configuring options\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends Component\n * @class Player\n */\n\nvar Player = (function (_Component) {\n\n /**\n * player's constructor function\n *\n * @constructs\n * @method init\n * @param {Element} tag The original video tag used for configuring options\n * @param {Object=} options Player options\n * @param {Function=} ready Ready callback function\n */\n\n function Player(tag, options, ready) {\n var _this = this;\n\n _classCallCheck(this, Player);\n\n // Make sure tag ID exists\n tag.id = tag.id || 'vjs_video_' + Guid.newGUID();\n\n // Set Options\n // The options argument overrides options set in the video tag\n // which overrides globally set options.\n // This latter part coincides with the load order\n // (tag must exist before Player)\n options = _assign2['default'](Player.getTagSettings(tag), options);\n\n // Delay the initialization of children because we need to set up\n // player properties first, and can't use `this` before `super()`\n options.initChildren = false;\n\n // Same with creating the element\n options.createEl = false;\n\n // we don't want the player to report touch activity on itself\n // see enableTouchActivity in Component\n options.reportTouchActivity = false;\n\n // Run base component initializing with new options\n _Component.call(this, null, options, ready);\n\n // if the global option object was accidentally blown away by\n // someone, bail early with an informative error\n if (!this.options_ || !this.options_.techOrder || !this.options_.techOrder.length) {\n throw new Error('No techOrder specified. Did you overwrite ' + 'videojs.options instead of just changing the ' + 'properties you want to override?');\n }\n\n this.tag = tag; // Store the original tag used to set options\n\n // Store the tag attributes used to restore html5 element\n this.tagAttributes = tag && Dom.getElAttributes(tag);\n\n // Update current language\n this.language(options.language || _globalOptions2['default'].language);\n\n // Update Supported Languages\n if (options.languages) {\n (function () {\n // Normalise player option languages to lowercase\n var languagesToLower = {};\n\n Object.getOwnPropertyNames(options.languages).forEach(function (name) {\n languagesToLower[name.toLowerCase()] = options.languages[name];\n });\n _this.languages_ = languagesToLower;\n })();\n } else {\n this.languages_ = _globalOptions2['default'].languages;\n }\n\n // Cache for video property values.\n this.cache_ = {};\n\n // Set poster\n this.poster_ = options.poster || '';\n\n // Set controls\n this.controls_ = !!options.controls;\n // Original tag settings stored in options\n // now remove immediately so native controls don't flash.\n // May be turned back on by HTML5 tech if nativeControlsForTouch is true\n tag.controls = false;\n\n /*\n * Store the internal state of scrubbing\n *\n * @private\n * @return {Boolean} True if the user is scrubbing\n */\n this.scrubbing_ = false;\n\n this.el_ = this.createEl();\n\n // We also want to pass the original player options to each component and plugin\n // as well so they don't need to reach back into the player for options later.\n // We also need to do another copy of this.options_ so we don't end up with\n // an infinite loop.\n var playerOptionsCopy = _mergeOptions2['default']({}, this.options_);\n\n // Load plugins\n if (options.plugins) {\n (function () {\n var plugins = options.plugins;\n\n Object.getOwnPropertyNames(plugins).forEach(function (name) {\n plugins[name].playerOptions = playerOptionsCopy;\n if (typeof this[name] === 'function') {\n this[name](plugins[name]);\n } else {\n _log2['default'].error('Unable to find plugin:', name);\n }\n }, _this);\n })();\n }\n\n this.options_.playerOptions = playerOptionsCopy;\n\n this.initChildren();\n\n // Set isAudio based on whether or not an audio tag was used\n this.isAudio(tag.nodeName.toLowerCase() === 'audio');\n\n // Update controls className. Can't do this when the controls are initially\n // set because the element doesn't exist yet.\n if (this.controls()) {\n this.addClass('vjs-controls-enabled');\n } else {\n this.addClass('vjs-controls-disabled');\n }\n\n if (this.isAudio()) {\n this.addClass('vjs-audio');\n }\n\n if (this.flexNotSupported_()) {\n this.addClass('vjs-no-flex');\n }\n\n // TODO: Make this smarter. Toggle user state between touching/mousing\n // using events, since devices can have both touch and mouse events.\n // if (browser.TOUCH_ENABLED) {\n // this.addClass('vjs-touch-enabled');\n // }\n\n // Make player easily findable by ID\n Player.players[this.id_] = this;\n\n // When the player is first initialized, trigger activity so components\n // like the control bar show themselves if needed\n this.userActive_ = true;\n this.reportUserActivity();\n this.listenForUserActivity();\n\n this.on('fullscreenchange', this.handleFullscreenChange);\n this.on('stageclick', this.handleStageClick);\n }\n\n _inherits(Player, _Component);\n\n /**\n * Destroys the video player and does any necessary cleanup\n * ```js\n * myPlayer.dispose();\n * ```\n * This is especially helpful if you are dynamically adding and removing videos\n * to/from the DOM.\n *\n * @method dispose\n */\n\n Player.prototype.dispose = function dispose() {\n this.trigger('dispose');\n // prevent dispose from being called twice\n this.off('dispose');\n\n // Kill reference to this player\n Player.players[this.id_] = null;\n if (this.tag && this.tag.player) {\n this.tag.player = null;\n }\n if (this.el_ && this.el_.player) {\n this.el_.player = null;\n }\n\n if (this.tech) {\n this.tech.dispose();\n }\n\n _Component.prototype.dispose.call(this);\n };\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n\n Player.prototype.createEl = function createEl() {\n var el = this.el_ = _Component.prototype.createEl.call(this, 'div');\n var tag = this.tag;\n\n // Remove width/height attrs from tag so CSS can make it 100% width/height\n tag.removeAttribute('width');\n tag.removeAttribute('height');\n\n // Copy over all the attributes from the tag, including ID and class\n // ID will now reference player box, not the video tag\n var attrs = Dom.getElAttributes(tag);\n\n Object.getOwnPropertyNames(attrs).forEach(function (attr) {\n // workaround so we don't totally break IE7\n // http://stackoverflow.com/questions/3653444/css-styles-not-applied-on-dynamic-elements-in-internet-explorer-7\n if (attr === 'class') {\n el.className = attrs[attr];\n } else {\n el.setAttribute(attr, attrs[attr]);\n }\n });\n\n // Update tag id/class for use as HTML5 playback tech\n // Might think we should do this after embedding in container so .vjs-tech class\n // doesn't flash 100% width/height, but class only applies with .video-js parent\n tag.id += '_html5_api';\n tag.className = 'vjs-tech';\n\n // Make player findable on elements\n tag.player = el.player = this;\n // Default state of video is paused\n this.addClass('vjs-paused');\n\n // Add a style element in the player that we'll use to set the width/height\n // of the player in a way that's still overrideable by CSS, just like the\n // video element\n this.styleEl_ = _document2['default'].createElement('style');\n el.appendChild(this.styleEl_);\n\n // Pass in the width/height/aspectRatio options which will update the style el\n this.width(this.options_.width);\n this.height(this.options_.height);\n this.fluid(this.options_.fluid);\n this.aspectRatio(this.options_.aspectRatio);\n\n // insertElFirst seems to cause the networkState to flicker from 3 to 2, so\n // keep track of the original for later so we can know if the source originally failed\n tag.initNetworkState_ = tag.networkState;\n\n // Wrap video tag in div (el/box) container\n if (tag.parentNode) {\n tag.parentNode.insertBefore(el, tag);\n }\n Dom.insertElFirst(tag, el); // Breaks iPhone, fixed in HTML5 setup.\n\n this.el_ = el;\n\n return el;\n };\n\n /**\n * Get/set player width\n *\n * @param {Number=} value Value for width\n * @return {Number} Width when getting\n * @method width\n */\n\n Player.prototype.width = function width(value) {\n return this.dimension('width', value);\n };\n\n /**\n * Get/set player height\n *\n * @param {Number=} value Value for height\n * @return {Number} Height when getting\n * @method height\n */\n\n Player.prototype.height = function height(value) {\n return this.dimension('height', value);\n };\n\n /**\n * Get/set dimension for player\n *\n * @param {String} dimension Either width or height\n * @param {Number=} value Value for dimension\n * @return {Component}\n * @method dimension\n */\n\n Player.prototype.dimension = (function (_dimension) {\n function dimension(_x, _x2) {\n return _dimension.apply(this, arguments);\n }\n\n dimension.toString = function () {\n return _dimension.toString();\n };\n\n return dimension;\n })(function (dimension, value) {\n var privDimension = dimension + '_';\n\n if (value === undefined) {\n return this[privDimension] || 0;\n }\n\n if (value === '') {\n // If an empty string is given, reset the dimension to be automatic\n this[privDimension] = undefined;\n } else {\n var parsedVal = parseFloat(value);\n\n if (isNaN(parsedVal)) {\n _log2['default'].error('Improper value \"' + value + '\" supplied for for ' + dimension);\n return this;\n }\n\n this[privDimension] = parsedVal;\n }\n\n this.updateStyleEl_();\n return this;\n });\n\n /**\n * Add/remove the vjs-fluid class\n *\n * @param {Boolean} bool Value of true adds the class, value of false removes the class\n * @method fluid\n */\n\n Player.prototype.fluid = function fluid(bool) {\n if (bool === undefined) {\n return !!this.fluid_;\n }\n\n this.fluid_ = !!bool;\n\n if (bool) {\n this.addClass('vjs-fluid');\n } else {\n this.removeClass('vjs-fluid');\n }\n };\n\n /**\n * Get/Set the aspect ratio\n *\n * @param {String=} ratio Aspect ratio for player\n * @return aspectRatio\n * @method aspectRatio\n */\n\n Player.prototype.aspectRatio = function aspectRatio(ratio) {\n if (ratio === undefined) {\n return this.aspectRatio_;\n }\n\n // Check for width:height format\n if (!/^\\d+\\:\\d+$/.test(ratio)) {\n throw new Error('Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.');\n }\n this.aspectRatio_ = ratio;\n\n // We're assuming if you set an aspect ratio you want fluid mode,\n // because in fixed mode you could calculate width and height yourself.\n this.fluid(true);\n\n this.updateStyleEl_();\n };\n\n /**\n * Update styles of the player element (height, width and aspect ratio)\n *\n * @method updateStyleEl_\n */\n\n Player.prototype.updateStyleEl_ = function updateStyleEl_() {\n var width = undefined;\n var height = undefined;\n var aspectRatio = undefined;\n\n // The aspect ratio is either used directly or to calculate width and height.\n if (this.aspectRatio_ !== undefined && this.aspectRatio_ !== 'auto') {\n // Use any aspectRatio that's been specifically set\n aspectRatio = this.aspectRatio_;\n } else if (this.videoWidth()) {\n // Otherwise try to get the aspect ratio from the video metadata\n aspectRatio = this.videoWidth() + ':' + this.videoHeight();\n } else {\n // Or use a default. The video element's is 2:1, but 16:9 is more common.\n aspectRatio = '16:9';\n }\n\n // Get the ratio as a decimal we can use to calculate dimensions\n var ratioParts = aspectRatio.split(':');\n var ratioMultiplier = ratioParts[1] / ratioParts[0];\n\n if (this.width_ !== undefined) {\n // Use any width that's been specifically set\n width = this.width_;\n } else if (this.height_ !== undefined) {\n // Or calulate the width from the aspect ratio if a height has been set\n width = this.height_ / ratioMultiplier;\n } else {\n // Or use the video's metadata, or use the video el's default of 300\n width = this.videoWidth() || 300;\n }\n\n if (this.height_ !== undefined) {\n // Use any height that's been specifically set\n height = this.height_;\n } else {\n // Otherwise calculate the height from the ratio and the width\n height = width * ratioMultiplier;\n }\n\n var idClass = this.id() + '-dimensions';\n\n // Ensure the right class is still on the player for the style element\n this.addClass(idClass);\n\n // Create the width/height CSS\n var css = '.' + idClass + ' { width: ' + width + 'px; height: ' + height + 'px; }';\n // Add the aspect ratio CSS for when using a fluid layout\n css += '.' + idClass + '.vjs-fluid { padding-top: ' + ratioMultiplier * 100 + '%; }';\n\n // Update the style el\n if (this.styleEl_.styleSheet) {\n this.styleEl_.styleSheet.cssText = css;\n } else {\n this.styleEl_.innerHTML = css;\n }\n };\n\n /**\n * Load the Media Playback Technology (tech)\n * Load/Create an instance of playback technology including element and API methods\n * And append playback element in player div.\n *\n * @param {String} techName Name of the playback technology\n * @param {String} source Video source\n * @method loadTech\n */\n\n Player.prototype.loadTech = function loadTech(techName, source) {\n\n // Pause and remove current playback technology\n if (this.tech) {\n this.unloadTech();\n }\n\n // get rid of the HTML5 video tag as soon as we are using another tech\n if (techName !== 'Html5' && this.tag) {\n _Component3['default'].getComponent('Html5').disposeMediaElement(this.tag);\n this.tag.player = null;\n this.tag = null;\n }\n\n this.techName = techName;\n\n // Turn off API access because we're loading a new tech that might load asynchronously\n this.isReady_ = false;\n\n var techReady = Fn.bind(this, function () {\n this.triggerReady();\n });\n\n // Grab tech-specific options from player options and add source and parent element to use.\n var techOptions = _assign2['default']({\n source: source,\n playerId: this.id(),\n techId: '' + this.id() + '_' + techName + '_api',\n textTracks: this.textTracks_,\n autoplay: this.options_.autoplay,\n preload: this.options_.preload,\n loop: this.options_.loop,\n muted: this.options_.muted\n }, this.options_[techName.toLowerCase()]);\n\n if (this.tag) {\n techOptions.tag = this.tag;\n }\n\n if (source) {\n this.currentType_ = source.type;\n if (source.src === this.cache_.src && this.cache_.currentTime > 0) {\n techOptions.startTime = this.cache_.currentTime;\n }\n\n this.cache_.src = source.src;\n }\n\n // Initialize tech instance\n var techComponent = _Component3['default'].getComponent(techName);\n this.tech = new techComponent(techOptions);\n\n this.on(this.tech, 'ready', this.handleTechReady);\n this.on(this.tech, 'usenativecontrols', this.handleTechUseNativeControls);\n\n // Listen to every HTML5 events and trigger them back on the player for the plugins\n this.on(this.tech, 'loadstart', this.handleTechLoadStart);\n this.on(this.tech, 'waiting', this.handleTechWaiting);\n this.on(this.tech, 'canplay', this.handleTechCanPlay);\n this.on(this.tech, 'canplaythrough', this.handleTechCanPlayThrough);\n this.on(this.tech, 'playing', this.handleTechPlaying);\n this.on(this.tech, 'ended', this.handleTechEnded);\n this.on(this.tech, 'seeking', this.handleTechSeeking);\n this.on(this.tech, 'seeked', this.handleTechSeeked);\n this.on(this.tech, 'play', this.handleTechPlay);\n this.on(this.tech, 'firstplay', this.handleTechFirstPlay);\n this.on(this.tech, 'pause', this.handleTechPause);\n this.on(this.tech, 'progress', this.handleTechProgress);\n this.on(this.tech, 'durationchange', this.handleTechDurationChange);\n this.on(this.tech, 'fullscreenchange', this.handleTechFullscreenChange);\n this.on(this.tech, 'error', this.handleTechError);\n this.on(this.tech, 'suspend', this.handleTechSuspend);\n this.on(this.tech, 'abort', this.handleTechAbort);\n this.on(this.tech, 'emptied', this.handleTechEmptied);\n this.on(this.tech, 'stalled', this.handleTechStalled);\n this.on(this.tech, 'loadedmetadata', this.handleTechLoadedMetaData);\n this.on(this.tech, 'loadeddata', this.handleTechLoadedData);\n this.on(this.tech, 'timeupdate', this.handleTechTimeUpdate);\n this.on(this.tech, 'ratechange', this.handleTechRateChange);\n this.on(this.tech, 'volumechange', this.handleTechVolumeChange);\n this.on(this.tech, 'texttrackchange', this.onTextTrackChange);\n this.on(this.tech, 'loadedmetadata', this.updateStyleEl_);\n\n if (this.controls() && !this.usingNativeControls()) {\n this.addTechControlsListeners();\n }\n\n // Add the tech element in the DOM if it was not already there\n // Make sure to not insert the original video element if using Html5\n if (this.tech.el().parentNode !== this.el() && (techName !== 'Html5' || !this.tag)) {\n Dom.insertElFirst(this.tech.el(), this.el());\n }\n\n // Get rid of the original video tag reference after the first tech is loaded\n if (this.tag) {\n this.tag.player = null;\n this.tag = null;\n }\n\n this.tech.ready(techReady);\n };\n\n /**\n * Unload playback technology\n *\n * @method unloadTech\n */\n\n Player.prototype.unloadTech = function unloadTech() {\n // Save the current text tracks so that we can reuse the same text tracks with the next tech\n this.textTracks_ = this.textTracks();\n\n this.isReady_ = false;\n\n this.tech.dispose();\n\n this.tech = false;\n };\n\n /**\n * Add playback technology listeners\n *\n * @method addTechControlsListeners\n */\n\n Player.prototype.addTechControlsListeners = function addTechControlsListeners() {\n // Some browsers (Chrome & IE) don't trigger a click on a flash swf, but do\n // trigger mousedown/up.\n // http://stackoverflow.com/questions/1444562/javascript-onclick-event-over-flash-object\n // Any touch events are set to block the mousedown event from happening\n this.on(this.tech, 'mousedown', this.handleTechClick);\n\n // If the controls were hidden we don't want that to change without a tap event\n // so we'll check if the controls were already showing before reporting user\n // activity\n this.on(this.tech, 'touchstart', this.handleTechTouchStart);\n this.on(this.tech, 'touchmove', this.handleTechTouchMove);\n this.on(this.tech, 'touchend', this.handleTechTouchEnd);\n\n // The tap listener needs to come after the touchend listener because the tap\n // listener cancels out any reportedUserActivity when setting userActive(false)\n this.on(this.tech, 'tap', this.handleTechTap);\n };\n\n /**\n * Remove the listeners used for click and tap controls. This is needed for\n * toggling to controls disabled, where a tap/touch should do nothing.\n *\n * @method removeTechControlsListeners\n */\n\n Player.prototype.removeTechControlsListeners = function removeTechControlsListeners() {\n // We don't want to just use `this.off()` because there might be other needed\n // listeners added by techs that extend this.\n this.off(this.tech, 'tap', this.handleTechTap);\n this.off(this.tech, 'touchstart', this.handleTechTouchStart);\n this.off(this.tech, 'touchmove', this.handleTechTouchMove);\n this.off(this.tech, 'touchend', this.handleTechTouchEnd);\n this.off(this.tech, 'mousedown', this.handleTechClick);\n };\n\n /**\n * Player waits for the tech to be ready\n *\n * @private\n * @method handleTechReady\n */\n\n Player.prototype.handleTechReady = function handleTechReady() {\n this.triggerReady();\n\n // Chrome and Safari both have issues with autoplay.\n // In Safari (5.1.1), when we move the video element into the container div, autoplay doesn't work.\n // In Chrome (15), if you have autoplay + a poster + no controls, the video gets hidden (but audio plays)\n // This fixes both issues. Need to wait for API, so it updates displays correctly\n if (this.tag && this.options_.autoplay && this.paused()) {\n delete this.tag.poster; // Chrome Fix. Fixed in Chrome v16.\n this.play();\n }\n };\n\n /**\n * Fired when the native controls are used\n *\n * @private\n * @method handleTechUseNativeControls\n */\n\n Player.prototype.handleTechUseNativeControls = function handleTechUseNativeControls() {\n this.usingNativeControls(true);\n };\n\n /**\n * Fired when the user agent begins looking for media data\n *\n * @event loadstart\n */\n\n Player.prototype.handleTechLoadStart = function handleTechLoadStart() {\n // TODO: Update to use `emptied` event instead. See #1277.\n\n this.removeClass('vjs-ended');\n\n // reset the error state\n this.error(null);\n\n // If it's already playing we want to trigger a firstplay event now.\n // The firstplay event relies on both the play and loadstart events\n // which can happen in any order for a new source\n if (!this.paused()) {\n this.trigger('loadstart');\n this.trigger('firstplay');\n } else {\n // reset the hasStarted state\n this.hasStarted(false);\n this.trigger('loadstart');\n }\n };\n\n /**\n * Add/remove the vjs-has-started class\n *\n * @param {Boolean} hasStarted The value of true adds the class the value of false remove the class\n * @return {Boolean} Boolean value if has started\n * @method hasStarted\n */\n\n Player.prototype.hasStarted = (function (_hasStarted) {\n function hasStarted(_x3) {\n return _hasStarted.apply(this, arguments);\n }\n\n hasStarted.toString = function () {\n return _hasStarted.toString();\n };\n\n return hasStarted;\n })(function (hasStarted) {\n if (hasStarted !== undefined) {\n // only update if this is a new value\n if (this.hasStarted_ !== hasStarted) {\n this.hasStarted_ = hasStarted;\n if (hasStarted) {\n this.addClass('vjs-has-started');\n // trigger the firstplay event if this newly has played\n this.trigger('firstplay');\n } else {\n this.removeClass('vjs-has-started');\n }\n }\n return this;\n }\n return !!this.hasStarted_;\n });\n\n /**\n * Fired whenever the media begins or resumes playback\n *\n * @event play\n */\n\n Player.prototype.handleTechPlay = function handleTechPlay() {\n this.removeClass('vjs-ended');\n this.removeClass('vjs-paused');\n this.addClass('vjs-playing');\n\n // hide the poster when the user hits play\n // https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-play\n this.hasStarted(true);\n\n this.trigger('play');\n };\n\n /**\n * Fired whenever the media begins waiting\n *\n * @event waiting\n */\n\n Player.prototype.handleTechWaiting = function handleTechWaiting() {\n this.addClass('vjs-waiting');\n this.trigger('waiting');\n };\n\n /**\n * A handler for events that signal that waiting has ended\n * which is not consistent between browsers. See #1351\n *\n * @event canplay\n */\n\n Player.prototype.handleTechCanPlay = function handleTechCanPlay() {\n this.removeClass('vjs-waiting');\n this.trigger('canplay');\n };\n\n /**\n * A handler for events that signal that waiting has ended\n * which is not consistent between browsers. See #1351\n *\n * @event canplaythrough\n */\n\n Player.prototype.handleTechCanPlayThrough = function handleTechCanPlayThrough() {\n this.removeClass('vjs-waiting');\n this.trigger('canplaythrough');\n };\n\n /**\n * A handler for events that signal that waiting has ended\n * which is not consistent between browsers. See #1351\n *\n * @event playing\n */\n\n Player.prototype.handleTechPlaying = function handleTechPlaying() {\n this.removeClass('vjs-waiting');\n this.trigger('playing');\n };\n\n /**\n * Fired whenever the player is jumping to a new time\n *\n * @event seeking\n */\n\n Player.prototype.handleTechSeeking = function handleTechSeeking() {\n this.addClass('vjs-seeking');\n this.trigger('seeking');\n };\n\n /**\n * Fired when the player has finished jumping to a new time\n *\n * @event seeked\n */\n\n Player.prototype.handleTechSeeked = function handleTechSeeked() {\n this.removeClass('vjs-seeking');\n this.trigger('seeked');\n };\n\n /**\n * Fired the first time a video is played\n * Not part of the HLS spec, and we're not sure if this is the best\n * implementation yet, so use sparingly. If you don't have a reason to\n * prevent playback, use `myPlayer.one('play');` instead.\n *\n * @event firstplay\n */\n\n Player.prototype.handleTechFirstPlay = function handleTechFirstPlay() {\n //If the first starttime attribute is specified\n //then we will start at the given offset in seconds\n if (this.options_.starttime) {\n this.currentTime(this.options_.starttime);\n }\n\n this.addClass('vjs-has-started');\n this.trigger('firstplay');\n };\n\n /**\n * Fired whenever the media has been paused\n *\n * @event pause\n */\n\n Player.prototype.handleTechPause = function handleTechPause() {\n this.removeClass('vjs-playing');\n this.addClass('vjs-paused');\n this.trigger('pause');\n };\n\n /**\n * Fired while the user agent is downloading media data\n *\n * @event progress\n */\n\n Player.prototype.handleTechProgress = function handleTechProgress() {\n this.trigger('progress');\n\n // Add custom event for when source is finished downloading.\n if (this.bufferedPercent() === 1) {\n this.trigger('loadedalldata');\n }\n };\n\n /**\n * Fired when the end of the media resource is reached (currentTime == duration)\n *\n * @event ended\n */\n\n Player.prototype.handleTechEnded = function handleTechEnded() {\n this.addClass('vjs-ended');\n if (this.options_.loop) {\n this.currentTime(0);\n this.play();\n } else if (!this.paused()) {\n this.pause();\n }\n\n this.trigger('ended');\n };\n\n /**\n * Fired when the duration of the media resource is first known or changed\n *\n * @event durationchange\n */\n\n Player.prototype.handleTechDurationChange = function handleTechDurationChange() {\n this.updateDuration();\n this.trigger('durationchange');\n };\n\n /**\n * Handle a click on the media element to play/pause\n *\n * @param {Object=} event Event object\n * @method handleTechClick\n */\n\n Player.prototype.handleTechClick = function handleTechClick(event) {\n // We're using mousedown to detect clicks thanks to Flash, but mousedown\n // will also be triggered with right-clicks, so we need to prevent that\n if (event.button !== 0) {\n return;\n } // When controls are disabled a click should not toggle playback because\n // the click is considered a control\n if (this.controls()) {\n if (this.paused()) {\n this.play();\n } else {\n this.pause();\n }\n }\n };\n\n /**\n * Handle a tap on the media element. It will toggle the user\n * activity state, which hides and shows the controls.\n *\n * @method handleTechTap\n */\n\n Player.prototype.handleTechTap = function handleTechTap() {\n this.userActive(!this.userActive());\n };\n\n /**\n * Handle touch to start\n *\n * @method handleTechTouchStart\n */\n\n Player.prototype.handleTechTouchStart = function handleTechTouchStart() {\n this.userWasActive = this.userActive();\n };\n\n /**\n * Handle touch to move\n *\n * @method handleTechTouchMove\n */\n\n Player.prototype.handleTechTouchMove = function handleTechTouchMove() {\n if (this.userWasActive) {\n this.reportUserActivity();\n }\n };\n\n /**\n * Handle touch to end\n *\n * @method handleTechTouchEnd\n */\n\n Player.prototype.handleTechTouchEnd = function handleTechTouchEnd(event) {\n // Stop the mouse events from also happening\n event.preventDefault();\n };\n\n /**\n * Update the duration of the player using the tech\n *\n * @private\n * @method updateDuration\n */\n\n Player.prototype.updateDuration = function updateDuration() {\n // Allows for caching value instead of asking player each time.\n // We need to get the techGet response and check for a value so we don't\n // accidentally cause the stack to blow up.\n var duration = this.techGet('duration');\n if (duration) {\n if (duration < 0) {\n duration = Infinity;\n }\n this.duration(duration);\n // Determine if the stream is live and propagate styles down to UI.\n if (duration === Infinity) {\n this.addClass('vjs-live');\n } else {\n this.removeClass('vjs-live');\n }\n }\n };\n\n /**\n * Fired when the player switches in or out of fullscreen mode\n *\n * @event fullscreenchange\n */\n\n Player.prototype.handleFullscreenChange = function handleFullscreenChange() {\n if (this.isFullscreen()) {\n this.addClass('vjs-fullscreen');\n } else {\n this.removeClass('vjs-fullscreen');\n }\n };\n\n /**\n * native click events on the SWF aren't triggered on IE11, Win8.1RT\n * use stageclick events triggered from inside the SWF instead\n *\n * @private\n * @method handleStageClick\n */\n\n Player.prototype.handleStageClick = function handleStageClick() {\n this.reportUserActivity();\n };\n\n /**\n * Handle Tech Fullscreen Change\n *\n * @method handleTechFullscreenChange\n */\n\n Player.prototype.handleTechFullscreenChange = function handleTechFullscreenChange() {\n this.trigger('fullscreenchange');\n };\n\n /**\n * Fires when an error occurred during the loading of an audio/video\n *\n * @event error\n */\n\n Player.prototype.handleTechError = function handleTechError() {\n this.error(this.tech.error().code);\n };\n\n /**\n * Fires when the browser is intentionally not getting media data\n *\n * @event suspend\n */\n\n Player.prototype.handleTechSuspend = function handleTechSuspend() {\n this.trigger('suspend');\n };\n\n /**\n * Fires when the loading of an audio/video is aborted\n *\n * @event abort\n */\n\n Player.prototype.handleTechAbort = function handleTechAbort() {\n this.trigger('abort');\n };\n\n /**\n * Fires when the current playlist is empty\n *\n * @event emptied\n */\n\n Player.prototype.handleTechEmptied = function handleTechEmptied() {\n this.trigger('emptied');\n };\n\n /**\n * Fires when the browser is trying to get media data, but data is not available\n *\n * @event stalled\n */\n\n Player.prototype.handleTechStalled = function handleTechStalled() {\n this.trigger('stalled');\n };\n\n /**\n * Fires when the browser has loaded meta data for the audio/video\n *\n * @event loadedmetadata\n */\n\n Player.prototype.handleTechLoadedMetaData = function handleTechLoadedMetaData() {\n this.trigger('loadedmetadata');\n };\n\n /**\n * Fires when the browser has loaded the current frame of the audio/video\n *\n * @event loaddata\n */\n\n Player.prototype.handleTechLoadedData = function handleTechLoadedData() {\n this.trigger('loadeddata');\n };\n\n /**\n * Fires when the current playback position has changed\n *\n * @event timeupdate\n */\n\n Player.prototype.handleTechTimeUpdate = function handleTechTimeUpdate() {\n this.trigger('timeupdate');\n };\n\n /**\n * Fires when the playing speed of the audio/video is changed\n *\n * @event ratechange\n */\n\n Player.prototype.handleTechRateChange = function handleTechRateChange() {\n this.trigger('ratechange');\n };\n\n /**\n * Fires when the volume has been changed\n *\n * @event volumechange\n */\n\n Player.prototype.handleTechVolumeChange = function handleTechVolumeChange() {\n this.trigger('volumechange');\n };\n\n /**\n * Fires when the text track has been changed\n *\n * @event texttrackchange\n */\n\n Player.prototype.onTextTrackChange = function onTextTrackChange() {\n this.trigger('texttrackchange');\n };\n\n /**\n * Get object for cached values.\n *\n * @return {Object}\n * @method getCache\n */\n\n Player.prototype.getCache = function getCache() {\n return this.cache_;\n };\n\n /**\n * Pass values to the playback tech\n *\n * @param {String=} method Method\n * @param {Object=} arg Argument\n * @method techCall\n */\n\n Player.prototype.techCall = function techCall(method, arg) {\n // If it's not ready yet, call method when it is\n if (this.tech && !this.tech.isReady_) {\n this.tech.ready(function () {\n this[method](arg);\n });\n\n // Otherwise call method now\n } else {\n try {\n this.tech[method](arg);\n } catch (e) {\n _log2['default'](e);\n throw e;\n }\n }\n };\n\n /**\n * Get calls can't wait for the tech, and sometimes don't need to.\n *\n * @param {String} method Tech method\n * @return {Method}\n * @method techGet\n */\n\n Player.prototype.techGet = function techGet(method) {\n if (this.tech && this.tech.isReady_) {\n\n // Flash likes to die and reload when you hide or reposition it.\n // In these cases the object methods go away and we get errors.\n // When that happens we'll catch the errors and inform tech that it's not ready any more.\n try {\n return this.tech[method]();\n } catch (e) {\n // When building additional tech libs, an expected method may not be defined yet\n if (this.tech[method] === undefined) {\n _log2['default']('Video.js: ' + method + ' method not defined for ' + this.techName + ' playback technology.', e);\n } else {\n // When a method isn't available on the object it throws a TypeError\n if (e.name === 'TypeError') {\n _log2['default']('Video.js: ' + method + ' unavailable on ' + this.techName + ' playback technology element.', e);\n this.tech.isReady_ = false;\n } else {\n _log2['default'](e);\n }\n }\n throw e;\n }\n }\n\n return;\n };\n\n /**\n * start media playback\n * ```js\n * myPlayer.play();\n * ```\n *\n * @return {Player} self\n * @method play\n */\n\n Player.prototype.play = function play() {\n this.techCall('play');\n return this;\n };\n\n /**\n * Pause the video playback\n * ```js\n * myPlayer.pause();\n * ```\n *\n * @return {Player} self\n * @method pause\n */\n\n Player.prototype.pause = function pause() {\n this.techCall('pause');\n return this;\n };\n\n /**\n * Check if the player is paused\n * ```js\n * var isPaused = myPlayer.paused();\n * var isPlaying = !myPlayer.paused();\n * ```\n *\n * @return {Boolean} false if the media is currently playing, or true otherwise\n * @method paused\n */\n\n Player.prototype.paused = function paused() {\n // The initial state of paused should be true (in Safari it's actually false)\n return this.techGet('paused') === false ? false : true;\n };\n\n /**\n * Returns whether or not the user is \"scrubbing\". Scrubbing is when the user\n * has clicked the progress bar handle and is dragging it along the progress bar.\n *\n * @param {Boolean} isScrubbing True/false the user is scrubbing\n * @return {Boolean} The scrubbing status when getting\n * @return {Object} The player when setting\n * @method scrubbing\n */\n\n Player.prototype.scrubbing = function scrubbing(isScrubbing) {\n if (isScrubbing !== undefined) {\n this.scrubbing_ = !!isScrubbing;\n\n if (isScrubbing) {\n this.addClass('vjs-scrubbing');\n } else {\n this.removeClass('vjs-scrubbing');\n }\n\n return this;\n }\n\n return this.scrubbing_;\n };\n\n /**\n * Get or set the current time (in seconds)\n * ```js\n * // get\n * var whereYouAt = myPlayer.currentTime();\n * // set\n * myPlayer.currentTime(120); // 2 minutes into the video\n * ```\n *\n * @param {Number|String=} seconds The time to seek to\n * @return {Number} The time in seconds, when not setting\n * @return {Player} self, when the current time is set\n * @method currentTime\n */\n\n Player.prototype.currentTime = function currentTime(seconds) {\n if (seconds !== undefined) {\n\n this.techCall('setCurrentTime', seconds);\n\n return this;\n }\n\n // cache last currentTime and return. default to 0 seconds\n //\n // Caching the currentTime is meant to prevent a massive amount of reads on the tech's\n // currentTime when scrubbing, but may not provide much performance benefit afterall.\n // Should be tested. Also something has to read the actual current time or the cache will\n // never get updated.\n return this.cache_.currentTime = this.techGet('currentTime') || 0;\n };\n\n /**\n * Get the length in time of the video in seconds\n * ```js\n * var lengthOfVideo = myPlayer.duration();\n * ```\n * **NOTE**: The video must have started loading before the duration can be\n * known, and in the case of Flash, may not be known until the video starts\n * playing.\n *\n * @param {Number} seconds Duration when setting\n * @return {Number} The duration of the video in seconds when getting\n * @method duration\n */\n\n Player.prototype.duration = function duration(seconds) {\n if (seconds !== undefined) {\n\n // cache the last set value for optimized scrubbing (esp. Flash)\n this.cache_.duration = parseFloat(seconds);\n\n return this;\n }\n\n if (this.cache_.duration === undefined) {\n this.updateDuration();\n }\n\n return this.cache_.duration || 0;\n };\n\n /**\n * Calculates how much time is left.\n * ```js\n * var timeLeft = myPlayer.remainingTime();\n * ```\n * Not a native video element function, but useful\n *\n * @return {Number} The time remaining in seconds\n * @method remainingTime\n */\n\n Player.prototype.remainingTime = function remainingTime() {\n return this.duration() - this.currentTime();\n };\n\n // http://dev.w3.org/html5/spec/video.html#dom-media-buffered\n // Buffered returns a timerange object.\n // Kind of like an array of portions of the video that have been downloaded.\n\n /**\n * Get a TimeRange object with the times of the video that have been downloaded\n * If you just want the percent of the video that's been downloaded,\n * use bufferedPercent.\n * ```js\n * // Number of different ranges of time have been buffered. Usually 1.\n * numberOfRanges = bufferedTimeRange.length,\n * // Time in seconds when the first range starts. Usually 0.\n * firstRangeStart = bufferedTimeRange.start(0),\n * // Time in seconds when the first range ends\n * firstRangeEnd = bufferedTimeRange.end(0),\n * // Length in seconds of the first time range\n * firstRangeLength = firstRangeEnd - firstRangeStart;\n * ```\n *\n * @return {Object} A mock TimeRange object (following HTML spec)\n * @method buffered\n */\n\n Player.prototype.buffered = (function (_buffered) {\n function buffered() {\n return _buffered.apply(this, arguments);\n }\n\n buffered.toString = function () {\n return _buffered.toString();\n };\n\n return buffered;\n })(function () {\n var buffered = this.techGet('buffered');\n\n if (!buffered || !buffered.length) {\n buffered = _createTimeRange.createTimeRange(0, 0);\n }\n\n return buffered;\n });\n\n /**\n * Get the percent (as a decimal) of the video that's been downloaded\n * ```js\n * var howMuchIsDownloaded = myPlayer.bufferedPercent();\n * ```\n * 0 means none, 1 means all.\n * (This method isn't in the HTML5 spec, but it's very convenient)\n *\n * @return {Number} A decimal between 0 and 1 representing the percent\n * @method bufferedPercent\n */\n\n Player.prototype.bufferedPercent = (function (_bufferedPercent) {\n function bufferedPercent() {\n return _bufferedPercent.apply(this, arguments);\n }\n\n bufferedPercent.toString = function () {\n return _bufferedPercent.toString();\n };\n\n return bufferedPercent;\n })(function () {\n return _bufferedPercent2.bufferedPercent(this.buffered(), this.duration());\n });\n\n /**\n * Get the ending time of the last buffered time range\n * This is used in the progress bar to encapsulate all time ranges.\n *\n * @return {Number} The end of the last buffered time range\n * @method bufferedEnd\n */\n\n Player.prototype.bufferedEnd = function bufferedEnd() {\n var buffered = this.buffered(),\n duration = this.duration(),\n end = buffered.end(buffered.length - 1);\n\n if (end > duration) {\n end = duration;\n }\n\n return end;\n };\n\n /**\n * Get or set the current volume of the media\n * ```js\n * // get\n * var howLoudIsIt = myPlayer.volume();\n * // set\n * myPlayer.volume(0.5); // Set volume to half\n * ```\n * 0 is off (muted), 1.0 is all the way up, 0.5 is half way.\n *\n * @param {Number} percentAsDecimal The new volume as a decimal percent\n * @return {Number} The current volume when getting\n * @return {Player} self when setting\n * @method volume\n */\n\n Player.prototype.volume = function volume(percentAsDecimal) {\n var vol = undefined;\n\n if (percentAsDecimal !== undefined) {\n vol = Math.max(0, Math.min(1, parseFloat(percentAsDecimal))); // Force value to between 0 and 1\n this.cache_.volume = vol;\n this.techCall('setVolume', vol);\n\n return this;\n }\n\n // Default to 1 when returning current volume.\n vol = parseFloat(this.techGet('volume'));\n return isNaN(vol) ? 1 : vol;\n };\n\n /**\n * Get the current muted state, or turn mute on or off\n * ```js\n * // get\n * var isVolumeMuted = myPlayer.muted();\n * // set\n * myPlayer.muted(true); // mute the volume\n * ```\n *\n * @param {Boolean=} muted True to mute, false to unmute\n * @return {Boolean} True if mute is on, false if not when getting\n * @return {Player} self when setting mute\n * @method muted\n */\n\n Player.prototype.muted = (function (_muted) {\n function muted(_x4) {\n return _muted.apply(this, arguments);\n }\n\n muted.toString = function () {\n return _muted.toString();\n };\n\n return muted;\n })(function (muted) {\n if (muted !== undefined) {\n this.techCall('setMuted', muted);\n return this;\n }\n return this.techGet('muted') || false; // Default to false\n });\n\n // Check if current tech can support native fullscreen\n // (e.g. with built in controls like iOS, so not our flash swf)\n /**\n * Check to see if fullscreen is supported\n *\n * @return {Boolean}\n * @method supportsFullScreen\n */\n\n Player.prototype.supportsFullScreen = function supportsFullScreen() {\n return this.techGet('supportsFullScreen') || false;\n };\n\n /**\n * Check if the player is in fullscreen mode\n * ```js\n * // get\n * var fullscreenOrNot = myPlayer.isFullscreen();\n * // set\n * myPlayer.isFullscreen(true); // tell the player it's in fullscreen\n * ```\n * NOTE: As of the latest HTML5 spec, isFullscreen is no longer an official\n * property and instead document.fullscreenElement is used. But isFullscreen is\n * still a valuable property for internal player workings.\n *\n * @param {Boolean=} isFS Update the player's fullscreen state\n * @return {Boolean} true if fullscreen false if not when getting\n * @return {Player} self when setting\n * @method isFullscreen\n */\n\n Player.prototype.isFullscreen = function isFullscreen(isFS) {\n if (isFS !== undefined) {\n this.isFullscreen_ = !!isFS;\n return this;\n }\n return !!this.isFullscreen_;\n };\n\n /**\n * Old naming for isFullscreen()\n *\n * @param {Boolean=} isFS Update the player's fullscreen state\n * @return {Boolean} true if fullscreen false if not when getting\n * @return {Player} self when setting\n * @deprecated\n * @method isFullScreen\n */\n\n Player.prototype.isFullScreen = function isFullScreen(isFS) {\n _log2['default'].warn('player.isFullScreen() has been deprecated, use player.isFullscreen() with a lowercase \"s\")');\n return this.isFullscreen(isFS);\n };\n\n /**\n * Increase the size of the video to full screen\n * ```js\n * myPlayer.requestFullscreen();\n * ```\n * In some browsers, full screen is not supported natively, so it enters\n * \"full window mode\", where the video fills the browser window.\n * In browsers and devices that support native full screen, sometimes the\n * browser's default controls will be shown, and not the Video.js custom skin.\n * This includes most mobile devices (iOS, Android) and older versions of\n * Safari.\n *\n * @return {Player} self\n * @method requestFullscreen\n */\n\n Player.prototype.requestFullscreen = function requestFullscreen() {\n var fsApi = _FullscreenApi2['default'];\n\n this.isFullscreen(true);\n\n if (fsApi.requestFullscreen) {\n // the browser supports going fullscreen at the element level so we can\n // take the controls fullscreen as well as the video\n\n // Trigger fullscreenchange event after change\n // We have to specifically add this each time, and remove\n // when canceling fullscreen. Otherwise if there's multiple\n // players on a page, they would all be reacting to the same fullscreen\n // events\n Events.on(_document2['default'], fsApi.fullscreenchange, Fn.bind(this, function documentFullscreenChange(e) {\n this.isFullscreen(_document2['default'][fsApi.fullscreenElement]);\n\n // If cancelling fullscreen, remove event listener.\n if (this.isFullscreen() === false) {\n Events.off(_document2['default'], fsApi.fullscreenchange, documentFullscreenChange);\n }\n\n this.trigger('fullscreenchange');\n }));\n\n this.el_[fsApi.requestFullscreen]();\n } else if (this.tech.supportsFullScreen()) {\n // we can't take the video.js controls fullscreen but we can go fullscreen\n // with native controls\n this.techCall('enterFullScreen');\n } else {\n // fullscreen isn't supported so we'll just stretch the video element to\n // fill the viewport\n this.enterFullWindow();\n this.trigger('fullscreenchange');\n }\n\n return this;\n };\n\n /**\n * Old naming for requestFullscreen\n *\n * @return {Boolean} true if fullscreen false if not when getting\n * @deprecated\n * @method requestFullScreen\n */\n\n Player.prototype.requestFullScreen = function requestFullScreen() {\n _log2['default'].warn('player.requestFullScreen() has been deprecated, use player.requestFullscreen() with a lowercase \"s\")');\n return this.requestFullscreen();\n };\n\n /**\n * Return the video to its normal size after having been in full screen mode\n * ```js\n * myPlayer.exitFullscreen();\n * ```\n *\n * @return {Player} self\n * @method exitFullscreen\n */\n\n Player.prototype.exitFullscreen = function exitFullscreen() {\n var fsApi = _FullscreenApi2['default'];\n this.isFullscreen(false);\n\n // Check for browser element fullscreen support\n if (fsApi.requestFullscreen) {\n _document2['default'][fsApi.exitFullscreen]();\n } else if (this.tech.supportsFullScreen()) {\n this.techCall('exitFullScreen');\n } else {\n this.exitFullWindow();\n this.trigger('fullscreenchange');\n }\n\n return this;\n };\n\n /**\n * Old naming for exitFullscreen\n *\n * @return {Player} self\n * @deprecated\n * @method cancelFullScreen\n */\n\n Player.prototype.cancelFullScreen = function cancelFullScreen() {\n _log2['default'].warn('player.cancelFullScreen() has been deprecated, use player.exitFullscreen()');\n return this.exitFullscreen();\n };\n\n /**\n * When fullscreen isn't supported we can stretch the video container to as wide as the browser will let us.\n *\n * @method enterFullWindow\n */\n\n Player.prototype.enterFullWindow = function enterFullWindow() {\n this.isFullWindow = true;\n\n // Storing original doc overflow value to return to when fullscreen is off\n this.docOrigOverflow = _document2['default'].documentElement.style.overflow;\n\n // Add listener for esc key to exit fullscreen\n Events.on(_document2['default'], 'keydown', Fn.bind(this, this.fullWindowOnEscKey));\n\n // Hide any scroll bars\n _document2['default'].documentElement.style.overflow = 'hidden';\n\n // Apply fullscreen styles\n Dom.addElClass(_document2['default'].body, 'vjs-full-window');\n\n this.trigger('enterFullWindow');\n };\n\n /**\n * Check for call to either exit full window or full screen on ESC key\n *\n * @param {String} event Event to check for key press\n * @method fullWindowOnEscKey\n */\n\n Player.prototype.fullWindowOnEscKey = function fullWindowOnEscKey(event) {\n if (event.keyCode === 27) {\n if (this.isFullscreen() === true) {\n this.exitFullscreen();\n } else {\n this.exitFullWindow();\n }\n }\n };\n\n /**\n * Exit full window\n *\n * @method exitFullWindow\n */\n\n Player.prototype.exitFullWindow = function exitFullWindow() {\n this.isFullWindow = false;\n Events.off(_document2['default'], 'keydown', this.fullWindowOnEscKey);\n\n // Unhide scroll bars.\n _document2['default'].documentElement.style.overflow = this.docOrigOverflow;\n\n // Remove fullscreen styles\n Dom.removeElClass(_document2['default'].body, 'vjs-full-window');\n\n // Resize the box, controller, and poster to original sizes\n // this.positionAll();\n this.trigger('exitFullWindow');\n };\n\n /**\n * Select source based on tech order\n *\n * @param {Array} sources The sources for a media asset\n * @return {Object|Boolean} Object of source and tech order, otherwise false\n * @method selectSource\n */\n\n Player.prototype.selectSource = function selectSource(sources) {\n // Loop through each playback technology in the options order\n for (var i = 0, j = this.options_.techOrder; i < j.length; i++) {\n var techName = _toTitleCase2['default'](j[i]);\n var tech = _Component3['default'].getComponent(techName);\n\n // Check if the current tech is defined before continuing\n if (!tech) {\n _log2['default'].error('The \"' + techName + '\" tech is undefined. Skipped browser support check for that tech.');\n continue;\n }\n\n // Check if the browser supports this technology\n if (tech.isSupported()) {\n // Loop through each source object\n for (var a = 0, b = sources; a < b.length; a++) {\n var source = b[a];\n\n // Check if source can be played with this technology\n if (tech.canPlaySource(source)) {\n return { source: source, tech: techName };\n }\n }\n }\n }\n\n return false;\n };\n\n /**\n * The source function updates the video source\n * There are three types of variables you can pass as the argument.\n * **URL String**: A URL to the the video file. Use this method if you are sure\n * the current playback technology (HTML5/Flash) can support the source you\n * provide. Currently only MP4 files can be used in both HTML5 and Flash.\n * ```js\n * myPlayer.src(\"http://www.example.com/path/to/video.mp4\");\n * ```\n * **Source Object (or element):* * A javascript object containing information\n * about the source file. Use this method if you want the player to determine if\n * it can support the file using the type information.\n * ```js\n * myPlayer.src({ type: \"video/mp4\", src: \"http://www.example.com/path/to/video.mp4\" });\n * ```\n * **Array of Source Objects:* * To provide multiple versions of the source so\n * that it can be played using HTML5 across browsers you can use an array of\n * source objects. Video.js will detect which version is supported and load that\n * file.\n * ```js\n * myPlayer.src([\n * { type: \"video/mp4\", src: \"http://www.example.com/path/to/video.mp4\" },\n * { type: \"video/webm\", src: \"http://www.example.com/path/to/video.webm\" },\n * { type: \"video/ogg\", src: \"http://www.example.com/path/to/video.ogv\" }\n * ]);\n * ```\n *\n * @param {String|Object|Array=} source The source URL, object, or array of sources\n * @return {String} The current video source when getting\n * @return {String} The player when setting\n * @method src\n */\n\n Player.prototype.src = function src(source) {\n if (source === undefined) {\n return this.techGet('src');\n }\n\n var currentTech = _Component3['default'].getComponent(this.techName);\n\n // case: Array of source objects to choose from and pick the best to play\n if (Array.isArray(source)) {\n this.sourceList_(source);\n\n // case: URL String (http://myvideo...)\n } else if (typeof source === 'string') {\n // create a source object from the string\n this.src({ src: source });\n\n // case: Source object { src: '', type: '' ... }\n } else if (source instanceof Object) {\n // check if the source has a type and the loaded tech cannot play the source\n // if there's no type we'll just try the current tech\n if (source.type && !currentTech.canPlaySource(source)) {\n // create a source list with the current source and send through\n // the tech loop to check for a compatible technology\n this.sourceList_([source]);\n } else {\n this.cache_.src = source.src;\n this.currentType_ = source.type || '';\n\n // wait until the tech is ready to set the source\n this.ready(function () {\n\n // The setSource tech method was added with source handlers\n // so older techs won't support it\n // We need to check the direct prototype for the case where subclasses\n // of the tech do not support source handlers\n if (currentTech.prototype.hasOwnProperty('setSource')) {\n this.techCall('setSource', source);\n } else {\n this.techCall('src', source.src);\n }\n\n if (this.options_.preload === 'auto') {\n this.load();\n }\n\n if (this.options_.autoplay) {\n this.play();\n }\n });\n }\n }\n\n return this;\n };\n\n /**\n * Handle an array of source objects\n *\n * @param {Array} sources Array of source objects\n * @private\n * @method sourceList_\n */\n\n Player.prototype.sourceList_ = function sourceList_(sources) {\n var sourceTech = this.selectSource(sources);\n\n if (sourceTech) {\n if (sourceTech.tech === this.techName) {\n // if this technology is already loaded, set the source\n this.src(sourceTech.source);\n } else {\n // load this technology with the chosen source\n this.loadTech(sourceTech.tech, sourceTech.source);\n }\n } else {\n // We need to wrap this in a timeout to give folks a chance to add error event handlers\n this.setTimeout(function () {\n this.error({ code: 4, message: this.localize(this.options_.notSupportedMessage) });\n }, 0);\n\n // we could not find an appropriate tech, but let's still notify the delegate that this is it\n // this needs a better comment about why this is needed\n this.triggerReady();\n }\n };\n\n /**\n * Begin loading the src data.\n *\n * @return {Player} Returns the player\n * @method load\n */\n\n Player.prototype.load = function load() {\n this.techCall('load');\n return this;\n };\n\n /**\n * Returns the fully qualified URL of the current source value e.g. http://mysite.com/video.mp4\n * Can be used in conjuction with `currentType` to assist in rebuilding the current source object.\n *\n * @return {String} The current source\n * @method currentSrc\n */\n\n Player.prototype.currentSrc = function currentSrc() {\n return this.techGet('currentSrc') || this.cache_.src || '';\n };\n\n /**\n * Get the current source type e.g. video/mp4\n * This can allow you rebuild the current source object so that you could load the same\n * source and tech later\n *\n * @return {String} The source MIME type\n * @method currentType\n */\n\n Player.prototype.currentType = function currentType() {\n return this.currentType_ || '';\n };\n\n /**\n * Get or set the preload attribute\n *\n * @param {Boolean} value Boolean to determine if preload should be used\n * @return {String} The preload attribute value when getting\n * @return {Player} Returns the player when setting\n * @method preload\n */\n\n Player.prototype.preload = function preload(value) {\n if (value !== undefined) {\n this.techCall('setPreload', value);\n this.options_.preload = value;\n return this;\n }\n return this.techGet('preload');\n };\n\n /**\n * Get or set the autoplay attribute.\n *\n * @param {Boolean} value Boolean to determine if preload should be used\n * @return {String} The autoplay attribute value when getting\n * @return {Player} Returns the player when setting\n * @method autoplay\n */\n\n Player.prototype.autoplay = function autoplay(value) {\n if (value !== undefined) {\n this.techCall('setAutoplay', value);\n this.options_.autoplay = value;\n return this;\n }\n return this.techGet('autoplay', value);\n };\n\n /**\n * Get or set the loop attribute on the video element.\n *\n * @param {Boolean} value Boolean to determine if preload should be used\n * @return {String} The loop attribute value when getting\n * @return {Player} Returns the player when setting\n * @method loop\n */\n\n Player.prototype.loop = function loop(value) {\n if (value !== undefined) {\n this.techCall('setLoop', value);\n this.options_.loop = value;\n return this;\n }\n return this.techGet('loop');\n };\n\n /**\n * get or set the poster image source url\n * ##### EXAMPLE:\n * ```js\n * // get\n * var currentPoster = myPlayer.poster();\n * // set\n * myPlayer.poster('http://example.com/myImage.jpg');\n * ```\n *\n * @param {String=} src Poster image source URL\n * @return {String} poster URL when getting\n * @return {Player} self when setting\n * @method poster\n */\n\n Player.prototype.poster = function poster(src) {\n if (src === undefined) {\n return this.poster_;\n }\n\n // The correct way to remove a poster is to set as an empty string\n // other falsey values will throw errors\n if (!src) {\n src = '';\n }\n\n // update the internal poster variable\n this.poster_ = src;\n\n // update the tech's poster\n this.techCall('setPoster', src);\n\n // alert components that the poster has been set\n this.trigger('posterchange');\n\n return this;\n };\n\n /**\n * Get or set whether or not the controls are showing.\n *\n * @param {Boolean} bool Set controls to showing or not\n * @return {Boolean} Controls are showing\n * @method controls\n */\n\n Player.prototype.controls = function controls(bool) {\n if (bool !== undefined) {\n bool = !!bool; // force boolean\n // Don't trigger a change event unless it actually changed\n if (this.controls_ !== bool) {\n this.controls_ = bool;\n\n if (this.usingNativeControls()) {\n this.techCall('setControls', bool);\n }\n\n if (bool) {\n this.removeClass('vjs-controls-disabled');\n this.addClass('vjs-controls-enabled');\n this.trigger('controlsenabled');\n\n if (!this.usingNativeControls()) {\n this.addTechControlsListeners();\n }\n } else {\n this.removeClass('vjs-controls-enabled');\n this.addClass('vjs-controls-disabled');\n this.trigger('controlsdisabled');\n\n if (!this.usingNativeControls()) {\n this.removeTechControlsListeners();\n }\n }\n }\n return this;\n }\n return !!this.controls_;\n };\n\n /**\n * Toggle native controls on/off. Native controls are the controls built into\n * devices (e.g. default iPhone controls), Flash, or other techs\n * (e.g. Vimeo Controls)\n * **This should only be set by the current tech, because only the tech knows\n * if it can support native controls**\n *\n * @param {Boolean} bool True signals that native controls are on\n * @return {Player} Returns the player\n * @private\n * @method usingNativeControls\n */\n\n Player.prototype.usingNativeControls = function usingNativeControls(bool) {\n if (bool !== undefined) {\n bool = !!bool; // force boolean\n // Don't trigger a change event unless it actually changed\n if (this.usingNativeControls_ !== bool) {\n this.usingNativeControls_ = bool;\n if (bool) {\n this.addClass('vjs-using-native-controls');\n\n /**\n * player is using the native device controls\n *\n * @event usingnativecontrols\n * @memberof Player\n * @instance\n * @private\n */\n this.trigger('usingnativecontrols');\n } else {\n this.removeClass('vjs-using-native-controls');\n\n /**\n * player is using the custom HTML controls\n *\n * @event usingcustomcontrols\n * @memberof Player\n * @instance\n * @private\n */\n this.trigger('usingcustomcontrols');\n }\n }\n return this;\n }\n return !!this.usingNativeControls_;\n };\n\n /**\n * Set or get the current MediaError\n *\n * @param {*} err A MediaError or a String/Number to be turned into a MediaError\n * @return {MediaError|null} when getting\n * @return {Player} when setting\n * @method error\n */\n\n Player.prototype.error = function error(err) {\n if (err === undefined) {\n return this.error_ || null;\n }\n\n // restoring to default\n if (err === null) {\n this.error_ = err;\n this.removeClass('vjs-error');\n return this;\n }\n\n // error instance\n if (err instanceof _MediaError2['default']) {\n this.error_ = err;\n } else {\n this.error_ = new _MediaError2['default'](err);\n }\n\n // fire an error event on the player\n this.trigger('error');\n\n // add the vjs-error classname to the player\n this.addClass('vjs-error');\n\n // log the name of the error type and any message\n // ie8 just logs \"[object object]\" if you just log the error object\n _log2['default'].error('(CODE:' + this.error_.code + ' ' + _MediaError2['default'].errorTypes[this.error_.code] + ')', this.error_.message, this.error_);\n\n return this;\n };\n\n /**\n * Returns whether or not the player is in the \"ended\" state.\n *\n * @return {Boolean} True if the player is in the ended state, false if not.\n * @method ended\n */\n\n Player.prototype.ended = function ended() {\n return this.techGet('ended');\n };\n\n /**\n * Returns whether or not the player is in the \"seeking\" state.\n *\n * @return {Boolean} True if the player is in the seeking state, false if not.\n * @method seeking\n */\n\n Player.prototype.seeking = function seeking() {\n return this.techGet('seeking');\n };\n\n /**\n * Returns the TimeRanges of the media that are currently available\n * for seeking to.\n *\n * @return {TimeRanges} the seekable intervals of the media timeline\n * @method seekable\n */\n\n Player.prototype.seekable = function seekable() {\n return this.techGet('seekable');\n };\n\n /**\n * Report user activity\n *\n * @param {Object} event Event object\n * @method reportUserActivity\n */\n\n Player.prototype.reportUserActivity = function reportUserActivity(event) {\n this.userActivity_ = true;\n };\n\n /**\n * Get/set if user is active\n *\n * @param {Boolean} bool Value when setting\n * @return {Boolean} Value if user is active user when getting\n * @method userActive\n */\n\n Player.prototype.userActive = function userActive(bool) {\n if (bool !== undefined) {\n bool = !!bool;\n if (bool !== this.userActive_) {\n this.userActive_ = bool;\n if (bool) {\n // If the user was inactive and is now active we want to reset the\n // inactivity timer\n this.userActivity_ = true;\n this.removeClass('vjs-user-inactive');\n this.addClass('vjs-user-active');\n this.trigger('useractive');\n } else {\n // We're switching the state to inactive manually, so erase any other\n // activity\n this.userActivity_ = false;\n\n // Chrome/Safari/IE have bugs where when you change the cursor it can\n // trigger a mousemove event. This causes an issue when you're hiding\n // the cursor when the user is inactive, and a mousemove signals user\n // activity. Making it impossible to go into inactive mode. Specifically\n // this happens in fullscreen when we really need to hide the cursor.\n //\n // When this gets resolved in ALL browsers it can be removed\n // https://code.google.com/p/chromium/issues/detail?id=103041\n if (this.tech) {\n this.tech.one('mousemove', function (e) {\n e.stopPropagation();\n e.preventDefault();\n });\n }\n\n this.removeClass('vjs-user-active');\n this.addClass('vjs-user-inactive');\n this.trigger('userinactive');\n }\n }\n return this;\n }\n return this.userActive_;\n };\n\n /**\n * Listen for user activity based on timeout value\n *\n * @method listenForUserActivity\n */\n\n Player.prototype.listenForUserActivity = function listenForUserActivity() {\n var mouseInProgress = undefined,\n lastMoveX = undefined,\n lastMoveY = undefined;\n\n var handleActivity = Fn.bind(this, this.reportUserActivity);\n\n var handleMouseMove = function handleMouseMove(e) {\n // #1068 - Prevent mousemove spamming\n // Chrome Bug: https://code.google.com/p/chromium/issues/detail?id=366970\n if (e.screenX !== lastMoveX || e.screenY !== lastMoveY) {\n lastMoveX = e.screenX;\n lastMoveY = e.screenY;\n handleActivity();\n }\n };\n\n var handleMouseDown = function handleMouseDown() {\n handleActivity();\n // For as long as the they are touching the device or have their mouse down,\n // we consider them active even if they're not moving their finger or mouse.\n // So we want to continue to update that they are active\n this.clearInterval(mouseInProgress);\n // Setting userActivity=true now and setting the interval to the same time\n // as the activityCheck interval (250) should ensure we never miss the\n // next activityCheck\n mouseInProgress = this.setInterval(handleActivity, 250);\n };\n\n var handleMouseUp = function handleMouseUp(event) {\n handleActivity();\n // Stop the interval that maintains activity if the mouse/touch is down\n this.clearInterval(mouseInProgress);\n };\n\n // Any mouse movement will be considered user activity\n this.on('mousedown', handleMouseDown);\n this.on('mousemove', handleMouseMove);\n this.on('mouseup', handleMouseUp);\n\n // Listen for keyboard navigation\n // Shouldn't need to use inProgress interval because of key repeat\n this.on('keydown', handleActivity);\n this.on('keyup', handleActivity);\n\n // Run an interval every 250 milliseconds instead of stuffing everything into\n // the mousemove/touchmove function itself, to prevent performance degradation.\n // `this.reportUserActivity` simply sets this.userActivity_ to true, which\n // then gets picked up by this loop\n // http://ejohn.org/blog/learning-from-twitter/\n var inactivityTimeout = undefined;\n var activityCheck = this.setInterval(function () {\n // Check to see if mouse/touch activity has happened\n if (this.userActivity_) {\n // Reset the activity tracker\n this.userActivity_ = false;\n\n // If the user state was inactive, set the state to active\n this.userActive(true);\n\n // Clear any existing inactivity timeout to start the timer over\n this.clearTimeout(inactivityTimeout);\n\n var timeout = this.options_.inactivityTimeout;\n if (timeout > 0) {\n // In milliseconds, if no more activity has occurred the\n // user will be considered inactive\n inactivityTimeout = this.setTimeout(function () {\n // Protect against the case where the inactivityTimeout can trigger just\n // before the next user activity is picked up by the activityCheck loop\n // causing a flicker\n if (!this.userActivity_) {\n this.userActive(false);\n }\n }, timeout);\n }\n }\n }, 250);\n };\n\n /**\n * Gets or sets the current playback rate. A playback rate of\n * 1.0 represents normal speed and 0.5 would indicate half-speed\n * playback, for instance.\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-playbackrate\n *\n * @param {Number} rate New playback rate to set.\n * @return {Number} Returns the new playback rate when setting\n * @return {Number} Returns the current playback rate when getting\n * @method playbackRate\n */\n\n Player.prototype.playbackRate = function playbackRate(rate) {\n if (rate !== undefined) {\n this.techCall('setPlaybackRate', rate);\n return this;\n }\n\n if (this.tech && this.tech.featuresPlaybackRate) {\n return this.techGet('playbackRate');\n } else {\n return 1;\n }\n };\n\n /**\n * Gets or sets the audio flag\n *\n * @param {Boolean} bool True signals that this is an audio player.\n * @return {Boolean} Returns true if player is audio, false if not when getting\n * @return {Player} Returns the player if setting\n * @private\n * @method isAudio\n */\n\n Player.prototype.isAudio = function isAudio(bool) {\n if (bool !== undefined) {\n this.isAudio_ = !!bool;\n return this;\n }\n\n return !!this.isAudio_;\n };\n\n /**\n * Returns the current state of network activity for the element, from\n * the codes in the list below.\n * - NETWORK_EMPTY (numeric value 0)\n * The element has not yet been initialised. All attributes are in\n * their initial states.\n * - NETWORK_IDLE (numeric value 1)\n * The element's resource selection algorithm is active and has\n * selected a resource, but it is not actually using the network at\n * this time.\n * - NETWORK_LOADING (numeric value 2)\n * The user agent is actively trying to download data.\n * - NETWORK_NO_SOURCE (numeric value 3)\n * The element's resource selection algorithm is active, but it has\n * not yet found a resource to use.\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#network-states\n * @return {Number} the current network activity state\n * @method networkState\n */\n\n Player.prototype.networkState = function networkState() {\n return this.techGet('networkState');\n };\n\n /**\n * Returns a value that expresses the current state of the element\n * with respect to rendering the current playback position, from the\n * codes in the list below.\n * - HAVE_NOTHING (numeric value 0)\n * No information regarding the media resource is available.\n * - HAVE_METADATA (numeric value 1)\n * Enough of the resource has been obtained that the duration of the\n * resource is available.\n * - HAVE_CURRENT_DATA (numeric value 2)\n * Data for the immediate current playback position is available.\n * - HAVE_FUTURE_DATA (numeric value 3)\n * Data for the immediate current playback position is available, as\n * well as enough data for the user agent to advance the current\n * playback position in the direction of playback.\n * - HAVE_ENOUGH_DATA (numeric value 4)\n * The user agent estimates that enough data is available for\n * playback to proceed uninterrupted.\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-readystate\n * @return {Number} the current playback rendering state\n * @method readyState\n */\n\n Player.prototype.readyState = function readyState() {\n return this.techGet('readyState');\n };\n\n /*\n * Text tracks are tracks of timed text events.\n * Captions - text displayed over the video for the hearing impaired\n * Subtitles - text displayed over the video for those who don't understand language in the video\n * Chapters - text displayed in a menu allowing the user to jump to particular points (chapters) in the video\n * Descriptions (not supported yet) - audio descriptions that are read back to the user by a screen reading device\n */\n\n /**\n * Get an array of associated text tracks. captions, subtitles, chapters, descriptions\n * http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-texttracks\n *\n * @return {Array} Array of track objects\n * @method textTracks\n */\n\n Player.prototype.textTracks = function textTracks() {\n // cannot use techGet directly because it checks to see whether the tech is ready.\n // Flash is unlikely to be ready in time but textTracks should still work.\n return this.tech && this.tech.textTracks();\n };\n\n /**\n * Get an array of remote text tracks\n *\n * @return {Array}\n * @method remoteTextTracks\n */\n\n Player.prototype.remoteTextTracks = function remoteTextTracks() {\n return this.tech && this.tech.remoteTextTracks();\n };\n\n /**\n * Add a text track\n * In addition to the W3C settings we allow adding additional info through options.\n * http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-addtexttrack\n *\n * @param {String} kind Captions, subtitles, chapters, descriptions, or metadata\n * @param {String=} label Optional label\n * @param {String=} language Optional language\n * @method addTextTrack\n */\n\n Player.prototype.addTextTrack = function addTextTrack(kind, label, language) {\n return this.tech && this.tech.addTextTrack(kind, label, language);\n };\n\n /**\n * Add a remote text track\n *\n * @param {Object} options Options for remote text track\n * @method addRemoteTextTrack\n */\n\n Player.prototype.addRemoteTextTrack = function addRemoteTextTrack(options) {\n return this.tech && this.tech.addRemoteTextTrack(options);\n };\n\n /**\n * Remove a remote text track\n *\n * @param {Object} track Remote text track to remove\n * @method removeRemoteTextTrack\n */\n\n Player.prototype.removeRemoteTextTrack = function removeRemoteTextTrack(track) {\n this.tech && this.tech.removeRemoteTextTrack(track);\n };\n\n /**\n * Get video width\n *\n * @return {Number} Video width\n * @method videoWidth\n */\n\n Player.prototype.videoWidth = function videoWidth() {\n return this.tech && this.tech.videoWidth && this.tech.videoWidth() || 0;\n };\n\n /**\n * Get video height\n *\n * @return {Number} Video height\n * @method videoHeight\n */\n\n Player.prototype.videoHeight = function videoHeight() {\n return this.tech && this.tech.videoHeight && this.tech.videoHeight() || 0;\n };\n\n // Methods to add support for\n // initialTime: function(){ return this.techCall('initialTime'); },\n // startOffsetTime: function(){ return this.techCall('startOffsetTime'); },\n // played: function(){ return this.techCall('played'); },\n // seekable: function(){ return this.techCall('seekable'); },\n // videoTracks: function(){ return this.techCall('videoTracks'); },\n // audioTracks: function(){ return this.techCall('audioTracks'); },\n // defaultPlaybackRate: function(){ return this.techCall('defaultPlaybackRate'); },\n // mediaGroup: function(){ return this.techCall('mediaGroup'); },\n // controller: function(){ return this.techCall('controller'); },\n // defaultMuted: function(){ return this.techCall('defaultMuted'); }\n\n // TODO\n // currentSrcList: the array of sources including other formats and bitrates\n // playList: array of source lists in order of playback\n\n /**\n * The player's language code\n * NOTE: The language should be set in the player options if you want the\n * the controls to be built with a specific language. Changing the lanugage\n * later will not update controls text.\n *\n * @param {String} code The locale string\n * @return {String} The locale string when getting\n * @return {Player} self when setting\n * @method language\n */\n\n Player.prototype.language = function language(code) {\n if (code === undefined) {\n return this.language_;\n }\n\n this.language_ = ('' + code).toLowerCase();\n return this;\n };\n\n /**\n * Get the player's language dictionary\n * Merge every time, because a newly added plugin might call videojs.addLanguage() at any time\n * Languages specified directly in the player options have precedence\n *\n * @return {Array} Array of languages\n * @method languages\n */\n\n Player.prototype.languages = function languages() {\n return _mergeOptions2['default'](_globalOptions2['default'].languages, this.languages_);\n };\n\n /**\n * Converts track info to JSON\n *\n * @return {Object} JSON object of options\n * @method toJSON\n */\n\n Player.prototype.toJSON = function toJSON() {\n var options = _mergeOptions2['default'](this.options_);\n var tracks = options.tracks;\n\n options.tracks = [];\n\n for (var i = 0; i < tracks.length; i++) {\n var track = tracks[i];\n\n // deep merge tracks and null out player so no circular references\n track = _mergeOptions2['default'](track);\n track.player = undefined;\n options.tracks[i] = track;\n }\n\n return options;\n };\n\n /**\n * Gets tag settings\n *\n * @param {Element} tag The player tag\n * @return {Array} An array of sources and track objects\n * @static\n * @method getTagSettings\n */\n\n Player.getTagSettings = function getTagSettings(tag) {\n var baseOptions = {\n sources: [],\n tracks: []\n };\n\n var tagOptions = Dom.getElAttributes(tag);\n var dataSetup = tagOptions['data-setup'];\n\n // Check if data-setup attr exists.\n if (dataSetup !== null) {\n // Parse options JSON\n // If empty string, make it a parsable json object.\n\n var _safeParseTuple = _safeParseTuple3['default'](dataSetup || '{}');\n\n var err = _safeParseTuple[0];\n var data = _safeParseTuple[1];\n\n if (err) {\n _log2['default'].error(err);\n }\n _assign2['default'](tagOptions, data);\n }\n\n _assign2['default'](baseOptions, tagOptions);\n\n // Get tag children settings\n if (tag.hasChildNodes()) {\n var children = tag.childNodes;\n\n for (var i = 0, j = children.length; i < j; i++) {\n var child = children[i];\n // Change case needed: http://ejohn.org/blog/nodename-case-sensitivity/\n var childName = child.nodeName.toLowerCase();\n if (childName === 'source') {\n baseOptions.sources.push(Dom.getElAttributes(child));\n } else if (childName === 'track') {\n baseOptions.tracks.push(Dom.getElAttributes(child));\n }\n }\n }\n\n return baseOptions;\n };\n\n return Player;\n})(_Component3['default']);\n\n/*\n * Global player list\n *\n * @type {Object}\n */\nPlayer.players = {};\n\n/*\n * Player instance options, surfaced using options\n * options = Player.prototype.options_\n * Make changes in options, not here.\n * All options should use string keys so they avoid\n * renaming by closure compiler\n *\n * @type {Object}\n * @private\n */\nPlayer.prototype.options_ = _globalOptions2['default'];\n\n/**\n * Fired when the player has initial duration and dimension information\n *\n * @event loadedmetadata\n */\nPlayer.prototype.handleLoadedMetaData;\n\n/**\n * Fired when the player has downloaded data at the current playback position\n *\n * @event loadeddata\n */\nPlayer.prototype.handleLoadedData;\n\n/**\n * Fired when the player has finished downloading the source data\n *\n * @event loadedalldata\n */\nPlayer.prototype.handleLoadedAllData;\n\n/**\n * Fired when the user is active, e.g. moves the mouse over the player\n *\n * @event useractive\n */\nPlayer.prototype.handleUserActive;\n\n/**\n * Fired when the user is inactive, e.g. a short delay after the last mouse move or control interaction\n *\n * @event userinactive\n */\nPlayer.prototype.handleUserInactive;\n\n/**\n * Fired when the current playback position has changed *\n * During playback this is fired every 15-250 milliseconds, depending on the\n * playback technology in use.\n *\n * @event timeupdate\n */\nPlayer.prototype.handleTimeUpdate;\n\n/**\n * Fired when the volume changes\n *\n * @event volumechange\n */\nPlayer.prototype.handleVolumeChange;\n\n/**\n * Fired when an error occurs\n *\n * @event error\n */\nPlayer.prototype.handleError;\n\nPlayer.prototype.flexNotSupported_ = function () {\n var elem = _document2['default'].createElement('i');\n\n // Note: We don't actually use flexBasis (or flexOrder), but it's one of the more\n // common flex features that we can rely on when checking for flex support.\n return !('flexBasis' in elem.style || 'webkitFlexBasis' in elem.style || 'mozFlexBasis' in elem.style || 'msFlexBasis' in elem.style || 'msFlexOrder' in elem.style /* IE10-specific (2012 flex spec) */);\n};\n\n_Component3['default'].registerComponent('Player', Player);\nexports['default'] = Player;\nmodule.exports = exports['default'];\n\n},{\"./big-play-button.js\":50,\"./component.js\":52,\"./control-bar/control-bar.js\":53,\"./error-display.js\":82,\"./fullscreen-api.js\":85,\"./global-options.js\":86,\"./loading-spinner.js\":87,\"./media-error.js\":88,\"./poster-image.js\":94,\"./tech/html5.js\":99,\"./tech/loader.js\":100,\"./tracks/text-track-display.js\":103,\"./tracks/text-track-settings.js\":106,\"./utils/browser.js\":108,\"./utils/buffer.js\":109,\"./utils/dom.js\":110,\"./utils/events.js\":111,\"./utils/fn.js\":112,\"./utils/guid.js\":114,\"./utils/log.js\":115,\"./utils/merge-options.js\":116,\"./utils/time-ranges.js\":118,\"./utils/to-title-case.js\":119,\"global/document\":1,\"global/window\":2,\"object.assign\":44,\"safe-json-parse/tuple\":49}],93:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nexports.__esModule = true;\n/**\n * @file plugins.js\n */\n\nvar _Player = _dereq_('./player.js');\n\nvar _Player2 = _interopRequireWildcard(_Player);\n\n/**\n * The method for registering a video.js plugin\n *\n * @param {String} name The name of the plugin\n * @param {Function} init The function that is run when the player inits\n * @method plugin\n */\nvar plugin = function plugin(name, init) {\n _Player2['default'].prototype[name] = init;\n};\n\nexports['default'] = plugin;\nmodule.exports = exports['default'];\n\n},{\"./player.js\":92}],94:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file poster-image.js\n */\n\nvar _Button2 = _dereq_('./button.js');\n\nvar _Button3 = _interopRequireWildcard(_Button2);\n\nvar _Component = _dereq_('./component.js');\n\nvar _Component2 = _interopRequireWildcard(_Component);\n\nvar _import = _dereq_('./utils/fn.js');\n\nvar Fn = _interopRequireWildcard(_import);\n\nvar _import2 = _dereq_('./utils/dom.js');\n\nvar Dom = _interopRequireWildcard(_import2);\n\nvar _import3 = _dereq_('./utils/browser.js');\n\nvar browser = _interopRequireWildcard(_import3);\n\n/**\n * The component that handles showing the poster image.\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Button\n * @class PosterImage\n */\n\nvar PosterImage = (function (_Button) {\n function PosterImage(player, options) {\n _classCallCheck(this, PosterImage);\n\n _Button.call(this, player, options);\n\n this.update();\n player.on('posterchange', Fn.bind(this, this.update));\n }\n\n _inherits(PosterImage, _Button);\n\n /**\n * Clean up the poster image\n *\n * @method dispose\n */\n\n PosterImage.prototype.dispose = function dispose() {\n this.player().off('posterchange', this.update);\n _Button.prototype.dispose.call(this);\n };\n\n /**\n * Create the poster's image element\n *\n * @return {Element}\n * @method createEl\n */\n\n PosterImage.prototype.createEl = function createEl() {\n var el = Dom.createEl('div', {\n className: 'vjs-poster',\n\n // Don't want poster to be tabbable.\n tabIndex: -1\n });\n\n // To ensure the poster image resizes while maintaining its original aspect\n // ratio, use a div with `background-size` when available. For browsers that\n // do not support `background-size` (e.g. IE8), fall back on using a regular\n // img element.\n if (!browser.BACKGROUND_SIZE_SUPPORTED) {\n this.fallbackImg_ = Dom.createEl('img');\n el.appendChild(this.fallbackImg_);\n }\n\n return el;\n };\n\n /**\n * Event handler for updates to the player's poster source\n *\n * @method update\n */\n\n PosterImage.prototype.update = function update() {\n var url = this.player().poster();\n\n this.setSrc(url);\n\n // If there's no poster source we should display:none on this component\n // so it's not still clickable or right-clickable\n if (url) {\n this.show();\n } else {\n this.hide();\n }\n };\n\n /**\n * Set the poster source depending on the display method\n *\n * @param {String} url The URL to the poster source\n * @method setSrc\n */\n\n PosterImage.prototype.setSrc = function setSrc(url) {\n if (this.fallbackImg_) {\n this.fallbackImg_.src = url;\n } else {\n var backgroundImage = '';\n // Any falsey values should stay as an empty string, otherwise\n // this will throw an extra error\n if (url) {\n backgroundImage = 'url(\"' + url + '\")';\n }\n\n this.el_.style.backgroundImage = backgroundImage;\n }\n };\n\n /**\n * Event handler for clicks on the poster image\n *\n * @method handleClick\n */\n\n PosterImage.prototype.handleClick = function handleClick() {\n // We don't want a click to trigger playback when controls are disabled\n // but CSS should be hiding the poster to prevent that from happening\n if (this.player_.paused()) {\n this.player_.play();\n } else {\n this.player_.pause();\n }\n };\n\n return PosterImage;\n})(_Button3['default']);\n\n_Component2['default'].registerComponent('PosterImage', PosterImage);\nexports['default'] = PosterImage;\nmodule.exports = exports['default'];\n\n},{\"./button.js\":51,\"./component.js\":52,\"./utils/browser.js\":108,\"./utils/dom.js\":110,\"./utils/fn.js\":112}],95:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nexports.__esModule = true;\n/**\n * @file setup.js\n *\n * Functions for automatically setting up a player\n * based on the data-setup attribute of the video tag\n */\n\nvar _import = _dereq_('./utils/events.js');\n\nvar Events = _interopRequireWildcard(_import);\n\nvar _document = _dereq_('global/document');\n\nvar _document2 = _interopRequireWildcard(_document);\n\nvar _window = _dereq_('global/window');\n\nvar _window2 = _interopRequireWildcard(_window);\n\nvar _windowLoaded = false;\nvar videojs = undefined;\n\n// Automatically set up any tags that have a data-setup attribute\nvar autoSetup = function autoSetup() {\n // One day, when we stop supporting IE8, go back to this, but in the meantime...*hack hack hack*\n // var vids = Array.prototype.slice.call(document.getElementsByTagName('video'));\n // var audios = Array.prototype.slice.call(document.getElementsByTagName('audio'));\n // var mediaEls = vids.concat(audios);\n\n // Because IE8 doesn't support calling slice on a node list, we need to loop through each list of elements\n // to build up a new, combined list of elements.\n var vids = _document2['default'].getElementsByTagName('video');\n var audios = _document2['default'].getElementsByTagName('audio');\n var mediaEls = [];\n if (vids && vids.length > 0) {\n for (var i = 0, e = vids.length; i < e; i++) {\n mediaEls.push(vids[i]);\n }\n }\n if (audios && audios.length > 0) {\n for (var i = 0, e = audios.length; i < e; i++) {\n mediaEls.push(audios[i]);\n }\n }\n\n // Check if any media elements exist\n if (mediaEls && mediaEls.length > 0) {\n\n for (var i = 0, e = mediaEls.length; i < e; i++) {\n var mediaEl = mediaEls[i];\n\n // Check if element exists, has getAttribute func.\n // IE seems to consider typeof el.getAttribute == 'object' instead of 'function' like expected, at least when loading the player immediately.\n if (mediaEl && mediaEl.getAttribute) {\n\n // Make sure this player hasn't already been set up.\n if (mediaEl.player === undefined) {\n var options = mediaEl.getAttribute('data-setup');\n\n // Check if data-setup attr exists.\n // We only auto-setup if they've added the data-setup attr.\n if (options !== null) {\n // Create new video.js instance.\n var player = videojs(mediaEl);\n }\n }\n\n // If getAttribute isn't defined, we need to wait for the DOM.\n } else {\n autoSetupTimeout(1);\n break;\n }\n }\n\n // No videos were found, so keep looping unless page is finished loading.\n } else if (!_windowLoaded) {\n autoSetupTimeout(1);\n }\n};\n\n// Pause to let the DOM keep processing\nvar autoSetupTimeout = function autoSetupTimeout(wait, vjs) {\n videojs = vjs;\n setTimeout(autoSetup, wait);\n};\n\nif (_document2['default'].readyState === 'complete') {\n _windowLoaded = true;\n} else {\n Events.one(_window2['default'], 'load', function () {\n _windowLoaded = true;\n });\n}\n\nvar hasLoaded = function hasLoaded() {\n return _windowLoaded;\n};\n\nexports.autoSetup = autoSetup;\nexports.autoSetupTimeout = autoSetupTimeout;\nexports.hasLoaded = hasLoaded;\n\n},{\"./utils/events.js\":111,\"global/document\":1,\"global/window\":2}],96:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file slider.js\n */\n\nvar _Component2 = _dereq_('../component.js');\n\nvar _Component3 = _interopRequireWildcard(_Component2);\n\nvar _import = _dereq_('../utils/dom.js');\n\nvar Dom = _interopRequireWildcard(_import);\n\nvar _roundFloat = _dereq_('../utils/round-float.js');\n\nvar _roundFloat2 = _interopRequireWildcard(_roundFloat);\n\nvar _document = _dereq_('global/document');\n\nvar _document2 = _interopRequireWildcard(_document);\n\nvar _assign = _dereq_('object.assign');\n\nvar _assign2 = _interopRequireWildcard(_assign);\n\n/**\n * The base functionality for sliders like the volume bar and seek bar\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class Slider\n */\n\nvar Slider = (function (_Component) {\n function Slider(player, options) {\n _classCallCheck(this, Slider);\n\n _Component.call(this, player, options);\n\n // Set property names to bar and handle to match with the child Slider class is looking for\n this.bar = this.getChild(this.options_.barName);\n this.handle = this.getChild(this.options_.handleName);\n\n // Set a horizontal or vertical class on the slider depending on the slider type\n this.vertical(!!this.options_.vertical);\n\n this.on('mousedown', this.handleMouseDown);\n this.on('touchstart', this.handleMouseDown);\n this.on('focus', this.handleFocus);\n this.on('blur', this.handleBlur);\n this.on('click', this.handleClick);\n\n this.on(player, 'controlsvisible', this.update);\n this.on(player, this.playerEvent, this.update);\n }\n\n _inherits(Slider, _Component);\n\n /**\n * Create the component's DOM element\n *\n * @param {String} type Type of element to create\n * @param {Object=} props List of properties in Object form \n * @return {Element}\n * @method createEl\n */\n\n Slider.prototype.createEl = function createEl(type) {\n var props = arguments[1] === undefined ? {} : arguments[1];\n\n // Add the slider element class to all sub classes\n props.className = props.className + ' vjs-slider';\n props = _assign2['default']({\n role: 'slider',\n 'aria-valuenow': 0,\n 'aria-valuemin': 0,\n 'aria-valuemax': 100,\n tabIndex: 0\n }, props);\n\n return _Component.prototype.createEl.call(this, type, props);\n };\n\n /**\n * Handle mouse down on slider\n *\n * @param {Object} event Mouse down event object\n * @method handleMouseDown\n */\n\n Slider.prototype.handleMouseDown = function handleMouseDown(event) {\n event.preventDefault();\n Dom.blockTextSelection();\n this.addClass('vjs-sliding');\n\n this.on(_document2['default'], 'mousemove', this.handleMouseMove);\n this.on(_document2['default'], 'mouseup', this.handleMouseUp);\n this.on(_document2['default'], 'touchmove', this.handleMouseMove);\n this.on(_document2['default'], 'touchend', this.handleMouseUp);\n\n this.handleMouseMove(event);\n };\n\n /**\n * To be overridden by a subclass\n *\n * @method handleMouseMove\n */\n\n Slider.prototype.handleMouseMove = function handleMouseMove() {};\n\n /**\n * Handle mouse up on Slider \n *\n * @method handleMouseUp\n */\n\n Slider.prototype.handleMouseUp = function handleMouseUp() {\n Dom.unblockTextSelection();\n this.removeClass('vjs-sliding');\n\n this.off(_document2['default'], 'mousemove', this.handleMouseMove);\n this.off(_document2['default'], 'mouseup', this.handleMouseUp);\n this.off(_document2['default'], 'touchmove', this.handleMouseMove);\n this.off(_document2['default'], 'touchend', this.handleMouseUp);\n\n this.update();\n };\n\n /**\n * Update slider\n *\n * @method update\n */\n\n Slider.prototype.update = function update() {\n // In VolumeBar init we have a setTimeout for update that pops and update to the end of the\n // execution stack. The player is destroyed before then update will cause an error\n if (!this.el_) {\n return;\n } // If scrubbing, we could use a cached value to make the handle keep up with the user's mouse.\n // On HTML5 browsers scrubbing is really smooth, but some flash players are slow, so we might want to utilize this later.\n // var progress = (this.player_.scrubbing) ? this.player_.getCache().currentTime / this.player_.duration() : this.player_.currentTime() / this.player_.duration();\n var progress = this.getPercent();\n var bar = this.bar;\n\n // If there's no bar...\n if (!bar) {\n return;\n } // Protect against no duration and other division issues\n if (typeof progress !== 'number' || progress !== progress || progress < 0 || progress === Infinity) {\n progress = 0;\n }\n\n // Convert to a percentage for setting\n var percentage = _roundFloat2['default'](progress * 100, 2) + '%';\n\n // Set the new bar width or height\n if (this.vertical()) {\n bar.el().style.height = percentage;\n } else {\n bar.el().style.width = percentage;\n }\n };\n\n /**\n * Calculate distance for slider\n *\n * @param {Object} event Event object\n * @method calculateDistance\n */\n\n Slider.prototype.calculateDistance = function calculateDistance(event) {\n var el = this.el_;\n var box = Dom.findElPosition(el);\n var boxW = el.offsetWidth;\n var boxH = el.offsetHeight;\n var handle = this.handle;\n\n if (this.options_.vertical) {\n var boxY = box.top;\n\n var pageY = undefined;\n if (event.changedTouches) {\n pageY = event.changedTouches[0].pageY;\n } else {\n pageY = event.pageY;\n }\n\n if (handle) {\n var handleH = handle.el().offsetHeight;\n // Adjusted X and Width, so handle doesn't go outside the bar\n boxY = boxY + handleH / 2;\n boxH = boxH - handleH;\n }\n\n // Percent that the click is through the adjusted area\n return Math.max(0, Math.min(1, (boxY - pageY + boxH) / boxH));\n } else {\n var boxX = box.left;\n\n var pageX = undefined;\n if (event.changedTouches) {\n pageX = event.changedTouches[0].pageX;\n } else {\n pageX = event.pageX;\n }\n\n if (handle) {\n var handleW = handle.el().offsetWidth;\n\n // Adjusted X and Width, so handle doesn't go outside the bar\n boxX = boxX + handleW / 2;\n boxW = boxW - handleW;\n }\n\n // Percent that the click is through the adjusted area\n return Math.max(0, Math.min(1, (pageX - boxX) / boxW));\n }\n };\n\n /**\n * Handle on focus for slider\n *\n * @method handleFocus\n */\n\n Slider.prototype.handleFocus = function handleFocus() {\n this.on(_document2['default'], 'keydown', this.handleKeyPress);\n };\n\n /**\n * Handle key press for slider\n *\n * @param {Object} event Event object\n * @method handleKeyPress\n */\n\n Slider.prototype.handleKeyPress = function handleKeyPress(event) {\n if (event.which === 37 || event.which === 40) {\n // Left and Down Arrows\n event.preventDefault();\n this.stepBack();\n } else if (event.which === 38 || event.which === 39) {\n // Up and Right Arrows\n event.preventDefault();\n this.stepForward();\n }\n };\n\n /**\n * Handle on blur for slider\n *\n * @method handleBlur\n */\n\n Slider.prototype.handleBlur = function handleBlur() {\n this.off(_document2['default'], 'keydown', this.handleKeyPress);\n };\n\n /**\n * Listener for click events on slider, used to prevent clicks\n * from bubbling up to parent elements like button menus.\n *\n * @param {Object} event Event object\n * @method handleClick\n */\n\n Slider.prototype.handleClick = function handleClick(event) {\n event.stopImmediatePropagation();\n event.preventDefault();\n };\n\n /**\n * Get/set if slider is horizontal for vertical\n *\n * @param {Boolean} bool True if slider is vertical, false is horizontal\n * @return {Boolean} True if slider is vertical, false is horizontal\n * @method vertical\n */\n\n Slider.prototype.vertical = function vertical(bool) {\n if (bool === undefined) {\n return this.vertical_ || false;\n }\n\n this.vertical_ = !!bool;\n\n if (this.vertical_) {\n this.addClass('vjs-slider-vertical');\n } else {\n this.addClass('vjs-slider-horizontal');\n }\n\n return this;\n };\n\n return Slider;\n})(_Component3['default']);\n\n_Component3['default'].registerComponent('Slider', Slider);\nexports['default'] = Slider;\nmodule.exports = exports['default'];\n\n},{\"../component.js\":52,\"../utils/dom.js\":110,\"../utils/round-float.js\":117,\"global/document\":1,\"object.assign\":44}],97:[function(_dereq_,module,exports){\n'use strict';\n\nexports.__esModule = true;\n/**\n * @file flash-rtmp.js\n */\nfunction FlashRtmpDecorator(Flash) {\n Flash.streamingFormats = {\n 'rtmp/mp4': 'MP4',\n 'rtmp/flv': 'FLV'\n };\n\n Flash.streamFromParts = function (connection, stream) {\n return connection + '&' + stream;\n };\n\n Flash.streamToParts = function (src) {\n var parts = {\n connection: '',\n stream: ''\n };\n\n if (!src) return parts;\n\n // Look for the normal URL separator we expect, '&'.\n // If found, we split the URL into two pieces around the\n // first '&'.\n var connEnd = src.indexOf('&');\n var streamBegin = undefined;\n if (connEnd !== -1) {\n streamBegin = connEnd + 1;\n } else {\n // If there's not a '&', we use the last '/' as the delimiter.\n connEnd = streamBegin = src.lastIndexOf('/') + 1;\n if (connEnd === 0) {\n // really, there's not a '/'?\n connEnd = streamBegin = src.length;\n }\n }\n parts.connection = src.substring(0, connEnd);\n parts.stream = src.substring(streamBegin, src.length);\n\n return parts;\n };\n\n Flash.isStreamingType = function (srcType) {\n return srcType in Flash.streamingFormats;\n };\n\n // RTMP has four variations, any string starting\n // with one of these protocols should be valid\n Flash.RTMP_RE = /^rtmp[set]?:\\/\\//i;\n\n Flash.isStreamingSrc = function (src) {\n return Flash.RTMP_RE.test(src);\n };\n\n /**\n * A source handler for RTMP urls\n * @type {Object}\n */\n Flash.rtmpSourceHandler = {};\n\n /**\n * Check Flash can handle the source natively\n * @param {Object} source The source object\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\n Flash.rtmpSourceHandler.canHandleSource = function (source) {\n if (Flash.isStreamingType(source.type) || Flash.isStreamingSrc(source.src)) {\n return 'maybe';\n }\n\n return '';\n };\n\n /**\n * Pass the source to the flash object\n * Adaptive source handlers will have more complicated workflows before passing\n * video data to the video element\n * @param {Object} source The source object\n * @param {Flash} tech The instance of the Flash tech\n */\n Flash.rtmpSourceHandler.handleSource = function (source, tech) {\n var srcParts = Flash.streamToParts(source.src);\n\n tech.setRtmpConnection(srcParts.connection);\n tech.setRtmpStream(srcParts.stream);\n };\n\n // Register the native source handler\n Flash.registerSourceHandler(Flash.rtmpSourceHandler);\n\n return Flash;\n}\n\nexports['default'] = FlashRtmpDecorator;\nmodule.exports = exports['default'];\n\n},{}],98:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file flash.js \n * VideoJS-SWF - Custom Flash Player with HTML5-ish API\n * https://github.com/zencoder/video-js-swf\n * Not using setupTriggers. Using global onEvent func to distribute events\n */\n\nvar _Tech2 = _dereq_('./tech');\n\nvar _Tech3 = _interopRequireWildcard(_Tech2);\n\nvar _import = _dereq_('../utils/dom.js');\n\nvar Dom = _interopRequireWildcard(_import);\n\nvar _import2 = _dereq_('../utils/url.js');\n\nvar Url = _interopRequireWildcard(_import2);\n\nvar _createTimeRange = _dereq_('../utils/time-ranges.js');\n\nvar _FlashRtmpDecorator = _dereq_('./flash-rtmp');\n\nvar _FlashRtmpDecorator2 = _interopRequireWildcard(_FlashRtmpDecorator);\n\nvar _Component = _dereq_('../component');\n\nvar _Component2 = _interopRequireWildcard(_Component);\n\nvar _window = _dereq_('global/window');\n\nvar _window2 = _interopRequireWildcard(_window);\n\nvar _assign = _dereq_('object.assign');\n\nvar _assign2 = _interopRequireWildcard(_assign);\n\nvar navigator = _window2['default'].navigator;\n/**\n * Flash Media Controller - Wrapper for fallback SWF API\n *\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends Tech\n * @class Flash\n */\n\nvar Flash = (function (_Tech) {\n function Flash(options, ready) {\n _classCallCheck(this, Flash);\n\n _Tech.call(this, options, ready);\n\n // If source was supplied pass as a flash var.\n if (options.source) {\n this.ready(function () {\n this.setSource(options.source);\n });\n }\n\n // Having issues with Flash reloading on certain page actions (hide/resize/fullscreen) in certain browsers\n // This allows resetting the playhead when we catch the reload\n if (options.startTime) {\n this.ready(function () {\n this.load();\n this.play();\n this.currentTime(options.startTime);\n });\n }\n\n // Add global window functions that the swf expects\n // A 4.x workflow we weren't able to solve for in 5.0\n // because of the need to hard code these functions\n // into the swf for security reasons\n _window2['default'].videojs = _window2['default'].videojs || {};\n _window2['default'].videojs.Flash = _window2['default'].videojs.Flash || {};\n _window2['default'].videojs.Flash.onReady = Flash.onReady;\n _window2['default'].videojs.Flash.onEvent = Flash.onEvent;\n _window2['default'].videojs.Flash.onError = Flash.onError;\n }\n\n _inherits(Flash, _Tech);\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n\n Flash.prototype.createEl = function createEl() {\n var options = this.options_;\n\n // Generate ID for swf object\n var objId = options.techId;\n\n // Merge default flashvars with ones passed in to init\n var flashVars = _assign2['default']({\n\n // SWF Callback Functions\n readyFunction: 'videojs.Flash.onReady',\n eventProxyFunction: 'videojs.Flash.onEvent',\n errorEventProxyFunction: 'videojs.Flash.onError',\n\n // Player Settings\n autoplay: options.autoplay,\n preload: options.preload,\n loop: options.loop,\n muted: options.muted\n\n }, options.flashVars);\n\n // Merge default parames with ones passed in\n var params = _assign2['default']({\n wmode: 'opaque', // Opaque is needed to overlay controls, but can affect playback performance\n bgcolor: '#000000' // Using bgcolor prevents a white flash when the object is loading\n }, options.params);\n\n // Merge default attributes with ones passed in\n var attributes = _assign2['default']({\n id: objId,\n name: objId, // Both ID and Name needed or swf to identify itself\n 'class': 'vjs-tech'\n }, options.attributes);\n\n this.el_ = Flash.embed(options.swf, flashVars, params, attributes);\n this.el_.tech = this;\n\n return this.el_;\n };\n\n /**\n * Play for flash tech\n *\n * @method play\n */\n\n Flash.prototype.play = function play() {\n this.el_.vjs_play();\n };\n\n /**\n * Pause for flash tech\n *\n * @method pause\n */\n\n Flash.prototype.pause = function pause() {\n this.el_.vjs_pause();\n };\n\n /**\n * Get/set video\n *\n * @param {Object=} src Source object \n * @return {Object} \n * @method src\n */\n\n Flash.prototype.src = (function (_src) {\n function src(_x) {\n return _src.apply(this, arguments);\n }\n\n src.toString = function () {\n return _src.toString();\n };\n\n return src;\n })(function (src) {\n if (src === undefined) {\n return this.currentSrc();\n }\n\n // Setting src through `src` not `setSrc` will be deprecated\n return this.setSrc(src);\n });\n\n /**\n * Set video\n *\n * @param {Object=} src Source object \n * @deprecated\n * @method setSrc\n */\n\n Flash.prototype.setSrc = function setSrc(src) {\n // Make sure source URL is absolute.\n src = Url.getAbsoluteURL(src);\n this.el_.vjs_src(src);\n\n // Currently the SWF doesn't autoplay if you load a source later.\n // e.g. Load player w/ no source, wait 2s, set src.\n if (this.autoplay()) {\n var tech = this;\n this.setTimeout(function () {\n tech.play();\n }, 0);\n }\n };\n\n /**\n * Set current time\n *\n * @param {Number} time Current time of video \n * @method setCurrentTime\n */\n\n Flash.prototype.setCurrentTime = function setCurrentTime(time) {\n this.lastSeekTarget_ = time;\n this.el_.vjs_setProperty('currentTime', time);\n _Tech.prototype.setCurrentTime.call(this);\n };\n\n /**\n * Get current time\n *\n * @param {Number=} time Current time of video \n * @return {Number} Current time\n * @method currentTime\n */\n\n Flash.prototype.currentTime = function currentTime(time) {\n // when seeking make the reported time keep up with the requested time\n // by reading the time we're seeking to\n if (this.seeking()) {\n return this.lastSeekTarget_ || 0;\n }\n return this.el_.vjs_getProperty('currentTime');\n };\n\n /**\n * Get current source\n *\n * @method currentSrc\n */\n\n Flash.prototype.currentSrc = function currentSrc() {\n if (this.currentSource_) {\n return this.currentSource_.src;\n } else {\n return this.el_.vjs_getProperty('currentSrc');\n }\n };\n\n /**\n * Load media into player\n *\n * @method load\n */\n\n Flash.prototype.load = function load() {\n this.el_.vjs_load();\n };\n\n /**\n * Get poster\n *\n * @method poster\n */\n\n Flash.prototype.poster = function poster() {\n this.el_.vjs_getProperty('poster');\n };\n\n /**\n * Poster images are not handled by the Flash tech so make this a no-op\n *\n * @method setPoster\n */\n\n Flash.prototype.setPoster = function setPoster() {};\n\n /**\n * Determine if can seek in media\n *\n * @return {TimeRangeObject}\n * @method seekable\n */\n\n Flash.prototype.seekable = function seekable() {\n var duration = this.duration();\n if (duration === 0) {\n return _createTimeRange.createTimeRange();\n }\n return _createTimeRange.createTimeRange(0, duration);\n };\n\n /**\n * Get buffered time range\n *\n * @return {TimeRangeObject} \n * @method buffered\n */\n\n Flash.prototype.buffered = function buffered() {\n return _createTimeRange.createTimeRange(0, this.el_.vjs_getProperty('buffered'));\n };\n\n /**\n * Get fullscreen support - \n * Flash does not allow fullscreen through javascript\n * so always returns false\n *\n * @return {Boolean} false \n * @method supportsFullScreen\n */\n\n Flash.prototype.supportsFullScreen = function supportsFullScreen() {\n return false; // Flash does not allow fullscreen through javascript\n };\n\n /**\n * Request to enter fullscreen\n * Flash does not allow fullscreen through javascript\n * so always returns false\n *\n * @return {Boolean} false \n * @method enterFullScreen\n */\n\n Flash.prototype.enterFullScreen = function enterFullScreen() {\n return false;\n };\n\n return Flash;\n})(_Tech3['default']);\n\n// Create setters and getters for attributes\nvar _api = Flash.prototype;\nvar _readWrite = 'rtmpConnection,rtmpStream,preload,defaultPlaybackRate,playbackRate,autoplay,loop,mediaGroup,controller,controls,volume,muted,defaultMuted'.split(',');\nvar _readOnly = 'error,networkState,readyState,seeking,initialTime,duration,startOffsetTime,paused,played,ended,videoTracks,audioTracks,videoWidth,videoHeight'.split(',');\n\nfunction _createSetter(attr) {\n var attrUpper = attr.charAt(0).toUpperCase() + attr.slice(1);\n _api['set' + attrUpper] = function (val) {\n return this.el_.vjs_setProperty(attr, val);\n };\n}\nfunction _createGetter(attr) {\n _api[attr] = function () {\n return this.el_.vjs_getProperty(attr);\n };\n}\n\n// Create getter and setters for all read/write attributes\nfor (var i = 0; i < _readWrite.length; i++) {\n _createGetter(_readWrite[i]);\n _createSetter(_readWrite[i]);\n}\n\n// Create getters for read-only attributes\nfor (var i = 0; i < _readOnly.length; i++) {\n _createGetter(_readOnly[i]);\n}\n\n/* Flash Support Testing -------------------------------------------------------- */\n\nFlash.isSupported = function () {\n return Flash.version()[0] >= 10;\n // return swfobject.hasFlashPlayerVersion('10');\n};\n\n// Add Source Handler pattern functions to this tech\n_Tech3['default'].withSourceHandlers(Flash);\n\n/*\n * The default native source handler.\n * This simply passes the source to the video element. Nothing fancy.\n *\n * @param {Object} source The source object\n * @param {Flash} tech The instance of the Flash tech\n */\nFlash.nativeSourceHandler = {};\n\n/*\n * Check Flash can handle the source natively\n *\n * @param {Object} source The source object\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\nFlash.nativeSourceHandler.canHandleSource = function (source) {\n var type;\n\n function guessMimeType(src) {\n var ext = Url.getFileExtension(src);\n if (ext) {\n return 'video/' + ext;\n }\n return '';\n }\n\n if (!source.type) {\n type = guessMimeType(source.src);\n } else {\n // Strip code information from the type because we don't get that specific\n type = source.type.replace(/;.*/, '').toLowerCase();\n }\n\n if (type in Flash.formats) {\n return 'maybe';\n }\n\n return '';\n};\n\n/*\n * Pass the source to the flash object\n * Adaptive source handlers will have more complicated workflows before passing\n * video data to the video element\n *\n * @param {Object} source The source object\n * @param {Flash} tech The instance of the Flash tech\n */\nFlash.nativeSourceHandler.handleSource = function (source, tech) {\n tech.setSrc(source.src);\n};\n\n/*\n * Clean up the source handler when disposing the player or switching sources..\n * (no cleanup is needed when supporting the format natively)\n */\nFlash.nativeSourceHandler.dispose = function () {};\n\n// Register the native source handler\nFlash.registerSourceHandler(Flash.nativeSourceHandler);\n\nFlash.formats = {\n 'video/flv': 'FLV',\n 'video/x-flv': 'FLV',\n 'video/mp4': 'MP4',\n 'video/m4v': 'MP4'\n};\n\nFlash.onReady = function (currSwf) {\n var el = Dom.getEl(currSwf);\n var tech = el && el.tech;\n\n // if there is no el then the tech has been disposed\n // and the tech element was removed from the player div\n if (tech && tech.el()) {\n // check that the flash object is really ready\n Flash.checkReady(tech);\n }\n};\n\n// The SWF isn't always ready when it says it is. Sometimes the API functions still need to be added to the object.\n// If it's not ready, we set a timeout to check again shortly.\nFlash.checkReady = function (tech) {\n // stop worrying if the tech has been disposed\n if (!tech.el()) {\n return;\n }\n\n // check if API property exists\n if (tech.el().vjs_getProperty) {\n // tell tech it's ready\n tech.triggerReady();\n } else {\n // wait longer\n this.setTimeout(function () {\n Flash.checkReady(tech);\n }, 50);\n }\n};\n\n// Trigger events from the swf on the player\nFlash.onEvent = function (swfID, eventName) {\n var tech = Dom.getEl(swfID).tech;\n tech.trigger(eventName);\n};\n\n// Log errors from the swf\nFlash.onError = function (swfID, err) {\n var tech = Dom.getEl(swfID).tech;\n var msg = 'FLASH: ' + err;\n\n if (err === 'srcnotfound') {\n tech.trigger('error', { code: 4, message: msg });\n\n // errors we haven't categorized into the media errors\n } else {\n tech.trigger('error', msg);\n }\n};\n\n// Flash Version Check\nFlash.version = function () {\n var version = '0,0,0';\n\n // IE\n try {\n version = new _window2['default'].ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\\D+/g, ',').match(/^,?(.+),?$/)[1];\n\n // other browsers\n } catch (e) {\n try {\n if (navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin) {\n version = (navigator.plugins['Shockwave Flash 2.0'] || navigator.plugins['Shockwave Flash']).description.replace(/\\D+/g, ',').match(/^,?(.+),?$/)[1];\n }\n } catch (err) {}\n }\n return version.split(',');\n};\n\n// Flash embedding method. Only used in non-iframe mode\nFlash.embed = function (swf, flashVars, params, attributes) {\n var code = Flash.getEmbedCode(swf, flashVars, params, attributes);\n\n // Get element by embedding code and retrieving created element\n var obj = Dom.createEl('div', { innerHTML: code }).childNodes[0];\n\n return obj;\n};\n\nFlash.getEmbedCode = function (swf, flashVars, params, attributes) {\n var objTag = '';\n });\n\n attributes = _assign2['default']({\n // Add swf to attributes (need both for IE and Others to work)\n data: swf,\n\n // Default to 100% width/height\n width: '100%',\n height: '100%'\n\n }, attributes);\n\n // Create Attributes string\n Object.getOwnPropertyNames(attributes).forEach(function (key) {\n attrsString += '' + key + '=\"' + attributes[key] + '\" ';\n });\n\n return '' + objTag + '' + attrsString + '>' + paramsString + '';\n};\n\n// Run Flash through the RTMP decorator\n_FlashRtmpDecorator2['default'](Flash);\n\n_Component2['default'].registerComponent('Flash', Flash);\nexports['default'] = Flash;\nmodule.exports = exports['default'];\n\n},{\"../component\":52,\"../utils/dom.js\":110,\"../utils/time-ranges.js\":118,\"../utils/url.js\":120,\"./flash-rtmp\":97,\"./tech\":101,\"global/window\":2,\"object.assign\":44}],99:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file html5.js \n * HTML5 Media Controller - Wrapper for HTML5 Media API\n */\n\nvar _Tech2 = _dereq_('./tech.js');\n\nvar _Tech3 = _interopRequireWildcard(_Tech2);\n\nvar _Component = _dereq_('../component');\n\nvar _Component2 = _interopRequireWildcard(_Component);\n\nvar _import = _dereq_('../utils/dom.js');\n\nvar Dom = _interopRequireWildcard(_import);\n\nvar _import2 = _dereq_('../utils/url.js');\n\nvar Url = _interopRequireWildcard(_import2);\n\nvar _import3 = _dereq_('../utils/fn.js');\n\nvar Fn = _interopRequireWildcard(_import3);\n\nvar _log = _dereq_('../utils/log.js');\n\nvar _log2 = _interopRequireWildcard(_log);\n\nvar _import4 = _dereq_('../utils/browser.js');\n\nvar browser = _interopRequireWildcard(_import4);\n\nvar _document = _dereq_('global/document');\n\nvar _document2 = _interopRequireWildcard(_document);\n\nvar _window = _dereq_('global/window');\n\nvar _window2 = _interopRequireWildcard(_window);\n\nvar _assign = _dereq_('object.assign');\n\nvar _assign2 = _interopRequireWildcard(_assign);\n\nvar _mergeOptions = _dereq_('../utils/merge-options.js');\n\nvar _mergeOptions2 = _interopRequireWildcard(_mergeOptions);\n\n/**\n * HTML5 Media Controller - Wrapper for HTML5 Media API\n *\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends Tech\n * @class Html5\n */\n\nvar Html5 = (function (_Tech) {\n function Html5(options, ready) {\n _classCallCheck(this, Html5);\n\n _Tech.call(this, options, ready);\n\n var source = options.source;\n\n // Set the source if one is provided\n // 1) Check if the source is new (if not, we want to keep the original so playback isn't interrupted)\n // 2) Check to see if the network state of the tag was failed at init, and if so, reset the source\n // anyway so the error gets fired.\n if (source && (this.el_.currentSrc !== source.src || options.tag && options.tag.initNetworkState_ === 3)) {\n this.setSource(source);\n }\n\n if (this.el_.hasChildNodes()) {\n\n var nodes = this.el_.childNodes;\n var nodesLength = nodes.length;\n var removeNodes = [];\n\n while (nodesLength--) {\n var node = nodes[nodesLength];\n var nodeName = node.nodeName.toLowerCase();\n if (nodeName === 'track') {\n if (!this.featuresNativeTextTracks) {\n // Empty video tag tracks so the built-in player doesn't use them also.\n // This may not be fast enough to stop HTML5 browsers from reading the tags\n // so we'll need to turn off any default tracks if we're manually doing\n // captions and subtitles. videoElement.textTracks\n removeNodes.push(node);\n } else {\n this.remoteTextTracks().addTrack_(node.track);\n }\n }\n }\n\n for (var i = 0; i < removeNodes.length; i++) {\n this.el_.removeChild(removeNodes[i]);\n }\n }\n\n if (this.featuresNativeTextTracks) {\n this.on('loadstart', Fn.bind(this, this.hideCaptions));\n }\n\n // Determine if native controls should be used\n // Our goal should be to get the custom controls on mobile solid everywhere\n // so we can remove this all together. Right now this will block custom\n // controls on touch enabled laptops like the Chrome Pixel\n if (browser.TOUCH_ENABLED && options.nativeControlsForTouch === true) {\n this.trigger('usenativecontrols');\n }\n\n this.triggerReady();\n }\n\n _inherits(Html5, _Tech);\n\n /**\n * Dispose of html5 media element\n *\n * @method dispose\n */\n\n Html5.prototype.dispose = function dispose() {\n Html5.disposeMediaElement(this.el_);\n _Tech.prototype.dispose.call(this);\n };\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n\n Html5.prototype.createEl = function createEl() {\n var el = this.options_.tag;\n\n // Check if this browser supports moving the element into the box.\n // On the iPhone video will break if you move the element,\n // So we have to create a brand new element.\n if (!el || this.movingMediaElementInDOM === false) {\n\n // If the original tag is still there, clone and remove it.\n if (el) {\n var clone = el.cloneNode(false);\n Html5.disposeMediaElement(el);\n el = clone;\n } else {\n el = _document2['default'].createElement('video');\n\n // determine if native controls should be used\n var tagAttributes = this.options_.tag && Dom.getElAttributes(this.options_.tag);\n var attributes = _mergeOptions2['default']({}, tagAttributes);\n if (!browser.TOUCH_ENABLED || this.options_.nativeControlsForTouch !== true) {\n delete attributes.controls;\n }\n\n Dom.setElAttributes(el, _assign2['default'](attributes, {\n id: this.options_.techId,\n 'class': 'vjs-tech'\n }));\n }\n\n if (this.options_.tracks) {\n for (var i = 0; i < this.options_.tracks.length; i++) {\n var _track = this.options_.tracks[i];\n var trackEl = _document2['default'].createElement('track');\n trackEl.kind = _track.kind;\n trackEl.label = _track.label;\n trackEl.srclang = _track.srclang;\n trackEl.src = _track.src;\n if ('default' in _track) {\n trackEl.setAttribute('default', 'default');\n }\n el.appendChild(trackEl);\n }\n }\n }\n\n // Update specific tag settings, in case they were overridden\n var settingsAttrs = ['autoplay', 'preload', 'loop', 'muted'];\n for (var i = settingsAttrs.length - 1; i >= 0; i--) {\n var attr = settingsAttrs[i];\n var overwriteAttrs = {};\n if (typeof this.options_[attr] !== 'undefined') {\n overwriteAttrs[attr] = this.options_[attr];\n }\n Dom.setElAttributes(el, overwriteAttrs);\n }\n\n return el;\n // jenniisawesome = true;\n };\n\n /**\n * Hide captions from text track\n *\n * @method hideCaptions\n */\n\n Html5.prototype.hideCaptions = function hideCaptions() {\n var tracks = this.el_.querySelectorAll('track');\n var i = tracks.length;\n var kinds = {\n captions: 1,\n subtitles: 1\n };\n\n while (i--) {\n var _track2 = tracks[i].track;\n if (_track2 && _track2.kind in kinds && !tracks[i]['default']) {\n _track2.mode = 'disabled';\n }\n }\n };\n\n /**\n * Play for html5 tech\n *\n * @method play\n */\n\n Html5.prototype.play = function play() {\n this.el_.play();\n };\n\n /**\n * Pause for html5 tech\n *\n * @method pause\n */\n\n Html5.prototype.pause = function pause() {\n this.el_.pause();\n };\n\n /**\n * Paused for html5 tech\n *\n * @return {Boolean} \n * @method paused\n */\n\n Html5.prototype.paused = function paused() {\n return this.el_.paused;\n };\n\n /**\n * Get current time\n *\n * @return {Number} \n * @method currentTime\n */\n\n Html5.prototype.currentTime = function currentTime() {\n return this.el_.currentTime;\n };\n\n /**\n * Set current time\n *\n * @param {Number} seconds Current time of video \n * @method setCurrentTime\n */\n\n Html5.prototype.setCurrentTime = function setCurrentTime(seconds) {\n try {\n this.el_.currentTime = seconds;\n } catch (e) {\n _log2['default'](e, 'Video is not ready. (Video.js)');\n // this.warning(VideoJS.warnings.videoNotReady);\n }\n };\n\n /**\n * Get duration\n *\n * @return {Number}\n * @method duration\n */\n\n Html5.prototype.duration = function duration() {\n return this.el_.duration || 0;\n };\n\n /**\n * Get a TimeRange object that represents the intersection\n * of the time ranges for which the user agent has all\n * relevant media\n *\n * @return {TimeRangeObject}\n * @method buffered\n */\n\n Html5.prototype.buffered = function buffered() {\n return this.el_.buffered;\n };\n\n /**\n * Get volume level \n *\n * @return {Number}\n * @method volume\n */\n\n Html5.prototype.volume = function volume() {\n return this.el_.volume;\n };\n\n /**\n * Set volume level \n *\n * @param {Number} percentAsDecimal Volume percent as a decimal\n * @method setVolume\n */\n\n Html5.prototype.setVolume = function setVolume(percentAsDecimal) {\n this.el_.volume = percentAsDecimal;\n };\n\n /**\n * Get if muted \n *\n * @return {Boolean}\n * @method muted\n */\n\n Html5.prototype.muted = function muted() {\n return this.el_.muted;\n };\n\n /**\n * Set muted \n *\n * @param {Boolean} If player is to be muted or note\n * @method setMuted\n */\n\n Html5.prototype.setMuted = function setMuted(muted) {\n this.el_.muted = muted;\n };\n\n /**\n * Get player width \n *\n * @return {Number}\n * @method width\n */\n\n Html5.prototype.width = function width() {\n return this.el_.offsetWidth;\n };\n\n /**\n * Get player height \n *\n * @return {Number}\n * @method height\n */\n\n Html5.prototype.height = function height() {\n return this.el_.offsetHeight;\n };\n\n /**\n * Get if there is fullscreen support \n *\n * @return {Boolean} \n * @method supportsFullScreen\n */\n\n Html5.prototype.supportsFullScreen = function supportsFullScreen() {\n if (typeof this.el_.webkitEnterFullScreen === 'function') {\n var userAgent = _window2['default'].navigator.userAgent;\n // Seems to be broken in Chromium/Chrome && Safari in Leopard\n if (/Android/.test(userAgent) || !/Chrome|Mac OS X 10.5/.test(userAgent)) {\n return true;\n }\n }\n return false;\n };\n\n /**\n * Request to enter fullscreen\n *\n * @method enterFullScreen\n */\n\n Html5.prototype.enterFullScreen = function enterFullScreen() {\n var video = this.el_;\n\n if ('webkitDisplayingFullscreen' in video) {\n this.one('webkitbeginfullscreen', function () {\n this.one('webkitendfullscreen', function () {\n this.trigger('fullscreenchange');\n });\n\n this.trigger('fullscreenchange');\n });\n }\n\n if (video.paused && video.networkState <= video.HAVE_METADATA) {\n // attempt to prime the video element for programmatic access\n // this isn't necessary on the desktop but shouldn't hurt\n this.el_.play();\n\n // playing and pausing synchronously during the transition to fullscreen\n // can get iOS ~6.1 devices into a play/pause loop\n this.setTimeout(function () {\n video.pause();\n video.webkitEnterFullScreen();\n }, 0);\n } else {\n video.webkitEnterFullScreen();\n }\n };\n\n /**\n * Request to exit fullscreen\n *\n * @method exitFullScreen\n */\n\n Html5.prototype.exitFullScreen = function exitFullScreen() {\n this.el_.webkitExitFullScreen();\n };\n\n /**\n * Get/set video\n *\n * @param {Object=} src Source object \n * @return {Object} \n * @method src\n */\n\n Html5.prototype.src = (function (_src) {\n function src(_x) {\n return _src.apply(this, arguments);\n }\n\n src.toString = function () {\n return _src.toString();\n };\n\n return src;\n })(function (src) {\n if (src === undefined) {\n return this.el_.src;\n } else {\n // Setting src through `src` instead of `setSrc` will be deprecated\n this.setSrc(src);\n }\n });\n\n /**\n * Set video\n *\n * @param {Object} src Source object \n * @deprecated\n * @method setSrc\n */\n\n Html5.prototype.setSrc = function setSrc(src) {\n this.el_.src = src;\n };\n\n /**\n * Load media into player\n *\n * @method load\n */\n\n Html5.prototype.load = function load() {\n this.el_.load();\n };\n\n /**\n * Get current source \n *\n * @return {Object} \n * @method currentSrc\n */\n\n Html5.prototype.currentSrc = function currentSrc() {\n return this.el_.currentSrc;\n };\n\n /**\n * Get poster \n *\n * @return {String} \n * @method poster\n */\n\n Html5.prototype.poster = function poster() {\n return this.el_.poster;\n };\n\n /**\n * Set poster \n *\n * @param {String} val URL to poster image\n * @method \n */\n\n Html5.prototype.setPoster = function setPoster(val) {\n this.el_.poster = val;\n };\n\n /**\n * Get preload attribute \n *\n * @return {String} \n * @method preload\n */\n\n Html5.prototype.preload = function preload() {\n return this.el_.preload;\n };\n\n /**\n * Set preload attribute \n *\n * @param {String} val Value for preload attribute \n * @method setPreload\n */\n\n Html5.prototype.setPreload = function setPreload(val) {\n this.el_.preload = val;\n };\n\n /**\n * Get autoplay attribute \n *\n * @return {String} \n * @method autoplay\n */\n\n Html5.prototype.autoplay = function autoplay() {\n return this.el_.autoplay;\n };\n\n /**\n * Set autoplay attribute \n *\n * @param {String} val Value for preload attribute \n * @method setAutoplay\n */\n\n Html5.prototype.setAutoplay = function setAutoplay(val) {\n this.el_.autoplay = val;\n };\n\n /**\n * Get controls attribute \n *\n * @return {String} \n * @method controls\n */\n\n Html5.prototype.controls = function controls() {\n return this.el_.controls;\n };\n\n /**\n * Set controls attribute \n *\n * @param {String} val Value for controls attribute \n * @method setControls\n */\n\n Html5.prototype.setControls = function setControls(val) {\n this.el_.controls = !!val;\n };\n\n /**\n * Get loop attribute \n *\n * @return {String} \n * @method loop\n */\n\n Html5.prototype.loop = function loop() {\n return this.el_.loop;\n };\n\n /**\n * Set loop attribute \n *\n * @param {String} val Value for loop attribute \n * @method setLoop\n */\n\n Html5.prototype.setLoop = function setLoop(val) {\n this.el_.loop = val;\n };\n\n /**\n * Get error value \n *\n * @return {String} \n * @method error\n */\n\n Html5.prototype.error = function error() {\n return this.el_.error;\n };\n\n /**\n * Get whether or not the player is in the \"seeking\" state\n *\n * @return {Boolean} \n * @method seeking\n */\n\n Html5.prototype.seeking = function seeking() {\n return this.el_.seeking;\n };\n\n /**\n * Get a TimeRanges object that represents the \n * ranges of the media resource to which it is possible \n * for the user agent to seek. \n *\n * @return {TimeRangeObject} \n * @method seekable\n */\n\n Html5.prototype.seekable = function seekable() {\n return this.el_.seekable;\n };\n\n /**\n * Get if video ended \n *\n * @return {Boolean} \n * @method ended\n */\n\n Html5.prototype.ended = function ended() {\n return this.el_.ended;\n };\n\n /**\n * Get the value of the muted content attribute\n * This attribute has no dynamic effect, it only \n * controls the default state of the element\n *\n * @return {Boolean} \n * @method defaultMuted\n */\n\n Html5.prototype.defaultMuted = function defaultMuted() {\n return this.el_.defaultMuted;\n };\n\n /**\n * Get desired speed at which the media resource is to play \n *\n * @return {Number}\n * @method playbackRate\n */\n\n Html5.prototype.playbackRate = function playbackRate() {\n return this.el_.playbackRate;\n };\n\n /**\n * Set desired speed at which the media resource is to play \n *\n * @param {Number} val Speed at which the media resource is to play\n * @method setPlaybackRate\n */\n\n Html5.prototype.setPlaybackRate = function setPlaybackRate(val) {\n this.el_.playbackRate = val;\n };\n\n /**\n * Get the current state of network activity for the element, from\n * the list below\n * NETWORK_EMPTY (numeric value 0)\n * NETWORK_IDLE (numeric value 1)\n * NETWORK_LOADING (numeric value 2)\n * NETWORK_NO_SOURCE (numeric value 3)\n *\n * @return {Number}\n * @method networkState\n */\n\n Html5.prototype.networkState = function networkState() {\n return this.el_.networkState;\n };\n\n /**\n * Get a value that expresses the current state of the element \n * with respect to rendering the current playback position, from \n * the codes in the list below\n * HAVE_NOTHING (numeric value 0)\n * HAVE_METADATA (numeric value 1)\n * HAVE_CURRENT_DATA (numeric value 2)\n * HAVE_FUTURE_DATA (numeric value 3)\n * HAVE_ENOUGH_DATA (numeric value 4)\n * \n * @return {Number}\n * @method readyState\n */\n\n Html5.prototype.readyState = function readyState() {\n return this.el_.readyState;\n };\n\n /**\n * Get width of video \n *\n * @return {Number}\n * @method videoWidth\n */\n\n Html5.prototype.videoWidth = function videoWidth() {\n return this.el_.videoWidth;\n };\n\n /**\n * Get height of video \n *\n * @return {Number}\n * @method videoHeight\n */\n\n Html5.prototype.videoHeight = function videoHeight() {\n return this.el_.videoHeight;\n };\n\n /**\n * Get text tracks \n *\n * @return {TextTrackList} \n * @method textTracks\n */\n\n Html5.prototype.textTracks = function textTracks() {\n if (!this.featuresNativeTextTracks) {\n return _Tech.prototype.textTracks.call(this);\n }\n\n return this.el_.textTracks;\n };\n\n /**\n * Creates and returns a text track object \n *\n * @param {String} kind Text track kind (subtitles, captions, descriptions\n * chapters and metadata)\n * @param {String=} label Label to identify the text track\n * @param {String=} language Two letter language abbreviation\n * @return {TextTrackObject}\n * @method addTextTrack\n */\n\n Html5.prototype.addTextTrack = function addTextTrack(kind, label, language) {\n if (!this.featuresNativeTextTracks) {\n return _Tech.prototype.addTextTrack.call(this, kind, label, language);\n }\n\n return this.el_.addTextTrack(kind, label, language);\n };\n\n /**\n * Creates and returns a remote text track object \n *\n * @param {Object} options The object should contain values for\n * kind, language, label and src (location of the WebVTT file)\n * @return {TextTrackObject}\n * @method addRemoteTextTrack\n */\n\n Html5.prototype.addRemoteTextTrack = function addRemoteTextTrack() {\n var options = arguments[0] === undefined ? {} : arguments[0];\n\n if (!this.featuresNativeTextTracks) {\n return _Tech.prototype.addRemoteTextTrack.call(this, options);\n }\n\n var track = _document2['default'].createElement('track');\n\n if (options.kind) {\n track.kind = options.kind;\n }\n if (options.label) {\n track.label = options.label;\n }\n if (options.language || options.srclang) {\n track.srclang = options.language || options.srclang;\n }\n if (options['default']) {\n track['default'] = options['default'];\n }\n if (options.id) {\n track.id = options.id;\n }\n if (options.src) {\n track.src = options.src;\n }\n\n this.el().appendChild(track);\n\n if (track.track.kind === 'metadata') {\n track.track.mode = 'hidden';\n } else {\n track.track.mode = 'disabled';\n }\n\n track.onload = function () {\n var tt = track.track;\n if (track.readyState >= 2) {\n if (tt.kind === 'metadata' && tt.mode !== 'hidden') {\n tt.mode = 'hidden';\n } else if (tt.kind !== 'metadata' && tt.mode !== 'disabled') {\n tt.mode = 'disabled';\n }\n track.onload = null;\n }\n };\n\n this.remoteTextTracks().addTrack_(track.track);\n\n return track;\n };\n\n /**\n * Remove remote text track from TextTrackList object \n *\n * @param {TextTrackObject} track Texttrack object to remove\n * @method removeRemoteTextTrack\n */\n\n Html5.prototype.removeRemoteTextTrack = function removeRemoteTextTrack(track) {\n if (!this.featuresNativeTextTracks) {\n return _Tech.prototype.removeRemoteTextTrack.call(this, track);\n }\n\n var tracks, i;\n\n this.remoteTextTracks().removeTrack_(track);\n\n tracks = this.el().querySelectorAll('track');\n\n for (i = 0; i < tracks.length; i++) {\n if (tracks[i] === track || tracks[i].track === track) {\n tracks[i].parentNode.removeChild(tracks[i]);\n break;\n }\n }\n };\n\n return Html5;\n})(_Tech3['default']);\n\n/* HTML5 Support Testing ---------------------------------------------------- */\n\n/*\n* Element for testing browser HTML5 video capabilities\n*\n* @type {Element}\n* @constant\n* @private\n*/\nHtml5.TEST_VID = _document2['default'].createElement('video');\nvar track = _document2['default'].createElement('track');\ntrack.kind = 'captions';\ntrack.srclang = 'en';\ntrack.label = 'English';\nHtml5.TEST_VID.appendChild(track);\n\n/*\n * Check if HTML5 video is supported by this browser/device\n *\n * @return {Boolean}\n */\nHtml5.isSupported = function () {\n // IE9 with no Media Player is a LIAR! (#984)\n try {\n Html5.TEST_VID.volume = 0.5;\n } catch (e) {\n return false;\n }\n\n return !!Html5.TEST_VID.canPlayType;\n};\n\n// Add Source Handler pattern functions to this tech\n_Tech3['default'].withSourceHandlers(Html5);\n\n/*\n * The default native source handler.\n * This simply passes the source to the video element. Nothing fancy.\n *\n * @param {Object} source The source object\n * @param {Html5} tech The instance of the HTML5 tech\n */\nHtml5.nativeSourceHandler = {};\n\n/*\n * Check if the video element can handle the source natively\n *\n * @param {Object} source The source object\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\nHtml5.nativeSourceHandler.canHandleSource = function (source) {\n var match, ext;\n\n function canPlayType(type) {\n // IE9 on Windows 7 without MediaPlayer throws an error here\n // https://github.com/videojs/video.js/issues/519\n try {\n return Html5.TEST_VID.canPlayType(type);\n } catch (e) {\n return '';\n }\n }\n\n // If a type was provided we should rely on that\n if (source.type) {\n return canPlayType(source.type);\n } else if (source.src) {\n // If no type, fall back to checking 'video/[EXTENSION]'\n ext = Url.getFileExtension(source.src);\n\n return canPlayType('video/' + ext);\n }\n\n return '';\n};\n\n/*\n * Pass the source to the video element\n * Adaptive source handlers will have more complicated workflows before passing\n * video data to the video element\n *\n * @param {Object} source The source object\n * @param {Html5} tech The instance of the Html5 tech\n */\nHtml5.nativeSourceHandler.handleSource = function (source, tech) {\n tech.setSrc(source.src);\n};\n\n/*\n* Clean up the source handler when disposing the player or switching sources..\n* (no cleanup is needed when supporting the format natively)\n*/\nHtml5.nativeSourceHandler.dispose = function () {};\n\n// Register the native source handler\nHtml5.registerSourceHandler(Html5.nativeSourceHandler);\n\n/*\n * Check if the volume can be changed in this browser/device.\n * Volume cannot be changed in a lot of mobile devices.\n * Specifically, it can't be changed from 1 on iOS.\n *\n * @return {Boolean}\n */\nHtml5.canControlVolume = function () {\n var volume = Html5.TEST_VID.volume;\n Html5.TEST_VID.volume = volume / 2 + 0.1;\n return volume !== Html5.TEST_VID.volume;\n};\n\n/*\n * Check if playbackRate is supported in this browser/device.\n *\n * @return {Number} [description]\n */\nHtml5.canControlPlaybackRate = function () {\n var playbackRate = Html5.TEST_VID.playbackRate;\n Html5.TEST_VID.playbackRate = playbackRate / 2 + 0.1;\n return playbackRate !== Html5.TEST_VID.playbackRate;\n};\n\n/*\n * Check to see if native text tracks are supported by this browser/device\n *\n * @return {Boolean}\n */\nHtml5.supportsNativeTextTracks = function () {\n var supportsTextTracks;\n\n // Figure out native text track support\n // If mode is a number, we cannot change it because it'll disappear from view.\n // Browsers with numeric modes include IE10 and older (<=2013) samsung android models.\n // Firefox isn't playing nice either with modifying the mode\n // TODO: Investigate firefox: https://github.com/videojs/video.js/issues/1862\n supportsTextTracks = !!Html5.TEST_VID.textTracks;\n if (supportsTextTracks && Html5.TEST_VID.textTracks.length > 0) {\n supportsTextTracks = typeof Html5.TEST_VID.textTracks[0].mode !== 'number';\n }\n if (supportsTextTracks && browser.IS_FIREFOX) {\n supportsTextTracks = false;\n }\n\n return supportsTextTracks;\n};\n\n/*\n * Set the tech's volume control support status\n *\n * @type {Boolean}\n */\nHtml5.prototype.featuresVolumeControl = Html5.canControlVolume();\n\n/*\n * Set the tech's playbackRate support status\n *\n * @type {Boolean}\n */\nHtml5.prototype.featuresPlaybackRate = Html5.canControlPlaybackRate();\n\n/*\n * Set the tech's status on moving the video element.\n * In iOS, if you move a video element in the DOM, it breaks video playback.\n *\n * @type {Boolean}\n */\nHtml5.prototype.movingMediaElementInDOM = !browser.IS_IOS;\n\n/*\n * Set the the tech's fullscreen resize support status.\n * HTML video is able to automatically resize when going to fullscreen.\n * (No longer appears to be used. Can probably be removed.)\n */\nHtml5.prototype.featuresFullscreenResize = true;\n\n/*\n * Set the tech's progress event support status\n * (this disables the manual progress events of the Tech)\n */\nHtml5.prototype.featuresProgressEvents = true;\n\n/*\n * Sets the tech's status on native text track support\n *\n * @type {Boolean}\n */\nHtml5.prototype.featuresNativeTextTracks = Html5.supportsNativeTextTracks();\n\n// HTML5 Feature detection and Device Fixes --------------------------------- //\nvar canPlayType = undefined;\nvar mpegurlRE = /^application\\/(?:x-|vnd\\.apple\\.)mpegurl/i;\nvar mp4RE = /^video\\/mp4/i;\n\nHtml5.patchCanPlayType = function () {\n // Android 4.0 and above can play HLS to some extent but it reports being unable to do so\n if (browser.ANDROID_VERSION >= 4) {\n if (!canPlayType) {\n canPlayType = Html5.TEST_VID.constructor.prototype.canPlayType;\n }\n\n Html5.TEST_VID.constructor.prototype.canPlayType = function (type) {\n if (type && mpegurlRE.test(type)) {\n return 'maybe';\n }\n return canPlayType.call(this, type);\n };\n }\n\n // Override Android 2.2 and less canPlayType method which is broken\n if (browser.IS_OLD_ANDROID) {\n if (!canPlayType) {\n canPlayType = Html5.TEST_VID.constructor.prototype.canPlayType;\n }\n\n Html5.TEST_VID.constructor.prototype.canPlayType = function (type) {\n if (type && mp4RE.test(type)) {\n return 'maybe';\n }\n return canPlayType.call(this, type);\n };\n }\n};\n\nHtml5.unpatchCanPlayType = function () {\n var r = Html5.TEST_VID.constructor.prototype.canPlayType;\n Html5.TEST_VID.constructor.prototype.canPlayType = canPlayType;\n canPlayType = null;\n return r;\n};\n\n// by default, patch the video element\nHtml5.patchCanPlayType();\n\nHtml5.disposeMediaElement = function (el) {\n if (!el) {\n return;\n }\n\n if (el.parentNode) {\n el.parentNode.removeChild(el);\n }\n\n // remove any child track or source nodes to prevent their loading\n while (el.hasChildNodes()) {\n el.removeChild(el.firstChild);\n }\n\n // remove any src reference. not setting `src=''` because that causes a warning\n // in firefox\n el.removeAttribute('src');\n\n // force the media element to update its loading state by calling load()\n // however IE on Windows 7N has a bug that throws an error so need a try/catch (#793)\n if (typeof el.load === 'function') {\n // wrapping in an iife so it's not deoptimized (#1060#discussion_r10324473)\n (function () {\n try {\n el.load();\n } catch (e) {}\n })();\n }\n};\n\n_Component2['default'].registerComponent('Html5', Html5);\nexports['default'] = Html5;\nmodule.exports = exports['default'];\n\n// not supported\n\n},{\"../component\":52,\"../utils/browser.js\":108,\"../utils/dom.js\":110,\"../utils/fn.js\":112,\"../utils/log.js\":115,\"../utils/merge-options.js\":116,\"../utils/url.js\":120,\"./tech.js\":101,\"global/document\":1,\"global/window\":2,\"object.assign\":44}],100:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file loader.js\n */\n\nvar _Component2 = _dereq_('../component');\n\nvar _Component3 = _interopRequireWildcard(_Component2);\n\nvar _window = _dereq_('global/window');\n\nvar _window2 = _interopRequireWildcard(_window);\n\nvar _toTitleCase = _dereq_('../utils/to-title-case.js');\n\nvar _toTitleCase2 = _interopRequireWildcard(_toTitleCase);\n\n/**\n * The Media Loader is the component that decides which playback technology to load\n * when the player is initialized.\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends Component\n * @class MediaLoader\n */\n\nvar MediaLoader = (function (_Component) {\n function MediaLoader(player, options, ready) {\n _classCallCheck(this, MediaLoader);\n\n _Component.call(this, player, options, ready);\n\n // If there are no sources when the player is initialized,\n // load the first supported playback technology.\n\n if (!options.playerOptions.sources || options.playerOptions.sources.length === 0) {\n for (var i = 0, j = options.playerOptions.techOrder; i < j.length; i++) {\n var techName = _toTitleCase2['default'](j[i]);\n var tech = _Component3['default'].getComponent(techName);\n\n // Check if the browser supports this technology\n if (tech && tech.isSupported()) {\n player.loadTech(techName);\n break;\n }\n }\n } else {\n // // Loop through playback technologies (HTML5, Flash) and check for support.\n // // Then load the best source.\n // // A few assumptions here:\n // // All playback technologies respect preload false.\n player.src(options.playerOptions.sources);\n }\n }\n\n _inherits(MediaLoader, _Component);\n\n return MediaLoader;\n})(_Component3['default']);\n\n_Component3['default'].registerComponent('MediaLoader', MediaLoader);\nexports['default'] = MediaLoader;\nmodule.exports = exports['default'];\n\n},{\"../component\":52,\"../utils/to-title-case.js\":119,\"global/window\":2}],101:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file tech.js\n * Media Technology Controller - Base class for media playback\n * technology controllers like Flash and HTML5\n */\n\nvar _Component2 = _dereq_('../component');\n\nvar _Component3 = _interopRequireWildcard(_Component2);\n\nvar _TextTrack = _dereq_('../tracks/text-track');\n\nvar _TextTrack2 = _interopRequireWildcard(_TextTrack);\n\nvar _TextTrackList = _dereq_('../tracks/text-track-list');\n\nvar _TextTrackList2 = _interopRequireWildcard(_TextTrackList);\n\nvar _import = _dereq_('../utils/fn.js');\n\nvar Fn = _interopRequireWildcard(_import);\n\nvar _log = _dereq_('../utils/log.js');\n\nvar _log2 = _interopRequireWildcard(_log);\n\nvar _createTimeRange = _dereq_('../utils/time-ranges.js');\n\nvar _bufferedPercent2 = _dereq_('../utils/buffer.js');\n\nvar _window = _dereq_('global/window');\n\nvar _window2 = _interopRequireWildcard(_window);\n\nvar _document = _dereq_('global/document');\n\nvar _document2 = _interopRequireWildcard(_document);\n\n/**\n * Base class for media (HTML5 Video, Flash) controllers\n *\n * @param {Object=} options Options object\n * @param {Function=} ready Ready callback function\n * @extends Component\n * @class Tech\n */\n\nvar Tech = (function (_Component) {\n function Tech() {\n var options = arguments[0] === undefined ? {} : arguments[0];\n var ready = arguments[1] === undefined ? function () {} : arguments[1];\n\n _classCallCheck(this, Tech);\n\n // we don't want the tech to report user activity automatically.\n // This is done manually in addControlsListeners\n options.reportTouchActivity = false;\n _Component.call(this, null, options, ready);\n\n this.textTracks_ = options.textTracks;\n\n // Manually track progress in cases where the browser/flash player doesn't report it.\n if (!this.featuresProgressEvents) {\n this.manualProgressOn();\n }\n\n // Manually track timeupdates in cases where the browser/flash player doesn't report it.\n if (!this.featuresTimeupdateEvents) {\n this.manualTimeUpdatesOn();\n }\n\n this.initControlsListeners();\n\n if (options.nativeCaptions === false || options.nativeTextTracks === false) {\n this.featuresNativeTextTracks = false;\n }\n\n if (!this.featuresNativeTextTracks) {\n this.emulateTextTracks();\n }\n\n this.initTextTrackListeners();\n\n // Turn on component tap events\n this.emitTapEvents();\n }\n\n _inherits(Tech, _Component);\n\n /**\n * Set up click and touch listeners for the playback element\n * On desktops, a click on the video itself will toggle playback,\n * on a mobile device a click on the video toggles controls.\n * (toggling controls is done by toggling the user state between active and\n * inactive)\n * A tap can signal that a user has become active, or has become inactive\n * e.g. a quick tap on an iPhone movie should reveal the controls. Another\n * quick tap should hide them again (signaling the user is in an inactive\n * viewing state)\n * In addition to this, we still want the user to be considered inactive after\n * a few seconds of inactivity.\n * Note: the only part of iOS interaction we can't mimic with this setup\n * is a touch and hold on the video element counting as activity in order to\n * keep the controls showing, but that shouldn't be an issue. A touch and hold on\n * any controls will still keep the user active\n *\n * @method initControlsListeners\n */\n\n Tech.prototype.initControlsListeners = function initControlsListeners() {\n // if we're loading the playback object after it has started loading or playing the\n // video (often with autoplay on) then the loadstart event has already fired and we\n // need to fire it manually because many things rely on it.\n // Long term we might consider how we would do this for other events like 'canplay'\n // that may also have fired.\n this.ready(function () {\n if (this.networkState && this.networkState() > 0) {\n this.trigger('loadstart');\n }\n });\n };\n\n /* Fallbacks for unsupported event types\n ================================================================================ */\n // Manually trigger progress events based on changes to the buffered amount\n // Many flash players and older HTML5 browsers don't send progress or progress-like events\n /**\n * Turn on progress events \n *\n * @method manualProgressOn\n */\n\n Tech.prototype.manualProgressOn = function manualProgressOn() {\n this.on('durationchange', this.onDurationChange);\n\n this.manualProgress = true;\n\n // Trigger progress watching when a source begins loading\n this.trackProgress();\n };\n\n /**\n * Turn off progress events \n *\n * @method manualProgressOff\n */\n\n Tech.prototype.manualProgressOff = function manualProgressOff() {\n this.manualProgress = false;\n this.stopTrackingProgress();\n\n this.off('durationchange', this.onDurationChange);\n };\n\n /**\n * Track progress \n *\n * @method trackProgress\n */\n\n Tech.prototype.trackProgress = function trackProgress() {\n this.progressInterval = this.setInterval(Fn.bind(this, function () {\n // Don't trigger unless buffered amount is greater than last time\n\n var numBufferedPercent = this.bufferedPercent();\n\n if (this.bufferedPercent_ !== numBufferedPercent) {\n this.trigger('progress');\n }\n\n this.bufferedPercent_ = numBufferedPercent;\n\n if (numBufferedPercent === 1) {\n this.stopTrackingProgress();\n }\n }), 500);\n };\n\n /**\n * Update duration \n *\n * @method onDurationChange\n */\n\n Tech.prototype.onDurationChange = function onDurationChange() {\n this.duration_ = this.duration();\n };\n\n /**\n * Create and get TimeRange object for buffering \n *\n * @return {TimeRangeObject}\n * @method buffered\n */\n\n Tech.prototype.buffered = function buffered() {\n return _createTimeRange.createTimeRange(0, 0);\n };\n\n /**\n * Get buffered percent\n *\n * @return {Number}\n * @method bufferedPercent\n */\n\n Tech.prototype.bufferedPercent = (function (_bufferedPercent) {\n function bufferedPercent() {\n return _bufferedPercent.apply(this, arguments);\n }\n\n bufferedPercent.toString = function () {\n return _bufferedPercent.toString();\n };\n\n return bufferedPercent;\n })(function () {\n return _bufferedPercent2.bufferedPercent(this.buffered(), this.duration_);\n });\n\n /**\n * Stops tracking progress by clearing progress interval \n *\n * @method stopTrackingProgress\n */\n\n Tech.prototype.stopTrackingProgress = function stopTrackingProgress() {\n this.clearInterval(this.progressInterval);\n };\n\n /*! Time Tracking -------------------------------------------------------------- */\n /**\n * Set event listeners for on play and pause and tracking current time\n *\n * @method manualTimeUpdatesOn\n */\n\n Tech.prototype.manualTimeUpdatesOn = function manualTimeUpdatesOn() {\n this.manualTimeUpdates = true;\n\n this.on('play', this.trackCurrentTime);\n this.on('pause', this.stopTrackingCurrentTime);\n };\n\n /**\n * Remove event listeners for on play and pause and tracking current time\n *\n * @method manualTimeUpdatesOff\n */\n\n Tech.prototype.manualTimeUpdatesOff = function manualTimeUpdatesOff() {\n this.manualTimeUpdates = false;\n this.stopTrackingCurrentTime();\n this.off('play', this.trackCurrentTime);\n this.off('pause', this.stopTrackingCurrentTime);\n };\n\n /**\n * Tracks current time\n *\n * @method trackCurrentTime\n */\n\n Tech.prototype.trackCurrentTime = function trackCurrentTime() {\n if (this.currentTimeInterval) {\n this.stopTrackingCurrentTime();\n }\n this.currentTimeInterval = this.setInterval(function () {\n this.trigger({ type: 'timeupdate', target: this, manuallyTriggered: true });\n }, 250); // 42 = 24 fps // 250 is what Webkit uses // FF uses 15\n };\n\n /**\n * Turn off play progress tracking (when paused or dragging)\n *\n * @method stopTrackingCurrentTime\n */\n\n Tech.prototype.stopTrackingCurrentTime = function stopTrackingCurrentTime() {\n this.clearInterval(this.currentTimeInterval);\n\n // #1002 - if the video ends right before the next timeupdate would happen,\n // the progress bar won't make it all the way to the end\n this.trigger({ type: 'timeupdate', target: this, manuallyTriggered: true });\n };\n\n /**\n * Turn off any manual progress or timeupdate tracking\n *\n * @method dispose\n */\n\n Tech.prototype.dispose = function dispose() {\n // Turn off any manual progress or timeupdate tracking\n if (this.manualProgress) {\n this.manualProgressOff();\n }\n\n if (this.manualTimeUpdates) {\n this.manualTimeUpdatesOff();\n }\n\n _Component.prototype.dispose.call(this);\n };\n\n /**\n * Set current time \n *\n * @method setCurrentTime\n */\n\n Tech.prototype.setCurrentTime = function setCurrentTime() {\n // improve the accuracy of manual timeupdates\n if (this.manualTimeUpdates) {\n this.trigger({ type: 'timeupdate', target: this, manuallyTriggered: true });\n }\n };\n\n /**\n * Initialize texttrack listeners \n *\n * @method initTextTrackListeners\n */\n\n Tech.prototype.initTextTrackListeners = function initTextTrackListeners() {\n var textTrackListChanges = Fn.bind(this, function () {\n this.trigger('texttrackchange');\n });\n\n var tracks = this.textTracks();\n\n if (!tracks) {\n return;\n }tracks.addEventListener('removetrack', textTrackListChanges);\n tracks.addEventListener('addtrack', textTrackListChanges);\n\n this.on('dispose', Fn.bind(this, function () {\n tracks.removeEventListener('removetrack', textTrackListChanges);\n tracks.removeEventListener('addtrack', textTrackListChanges);\n }));\n };\n\n /**\n * Emulate texttracks \n *\n * @method emulateTextTracks\n */\n\n Tech.prototype.emulateTextTracks = function emulateTextTracks() {\n if (!_window2['default'].WebVTT && this.el().parentNode != null) {\n var script = _document2['default'].createElement('script');\n script.src = this.options_['vtt.js'] || '../node_modules/vtt.js/dist/vtt.js';\n this.el().parentNode.appendChild(script);\n _window2['default'].WebVTT = true;\n }\n\n var tracks = this.textTracks();\n if (!tracks) {\n return;\n }\n\n var textTracksChanges = Fn.bind(this, function () {\n var _this = this;\n\n var updateDisplay = function updateDisplay() {\n return _this.trigger('texttrackchange');\n };\n\n updateDisplay();\n\n for (var i = 0; i < tracks.length; i++) {\n var track = tracks[i];\n track.removeEventListener('cuechange', updateDisplay);\n if (track.mode === 'showing') {\n track.addEventListener('cuechange', updateDisplay);\n }\n }\n });\n\n tracks.addEventListener('change', textTracksChanges);\n\n this.on('dispose', function () {\n tracks.removeEventListener('change', textTracksChanges);\n });\n };\n\n /*\n * Provide default methods for text tracks.\n *\n * Html5 tech overrides these.\n */\n\n /**\n * Get texttracks \n *\n * @returns {TextTrackList}\n * @method textTracks\n */\n\n Tech.prototype.textTracks = function textTracks() {\n this.textTracks_ = this.textTracks_ || new _TextTrackList2['default']();\n return this.textTracks_;\n };\n\n /**\n * Get remote texttracks \n *\n * @returns {TextTrackList}\n * @method remoteTextTracks\n */\n\n Tech.prototype.remoteTextTracks = function remoteTextTracks() {\n this.remoteTextTracks_ = this.remoteTextTracks_ || new _TextTrackList2['default']();\n return this.remoteTextTracks_;\n };\n\n /**\n * Creates and returns a remote text track object \n *\n * @param {String} kind Text track kind (subtitles, captions, descriptions\n * chapters and metadata)\n * @param {String=} label Label to identify the text track\n * @param {String=} language Two letter language abbreviation\n * @return {TextTrackObject}\n * @method addTextTrack\n */\n\n Tech.prototype.addTextTrack = function addTextTrack(kind, label, language) {\n if (!kind) {\n throw new Error('TextTrack kind is required but was not provided');\n }\n\n return createTrackHelper(this, kind, label, language);\n };\n\n /**\n * Creates and returns a remote text track object \n *\n * @param {Object} options The object should contain values for\n * kind, language, label and src (location of the WebVTT file)\n * @return {TextTrackObject}\n * @method addRemoteTextTrack\n */\n\n Tech.prototype.addRemoteTextTrack = function addRemoteTextTrack(options) {\n var track = createTrackHelper(this, options.kind, options.label, options.language, options);\n this.remoteTextTracks().addTrack_(track);\n return {\n track: track\n };\n };\n\n /**\n * Remove remote texttrack \n *\n * @param {TextTrackObject} track Texttrack to remove\n * @method removeRemoteTextTrack\n */\n\n Tech.prototype.removeRemoteTextTrack = function removeRemoteTextTrack(track) {\n this.textTracks().removeTrack_(track);\n this.remoteTextTracks().removeTrack_(track);\n };\n\n /**\n * Provide a default setPoster method for techs\n * Poster support for techs should be optional, so we don't want techs to\n * break if they don't have a way to set a poster.\n *\n * @method setPoster\n */\n\n Tech.prototype.setPoster = function setPoster() {};\n\n return Tech;\n})(_Component3['default']);\n\n/*\n * List of associated text tracks\n *\n * @type {Array}\n * @private\n */\nTech.prototype.textTracks_;\n\nvar createTrackHelper = function createTrackHelper(self, kind, label, language) {\n var options = arguments[4] === undefined ? {} : arguments[4];\n\n var tracks = self.textTracks();\n\n options.kind = kind;\n\n if (label) {\n options.label = label;\n }\n if (language) {\n options.language = language;\n }\n options.tech = self;\n\n var track = new _TextTrack2['default'](options);\n tracks.addTrack_(track);\n\n return track;\n};\n\nTech.prototype.featuresVolumeControl = true;\n\n// Resizing plugins using request fullscreen reloads the plugin\nTech.prototype.featuresFullscreenResize = false;\nTech.prototype.featuresPlaybackRate = false;\n\n// Optional events that we can manually mimic with timers\n// currently not triggered by video-js-swf\nTech.prototype.featuresProgressEvents = false;\nTech.prototype.featuresTimeupdateEvents = false;\n\nTech.prototype.featuresNativeTextTracks = false;\n\n/*\n * A functional mixin for techs that want to use the Source Handler pattern. \n *\n * ##### EXAMPLE:\n *\n * Tech.withSourceHandlers.call(MyTech);\n *\n */\nTech.withSourceHandlers = function (_Tech) {\n /*\n * Register a source handler\n * Source handlers are scripts for handling specific formats.\n * The source handler pattern is used for adaptive formats (HLS, DASH) that\n * manually load video data and feed it into a Source Buffer (Media Source Extensions)\n * @param {Function} handler The source handler\n * @param {Boolean} first Register it before any existing handlers\n */\n _Tech.registerSourceHandler = function (handler, index) {\n var handlers = _Tech.sourceHandlers;\n\n if (!handlers) {\n handlers = _Tech.sourceHandlers = [];\n }\n\n if (index === undefined) {\n // add to the end of the list\n index = handlers.length;\n }\n\n handlers.splice(index, 0, handler);\n };\n\n /*\n * Return the first source handler that supports the source\n * TODO: Answer question: should 'probably' be prioritized over 'maybe'\n * @param {Object} source The source object\n * @returns {Object} The first source handler that supports the source\n * @returns {null} Null if no source handler is found\n */\n _Tech.selectSourceHandler = function (source) {\n var handlers = _Tech.sourceHandlers || [];\n var can = undefined;\n\n for (var i = 0; i < handlers.length; i++) {\n can = handlers[i].canHandleSource(source);\n\n if (can) {\n return handlers[i];\n }\n }\n\n return null;\n };\n\n /*\n * Check if the tech can support the given source\n * @param {Object} srcObj The source object\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\n _Tech.canPlaySource = function (srcObj) {\n var sh = _Tech.selectSourceHandler(srcObj);\n\n if (sh) {\n return sh.canHandleSource(srcObj);\n }\n\n return '';\n };\n\n /*\n * Create a function for setting the source using a source object\n * and source handlers.\n * Should never be called unless a source handler was found.\n * @param {Object} source A source object with src and type keys\n * @return {Tech} self\n */\n _Tech.prototype.setSource = function (source) {\n var sh = _Tech.selectSourceHandler(source);\n\n if (!sh) {\n // Fall back to a native source hander when unsupported sources are\n // deliberately set\n if (_Tech.nativeSourceHandler) {\n sh = _Tech.nativeSourceHandler;\n } else {\n _log2['default'].error('No source hander found for the current source.');\n }\n }\n\n // Dispose any existing source handler\n this.disposeSourceHandler();\n this.off('dispose', this.disposeSourceHandler);\n\n this.currentSource_ = source;\n this.sourceHandler_ = sh.handleSource(source, this);\n this.on('dispose', this.disposeSourceHandler);\n\n return this;\n };\n\n /*\n * Clean up any existing source handler\n */\n _Tech.prototype.disposeSourceHandler = function () {\n if (this.sourceHandler_ && this.sourceHandler_.dispose) {\n this.sourceHandler_.dispose();\n }\n };\n};\n\n_Component3['default'].registerComponent('Tech', Tech);\n// Old name for Tech\n_Component3['default'].registerComponent('MediaTechController', Tech);\nexports['default'] = Tech;\nmodule.exports = exports['default'];\n\n},{\"../component\":52,\"../tracks/text-track\":107,\"../tracks/text-track-list\":105,\"../utils/buffer.js\":109,\"../utils/fn.js\":112,\"../utils/log.js\":115,\"../utils/time-ranges.js\":118,\"global/document\":1,\"global/window\":2}],102:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nexports.__esModule = true;\n/**\n * @file text-track-cue-list.js\n */\n\nvar _import = _dereq_('../utils/browser.js');\n\nvar browser = _interopRequireWildcard(_import);\n\nvar _document = _dereq_('global/document');\n\nvar _document2 = _interopRequireWildcard(_document);\n\n/*\n * https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackcuelist\n *\n * interface TextTrackCueList {\n * readonly attribute unsigned long length;\n * getter TextTrackCue (unsigned long index);\n * TextTrackCue? getCueById(DOMString id);\n * };\n */\n\nvar TextTrackCueList = (function (_TextTrackCueList) {\n function TextTrackCueList(_x) {\n return _TextTrackCueList.apply(this, arguments);\n }\n\n TextTrackCueList.toString = function () {\n return _TextTrackCueList.toString();\n };\n\n return TextTrackCueList;\n})(function (cues) {\n var list = this;\n\n if (browser.IS_IE8) {\n list = _document2['default'].createElement('custom');\n\n for (var prop in TextTrackCueList.prototype) {\n list[prop] = TextTrackCueList.prototype[prop];\n }\n }\n\n TextTrackCueList.prototype.setCues_.call(list, cues);\n\n Object.defineProperty(list, 'length', {\n get: function get() {\n return this.length_;\n }\n });\n\n if (browser.IS_IE8) {\n return list;\n }\n});\n\nTextTrackCueList.prototype.setCues_ = function (cues) {\n var oldLength = this.length || 0;\n var i = 0;\n var l = cues.length;\n\n this.cues_ = cues;\n this.length_ = cues.length;\n\n var defineProp = function defineProp(i) {\n if (!('' + i in this)) {\n Object.defineProperty(this, '' + i, {\n get: function get() {\n return this.cues_[i];\n }\n });\n }\n };\n\n if (oldLength < l) {\n i = oldLength;\n\n for (; i < l; i++) {\n defineProp.call(this, i);\n }\n }\n};\n\nTextTrackCueList.prototype.getCueById = function (id) {\n var result = null;\n for (var i = 0, l = this.length; i < l; i++) {\n var cue = this[i];\n if (cue.id === id) {\n result = cue;\n break;\n }\n }\n\n return result;\n};\n\nexports['default'] = TextTrackCueList;\nmodule.exports = exports['default'];\n\n},{\"../utils/browser.js\":108,\"global/document\":1}],103:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file text-track-display.js\n */\n\nvar _Component2 = _dereq_('../component');\n\nvar _Component3 = _interopRequireWildcard(_Component2);\n\nvar _Menu = _dereq_('../menu/menu.js');\n\nvar _Menu2 = _interopRequireWildcard(_Menu);\n\nvar _MenuItem = _dereq_('../menu/menu-item.js');\n\nvar _MenuItem2 = _interopRequireWildcard(_MenuItem);\n\nvar _MenuButton = _dereq_('../menu/menu-button.js');\n\nvar _MenuButton2 = _interopRequireWildcard(_MenuButton);\n\nvar _import = _dereq_('../utils/fn.js');\n\nvar Fn = _interopRequireWildcard(_import);\n\nvar _document = _dereq_('global/document');\n\nvar _document2 = _interopRequireWildcard(_document);\n\nvar _window = _dereq_('global/window');\n\nvar _window2 = _interopRequireWildcard(_window);\n\nvar darkGray = '#222';\nvar lightGray = '#ccc';\nvar fontMap = {\n monospace: 'monospace',\n sansSerif: 'sans-serif',\n serif: 'serif',\n monospaceSansSerif: '\"Andale Mono\", \"Lucida Console\", monospace',\n monospaceSerif: '\"Courier New\", monospace',\n proportionalSansSerif: 'sans-serif',\n proportionalSerif: 'serif',\n casual: '\"Comic Sans MS\", Impact, fantasy',\n script: '\"Monotype Corsiva\", cursive',\n smallcaps: '\"Andale Mono\", \"Lucida Console\", monospace, sans-serif'\n};\n\n/**\n * The component for displaying text track cues\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends Component\n * @class TextTrackDisplay\n */\n\nvar TextTrackDisplay = (function (_Component) {\n function TextTrackDisplay(player, options, ready) {\n _classCallCheck(this, TextTrackDisplay);\n\n _Component.call(this, player, options, ready);\n\n player.on('loadstart', Fn.bind(this, this.toggleDisplay));\n player.on('texttrackchange', Fn.bind(this, this.updateDisplay));\n\n // This used to be called during player init, but was causing an error\n // if a track should show by default and the display hadn't loaded yet.\n // Should probably be moved to an external track loader when we support\n // tracks that don't need a display.\n player.ready(Fn.bind(this, function () {\n if (player.tech && player.tech.featuresNativeTextTracks) {\n this.hide();\n return;\n }\n\n player.on('fullscreenchange', Fn.bind(this, this.updateDisplay));\n\n var tracks = this.options_.playerOptions.tracks || [];\n for (var i = 0; i < tracks.length; i++) {\n var track = tracks[i];\n this.player_.addRemoteTextTrack(track);\n }\n }));\n }\n\n _inherits(TextTrackDisplay, _Component);\n\n /**\n * Toggle display texttracks \n *\n * @method toggleDisplay\n */\n\n TextTrackDisplay.prototype.toggleDisplay = function toggleDisplay() {\n if (this.player_.tech && this.player_.tech.featuresNativeTextTracks) {\n this.hide();\n } else {\n this.show();\n }\n };\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n\n TextTrackDisplay.prototype.createEl = function createEl() {\n return _Component.prototype.createEl.call(this, 'div', {\n className: 'vjs-text-track-display'\n });\n };\n\n /**\n * Clear display texttracks \n *\n * @method clearDisplay\n */\n\n TextTrackDisplay.prototype.clearDisplay = function clearDisplay() {\n if (typeof _window2['default'].WebVTT === 'function') {\n _window2['default'].WebVTT.processCues(_window2['default'], [], this.el_);\n }\n };\n\n /**\n * Update display texttracks \n *\n * @method updateDisplay\n */\n\n TextTrackDisplay.prototype.updateDisplay = function updateDisplay() {\n var tracks = this.player_.textTracks();\n\n this.clearDisplay();\n\n if (!tracks) {\n return;\n }\n\n for (var i = 0; i < tracks.length; i++) {\n var track = tracks[i];\n if (track.mode === 'showing') {\n this.updateForTrack(track);\n }\n }\n };\n\n /**\n * Add texttrack to texttrack list \n *\n * @param {TextTrackObject} track Texttrack object to be added to list\n * @method updateForTrack\n */\n\n TextTrackDisplay.prototype.updateForTrack = function updateForTrack(track) {\n if (typeof _window2['default'].WebVTT !== 'function' || !track.activeCues) {\n return;\n }\n\n var overrides = this.player_.textTrackSettings.getValues();\n\n var cues = [];\n for (var _i = 0; _i < track.activeCues.length; _i++) {\n cues.push(track.activeCues[_i]);\n }\n\n _window2['default'].WebVTT.processCues(_window2['default'], track.activeCues, this.el_);\n\n var i = cues.length;\n while (i--) {\n var cueDiv = cues[i].displayState;\n if (overrides.color) {\n cueDiv.firstChild.style.color = overrides.color;\n }\n if (overrides.textOpacity) {\n tryUpdateStyle(cueDiv.firstChild, 'color', constructColor(overrides.color || '#fff', overrides.textOpacity));\n }\n if (overrides.backgroundColor) {\n cueDiv.firstChild.style.backgroundColor = overrides.backgroundColor;\n }\n if (overrides.backgroundOpacity) {\n tryUpdateStyle(cueDiv.firstChild, 'backgroundColor', constructColor(overrides.backgroundColor || '#000', overrides.backgroundOpacity));\n }\n if (overrides.windowColor) {\n if (overrides.windowOpacity) {\n tryUpdateStyle(cueDiv, 'backgroundColor', constructColor(overrides.windowColor, overrides.windowOpacity));\n } else {\n cueDiv.style.backgroundColor = overrides.windowColor;\n }\n }\n if (overrides.edgeStyle) {\n if (overrides.edgeStyle === 'dropshadow') {\n cueDiv.firstChild.style.textShadow = '2px 2px 3px ' + darkGray + ', 2px 2px 4px ' + darkGray + ', 2px 2px 5px ' + darkGray;\n } else if (overrides.edgeStyle === 'raised') {\n cueDiv.firstChild.style.textShadow = '1px 1px ' + darkGray + ', 2px 2px ' + darkGray + ', 3px 3px ' + darkGray;\n } else if (overrides.edgeStyle === 'depressed') {\n cueDiv.firstChild.style.textShadow = '1px 1px ' + lightGray + ', 0 1px ' + lightGray + ', -1px -1px ' + darkGray + ', 0 -1px ' + darkGray;\n } else if (overrides.edgeStyle === 'uniform') {\n cueDiv.firstChild.style.textShadow = '0 0 4px ' + darkGray + ', 0 0 4px ' + darkGray + ', 0 0 4px ' + darkGray + ', 0 0 4px ' + darkGray;\n }\n }\n if (overrides.fontPercent && overrides.fontPercent !== 1) {\n var fontSize = _window2['default'].parseFloat(cueDiv.style.fontSize);\n cueDiv.style.fontSize = fontSize * overrides.fontPercent + 'px';\n cueDiv.style.height = 'auto';\n cueDiv.style.top = 'auto';\n cueDiv.style.bottom = '2px';\n }\n if (overrides.fontFamily && overrides.fontFamily !== 'default') {\n if (overrides.fontFamily === 'small-caps') {\n cueDiv.firstChild.style.fontVariant = 'small-caps';\n } else {\n cueDiv.firstChild.style.fontFamily = fontMap[overrides.fontFamily];\n }\n }\n }\n };\n\n return TextTrackDisplay;\n})(_Component3['default']);\n\n/**\n* Add cue HTML to display\n*\n* @param {Number} color Hex number for color, like #f0e\n* @param {Number} opacity Value for opacity,0.0 - 1.0\n* @return {RGBAColor} In the form 'rgba(255, 0, 0, 0.3)'\n* @method constructColor\n*/\nfunction constructColor(color, opacity) {\n return 'rgba(' +\n // color looks like \"#f0e\"\n parseInt(color[1] + color[1], 16) + ',' + parseInt(color[2] + color[2], 16) + ',' + parseInt(color[3] + color[3], 16) + ',' + opacity + ')';\n}\n\n/**\n * Try to update style\n * Some style changes will throw an error, particularly in IE8. Those should be noops.\n *\n * @param {Element} el The element to be styles\n * @param {CSSProperty} style The CSS property to be styled\n * @param {CSSStyle} rule The actual style to be applied to the property\n * @method tryUpdateStyle\n */\nfunction tryUpdateStyle(el, style, rule) {\n //\n try {\n el.style[style] = rule;\n } catch (e) {}\n}\n\n_Component3['default'].registerComponent('TextTrackDisplay', TextTrackDisplay);\nexports['default'] = TextTrackDisplay;\nmodule.exports = exports['default'];\n\n},{\"../component\":52,\"../menu/menu-button.js\":89,\"../menu/menu-item.js\":90,\"../menu/menu.js\":91,\"../utils/fn.js\":112,\"global/document\":1,\"global/window\":2}],104:[function(_dereq_,module,exports){\n'use strict';\n\nexports.__esModule = true;\n/**\n * @file text-track-enums.js\n *\n * https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackmode\n *\n * enum TextTrackMode { \"disabled\", \"hidden\", \"showing\" };\n */\nvar TextTrackMode = {\n disabled: 'disabled',\n hidden: 'hidden',\n showing: 'showing'\n};\n\n/*\n * https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackkind\n *\n * enum TextTrackKind { \"subtitles\", \"captions\", \"descriptions\", \"chapters\", \"metadata\" };\n */\nvar TextTrackKind = {\n subtitles: 'subtitles',\n captions: 'captions',\n descriptions: 'descriptions',\n chapters: 'chapters',\n metadata: 'metadata'\n};\n\nexports.TextTrackMode = TextTrackMode;\nexports.TextTrackKind = TextTrackKind;\n\n},{}],105:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nexports.__esModule = true;\n/**\n * @file text-track-list.js\n */\n\nvar _EventEmitter = _dereq_('../event-emitter');\n\nvar _EventEmitter2 = _interopRequireWildcard(_EventEmitter);\n\nvar _import = _dereq_('../utils/fn.js');\n\nvar Fn = _interopRequireWildcard(_import);\n\nvar _import2 = _dereq_('../utils/browser.js');\n\nvar browser = _interopRequireWildcard(_import2);\n\nvar _document = _dereq_('global/document');\n\nvar _document2 = _interopRequireWildcard(_document);\n\n/*\n * https://html.spec.whatwg.org/multipage/embedded-content.html#texttracklist\n *\n * interface TextTrackList : EventTarget {\n * readonly attribute unsigned long length;\n * getter TextTrack (unsigned long index);\n * TextTrack? getTrackById(DOMString id);\n *\n * attribute EventHandler onchange;\n * attribute EventHandler onaddtrack;\n * attribute EventHandler onremovetrack;\n * };\n */\nvar TextTrackList = (function (_TextTrackList) {\n function TextTrackList(_x) {\n return _TextTrackList.apply(this, arguments);\n }\n\n TextTrackList.toString = function () {\n return _TextTrackList.toString();\n };\n\n return TextTrackList;\n})(function (tracks) {\n var list = this;\n\n if (browser.IS_IE8) {\n list = _document2['default'].createElement('custom');\n\n for (var prop in TextTrackList.prototype) {\n list[prop] = TextTrackList.prototype[prop];\n }\n }\n\n tracks = tracks || [];\n list.tracks_ = [];\n\n Object.defineProperty(list, 'length', {\n get: function get() {\n return this.tracks_.length;\n }\n });\n\n for (var i = 0; i < tracks.length; i++) {\n list.addTrack_(tracks[i]);\n }\n\n if (browser.IS_IE8) {\n return list;\n }\n});\n\nTextTrackList.prototype = Object.create(_EventEmitter2['default'].prototype);\nTextTrackList.prototype.constructor = TextTrackList;\n\n/*\n * change - One or more tracks in the track list have been enabled or disabled.\n * addtrack - A track has been added to the track list.\n * removetrack - A track has been removed from the track list.\n */\nTextTrackList.prototype.allowedEvents_ = {\n change: 'change',\n addtrack: 'addtrack',\n removetrack: 'removetrack'\n};\n\n// emulate attribute EventHandler support to allow for feature detection\nfor (var _event in TextTrackList.prototype.allowedEvents_) {\n TextTrackList.prototype['on' + _event] = null;\n}\n\nTextTrackList.prototype.addTrack_ = function (track) {\n var index = this.tracks_.length;\n if (!('' + index in this)) {\n Object.defineProperty(this, index, {\n get: function get() {\n return this.tracks_[index];\n }\n });\n }\n\n track.addEventListener('modechange', Fn.bind(this, function () {\n this.trigger('change');\n }));\n this.tracks_.push(track);\n\n this.trigger({\n type: 'addtrack',\n track: track\n });\n};\n\nTextTrackList.prototype.removeTrack_ = function (rtrack) {\n var result = null;\n var track = undefined;\n\n for (var i = 0, l = this.length; i < l; i++) {\n track = this[i];\n if (track === rtrack) {\n this.tracks_.splice(i, 1);\n break;\n }\n }\n\n this.trigger({\n type: 'removetrack',\n track: track\n });\n};\n\nTextTrackList.prototype.getTrackById = function (id) {\n var result = null;\n\n for (var i = 0, l = this.length; i < l; i++) {\n var track = this[i];\n if (track.id === id) {\n result = track;\n break;\n }\n }\n\n return result;\n};\n\nexports['default'] = TextTrackList;\nmodule.exports = exports['default'];\n\n},{\"../event-emitter\":83,\"../utils/browser.js\":108,\"../utils/fn.js\":112,\"global/document\":1}],106:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (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) subClass.__proto__ = superClass; };\n\nexports.__esModule = true;\n/**\n * @file text-track-settings.js\n */\n\nvar _Component2 = _dereq_('../component');\n\nvar _Component3 = _interopRequireWildcard(_Component2);\n\nvar _import = _dereq_('../utils/events.js');\n\nvar Events = _interopRequireWildcard(_import);\n\nvar _import2 = _dereq_('../utils/fn.js');\n\nvar Fn = _interopRequireWildcard(_import2);\n\nvar _log = _dereq_('../utils/log.js');\n\nvar _log2 = _interopRequireWildcard(_log);\n\nvar _safeParseTuple2 = _dereq_('safe-json-parse/tuple');\n\nvar _safeParseTuple3 = _interopRequireWildcard(_safeParseTuple2);\n\nvar _window = _dereq_('global/window');\n\nvar _window2 = _interopRequireWildcard(_window);\n\n/**\n * Manipulate settings of texttracks\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @extends Component\n * @class TextTrackSettings\n */\n\nvar TextTrackSettings = (function (_Component) {\n function TextTrackSettings(player, options) {\n _classCallCheck(this, TextTrackSettings);\n\n _Component.call(this, player, options);\n this.hide();\n\n // Grab `persistTextTrackSettings` from the player options if not passed in child options\n if (options.persistTextTrackSettings === undefined) {\n this.options_.persistTextTrackSettings = this.options_.playerOptions.persistTextTrackSettings;\n }\n\n Events.on(this.el().querySelector('.vjs-done-button'), 'click', Fn.bind(this, function () {\n this.saveSettings();\n this.hide();\n }));\n\n Events.on(this.el().querySelector('.vjs-default-button'), 'click', Fn.bind(this, function () {\n this.el().querySelector('.vjs-fg-color > select').selectedIndex = 0;\n this.el().querySelector('.vjs-bg-color > select').selectedIndex = 0;\n this.el().querySelector('.window-color > select').selectedIndex = 0;\n this.el().querySelector('.vjs-text-opacity > select').selectedIndex = 0;\n this.el().querySelector('.vjs-bg-opacity > select').selectedIndex = 0;\n this.el().querySelector('.vjs-window-opacity > select').selectedIndex = 0;\n this.el().querySelector('.vjs-edge-style select').selectedIndex = 0;\n this.el().querySelector('.vjs-font-family select').selectedIndex = 0;\n this.el().querySelector('.vjs-font-percent select').selectedIndex = 2;\n this.updateDisplay();\n }));\n\n Events.on(this.el().querySelector('.vjs-fg-color > select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.el().querySelector('.vjs-bg-color > select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.el().querySelector('.window-color > select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.el().querySelector('.vjs-text-opacity > select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.el().querySelector('.vjs-bg-opacity > select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.el().querySelector('.vjs-window-opacity > select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.el().querySelector('.vjs-font-percent select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.el().querySelector('.vjs-edge-style select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.el().querySelector('.vjs-font-family select'), 'change', Fn.bind(this, this.updateDisplay));\n\n if (this.options_.persistTextTrackSettings) {\n this.restoreSettings();\n }\n }\n\n _inherits(TextTrackSettings, _Component);\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n\n TextTrackSettings.prototype.createEl = function createEl() {\n return _Component.prototype.createEl.call(this, 'div', {\n className: 'vjs-caption-settings vjs-modal-overlay',\n innerHTML: captionOptionsMenuTemplate()\n });\n };\n\n /**\n * Get texttrack settings \n * Settings are\n * .vjs-edge-style\n * .vjs-font-family\n * .vjs-fg-color\n * .vjs-text-opacity\n * .vjs-bg-color\n * .vjs-bg-opacity\n * .window-color\n * .vjs-window-opacity \n *\n * @return {Object} \n * @method getValues\n */\n\n TextTrackSettings.prototype.getValues = function getValues() {\n var el = this.el();\n\n var textEdge = getSelectedOptionValue(el.querySelector('.vjs-edge-style select'));\n var fontFamily = getSelectedOptionValue(el.querySelector('.vjs-font-family select'));\n var fgColor = getSelectedOptionValue(el.querySelector('.vjs-fg-color > select'));\n var textOpacity = getSelectedOptionValue(el.querySelector('.vjs-text-opacity > select'));\n var bgColor = getSelectedOptionValue(el.querySelector('.vjs-bg-color > select'));\n var bgOpacity = getSelectedOptionValue(el.querySelector('.vjs-bg-opacity > select'));\n var windowColor = getSelectedOptionValue(el.querySelector('.window-color > select'));\n var windowOpacity = getSelectedOptionValue(el.querySelector('.vjs-window-opacity > select'));\n var fontPercent = _window2['default'].parseFloat(getSelectedOptionValue(el.querySelector('.vjs-font-percent > select')));\n\n var result = {\n backgroundOpacity: bgOpacity,\n textOpacity: textOpacity,\n windowOpacity: windowOpacity,\n edgeStyle: textEdge,\n fontFamily: fontFamily,\n color: fgColor,\n backgroundColor: bgColor,\n windowColor: windowColor,\n fontPercent: fontPercent\n };\n for (var _name in result) {\n if (result[_name] === '' || result[_name] === 'none' || _name === 'fontPercent' && result[_name] === 1) {\n delete result[_name];\n }\n }\n return result;\n };\n\n /**\n * Set texttrack settings \n * Settings are\n * .vjs-edge-style\n * .vjs-font-family\n * .vjs-fg-color\n * .vjs-text-opacity\n * .vjs-bg-color\n * .vjs-bg-opacity\n * .window-color\n * .vjs-window-opacity \n *\n * @param {Object} values Object with texttrack setting values\n * @method setValues\n */\n\n TextTrackSettings.prototype.setValues = function setValues(values) {\n var el = this.el();\n\n setSelectedOption(el.querySelector('.vjs-edge-style select'), values.edgeStyle);\n setSelectedOption(el.querySelector('.vjs-font-family select'), values.fontFamily);\n setSelectedOption(el.querySelector('.vjs-fg-color > select'), values.color);\n setSelectedOption(el.querySelector('.vjs-text-opacity > select'), values.textOpacity);\n setSelectedOption(el.querySelector('.vjs-bg-color > select'), values.backgroundColor);\n setSelectedOption(el.querySelector('.vjs-bg-opacity > select'), values.backgroundOpacity);\n setSelectedOption(el.querySelector('.window-color > select'), values.windowColor);\n setSelectedOption(el.querySelector('.vjs-window-opacity > select'), values.windowOpacity);\n\n var fontPercent = values.fontPercent;\n\n if (fontPercent) {\n fontPercent = fontPercent.toFixed(2);\n }\n\n setSelectedOption(el.querySelector('.vjs-font-percent > select'), fontPercent);\n };\n\n /**\n * Restore texttrack settings \n *\n * @method restoreSettings\n */\n\n TextTrackSettings.prototype.restoreSettings = function restoreSettings() {\n var _safeParseTuple = _safeParseTuple3['default'](_window2['default'].localStorage.getItem('vjs-text-track-settings'));\n\n var err = _safeParseTuple[0];\n var values = _safeParseTuple[1];\n\n if (err) {\n _log2['default'].error(err);\n }\n\n if (values) {\n this.setValues(values);\n }\n };\n\n /**\n * Save texttrack settings to local storage \n *\n * @method saveSettings\n */\n\n TextTrackSettings.prototype.saveSettings = function saveSettings() {\n if (!this.options_.persistTextTrackSettings) {\n return;\n }\n\n var values = this.getValues();\n try {\n if (Object.getOwnPropertyNames(values).length > 0) {\n _window2['default'].localStorage.setItem('vjs-text-track-settings', JSON.stringify(values));\n } else {\n _window2['default'].localStorage.removeItem('vjs-text-track-settings');\n }\n } catch (e) {}\n };\n\n /**\n * Update display of texttrack settings \n *\n * @method updateDisplay\n */\n\n TextTrackSettings.prototype.updateDisplay = function updateDisplay() {\n var ttDisplay = this.player_.getChild('textTrackDisplay');\n if (ttDisplay) {\n ttDisplay.updateDisplay();\n }\n };\n\n return TextTrackSettings;\n})(_Component3['default']);\n\n_Component3['default'].registerComponent('TextTrackSettings', TextTrackSettings);\n\nfunction getSelectedOptionValue(target) {\n var selectedOption = undefined;\n // not all browsers support selectedOptions, so, fallback to options\n if (target.selectedOptions) {\n selectedOption = target.selectedOptions[0];\n } else if (target.options) {\n selectedOption = target.options[target.options.selectedIndex];\n }\n\n return selectedOption.value;\n}\n\nfunction setSelectedOption(target, value) {\n if (!value) {\n return;\n }\n\n var i = undefined;\n for (i = 0; i < target.options.length; i++) {\n var option = target.options[i];\n if (option.value === value) {\n break;\n }\n }\n\n target.selectedIndex = i;\n}\n\nfunction captionOptionsMenuTemplate() {\n var template = '
    \\n
    \\n
    \\n \\n \\n \\n \\n \\n
    \\n
    \\n \\n \\n \\n \\n \\n
    \\n
    \\n \\n \\n \\n \\n \\n
    \\n
    \\n
    \\n
    \\n \\n \\n
    \\n
    \\n \\n \\n
    \\n
    \\n \\n \\n
    \\n
    \\n
    \\n
    \\n \\n \\n
    ';\n\n return template;\n}\n\nexports['default'] = TextTrackSettings;\nmodule.exports = exports['default'];\n\n},{\"../component\":52,\"../utils/events.js\":111,\"../utils/fn.js\":112,\"../utils/log.js\":115,\"global/window\":2,\"safe-json-parse/tuple\":49}],107:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nexports.__esModule = true;\n/**\n * @file text-track.js\n */\n\nvar _TextTrackCueList = _dereq_('./text-track-cue-list');\n\nvar _TextTrackCueList2 = _interopRequireWildcard(_TextTrackCueList);\n\nvar _import = _dereq_('../utils/fn.js');\n\nvar Fn = _interopRequireWildcard(_import);\n\nvar _import2 = _dereq_('../utils/guid.js');\n\nvar Guid = _interopRequireWildcard(_import2);\n\nvar _import3 = _dereq_('../utils/browser.js');\n\nvar browser = _interopRequireWildcard(_import3);\n\nvar _import4 = _dereq_('./text-track-enums');\n\nvar TextTrackEnum = _interopRequireWildcard(_import4);\n\nvar _log = _dereq_('../utils/log.js');\n\nvar _log2 = _interopRequireWildcard(_log);\n\nvar _EventEmitter = _dereq_('../event-emitter');\n\nvar _EventEmitter2 = _interopRequireWildcard(_EventEmitter);\n\nvar _document = _dereq_('global/document');\n\nvar _document2 = _interopRequireWildcard(_document);\n\nvar _window = _dereq_('global/window');\n\nvar _window2 = _interopRequireWildcard(_window);\n\nvar _XHR = _dereq_('../xhr.js');\n\nvar _XHR2 = _interopRequireWildcard(_XHR);\n\n/*\n * https://html.spec.whatwg.org/multipage/embedded-content.html#texttrack\n *\n * interface TextTrack : EventTarget {\n * readonly attribute TextTrackKind kind;\n * readonly attribute DOMString label;\n * readonly attribute DOMString language;\n *\n * readonly attribute DOMString id;\n * readonly attribute DOMString inBandMetadataTrackDispatchType;\n *\n * attribute TextTrackMode mode;\n *\n * readonly attribute TextTrackCueList? cues;\n * readonly attribute TextTrackCueList? activeCues;\n *\n * void addCue(TextTrackCue cue);\n * void removeCue(TextTrackCue cue);\n *\n * attribute EventHandler oncuechange;\n * };\n */\nvar TextTrack = (function (_TextTrack) {\n function TextTrack() {\n return _TextTrack.apply(this, arguments);\n }\n\n TextTrack.toString = function () {\n return _TextTrack.toString();\n };\n\n return TextTrack;\n})(function () {\n var options = arguments[0] === undefined ? {} : arguments[0];\n\n if (!options.tech) {\n throw new Error('A tech was not provided.');\n }\n\n var tt = this;\n if (browser.IS_IE8) {\n tt = _document2['default'].createElement('custom');\n\n for (var prop in TextTrack.prototype) {\n tt[prop] = TextTrack.prototype[prop];\n }\n }\n\n tt.tech_ = options.tech;\n\n var mode = TextTrackEnum.TextTrackMode[options.mode] || 'disabled';\n var kind = TextTrackEnum.TextTrackKind[options.kind] || 'subtitles';\n var label = options.label || '';\n var language = options.language || options.srclang || '';\n var id = options.id || 'vjs_text_track_' + Guid.newGUID();\n\n if (kind === 'metadata' || kind === 'chapters') {\n mode = 'hidden';\n }\n\n tt.cues_ = [];\n tt.activeCues_ = [];\n\n var cues = new _TextTrackCueList2['default'](tt.cues_);\n var activeCues = new _TextTrackCueList2['default'](tt.activeCues_);\n\n var changed = false;\n var timeupdateHandler = Fn.bind(tt, function () {\n this.activeCues;\n if (changed) {\n this.trigger('cuechange');\n changed = false;\n }\n });\n if (mode !== 'disabled') {\n tt.tech_.on('timeupdate', timeupdateHandler);\n }\n\n Object.defineProperty(tt, 'kind', {\n get: function get() {\n return kind;\n },\n set: Function.prototype\n });\n\n Object.defineProperty(tt, 'label', {\n get: function get() {\n return label;\n },\n set: Function.prototype\n });\n\n Object.defineProperty(tt, 'language', {\n get: function get() {\n return language;\n },\n set: Function.prototype\n });\n\n Object.defineProperty(tt, 'id', {\n get: function get() {\n return id;\n },\n set: Function.prototype\n });\n\n Object.defineProperty(tt, 'mode', {\n get: function get() {\n return mode;\n },\n set: function set(newMode) {\n if (!TextTrackEnum.TextTrackMode[newMode]) {\n return;\n }\n mode = newMode;\n if (mode === 'showing') {\n this.tech_.on('timeupdate', timeupdateHandler);\n }\n this.trigger('modechange');\n }\n });\n\n Object.defineProperty(tt, 'cues', {\n get: function get() {\n if (!this.loaded_) {\n return null;\n }\n\n return cues;\n },\n set: Function.prototype\n });\n\n Object.defineProperty(tt, 'activeCues', {\n get: function get() {\n if (!this.loaded_) {\n return null;\n }\n\n if (this.cues.length === 0) {\n return activeCues; // nothing to do\n }\n\n var ct = this.tech_.currentTime();\n var active = [];\n\n for (var i = 0, l = this.cues.length; i < l; i++) {\n var cue = this.cues[i];\n if (cue.startTime <= ct && cue.endTime >= ct) {\n active.push(cue);\n } else if (cue.startTime === cue.endTime && cue.startTime <= ct && cue.startTime + 0.5 >= ct) {\n active.push(cue);\n }\n }\n\n changed = false;\n\n if (active.length !== this.activeCues_.length) {\n changed = true;\n } else {\n for (var i = 0; i < active.length; i++) {\n if (indexOf.call(this.activeCues_, active[i]) === -1) {\n changed = true;\n }\n }\n }\n\n this.activeCues_ = active;\n activeCues.setCues_(this.activeCues_);\n\n return activeCues;\n },\n set: Function.prototype\n });\n\n if (options.src) {\n loadTrack(options.src, tt);\n } else {\n tt.loaded_ = true;\n }\n\n if (browser.IS_IE8) {\n return tt;\n }\n});\n\nTextTrack.prototype = Object.create(_EventEmitter2['default'].prototype);\nTextTrack.prototype.constructor = TextTrack;\n\n/*\n * cuechange - One or more cues in the track have become active or stopped being active.\n */\nTextTrack.prototype.allowedEvents_ = {\n cuechange: 'cuechange'\n};\n\nTextTrack.prototype.addCue = function (cue) {\n var tracks = this.tech_.textTracks();\n\n if (tracks) {\n for (var i = 0; i < tracks.length; i++) {\n if (tracks[i] !== this) {\n tracks[i].removeCue(cue);\n }\n }\n }\n\n this.cues_.push(cue);\n this.cues.setCues_(this.cues_);\n};\n\nTextTrack.prototype.removeCue = function (removeCue) {\n var removed = false;\n\n for (var i = 0, l = this.cues_.length; i < l; i++) {\n var cue = this.cues_[i];\n if (cue === removeCue) {\n this.cues_.splice(i, 1);\n removed = true;\n }\n }\n\n if (removed) {\n this.cues.setCues_(this.cues_);\n }\n};\n\n/*\n* Downloading stuff happens below this point\n*/\nvar parseCues = (function (_parseCues) {\n function parseCues(_x, _x2) {\n return _parseCues.apply(this, arguments);\n }\n\n parseCues.toString = function () {\n return _parseCues.toString();\n };\n\n return parseCues;\n})(function (srcContent, track) {\n if (typeof _window2['default'].WebVTT !== 'function') {\n //try again a bit later\n return _window2['default'].setTimeout(function () {\n parseCues(srcContent, track);\n }, 25);\n }\n\n var parser = new _window2['default'].WebVTT.Parser(_window2['default'], _window2['default'].vttjs, _window2['default'].WebVTT.StringDecoder());\n\n parser.oncue = function (cue) {\n track.addCue(cue);\n };\n parser.onparsingerror = function (error) {\n _log2['default'].error(error);\n };\n\n parser.parse(srcContent);\n parser.flush();\n});\n\nvar loadTrack = function loadTrack(src, track) {\n _XHR2['default'](src, Fn.bind(this, function (err, response, responseBody) {\n if (err) {\n return _log2['default'].error(err);\n }\n\n track.loaded_ = true;\n parseCues(responseBody, track);\n }));\n};\n\nvar indexOf = function indexOf(searchElement, fromIndex) {\n if (this == null) {\n throw new TypeError('\"this\" is null or not defined');\n }\n\n var O = Object(this);\n\n var len = O.length >>> 0;\n\n if (len === 0) {\n return -1;\n }\n\n var n = +fromIndex || 0;\n\n if (Math.abs(n) === Infinity) {\n n = 0;\n }\n\n if (n >= len) {\n return -1;\n }\n\n var k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\n\n while (k < len) {\n if (k in O && O[k] === searchElement) {\n return k;\n }\n k++;\n }\n return -1;\n};\n\nexports['default'] = TextTrack;\nmodule.exports = exports['default'];\n\n},{\"../event-emitter\":83,\"../utils/browser.js\":108,\"../utils/fn.js\":112,\"../utils/guid.js\":114,\"../utils/log.js\":115,\"../xhr.js\":122,\"./text-track-cue-list\":102,\"./text-track-enums\":104,\"global/document\":1,\"global/window\":2}],108:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nexports.__esModule = true;\n/**\n * @file browser.js\n */\n\nvar _document = _dereq_('global/document');\n\nvar _document2 = _interopRequireWildcard(_document);\n\nvar _window = _dereq_('global/window');\n\nvar _window2 = _interopRequireWildcard(_window);\n\nvar USER_AGENT = _window2['default'].navigator.userAgent;\n\n/*\n * Device is an iPhone\n *\n * @type {Boolean}\n * @constant\n * @private\n */\nvar IS_IPHONE = /iPhone/i.test(USER_AGENT);\nexports.IS_IPHONE = IS_IPHONE;\nvar IS_IPAD = /iPad/i.test(USER_AGENT);\nexports.IS_IPAD = IS_IPAD;\nvar IS_IPOD = /iPod/i.test(USER_AGENT);\nexports.IS_IPOD = IS_IPOD;\nvar IS_IOS = IS_IPHONE || IS_IPAD || IS_IPOD;\n\nexports.IS_IOS = IS_IOS;\nvar IOS_VERSION = (function () {\n var match = USER_AGENT.match(/OS (\\d+)_/i);\n if (match && match[1]) {\n return match[1];\n }\n})();\n\nexports.IOS_VERSION = IOS_VERSION;\nvar IS_ANDROID = /Android/i.test(USER_AGENT);\nexports.IS_ANDROID = IS_ANDROID;\nvar ANDROID_VERSION = (function () {\n // This matches Android Major.Minor.Patch versions\n // ANDROID_VERSION is Major.Minor as a Number, if Minor isn't available, then only Major is returned\n var match = USER_AGENT.match(/Android (\\d+)(?:\\.(\\d+))?(?:\\.(\\d+))*/i),\n major,\n minor;\n\n if (!match) {\n return null;\n }\n\n major = match[1] && parseFloat(match[1]);\n minor = match[2] && parseFloat(match[2]);\n\n if (major && minor) {\n return parseFloat(match[1] + '.' + match[2]);\n } else if (major) {\n return major;\n } else {\n return null;\n }\n})();\nexports.ANDROID_VERSION = ANDROID_VERSION;\n// Old Android is defined as Version older than 2.3, and requiring a webkit version of the android browser\nvar IS_OLD_ANDROID = IS_ANDROID && /webkit/i.test(USER_AGENT) && ANDROID_VERSION < 2.3;\n\nexports.IS_OLD_ANDROID = IS_OLD_ANDROID;\nvar IS_FIREFOX = /Firefox/i.test(USER_AGENT);\nexports.IS_FIREFOX = IS_FIREFOX;\nvar IS_CHROME = /Chrome/i.test(USER_AGENT);\nexports.IS_CHROME = IS_CHROME;\nvar IS_IE8 = /MSIE\\s8\\.0/.test(USER_AGENT);\n\nexports.IS_IE8 = IS_IE8;\nvar TOUCH_ENABLED = !!('ontouchstart' in _window2['default'] || _window2['default'].DocumentTouch && _document2['default'] instanceof _window2['default'].DocumentTouch);\nexports.TOUCH_ENABLED = TOUCH_ENABLED;\nvar BACKGROUND_SIZE_SUPPORTED = ('backgroundSize' in _document2['default'].createElement('video').style);\nexports.BACKGROUND_SIZE_SUPPORTED = BACKGROUND_SIZE_SUPPORTED;\n\n},{\"global/document\":1,\"global/window\":2}],109:[function(_dereq_,module,exports){\n'use strict';\n\nexports.__esModule = true;\n\n/**\n * Compute how much your video has been buffered\n *\n * @param {Object} Buffered object\n * @param {Number} Total duration\n * @return {Number} Percent buffered of the total duration\n * @private\n * @function bufferedPercent\n */\nexports.bufferedPercent = bufferedPercent;\n/**\n * @file buffer.js\n */\n\nvar _createTimeRange = _dereq_('./time-ranges.js');\n\nfunction bufferedPercent(buffered, duration) {\n var bufferedDuration = 0,\n start,\n end;\n\n if (!duration) {\n return 0;\n }\n\n if (!buffered || !buffered.length) {\n buffered = _createTimeRange.createTimeRange(0, 0);\n }\n\n for (var i = 0; i < buffered.length; i++) {\n start = buffered.start(i);\n end = buffered.end(i);\n\n // buffered end can be bigger than duration by a very small fraction\n if (end > duration) {\n end = duration;\n }\n\n bufferedDuration += end - start;\n }\n\n return bufferedDuration / duration;\n}\n\n},{\"./time-ranges.js\":118}],110:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nexports.__esModule = true;\n\n/**\n * Shorthand for document.getElementById()\n * Also allows for CSS (jQuery) ID syntax. But nothing other than IDs.\n *\n * @param {String} id Element ID\n * @return {Element} Element with supplied ID\n * @function getEl\n */\nexports.getEl = getEl;\n\n/**\n * Creates an element and applies properties.\n *\n * @param {String=} tagName Name of tag to be created.\n * @param {Object=} properties Element properties to be applied.\n * @return {Element}\n * @function createEl\n */\nexports.createEl = createEl;\n\n/**\n * Insert an element as the first child node of another\n * \n * @param {Element} child Element to insert\n * @param {Element} parent Element to insert child into\n * @private\n * @function insertElFirst\n */\nexports.insertElFirst = insertElFirst;\n\n/**\n * Returns the cache object where data for an element is stored\n *\n * @param {Element} el Element to store data for.\n * @return {Object}\n * @function getElData\n */\nexports.getElData = getElData;\n\n/**\n * Returns whether or not an element has cached data\n *\n * @param {Element} el A dom element\n * @return {Boolean}\n * @private\n * @function hasElData\n */\nexports.hasElData = hasElData;\n\n/**\n * Delete data for the element from the cache and the guid attr from getElementById\n *\n * @param {Element} el Remove data for an element\n * @private\n * @function removeElData\n */\nexports.removeElData = removeElData;\n\n/**\n * Check if an element has a CSS class\n *\n * @param {Element} element Element to check\n * @param {String} classToCheck Classname to check\n * @function hasElClass\n */\nexports.hasElClass = hasElClass;\n\n/**\n * Add a CSS class name to an element\n *\n * @param {Element} element Element to add class name to\n * @param {String} classToAdd Classname to add\n * @function addElClass\n */\nexports.addElClass = addElClass;\n\n/**\n * Remove a CSS class name from an element\n *\n * @param {Element} element Element to remove from class name\n * @param {String} classToRemove Classname to remove\n * @function removeElClass\n */\nexports.removeElClass = removeElClass;\n\n/**\n * Apply attributes to an HTML element.\n *\n * @param {Element} el Target element.\n * @param {Object=} attributes Element attributes to be applied.\n * @private\n * @function setElAttributes\n */\nexports.setElAttributes = setElAttributes;\n\n/**\n * Get an element's attribute values, as defined on the HTML tag\n * Attributes are not the same as properties. They're defined on the tag\n * or with setAttribute (which shouldn't be used with HTML)\n * This will return true or false for boolean attributes.\n *\n * @param {Element} tag Element from which to get tag attributes\n * @return {Object}\n * @private\n * @function getElAttributes\n */\nexports.getElAttributes = getElAttributes;\n\n/**\n * Attempt to block the ability to select text while dragging controls\n *\n * @return {Boolean} \n * @method blockTextSelection\n */\nexports.blockTextSelection = blockTextSelection;\n\n/**\n * Turn off text selection blocking\n *\n * @return {Boolean} \n * @method unblockTextSelection\n */\nexports.unblockTextSelection = unblockTextSelection;\n\n/**\n * Offset Left\n * getBoundingClientRect technique from \n * John Resig http://ejohn.org/blog/getboundingclientrect-is-awesome/\n *\n * @param {Element} el Element from which to get offset\n * @return {Object=} \n * @method findElPosition\n */\nexports.findElPosition = findElPosition;\n/**\n * @file dom.js\n */\n\nvar _document = _dereq_('global/document');\n\nvar _document2 = _interopRequireWildcard(_document);\n\nvar _window = _dereq_('global/window');\n\nvar _window2 = _interopRequireWildcard(_window);\n\nvar _import = _dereq_('./guid.js');\n\nvar Guid = _interopRequireWildcard(_import);\n\nvar _roundFloat = _dereq_('./round-float.js');\n\nvar _roundFloat2 = _interopRequireWildcard(_roundFloat);\n\nfunction getEl(id) {\n if (id.indexOf('#') === 0) {\n id = id.slice(1);\n }\n\n return _document2['default'].getElementById(id);\n}\n\nfunction createEl() {\n var tagName = arguments[0] === undefined ? 'div' : arguments[0];\n var properties = arguments[1] === undefined ? {} : arguments[1];\n\n var el = _document2['default'].createElement(tagName);\n\n Object.getOwnPropertyNames(properties).forEach(function (propName) {\n var val = properties[propName];\n\n // Not remembering why we were checking for dash\n // but using setAttribute means you have to use getAttribute\n\n // The check for dash checks for the aria- * attributes, like aria-label, aria-valuemin.\n // The additional check for \"role\" is because the default method for adding attributes does not\n // add the attribute \"role\". My guess is because it's not a valid attribute in some namespaces, although\n // browsers handle the attribute just fine. The W3C allows for aria- * attributes to be used in pre-HTML5 docs.\n // http://www.w3.org/TR/wai-aria-primer/#ariahtml. Using setAttribute gets around this problem.\n if (propName.indexOf('aria-') !== -1 || propName === 'role') {\n el.setAttribute(propName, val);\n } else {\n el[propName] = val;\n }\n });\n\n return el;\n}\n\nfunction insertElFirst(child, parent) {\n if (parent.firstChild) {\n parent.insertBefore(child, parent.firstChild);\n } else {\n parent.appendChild(child);\n }\n}\n\n/**\n * Element Data Store. Allows for binding data to an element without putting it directly on the element.\n * Ex. Event listeners are stored here.\n * (also from jsninja.com, slightly modified and updated for closure compiler)\n *\n * @type {Object}\n * @private\n */\nvar elData = {};\n\n/*\n * Unique attribute name to store an element's guid in\n *\n * @type {String}\n * @constant\n * @private\n */\nvar elIdAttr = 'vdata' + new Date().getTime();\nfunction getElData(el) {\n var id = el[elIdAttr];\n\n if (!id) {\n id = el[elIdAttr] = Guid.newGUID();\n }\n\n if (!elData[id]) {\n elData[id] = {};\n }\n\n return elData[id];\n}\n\nfunction hasElData(el) {\n var id = el[elIdAttr];\n\n if (!id) {\n return false;\n }\n\n return !!Object.getOwnPropertyNames(elData[id]).length;\n}\n\nfunction removeElData(el) {\n var id = el[elIdAttr];\n\n if (!id) {\n return;\n }\n\n // Remove all stored data\n delete elData[id];\n\n // Remove the elIdAttr property from the DOM node\n try {\n delete el[elIdAttr];\n } catch (e) {\n if (el.removeAttribute) {\n el.removeAttribute(elIdAttr);\n } else {\n // IE doesn't appear to support removeAttribute on the document element\n el[elIdAttr] = null;\n }\n }\n}\n\nfunction hasElClass(element, classToCheck) {\n return (' ' + element.className + ' ').indexOf(' ' + classToCheck + ' ') !== -1;\n}\n\nfunction addElClass(element, classToAdd) {\n if (!hasElClass(element, classToAdd)) {\n element.className = element.className === '' ? classToAdd : element.className + ' ' + classToAdd;\n }\n}\n\nfunction removeElClass(element, classToRemove) {\n if (!hasElClass(element, classToRemove)) {\n return;\n }\n\n var classNames = element.className.split(' ');\n\n // no arr.indexOf in ie8, and we don't want to add a big shim\n for (var i = classNames.length - 1; i >= 0; i--) {\n if (classNames[i] === classToRemove) {\n classNames.splice(i, 1);\n }\n }\n\n element.className = classNames.join(' ');\n}\n\nfunction setElAttributes(el, attributes) {\n Object.getOwnPropertyNames(attributes).forEach(function (attrName) {\n var attrValue = attributes[attrName];\n\n if (attrValue === null || typeof attrValue === 'undefined' || attrValue === false) {\n el.removeAttribute(attrName);\n } else {\n el.setAttribute(attrName, attrValue === true ? '' : attrValue);\n }\n });\n}\n\nfunction getElAttributes(tag) {\n var obj, knownBooleans, attrs, attrName, attrVal;\n\n obj = {};\n\n // known boolean attributes\n // we can check for matching boolean properties, but older browsers\n // won't know about HTML5 boolean attributes that we still read from\n knownBooleans = ',' + 'autoplay,controls,loop,muted,default' + ',';\n\n if (tag && tag.attributes && tag.attributes.length > 0) {\n attrs = tag.attributes;\n\n for (var i = attrs.length - 1; i >= 0; i--) {\n attrName = attrs[i].name;\n attrVal = attrs[i].value;\n\n // check for known booleans\n // the matching element property will return a value for typeof\n if (typeof tag[attrName] === 'boolean' || knownBooleans.indexOf(',' + attrName + ',') !== -1) {\n // the value of an included boolean attribute is typically an empty\n // string ('') which would equal false if we just check for a false value.\n // we also don't want support bad code like autoplay='false'\n attrVal = attrVal !== null ? true : false;\n }\n\n obj[attrName] = attrVal;\n }\n }\n\n return obj;\n}\n\nfunction blockTextSelection() {\n _document2['default'].body.focus();\n _document2['default'].onselectstart = function () {\n return false;\n };\n}\n\nfunction unblockTextSelection() {\n _document2['default'].onselectstart = function () {\n return true;\n };\n}\n\nfunction findElPosition(el) {\n var box = undefined;\n\n if (el.getBoundingClientRect && el.parentNode) {\n box = el.getBoundingClientRect();\n }\n\n if (!box) {\n return {\n left: 0,\n top: 0\n };\n }\n\n var docEl = _document2['default'].documentElement;\n var body = _document2['default'].body;\n\n var clientLeft = docEl.clientLeft || body.clientLeft || 0;\n var scrollLeft = _window2['default'].pageXOffset || body.scrollLeft;\n var left = box.left + scrollLeft - clientLeft;\n\n var clientTop = docEl.clientTop || body.clientTop || 0;\n var scrollTop = _window2['default'].pageYOffset || body.scrollTop;\n var top = box.top + scrollTop - clientTop;\n\n // Android sometimes returns slightly off decimal values, so need to round\n return {\n left: _roundFloat2['default'](left),\n top: _roundFloat2['default'](top)\n };\n}\n\n},{\"./guid.js\":114,\"./round-float.js\":117,\"global/document\":1,\"global/window\":2}],111:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nexports.__esModule = true;\n\n/**\n * Add an event listener to element\n * It stores the handler function in a separate cache object\n * and adds a generic handler to the element's event,\n * along with a unique id (guid) to the element.\n * \n * @param {Element|Object} elem Element or object to bind listeners to\n * @param {String|Array} type Type of event to bind to.\n * @param {Function} fn Event listener.\n * @method on\n */\nexports.on = on;\n\n/**\n * Removes event listeners from an element\n *\n * @param {Element|Object} elem Object to remove listeners from\n * @param {String|Array=} type Type of listener to remove. Don't include to remove all events from element.\n * @param {Function} fn Specific listener to remove. Don't include to remove listeners for an event type.\n * @method off\n */\nexports.off = off;\n\n/**\n * Trigger an event for an element\n *\n * @param {Element|Object} elem Element to trigger an event on\n * @param {Event|Object|String} event A string (the type) or an event object with a type attribute\n * @param {Object} [hash] data hash to pass along with the event\n * @return {Boolean=} Returned only if default was prevented\n * @method trigger\n */\nexports.trigger = trigger;\n\n/**\n * Trigger a listener only once for an event\n *\n * @param {Element|Object} elem Element or object to\n * @param {String|Array} type Name/type of event\n * @param {Function} fn Event handler function\n * @method one\n */\nexports.one = one;\n\n/**\n * Fix a native event to have standard property values\n * \n * @param {Object} event Event object to fix\n * @return {Object}\n * @private\n * @method fixEvent\n */\nexports.fixEvent = fixEvent;\n/**\n * @file events.js\n *\n * Event System (John Resig - Secrets of a JS Ninja http://jsninja.com/)\n * (Original book version wasn't completely usable, so fixed some things and made Closure Compiler compatible)\n * This should work very similarly to jQuery's events, however it's based off the book version which isn't as\n * robust as jquery's, so there's probably some differences.\n */\n\nvar _import = _dereq_('./dom.js');\n\nvar Dom = _interopRequireWildcard(_import);\n\nvar _import2 = _dereq_('./guid.js');\n\nvar Guid = _interopRequireWildcard(_import2);\n\nvar _window = _dereq_('global/window');\n\nvar _window2 = _interopRequireWildcard(_window);\n\nvar _document = _dereq_('global/document');\n\nvar _document2 = _interopRequireWildcard(_document);\n\nfunction on(elem, type, fn) {\n if (Array.isArray(type)) {\n return _handleMultipleEvents(on, elem, type, fn);\n }\n\n var data = Dom.getElData(elem);\n\n // We need a place to store all our handler data\n if (!data.handlers) data.handlers = {};\n\n if (!data.handlers[type]) data.handlers[type] = [];\n\n if (!fn.guid) fn.guid = Guid.newGUID();\n\n data.handlers[type].push(fn);\n\n if (!data.dispatcher) {\n data.disabled = false;\n\n data.dispatcher = function (event, hash) {\n\n if (data.disabled) return;\n event = fixEvent(event);\n\n var handlers = data.handlers[event.type];\n\n if (handlers) {\n // Copy handlers so if handlers are added/removed during the process it doesn't throw everything off.\n var handlersCopy = handlers.slice(0);\n\n for (var m = 0, n = handlersCopy.length; m < n; m++) {\n if (event.isImmediatePropagationStopped()) {\n break;\n } else {\n handlersCopy[m].call(elem, event, hash);\n }\n }\n }\n };\n }\n\n if (data.handlers[type].length === 1) {\n if (elem.addEventListener) {\n elem.addEventListener(type, data.dispatcher, false);\n } else if (elem.attachEvent) {\n elem.attachEvent('on' + type, data.dispatcher);\n }\n }\n}\n\nfunction off(elem, type, fn) {\n // Don't want to add a cache object through getElData if not needed\n if (!Dom.hasElData(elem)) {\n return;\n }var data = Dom.getElData(elem);\n\n // If no events exist, nothing to unbind\n if (!data.handlers) {\n return;\n }\n\n if (Array.isArray(type)) {\n return _handleMultipleEvents(off, elem, type, fn);\n }\n\n // Utility function\n var removeType = function removeType(t) {\n data.handlers[t] = [];\n _cleanUpEvents(elem, t);\n };\n\n // Are we removing all bound events?\n if (!type) {\n for (var t in data.handlers) {\n removeType(t);\n }return;\n }\n\n var handlers = data.handlers[type];\n\n // If no handlers exist, nothing to unbind\n if (!handlers) {\n return;\n } // If no listener was provided, remove all listeners for type\n if (!fn) {\n removeType(type);\n return;\n }\n\n // We're only removing a single handler\n if (fn.guid) {\n for (var n = 0; n < handlers.length; n++) {\n if (handlers[n].guid === fn.guid) {\n handlers.splice(n--, 1);\n }\n }\n }\n\n _cleanUpEvents(elem, type);\n}\n\nfunction trigger(elem, event, hash) {\n // Fetches element data and a reference to the parent (for bubbling).\n // Don't want to add a data object to cache for every parent,\n // so checking hasElData first.\n var elemData = Dom.hasElData(elem) ? Dom.getElData(elem) : {};\n var parent = elem.parentNode || elem.ownerDocument;\n // type = event.type || event,\n // handler;\n\n // If an event name was passed as a string, creates an event out of it\n if (typeof event === 'string') {\n event = { type: event, target: elem };\n }\n // Normalizes the event properties.\n event = fixEvent(event);\n\n // If the passed element has a dispatcher, executes the established handlers.\n if (elemData.dispatcher) {\n elemData.dispatcher.call(elem, event, hash);\n }\n\n // Unless explicitly stopped or the event does not bubble (e.g. media events)\n // recursively calls this function to bubble the event up the DOM.\n if (parent && !event.isPropagationStopped() && event.bubbles !== false) {\n trigger.call(null, parent, event, hash);\n\n // If at the top of the DOM, triggers the default action unless disabled.\n } else if (!parent && !event.defaultPrevented) {\n var targetData = Dom.getElData(event.target);\n\n // Checks if the target has a default action for this event.\n if (event.target[event.type]) {\n // Temporarily disables event dispatching on the target as we have already executed the handler.\n targetData.disabled = true;\n // Executes the default action.\n if (typeof event.target[event.type] === 'function') {\n event.target[event.type]();\n }\n // Re-enables event dispatching.\n targetData.disabled = false;\n }\n }\n\n // Inform the triggerer if the default was prevented by returning false\n return !event.defaultPrevented;\n}\n\nfunction one(elem, type, fn) {\n if (Array.isArray(type)) {\n return _handleMultipleEvents(one, elem, type, fn);\n }\n var func = (function (_func) {\n function func() {\n return _func.apply(this, arguments);\n }\n\n func.toString = function () {\n return _func.toString();\n };\n\n return func;\n })(function () {\n off(elem, type, func);\n fn.apply(this, arguments);\n });\n // copy the guid to the new function so it can removed using the original function's ID\n func.guid = fn.guid = fn.guid || Guid.newGUID();\n on(elem, type, func);\n}\n\nfunction fixEvent(event) {\n\n function returnTrue() {\n return true;\n }\n function returnFalse() {\n return false;\n }\n\n // Test if fixing up is needed\n // Used to check if !event.stopPropagation instead of isPropagationStopped\n // But native events return true for stopPropagation, but don't have\n // other expected methods like isPropagationStopped. Seems to be a problem\n // with the Javascript Ninja code. So we're just overriding all events now.\n if (!event || !event.isPropagationStopped) {\n var old = event || _window2['default'].event;\n\n event = {};\n // Clone the old object so that we can modify the values event = {};\n // IE8 Doesn't like when you mess with native event properties\n // Firefox returns false for event.hasOwnProperty('type') and other props\n // which makes copying more difficult.\n // TODO: Probably best to create a whitelist of event props\n for (var key in old) {\n // Safari 6.0.3 warns you if you try to copy deprecated layerX/Y\n // Chrome warns you if you try to copy deprecated keyboardEvent.keyLocation\n if (key !== 'layerX' && key !== 'layerY' && key !== 'keyLocation') {\n // Chrome 32+ warns if you try to copy deprecated returnValue, but\n // we still want to if preventDefault isn't supported (IE8).\n if (!(key === 'returnValue' && old.preventDefault)) {\n event[key] = old[key];\n }\n }\n }\n\n // The event occurred on this element\n if (!event.target) {\n event.target = event.srcElement || _document2['default'];\n }\n\n // Handle which other element the event is related to\n if (!event.relatedTarget) {\n event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement;\n }\n\n // Stop the default browser action\n event.preventDefault = function () {\n if (old.preventDefault) {\n old.preventDefault();\n }\n event.returnValue = false;\n event.defaultPrevented = true;\n };\n\n event.defaultPrevented = false;\n\n // Stop the event from bubbling\n event.stopPropagation = function () {\n if (old.stopPropagation) {\n old.stopPropagation();\n }\n event.cancelBubble = true;\n event.isPropagationStopped = returnTrue;\n };\n\n event.isPropagationStopped = returnFalse;\n\n // Stop the event from bubbling and executing other handlers\n event.stopImmediatePropagation = function () {\n if (old.stopImmediatePropagation) {\n old.stopImmediatePropagation();\n }\n event.isImmediatePropagationStopped = returnTrue;\n event.stopPropagation();\n };\n\n event.isImmediatePropagationStopped = returnFalse;\n\n // Handle mouse position\n if (event.clientX != null) {\n var doc = _document2['default'].documentElement,\n body = _document2['default'].body;\n\n event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);\n event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);\n }\n\n // Handle key presses\n event.which = event.charCode || event.keyCode;\n\n // Fix button for mouse clicks:\n // 0 == left; 1 == middle; 2 == right\n if (event.button != null) {\n event.button = event.button & 1 ? 0 : event.button & 4 ? 1 : event.button & 2 ? 2 : 0;\n }\n }\n\n // Returns fixed-up instance\n return event;\n}\n\n/**\n * Clean up the listener cache and dispatchers\n*\n * @param {Element|Object} elem Element to clean up\n * @param {String} type Type of event to clean up\n * @private\n * @method _cleanUpEvents\n */\nfunction _cleanUpEvents(elem, type) {\n var data = Dom.getElData(elem);\n\n // Remove the events of a particular type if there are none left\n if (data.handlers[type].length === 0) {\n delete data.handlers[type];\n // data.handlers[type] = null;\n // Setting to null was causing an error with data.handlers\n\n // Remove the meta-handler from the element\n if (elem.removeEventListener) {\n elem.removeEventListener(type, data.dispatcher, false);\n } else if (elem.detachEvent) {\n elem.detachEvent('on' + type, data.dispatcher);\n }\n }\n\n // Remove the events object if there are no types left\n if (Object.getOwnPropertyNames(data.handlers).length <= 0) {\n delete data.handlers;\n delete data.dispatcher;\n delete data.disabled;\n }\n\n // Finally remove the element data if there is no data left\n if (Object.getOwnPropertyNames(data).length === 0) {\n Dom.removeElData(elem);\n }\n}\n\n/**\n * Loops through an array of event types and calls the requested method for each type.\n *\n * @param {Function} fn The event method we want to use.\n * @param {Element|Object} elem Element or object to bind listeners to\n * @param {String} type Type of event to bind to.\n * @param {Function} callback Event listener.\n * @private\n * @function _handleMultipleEvents\n */\nfunction _handleMultipleEvents(fn, elem, types, callback) {\n types.forEach(function (type) {\n //Call the event method for each one of the types\n fn(elem, type, callback);\n });\n}\n\n},{\"./dom.js\":110,\"./guid.js\":114,\"global/document\":1,\"global/window\":2}],112:[function(_dereq_,module,exports){\n'use strict';\n\nexports.__esModule = true;\n/**\n * @file fn.js\n */\n\nvar _newGUID = _dereq_('./guid.js');\n\n/**\n * Bind (a.k.a proxy or Context). A simple method for changing the context of a function\n * It also stores a unique id on the function so it can be easily removed from events\n *\n * @param {*} context The object to bind as scope\n * @param {Function} fn The function to be bound to a scope\n * @param {Number=} uid An optional unique ID for the function to be set\n * @return {Function}\n * @private\n * @method bind\n */\nvar bind = function bind(context, fn, uid) {\n // Make sure the function has a unique ID\n if (!fn.guid) {\n fn.guid = _newGUID.newGUID();\n }\n\n // Create the new function that changes the context\n var ret = function ret() {\n return fn.apply(context, arguments);\n };\n\n // Allow for the ability to individualize this function\n // Needed in the case where multiple objects might share the same prototype\n // IF both items add an event listener with the same function, then you try to remove just one\n // it will remove both because they both have the same guid.\n // when using this, you need to use the bind method when you remove the listener as well.\n // currently used in text tracks\n ret.guid = uid ? uid + '_' + fn.guid : fn.guid;\n\n return ret;\n};\nexports.bind = bind;\n\n},{\"./guid.js\":114}],113:[function(_dereq_,module,exports){\n'use strict';\n\nexports.__esModule = true;\n/**\n * @file format-time.js\n *\n * Format seconds as a time string, H:MM:SS or M:SS\n * Supplying a guide (in seconds) will force a number of leading zeros\n * to cover the length of the guide\n *\n * @param {Number} seconds Number of seconds to be turned into a string\n * @param {Number} guide Number (in seconds) to model the string after\n * @return {String} Time formatted as H:MM:SS or M:SS\n * @private\n * @function formatTime\n */\nfunction formatTime(seconds) {\n var guide = arguments[1] === undefined ? seconds : arguments[1];\n return (function () {\n var s = Math.floor(seconds % 60);\n var m = Math.floor(seconds / 60 % 60);\n var h = Math.floor(seconds / 3600);\n var gm = Math.floor(guide / 60 % 60);\n var gh = Math.floor(guide / 3600);\n\n // handle invalid times\n if (isNaN(seconds) || seconds === Infinity) {\n // '-' is false for all relational operators (e.g. <, >=) so this setting\n // will add the minimum number of fields specified by the guide\n h = m = s = '-';\n }\n\n // Check if we need to show hours\n h = h > 0 || gh > 0 ? h + ':' : '';\n\n // If hours are showing, we may need to add a leading zero.\n // Always show at least one digit of minutes.\n m = ((h || gm >= 10) && m < 10 ? '0' + m : m) + ':';\n\n // Check if leading zero is need for seconds\n s = s < 10 ? '0' + s : s;\n\n return h + m + s;\n })();\n}\n\nexports['default'] = formatTime;\nmodule.exports = exports['default'];\n\n},{}],114:[function(_dereq_,module,exports){\n\"use strict\";\n\nexports.__esModule = true;\n\n/**\n * Get the next unique ID\n *\n * @return {String} \n * @function newGUID\n */\nexports.newGUID = newGUID;\n/**\n * @file guid.js\n *\n * Unique ID for an element or function\n * @type {Number}\n * @private\n */\nvar _guid = 1;\nfunction newGUID() {\n return _guid++;\n}\n\n},{}],115:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nexports.__esModule = true;\n/**\n * @file log.js\n */\n\nvar _window = _dereq_('global/window');\n\nvar _window2 = _interopRequireWildcard(_window);\n\n/**\n * Log plain debug messages\n */\nvar log = function log() {\n _logType(null, arguments);\n};\n\n/**\n * Keep a history of log messages\n * @type {Array}\n */\nlog.history = [];\n\n/**\n * Log error messages\n */\nlog.error = function () {\n _logType('error', arguments);\n};\n\n/**\n * Log warning messages\n */\nlog.warn = function () {\n _logType('warn', arguments);\n};\n\n/**\n * Log messages to the console and history based on the type of message\n *\n * @param {String} type The type of message, or `null` for `log`\n * @param {Object} args The args to be passed to the log\n * @private\n * @method _logType\n */\nfunction _logType(type, args) {\n // convert args to an array to get array functions\n var argsArray = Array.prototype.slice.call(args);\n // if there's no console then don't try to output messages\n // they will still be stored in log.history\n // Was setting these once outside of this function, but containing them\n // in the function makes it easier to test cases where console doesn't exist\n var noop = function noop() {};\n\n var console = _window2['default'].console || {\n log: noop,\n warn: noop,\n error: noop\n };\n\n if (type) {\n // add the type to the front of the message\n argsArray.unshift(type.toUpperCase() + ':');\n } else {\n // default to log with no prefix\n type = 'log';\n }\n\n // add to history\n log.history.push(argsArray);\n\n // add console prefix after adding to history\n argsArray.unshift('VIDEOJS:');\n\n // call appropriate log function\n if (console[type].apply) {\n console[type].apply(console, argsArray);\n } else {\n // ie8 doesn't allow error.apply, but it will just join() the array anyway\n console[type](argsArray.join(' '));\n }\n}\n\nexports['default'] = log;\nmodule.exports = exports['default'];\n\n},{\"global/window\":2}],116:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nexports.__esModule = true;\n\n/**\n * Merge two options objects, recursively merging **only* * plain object\n * properties. Previously `deepMerge`.\n *\n * @param {Object} object The destination object\n * @param {...Object} source One or more objects to merge into the first\n * @returns {Object} The updated first object\n * @function mergeOptions\n */\nexports['default'] = mergeOptions;\n/**\n * @file merge-options.js\n */\n\nvar _merge = _dereq_('lodash-compat/object/merge');\n\nvar _merge2 = _interopRequireWildcard(_merge);\n\nfunction isPlain(obj) {\n return !!obj && typeof obj === 'object' && obj.toString() === '[object Object]' && obj.constructor === Object;\n}\nfunction mergeOptions() {\n var object = arguments[0] === undefined ? {} : arguments[0];\n\n // Allow for infinite additional object args to merge\n Array.prototype.slice.call(arguments, 1).forEach(function (source) {\n\n // Recursively merge only plain objects\n // All other values will be directly copied\n _merge2['default'](object, source, function (a, b) {\n\n // If we're not working with a plain object, copy the value as is\n if (!isPlain(b)) {\n return b;\n }\n\n // If the new value is a plain object but the first object value is not\n // we need to create a new object for the first object to merge with.\n // This makes it consistent with how merge() works by default\n // and also protects from later changes the to first object affecting\n // the second object's values.\n if (!isPlain(a)) {\n return mergeOptions({}, b);\n }\n });\n });\n\n return object;\n}\n\nmodule.exports = exports['default'];\n\n},{\"lodash-compat/object/merge\":40}],117:[function(_dereq_,module,exports){\n\"use strict\";\n\nexports.__esModule = true;\n/**\n * @file round-float.js\n *\n * Should round off a number to a decimal place\n *\n * @param {Number} num Number to round\n * @param {Number} dec Number of decimal places to round to\n * @return {Number} Rounded number\n * @private\n * @method roundFloat\n */\nvar roundFloat = function roundFloat(num) {\n var dec = arguments[1] === undefined ? 0 : arguments[1];\n\n return Math.round(num * Math.pow(10, dec)) / Math.pow(10, dec);\n};\n\nexports[\"default\"] = roundFloat;\nmodule.exports = exports[\"default\"];\n\n},{}],118:[function(_dereq_,module,exports){\n'use strict';\n\nexports.__esModule = true;\n/**\n * @file time-ranges.js\n *\n * Should create a fake TimeRange object\n * Mimics an HTML5 time range instance, which has functions that\n * return the start and end times for a range\n * TimeRanges are returned by the buffered() method\n *\n * @param {Number} start Start time in seconds\n * @param {Number} end End time in seconds\n * @return {Object} Fake TimeRange object\n * @private\n * @method createTimeRange\n */\nexports.createTimeRange = createTimeRange;\n\nfunction createTimeRange(start, end) {\n if (start === undefined && end === undefined) {\n return {\n length: 0,\n start: function start() {\n throw new Error('This TimeRanges object is empty');\n },\n end: function end() {\n throw new Error('This TimeRanges object is empty');\n }\n };\n }\n return {\n length: 1,\n start: (function (_start) {\n function start() {\n return _start.apply(this, arguments);\n }\n\n start.toString = function () {\n return _start.toString();\n };\n\n return start;\n })(function () {\n return start;\n }),\n end: (function (_end) {\n function end() {\n return _end.apply(this, arguments);\n }\n\n end.toString = function () {\n return _end.toString();\n };\n\n return end;\n })(function () {\n return end;\n })\n };\n}\n\n},{}],119:[function(_dereq_,module,exports){\n\"use strict\";\n\nexports.__esModule = true;\n/**\n * @file to-title-case.js\n *\n * Uppercase the first letter of a string\n *\n * @param {String} string String to be uppercased\n * @return {String}\n * @private\n * @method toTitleCase\n */\nfunction toTitleCase(string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\n\nexports[\"default\"] = toTitleCase;\nmodule.exports = exports[\"default\"];\n\n},{}],120:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nexports.__esModule = true;\n/**\n * @file url.js\n */\n\nvar _document = _dereq_('global/document');\n\nvar _document2 = _interopRequireWildcard(_document);\n\n/**\n * Resolve and parse the elements of a URL\n *\n * @param {String} url The url to parse\n * @return {Object} An object of url details\n * @method parseUrl\n */\nvar parseUrl = function parseUrl(url) {\n var props = ['protocol', 'hostname', 'port', 'pathname', 'search', 'hash', 'host'];\n\n // add the url to an anchor and let the browser parse the URL\n var a = _document2['default'].createElement('a');\n a.href = url;\n\n // IE8 (and 9?) Fix\n // ie8 doesn't parse the URL correctly until the anchor is actually\n // added to the body, and an innerHTML is needed to trigger the parsing\n var addToBody = a.host === '' && a.protocol !== 'file:';\n var div = undefined;\n if (addToBody) {\n div = _document2['default'].createElement('div');\n div.innerHTML = '';\n a = div.firstChild;\n // prevent the div from affecting layout\n div.setAttribute('style', 'display:none; position:absolute;');\n _document2['default'].body.appendChild(div);\n }\n\n // Copy the specific URL properties to a new object\n // This is also needed for IE8 because the anchor loses its\n // properties when it's removed from the dom\n var details = {};\n for (var i = 0; i < props.length; i++) {\n details[props[i]] = a[props[i]];\n }\n\n // IE9 adds the port to the host property unlike everyone else. If\n // a port identifier is added for standard ports, strip it.\n if (details.protocol === 'http:') {\n details.host = details.host.replace(/:80$/, '');\n }\n if (details.protocol === 'https:') {\n details.host = details.host.replace(/:443$/, '');\n }\n\n if (addToBody) {\n _document2['default'].body.removeChild(div);\n }\n\n return details;\n};\n\nexports.parseUrl = parseUrl;\n/**\n * Get absolute version of relative URL. Used to tell flash correct URL.\n * http://stackoverflow.com/questions/470832/getting-an-absolute-url-from-a-relative-one-ie6-issue\n *\n * @param {String} url URL to make absolute\n * @return {String} Absolute URL\n * @private\n * @method getAbsoluteURL\n */\nvar getAbsoluteURL = function getAbsoluteURL(url) {\n // Check if absolute URL\n if (!url.match(/^https?:\\/\\//)) {\n // Convert to absolute URL. Flash hosted off-site needs an absolute URL.\n var div = _document2['default'].createElement('div');\n div.innerHTML = 'x';\n url = div.firstChild.href;\n }\n\n return url;\n};\n\nexports.getAbsoluteURL = getAbsoluteURL;\n/**\n * Returns the extension of the passed file name. It will return an empty string if you pass an invalid path\n *\n * @param {String} path The fileName path like '/path/to/file.mp4'\n * @returns {String} The extension in lower case or an empty string if no extension could be found.\n * @method getFileExtension\n */\nvar getFileExtension = function getFileExtension(path) {\n if (typeof path === 'string') {\n var splitPathRe = /^(\\/?)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?)(\\.([^\\.\\/\\?]+)))(?:[\\/]*|[\\?].*)$/i;\n var pathParts = splitPathRe.exec(path);\n\n if (pathParts) {\n return pathParts.pop().toLowerCase();\n }\n }\n\n return '';\n};\nexports.getFileExtension = getFileExtension;\n\n},{\"global/document\":1}],121:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nexports.__esModule = true;\n/**\n * @file video.js\n */\n\nvar _document = _dereq_('global/document');\n\nvar _document2 = _interopRequireWildcard(_document);\n\nvar _import = _dereq_('./setup');\n\nvar setup = _interopRequireWildcard(_import);\n\nvar _Component = _dereq_('./component');\n\nvar _Component2 = _interopRequireWildcard(_Component);\n\nvar _globalOptions = _dereq_('./global-options.js');\n\nvar _globalOptions2 = _interopRequireWildcard(_globalOptions);\n\nvar _Player = _dereq_('./player');\n\nvar _Player2 = _interopRequireWildcard(_Player);\n\nvar _plugin = _dereq_('./plugins.js');\n\nvar _plugin2 = _interopRequireWildcard(_plugin);\n\nvar _mergeOptions = _dereq_('../../src/js/utils/merge-options.js');\n\nvar _mergeOptions2 = _interopRequireWildcard(_mergeOptions);\n\nvar _assign = _dereq_('object.assign');\n\nvar _assign2 = _interopRequireWildcard(_assign);\n\nvar _log = _dereq_('./utils/log.js');\n\nvar _log2 = _interopRequireWildcard(_log);\n\nvar _import2 = _dereq_('./utils/dom.js');\n\nvar Dom = _interopRequireWildcard(_import2);\n\nvar _import3 = _dereq_('./utils/browser.js');\n\nvar browser = _interopRequireWildcard(_import3);\n\nvar _extendsFn = _dereq_('./extends.js');\n\nvar _extendsFn2 = _interopRequireWildcard(_extendsFn);\n\nvar _merge2 = _dereq_('lodash-compat/object/merge');\n\nvar _merge3 = _interopRequireWildcard(_merge2);\n\n// Include the built-in techs\n\nvar _Html5 = _dereq_('./tech/html5.js');\n\nvar _Html52 = _interopRequireWildcard(_Html5);\n\nvar _Flash = _dereq_('./tech/flash.js');\n\nvar _Flash2 = _interopRequireWildcard(_Flash);\n\n// HTML5 Element Shim for IE8\nif (typeof HTMLVideoElement === 'undefined') {\n _document2['default'].createElement('video');\n _document2['default'].createElement('audio');\n _document2['default'].createElement('track');\n}\n\n/**\n * Doubles as the main function for users to create a player instance and also\n * the main library object.\n * The `videojs` function can be used to initialize or retrieve a player.\n * ```js\n * var myPlayer = videojs('my_video_id');\n * ```\n *\n * @param {String|Element} id Video element or video element ID\n * @param {Object=} options Optional options object for config/settings\n * @param {Function=} ready Optional ready callback\n * @return {Player} A player instance\n * @mixes videojs\n * @method videojs\n */\nvar videojs = function videojs(id, options, ready) {\n var tag; // Element of ID\n\n // Allow for element or ID to be passed in\n // String ID\n if (typeof id === 'string') {\n\n // Adjust for jQuery ID syntax\n if (id.indexOf('#') === 0) {\n id = id.slice(1);\n }\n\n // If a player instance has already been created for this ID return it.\n if (_Player2['default'].players[id]) {\n\n // If options or ready funtion are passed, warn\n if (options) {\n _log2['default'].warn('Player \"' + id + '\" is already initialised. Options will not be applied.');\n }\n\n if (ready) {\n _Player2['default'].players[id].ready(ready);\n }\n\n return _Player2['default'].players[id];\n\n // Otherwise get element for ID\n } else {\n tag = Dom.getEl(id);\n }\n\n // ID is a media element\n } else {\n tag = id;\n }\n\n // Check for a useable element\n if (!tag || !tag.nodeName) {\n // re: nodeName, could be a box div also\n throw new TypeError('The element or ID supplied is not valid. (videojs)'); // Returns\n }\n\n // Element may have a player attr referring to an already created player instance.\n // If not, set up a new player and return the instance.\n return tag.player || new _Player2['default'](tag, options, ready);\n};\n\n// Run Auto-load players\n// 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)\nsetup.autoSetupTimeout(1, videojs);\n\n/*\n * Current software version (semver)\n *\n * @type {String}\n */\nvideojs.VERSION = '5.0.0-rc.9';\n\n/**\n * Get the global options object\n *\n * @return {Object} The global options object\n * @mixes videojs\n * @method getGlobalOptions\n */\nvideojs.getGlobalOptions = function () {\n return _globalOptions2['default'];\n};\n\n/**\n * Set options that will apply to every player\n * ```js\n * videojs.setGlobalOptions({\n * autoplay: true\n * });\n * // -> all players will autoplay by default\n * ```\n * NOTE: This will do a deep merge with the new options,\n * not overwrite the entire global options object.\n *\n * @return {Object} The updated global options object\n * @mixes videojs\n * @method setGlobalOptions\n */\nvideojs.setGlobalOptions = function (newOptions) {\n return _mergeOptions2['default'](_globalOptions2['default'], newOptions);\n};\n\n/**\n * Get an object with the currently created players, keyed by player ID\n *\n * @return {Object} The created players\n * @mixes videojs\n * @method getPlayers\n */\nvideojs.getPlayers = function () {\n return _Player2['default'].players;\n};\n\n/**\n * Get a component class object by name\n * ```js\n * var VjsButton = videojs.getComponent('Button');\n * // Create a new instance of the component\n * var myButton = new VjsButton(myPlayer);\n * ```\n *\n * @return {Component} Component identified by name\n * @mixes videojs\n * @method getComponent\n */\nvideojs.getComponent = _Component2['default'].getComponent;\n\n/**\n * Register a component so it can referred to by name\n * Used when adding to other\n * components, either through addChild\n * `component.addChild('myComponent')`\n * or through default children options\n * `{ children: ['myComponent'] }`.\n * ```js\n * // Get a component to subclass\n * var VjsButton = videojs.getComponent('Button');\n * // Subclass the component (see 'extends' doc for more info)\n * var MySpecialButton = videojs.extends(VjsButton, {});\n * // Register the new component\n * VjsButton.registerComponent('MySepcialButton', MySepcialButton);\n * // (optionally) add the new component as a default player child\n * myPlayer.addChild('MySepcialButton');\n * ```\n * NOTE: You could also just initialize the component before adding.\n * `component.addChild(new MyComponent());`\n *\n * @param {String} The class name of the component\n * @param {Component} The component class\n * @return {Component} The newly registered component\n * @mixes videojs\n * @method registerComponent\n */\nvideojs.registerComponent = _Component2['default'].registerComponent;\n\n/*\n * A suite of browser and device tests\n *\n * @type {Object}\n */\nvideojs.browser = browser;\n\n/**\n * Subclass an existing class\n * Mimics ES6 subclassing with the `extends` keyword\n * ```js\n * // Create a basic javascript 'class'\n * function MyClass(name){\n * // Set a property at initialization\n * this.myName = name;\n * }\n * // Create an instance method\n * MyClass.prototype.sayMyName = function(){\n * alert(this.myName);\n * };\n * // Subclass the exisitng class and change the name\n * // when initializing\n * var MySubClass = videojs.extends(MyClass, {\n * constructor: function(name) {\n * // Call the super class constructor for the subclass\n * MyClass.call(this, name)\n * }\n * });\n * // Create an instance of the new sub class\n * var myInstance = new MySubClass('John');\n * myInstance.sayMyName(); // -> should alert \"John\"\n * ```\n *\n * @param {Function} The Class to subclass\n * @param {Object} An object including instace methods for the new class\n * Optionally including a `constructor` function\n * @return {Function} The newly created subclass\n * @mixes videojs\n * @method extends\n */\nvideojs['extends'] = _extendsFn2['default'];\n\n/**\n * Merge two options objects recursively\n * Performs a deep merge like lodash.merge but **only merges plain objects**\n * (not arrays, elements, anything else)\n * Other values will be copied directly from the second object.\n * ```js\n * var defaultOptions = {\n * foo: true,\n * bar: {\n * a: true,\n * b: [1,2,3]\n * }\n * };\n * var newOptions = {\n * foo: false,\n * bar: {\n * b: [4,5,6]\n * }\n * };\n * var result = videojs.mergeOptions(defaultOptions, newOptions);\n * // result.foo = false;\n * // result.bar.a = true;\n * // result.bar.b = [4,5,6];\n * ```\n *\n * @param {Object} The options object whose values will be overriden\n * @param {Object} The options object with values to override the first\n * @param {Object} Any number of additional options objects\n *\n * @return {Object} a new object with the merged values\n * @mixes videojs\n * @method mergeOptions\n */\nvideojs.mergeOptions = _mergeOptions2['default'];\n\n/**\n * Create a Video.js player plugin\n * Plugins are only initialized when options for the plugin are included\n * in the player options, or the plugin function on the player instance is\n * called.\n * **See the plugin guide in the docs for a more detailed example**\n * ```js\n * // Make a plugin that alerts when the player plays\n * videojs.plugin('myPlugin', function(myPluginOptions) {\n * myPluginOptions = myPluginOptions || {};\n *\n * var player = this;\n * var alertText = myPluginOptions.text || 'Player is playing!'\n *\n * player.on('play', function(){\n * alert(alertText);\n * });\n * });\n * // USAGE EXAMPLES\n * // EXAMPLE 1: New player with plugin options, call plugin immediately\n * var player1 = videojs('idOne', {\n * myPlugin: {\n * text: 'Custom text!'\n * }\n * });\n * // Click play\n * // --> Should alert 'Custom text!'\n * // EXAMPLE 3: New player, initialize plugin later\n * var player3 = videojs('idThree');\n * // Click play\n * // --> NO ALERT\n * // Click pause\n * // Initialize plugin using the plugin function on the player instance\n * player3.myPlugin({\n * text: 'Plugin added later!'\n * });\n * // Click play\n * // --> Should alert 'Plugin added later!'\n * ```\n *\n * @param {String} The plugin name\n * @param {Function} The plugin function that will be called with options\n * @mixes videojs\n * @method plugin\n */\nvideojs.plugin = _plugin2['default'];\n\n/**\n * Adding languages so that they're available to all players.\n * ```js\n * videojs.addLanguage('es', { 'Hello': 'Hola' });\n * ```\n *\n * @param {String} code The language code or dictionary property\n * @param {Object} data The data values to be translated\n * @return {Object} The resulting language dictionary object\n * @mixes videojs\n * @method addLanguage\n */\nvideojs.addLanguage = function (code, data) {\n var _merge;\n\n code = ('' + code).toLowerCase();\n return _merge3['default'](_globalOptions2['default'].languages, (_merge = {}, _merge[code] = data, _merge))[code];\n};\n\n// REMOVING: We probably should add this to the migration plugin\n// // Expose but deprecate the window[componentName] method for accessing components\n// Object.getOwnPropertyNames(Component.components).forEach(function(name){\n// let component = Component.components[name];\n//\n// // A deprecation warning as the constuctor\n// module.exports[name] = function(player, options, ready){\n// log.warn('Using videojs.'+name+' to access the '+name+' component has been deprecated. Please use videojs.getComponent(\"componentName\")');\n//\n// return new Component(player, options, ready);\n// };\n//\n// // Allow the prototype and class methods to be accessible still this way\n// // Though anything that attempts to override class methods will no longer work\n// assign(module.exports[name], component);\n// });\n\n/*\n * Custom Universal Module Definition (UMD)\n *\n * Video.js will never be a non-browser lib so we can simplify UMD a bunch and\n * still support requirejs and browserify. This also needs to be closure\n * compiler compatible, so string keys are used.\n */\nif (typeof define === 'function' && define.amd) {\n define('videojs', [], function () {\n return videojs;\n });\n\n // checking that module is an object too because of umdjs/umd#35\n} else if (typeof exports === 'object' && typeof module === 'object') {\n module.exports = videojs;\n}\n\nexports['default'] = videojs;\nmodule.exports = exports['default'];\n\n},{\"../../src/js/utils/merge-options.js\":116,\"./component\":52,\"./extends.js\":84,\"./global-options.js\":86,\"./player\":92,\"./plugins.js\":93,\"./setup\":95,\"./tech/flash.js\":98,\"./tech/html5.js\":99,\"./utils/browser.js\":108,\"./utils/dom.js\":110,\"./utils/log.js\":115,\"global/document\":1,\"lodash-compat/object/merge\":40,\"object.assign\":44}],122:[function(_dereq_,module,exports){\n'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nexports.__esModule = true;\n/**\n * @file xhr.js\n */\n\nvar _import = _dereq_('./utils/url.js');\n\nvar Url = _interopRequireWildcard(_import);\n\nvar _log = _dereq_('./utils/log.js');\n\nvar _log2 = _interopRequireWildcard(_log);\n\nvar _mergeOptions = _dereq_('./utils/merge-options.js');\n\nvar _mergeOptions2 = _interopRequireWildcard(_mergeOptions);\n\nvar _window = _dereq_('global/window');\n\nvar _window2 = _interopRequireWildcard(_window);\n\n/*\n * Simple http request for retrieving external files (e.g. text tracks)\n * ##### Example\n * // using url string\n * videojs.xhr('http://example.com/myfile.vtt', function(error, response, responseBody){});\n *\n * // or options block\n * videojs.xhr({\n * uri: 'http://example.com/myfile.vtt',\n * method: 'GET',\n * responseType: 'text'\n * }, function(error, response, responseBody){\n * if (error) {\n * // log the error\n * } else {\n * // successful, do something with the response\n * }\n * });\n * /////////////\n * API is modeled after the Raynos/xhr, which we hope to use after\n * getting browserify implemented.\n * https://github.com/Raynos/xhr/blob/master/index.js\n *\n * @param {Object|String} options Options block or URL string\n * @param {Function} callback The callback function\n * @return {Object} The request\n * @method xhr\n */\nvar xhr = function xhr(options, callback) {\n var abortTimeout = undefined;\n\n // If options is a string it's the url\n if (typeof options === 'string') {\n options = {\n uri: options\n };\n }\n\n // Merge with default options\n _mergeOptions2['default']({\n method: 'GET',\n timeout: 45 * 1000\n }, options);\n\n callback = callback || function () {};\n\n var XHR = _window2['default'].XMLHttpRequest;\n\n if (typeof XHR === 'undefined') {\n // Shim XMLHttpRequest for older IEs\n XHR = function () {\n try {\n return new _window2['default'].ActiveXObject('Msxml2.XMLHTTP.6.0');\n } catch (e) {}\n try {\n return new _window2['default'].ActiveXObject('Msxml2.XMLHTTP.3.0');\n } catch (f) {}\n try {\n return new _window2['default'].ActiveXObject('Msxml2.XMLHTTP');\n } catch (g) {}\n throw new Error('This browser does not support XMLHttpRequest.');\n };\n }\n\n var request = new XHR();\n // Store a reference to the url on the request instance\n request.uri = options.uri;\n\n var urlInfo = Url.parseUrl(options.uri);\n var winLoc = _window2['default'].location;\n\n var successHandler = function successHandler() {\n _window2['default'].clearTimeout(abortTimeout);\n callback(null, request, request.response || request.responseText);\n };\n\n var errorHandler = function errorHandler(err) {\n _window2['default'].clearTimeout(abortTimeout);\n\n if (!err || typeof err === 'string') {\n err = new Error(err);\n }\n\n callback(err, request);\n };\n\n // Check if url is for another domain/origin\n // IE8 doesn't know location.origin, so we won't rely on it here\n var crossOrigin = urlInfo.protocol + urlInfo.host !== winLoc.protocol + winLoc.host;\n\n // XDomainRequest -- Use for IE if XMLHTTPRequest2 isn't available\n // 'withCredentials' is only available in XMLHTTPRequest2\n // Also XDomainRequest has a lot of gotchas, so only use if cross domain\n if (crossOrigin && _window2['default'].XDomainRequest && !('withCredentials' in request)) {\n request = new _window2['default'].XDomainRequest();\n request.onload = successHandler;\n request.onerror = errorHandler;\n // These blank handlers need to be set to fix ie9\n // http://cypressnorth.com/programming/internet-explorer-aborting-ajax-requests-fixed/\n request.onprogress = function () {};\n request.ontimeout = function () {};\n\n // XMLHTTPRequest\n } else {\n (function () {\n var fileUrl = urlInfo.protocol === 'file:' || winLoc.protocol === 'file:';\n\n request.onreadystatechange = function () {\n if (request.readyState === 4) {\n if (request.timedout) {\n return errorHandler('timeout');\n }\n\n if (request.status === 200 || fileUrl && request.status === 0) {\n successHandler();\n } else {\n errorHandler();\n }\n }\n };\n\n if (options.timeout) {\n abortTimeout = _window2['default'].setTimeout(function () {\n if (request.readyState !== 4) {\n request.timedout = true;\n request.abort();\n }\n }, options.timeout);\n }\n })();\n }\n\n // open the connection\n try {\n // Third arg is async, or ignored by XDomainRequest\n request.open(options.method || 'GET', options.uri, true);\n } catch (err) {\n return errorHandler(err);\n }\n\n // withCredentials only supported by XMLHttpRequest2\n if (options.withCredentials) {\n request.withCredentials = true;\n }\n\n if (options.responseType) {\n request.responseType = options.responseType;\n }\n\n // send the request\n try {\n request.send();\n } catch (err) {\n return errorHandler(err);\n }\n\n return request;\n};\n\nexports['default'] = xhr;\nmodule.exports = exports['default'];\n\n},{\"./utils/log.js\":115,\"./utils/merge-options.js\":116,\"./utils/url.js\":120,\"global/window\":2}]},{},[121])(121)\n});\n\n\n/* vtt.js - v0.11.11 (https://github.com/mozilla/vtt.js) built on 22-01-2015 */\n\n(function(root) {\n var vttjs = root.vttjs = {};\n var cueShim = vttjs.VTTCue;\n var regionShim = vttjs.VTTRegion;\n var oldVTTCue = root.VTTCue;\n var oldVTTRegion = root.VTTRegion;\n\n vttjs.shim = function() {\n vttjs.VTTCue = cueShim;\n vttjs.VTTRegion = regionShim;\n };\n\n vttjs.restore = function() {\n vttjs.VTTCue = oldVTTCue;\n vttjs.VTTRegion = oldVTTRegion;\n };\n}(this));\n\n/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n(function(root, vttjs) {\n\n var autoKeyword = \"auto\";\n var directionSetting = {\n \"\": true,\n \"lr\": true,\n \"rl\": true\n };\n var alignSetting = {\n \"start\": true,\n \"middle\": true,\n \"end\": true,\n \"left\": true,\n \"right\": true\n };\n\n function findDirectionSetting(value) {\n if (typeof value !== \"string\") {\n return false;\n }\n var dir = directionSetting[value.toLowerCase()];\n return dir ? value.toLowerCase() : false;\n }\n\n function findAlignSetting(value) {\n if (typeof value !== \"string\") {\n return false;\n }\n var align = alignSetting[value.toLowerCase()];\n return align ? value.toLowerCase() : false;\n }\n\n function extend(obj) {\n var i = 1;\n for (; i < arguments.length; i++) {\n var cobj = arguments[i];\n for (var p in cobj) {\n obj[p] = cobj[p];\n }\n }\n\n return obj;\n }\n\n function VTTCue(startTime, endTime, text) {\n var cue = this;\n var isIE8 = (/MSIE\\s8\\.0/).test(navigator.userAgent);\n var baseObj = {};\n\n if (isIE8) {\n cue = document.createElement('custom');\n } else {\n baseObj.enumerable = true;\n }\n\n /**\n * Shim implementation specific properties. These properties are not in\n * the spec.\n */\n\n // Lets us know when the VTTCue's data has changed in such a way that we need\n // to recompute its display state. This lets us compute its display state\n // lazily.\n cue.hasBeenReset = false;\n\n /**\n * VTTCue and TextTrackCue properties\n * http://dev.w3.org/html5/webvtt/#vttcue-interface\n */\n\n var _id = \"\";\n var _pauseOnExit = false;\n var _startTime = startTime;\n var _endTime = endTime;\n var _text = text;\n var _region = null;\n var _vertical = \"\";\n var _snapToLines = true;\n var _line = \"auto\";\n var _lineAlign = \"start\";\n var _position = 50;\n var _positionAlign = \"middle\";\n var _size = 50;\n var _align = \"middle\";\n\n Object.defineProperty(cue,\n \"id\", extend({}, baseObj, {\n get: function() {\n return _id;\n },\n set: function(value) {\n _id = \"\" + value;\n }\n }));\n\n Object.defineProperty(cue,\n \"pauseOnExit\", extend({}, baseObj, {\n get: function() {\n return _pauseOnExit;\n },\n set: function(value) {\n _pauseOnExit = !!value;\n }\n }));\n\n Object.defineProperty(cue,\n \"startTime\", extend({}, baseObj, {\n get: function() {\n return _startTime;\n },\n set: function(value) {\n if (typeof value !== \"number\") {\n throw new TypeError(\"Start time must be set to a number.\");\n }\n _startTime = value;\n this.hasBeenReset = true;\n }\n }));\n\n Object.defineProperty(cue,\n \"endTime\", extend({}, baseObj, {\n get: function() {\n return _endTime;\n },\n set: function(value) {\n if (typeof value !== \"number\") {\n throw new TypeError(\"End time must be set to a number.\");\n }\n _endTime = value;\n this.hasBeenReset = true;\n }\n }));\n\n Object.defineProperty(cue,\n \"text\", extend({}, baseObj, {\n get: function() {\n return _text;\n },\n set: function(value) {\n _text = \"\" + value;\n this.hasBeenReset = true;\n }\n }));\n\n Object.defineProperty(cue,\n \"region\", extend({}, baseObj, {\n get: function() {\n return _region;\n },\n set: function(value) {\n _region = value;\n this.hasBeenReset = true;\n }\n }));\n\n Object.defineProperty(cue,\n \"vertical\", extend({}, baseObj, {\n get: function() {\n return _vertical;\n },\n set: function(value) {\n var setting = findDirectionSetting(value);\n // Have to check for false because the setting an be an empty string.\n if (setting === false) {\n throw new SyntaxError(\"An invalid or illegal string was specified.\");\n }\n _vertical = setting;\n this.hasBeenReset = true;\n }\n }));\n\n Object.defineProperty(cue,\n \"snapToLines\", extend({}, baseObj, {\n get: function() {\n return _snapToLines;\n },\n set: function(value) {\n _snapToLines = !!value;\n this.hasBeenReset = true;\n }\n }));\n\n Object.defineProperty(cue,\n \"line\", extend({}, baseObj, {\n get: function() {\n return _line;\n },\n set: function(value) {\n if (typeof value !== \"number\" && value !== autoKeyword) {\n throw new SyntaxError(\"An invalid number or illegal string was specified.\");\n }\n _line = value;\n this.hasBeenReset = true;\n }\n }));\n\n Object.defineProperty(cue,\n \"lineAlign\", extend({}, baseObj, {\n get: function() {\n return _lineAlign;\n },\n set: function(value) {\n var setting = findAlignSetting(value);\n if (!setting) {\n throw new SyntaxError(\"An invalid or illegal string was specified.\");\n }\n _lineAlign = setting;\n this.hasBeenReset = true;\n }\n }));\n\n Object.defineProperty(cue,\n \"position\", extend({}, baseObj, {\n get: function() {\n return _position;\n },\n set: function(value) {\n if (value < 0 || value > 100) {\n throw new Error(\"Position must be between 0 and 100.\");\n }\n _position = value;\n this.hasBeenReset = true;\n }\n }));\n\n Object.defineProperty(cue,\n \"positionAlign\", extend({}, baseObj, {\n get: function() {\n return _positionAlign;\n },\n set: function(value) {\n var setting = findAlignSetting(value);\n if (!setting) {\n throw new SyntaxError(\"An invalid or illegal string was specified.\");\n }\n _positionAlign = setting;\n this.hasBeenReset = true;\n }\n }));\n\n Object.defineProperty(cue,\n \"size\", extend({}, baseObj, {\n get: function() {\n return _size;\n },\n set: function(value) {\n if (value < 0 || value > 100) {\n throw new Error(\"Size must be between 0 and 100.\");\n }\n _size = value;\n this.hasBeenReset = true;\n }\n }));\n\n Object.defineProperty(cue,\n \"align\", extend({}, baseObj, {\n get: function() {\n return _align;\n },\n set: function(value) {\n var setting = findAlignSetting(value);\n if (!setting) {\n throw new SyntaxError(\"An invalid or illegal string was specified.\");\n }\n _align = setting;\n this.hasBeenReset = true;\n }\n }));\n\n /**\n * Other spec defined properties\n */\n\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#text-track-cue-display-state\n cue.displayState = undefined;\n\n if (isIE8) {\n return cue;\n }\n }\n\n /**\n * VTTCue methods\n */\n\n VTTCue.prototype.getCueAsHTML = function() {\n // Assume WebVTT.convertCueToDOMTree is on the global.\n return WebVTT.convertCueToDOMTree(window, this.text);\n };\n\n root.VTTCue = root.VTTCue || VTTCue;\n vttjs.VTTCue = VTTCue;\n}(this, (this.vttjs || {})));\n\n/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n(function(root, vttjs) {\n\n var scrollSetting = {\n \"\": true,\n \"up\": true,\n };\n\n function findScrollSetting(value) {\n if (typeof value !== \"string\") {\n return false;\n }\n var scroll = scrollSetting[value.toLowerCase()];\n return scroll ? value.toLowerCase() : false;\n }\n\n function isValidPercentValue(value) {\n return typeof value === \"number\" && (value >= 0 && value <= 100);\n }\n\n // VTTRegion shim http://dev.w3.org/html5/webvtt/#vttregion-interface\n function VTTRegion() {\n var _width = 100;\n var _lines = 3;\n var _regionAnchorX = 0;\n var _regionAnchorY = 100;\n var _viewportAnchorX = 0;\n var _viewportAnchorY = 100;\n var _scroll = \"\";\n\n Object.defineProperties(this, {\n \"width\": {\n enumerable: true,\n get: function() {\n return _width;\n },\n set: function(value) {\n if (!isValidPercentValue(value)) {\n throw new Error(\"Width must be between 0 and 100.\");\n }\n _width = value;\n }\n },\n \"lines\": {\n enumerable: true,\n get: function() {\n return _lines;\n },\n set: function(value) {\n if (typeof value !== \"number\") {\n throw new TypeError(\"Lines must be set to a number.\");\n }\n _lines = value;\n }\n },\n \"regionAnchorY\": {\n enumerable: true,\n get: function() {\n return _regionAnchorY;\n },\n set: function(value) {\n if (!isValidPercentValue(value)) {\n throw new Error(\"RegionAnchorX must be between 0 and 100.\");\n }\n _regionAnchorY = value;\n }\n },\n \"regionAnchorX\": {\n enumerable: true,\n get: function() {\n return _regionAnchorX;\n },\n set: function(value) {\n if(!isValidPercentValue(value)) {\n throw new Error(\"RegionAnchorY must be between 0 and 100.\");\n }\n _regionAnchorX = value;\n }\n },\n \"viewportAnchorY\": {\n enumerable: true,\n get: function() {\n return _viewportAnchorY;\n },\n set: function(value) {\n if (!isValidPercentValue(value)) {\n throw new Error(\"ViewportAnchorY must be between 0 and 100.\");\n }\n _viewportAnchorY = value;\n }\n },\n \"viewportAnchorX\": {\n enumerable: true,\n get: function() {\n return _viewportAnchorX;\n },\n set: function(value) {\n if (!isValidPercentValue(value)) {\n throw new Error(\"ViewportAnchorX must be between 0 and 100.\");\n }\n _viewportAnchorX = value;\n }\n },\n \"scroll\": {\n enumerable: true,\n get: function() {\n return _scroll;\n },\n set: function(value) {\n var setting = findScrollSetting(value);\n // Have to check for false as an empty string is a legal value.\n if (setting === false) {\n throw new SyntaxError(\"An invalid or illegal string was specified.\");\n }\n _scroll = setting;\n }\n }\n });\n }\n\n root.VTTRegion = root.VTTRegion || VTTRegion;\n vttjs.VTTRegion = VTTRegion;\n}(this, (this.vttjs || {})));\n\n/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */\n/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */\n\n(function(global) {\n\n var _objCreate = Object.create || (function() {\n function F() {}\n return function(o) {\n if (arguments.length !== 1) {\n throw new Error('Object.create shim only accepts one parameter.');\n }\n F.prototype = o;\n return new F();\n };\n })();\n\n // Creates a new ParserError object from an errorData object. The errorData\n // object should have default code and message properties. The default message\n // property can be overriden by passing in a message parameter.\n // See ParsingError.Errors below for acceptable errors.\n function ParsingError(errorData, message) {\n this.name = \"ParsingError\";\n this.code = errorData.code;\n this.message = message || errorData.message;\n }\n ParsingError.prototype = _objCreate(Error.prototype);\n ParsingError.prototype.constructor = ParsingError;\n\n // ParsingError metadata for acceptable ParsingErrors.\n ParsingError.Errors = {\n BadSignature: {\n code: 0,\n message: \"Malformed WebVTT signature.\"\n },\n BadTimeStamp: {\n code: 1,\n message: \"Malformed time stamp.\"\n }\n };\n\n // Try to parse input as a time stamp.\n function parseTimeStamp(input) {\n\n function computeSeconds(h, m, s, f) {\n return (h | 0) * 3600 + (m | 0) * 60 + (s | 0) + (f | 0) / 1000;\n }\n\n var m = input.match(/^(\\d+):(\\d{2})(:\\d{2})?\\.(\\d{3})/);\n if (!m) {\n return null;\n }\n\n if (m[3]) {\n // Timestamp takes the form of [hours]:[minutes]:[seconds].[milliseconds]\n return computeSeconds(m[1], m[2], m[3].replace(\":\", \"\"), m[4]);\n } else if (m[1] > 59) {\n // Timestamp takes the form of [hours]:[minutes].[milliseconds]\n // First position is hours as it's over 59.\n return computeSeconds(m[1], m[2], 0, m[4]);\n } else {\n // Timestamp takes the form of [minutes]:[seconds].[milliseconds]\n return computeSeconds(0, m[1], m[2], m[4]);\n }\n }\n\n // A settings object holds key/value pairs and will ignore anything but the first\n // assignment to a specific key.\n function Settings() {\n this.values = _objCreate(null);\n }\n\n Settings.prototype = {\n // Only accept the first assignment to any key.\n set: function(k, v) {\n if (!this.get(k) && v !== \"\") {\n this.values[k] = v;\n }\n },\n // Return the value for a key, or a default value.\n // If 'defaultKey' is passed then 'dflt' is assumed to be an object with\n // a number of possible default values as properties where 'defaultKey' is\n // the key of the property that will be chosen; otherwise it's assumed to be\n // a single value.\n get: function(k, dflt, defaultKey) {\n if (defaultKey) {\n return this.has(k) ? this.values[k] : dflt[defaultKey];\n }\n return this.has(k) ? this.values[k] : dflt;\n },\n // Check whether we have a value for a key.\n has: function(k) {\n return k in this.values;\n },\n // Accept a setting if its one of the given alternatives.\n alt: function(k, v, a) {\n for (var n = 0; n < a.length; ++n) {\n if (v === a[n]) {\n this.set(k, v);\n break;\n }\n }\n },\n // Accept a setting if its a valid (signed) integer.\n integer: function(k, v) {\n if (/^-?\\d+$/.test(v)) { // integer\n this.set(k, parseInt(v, 10));\n }\n },\n // Accept a setting if its a valid percentage.\n percent: function(k, v) {\n var m;\n if ((m = v.match(/^([\\d]{1,3})(\\.[\\d]*)?%$/))) {\n v = parseFloat(v);\n if (v >= 0 && v <= 100) {\n this.set(k, v);\n return true;\n }\n }\n return false;\n }\n };\n\n // Helper function to parse input into groups separated by 'groupDelim', and\n // interprete each group as a key/value pair separated by 'keyValueDelim'.\n function parseOptions(input, callback, keyValueDelim, groupDelim) {\n var groups = groupDelim ? input.split(groupDelim) : [input];\n for (var i in groups) {\n if (typeof groups[i] !== \"string\") {\n continue;\n }\n var kv = groups[i].split(keyValueDelim);\n if (kv.length !== 2) {\n continue;\n }\n var k = kv[0];\n var v = kv[1];\n callback(k, v);\n }\n }\n\n function parseCue(input, cue, regionList) {\n // Remember the original input if we need to throw an error.\n var oInput = input;\n // 4.1 WebVTT timestamp\n function consumeTimeStamp() {\n var ts = parseTimeStamp(input);\n if (ts === null) {\n throw new ParsingError(ParsingError.Errors.BadTimeStamp,\n \"Malformed timestamp: \" + oInput);\n }\n // Remove time stamp from input.\n input = input.replace(/^[^\\sa-zA-Z-]+/, \"\");\n return ts;\n }\n\n // 4.4.2 WebVTT cue settings\n function consumeCueSettings(input, cue) {\n var settings = new Settings();\n\n parseOptions(input, function (k, v) {\n switch (k) {\n case \"region\":\n // Find the last region we parsed with the same region id.\n for (var i = regionList.length - 1; i >= 0; i--) {\n if (regionList[i].id === v) {\n settings.set(k, regionList[i].region);\n break;\n }\n }\n break;\n case \"vertical\":\n settings.alt(k, v, [\"rl\", \"lr\"]);\n break;\n case \"line\":\n var vals = v.split(\",\"),\n vals0 = vals[0];\n settings.integer(k, vals0);\n settings.percent(k, vals0) ? settings.set(\"snapToLines\", false) : null;\n settings.alt(k, vals0, [\"auto\"]);\n if (vals.length === 2) {\n settings.alt(\"lineAlign\", vals[1], [\"start\", \"middle\", \"end\"]);\n }\n break;\n case \"position\":\n vals = v.split(\",\");\n settings.percent(k, vals[0]);\n if (vals.length === 2) {\n settings.alt(\"positionAlign\", vals[1], [\"start\", \"middle\", \"end\"]);\n }\n break;\n case \"size\":\n settings.percent(k, v);\n break;\n case \"align\":\n settings.alt(k, v, [\"start\", \"middle\", \"end\", \"left\", \"right\"]);\n break;\n }\n }, /:/, /\\s/);\n\n // Apply default values for any missing fields.\n cue.region = settings.get(\"region\", null);\n cue.vertical = settings.get(\"vertical\", \"\");\n cue.line = settings.get(\"line\", \"auto\");\n cue.lineAlign = settings.get(\"lineAlign\", \"start\");\n cue.snapToLines = settings.get(\"snapToLines\", true);\n cue.size = settings.get(\"size\", 100);\n cue.align = settings.get(\"align\", \"middle\");\n cue.position = settings.get(\"position\", {\n start: 0,\n left: 0,\n middle: 50,\n end: 100,\n right: 100\n }, cue.align);\n cue.positionAlign = settings.get(\"positionAlign\", {\n start: \"start\",\n left: \"start\",\n middle: \"middle\",\n end: \"end\",\n right: \"end\"\n }, cue.align);\n }\n\n function skipWhitespace() {\n input = input.replace(/^\\s+/, \"\");\n }\n\n // 4.1 WebVTT cue timings.\n skipWhitespace();\n cue.startTime = consumeTimeStamp(); // (1) collect cue start time\n skipWhitespace();\n if (input.substr(0, 3) !== \"-->\") { // (3) next characters must match \"-->\"\n throw new ParsingError(ParsingError.Errors.BadTimeStamp,\n \"Malformed time stamp (time stamps must be separated by '-->'): \" +\n oInput);\n }\n input = input.substr(3);\n skipWhitespace();\n cue.endTime = consumeTimeStamp(); // (5) collect cue end time\n\n // 4.1 WebVTT cue settings list.\n skipWhitespace();\n consumeCueSettings(input, cue);\n }\n\n var ESCAPE = {\n \"&amp;\": \"&\",\n \"&lt;\": \"<\",\n \"&gt;\": \">\",\n \"&lrm;\": \"\\u200e\",\n \"&rlm;\": \"\\u200f\",\n \"&nbsp;\": \"\\u00a0\"\n };\n\n var TAG_NAME = {\n c: \"span\",\n i: \"i\",\n b: \"b\",\n u: \"u\",\n ruby: \"ruby\",\n rt: \"rt\",\n v: \"span\",\n lang: \"span\"\n };\n\n var TAG_ANNOTATION = {\n v: \"title\",\n lang: \"lang\"\n };\n\n var NEEDS_PARENT = {\n rt: \"ruby\"\n };\n\n // Parse content into a document fragment.\n function parseContent(window, input) {\n function nextToken() {\n // Check for end-of-string.\n if (!input) {\n return null;\n }\n\n // Consume 'n' characters from the input.\n function consume(result) {\n input = input.substr(result.length);\n return result;\n }\n\n var m = input.match(/^([^<]*)(<[^>]+>?)?/);\n // If there is some text before the next tag, return it, otherwise return\n // the tag.\n return consume(m[1] ? m[1] : m[2]);\n }\n\n // Unescape a string 's'.\n function unescape1(e) {\n return ESCAPE[e];\n }\n function unescape(s) {\n while ((m = s.match(/&(amp|lt|gt|lrm|rlm|nbsp);/))) {\n s = s.replace(m[0], unescape1);\n }\n return s;\n }\n\n function shouldAdd(current, element) {\n return !NEEDS_PARENT[element.localName] ||\n NEEDS_PARENT[element.localName] === current.localName;\n }\n\n // Create an element for this tag.\n function createElement(type, annotation) {\n var tagName = TAG_NAME[type];\n if (!tagName) {\n return null;\n }\n var element = window.document.createElement(tagName);\n element.localName = tagName;\n var name = TAG_ANNOTATION[type];\n if (name && annotation) {\n element[name] = annotation.trim();\n }\n return element;\n }\n\n var rootDiv = window.document.createElement(\"div\"),\n current = rootDiv,\n t,\n tagStack = [];\n\n while ((t = nextToken()) !== null) {\n if (t[0] === '<') {\n if (t[1] === \"/\") {\n // If the closing tag matches, move back up to the parent node.\n if (tagStack.length &&\n tagStack[tagStack.length - 1] === t.substr(2).replace(\">\", \"\")) {\n tagStack.pop();\n current = current.parentNode;\n }\n // Otherwise just ignore the end tag.\n continue;\n }\n var ts = parseTimeStamp(t.substr(1, t.length - 2));\n var node;\n if (ts) {\n // Timestamps are lead nodes as well.\n node = window.document.createProcessingInstruction(\"timestamp\", ts);\n current.appendChild(node);\n continue;\n }\n var m = t.match(/^<([^.\\s/0-9>]+)(\\.[^\\s\\\\>]+)?([^>\\\\]+)?(\\\\?)>?$/);\n // If we can't parse the tag, skip to the next tag.\n if (!m) {\n continue;\n }\n // Try to construct an element, and ignore the tag if we couldn't.\n node = createElement(m[1], m[3]);\n if (!node) {\n continue;\n }\n // Determine if the tag should be added based on the context of where it\n // is placed in the cuetext.\n if (!shouldAdd(current, node)) {\n continue;\n }\n // Set the class list (as a list of classes, separated by space).\n if (m[2]) {\n node.className = m[2].substr(1).replace('.', ' ');\n }\n // Append the node to the current node, and enter the scope of the new\n // node.\n tagStack.push(m[1]);\n current.appendChild(node);\n current = node;\n continue;\n }\n\n // Text nodes are leaf nodes.\n current.appendChild(window.document.createTextNode(unescape(t)));\n }\n\n return rootDiv;\n }\n\n // This is a list of all the Unicode characters that have a strong\n // right-to-left category. What this means is that these characters are\n // written right-to-left for sure. It was generated by pulling all the strong\n // right-to-left characters out of the Unicode data table. That table can\n // found at: http://www.unicode.org/Public/UNIDATA/UnicodeData.txt\n var strongRTLChars = [0x05BE, 0x05C0, 0x05C3, 0x05C6, 0x05D0, 0x05D1,\n 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7, 0x05D8, 0x05D9, 0x05DA,\n 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF, 0x05E0, 0x05E1, 0x05E2, 0x05E3,\n 0x05E4, 0x05E5, 0x05E6, 0x05E7, 0x05E8, 0x05E9, 0x05EA, 0x05F0, 0x05F1,\n 0x05F2, 0x05F3, 0x05F4, 0x0608, 0x060B, 0x060D, 0x061B, 0x061E, 0x061F,\n 0x0620, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627, 0x0628,\n 0x0629, 0x062A, 0x062B, 0x062C, 0x062D, 0x062E, 0x062F, 0x0630, 0x0631,\n 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x0637, 0x0638, 0x0639, 0x063A,\n 0x063B, 0x063C, 0x063D, 0x063E, 0x063F, 0x0640, 0x0641, 0x0642, 0x0643,\n 0x0644, 0x0645, 0x0646, 0x0647, 0x0648, 0x0649, 0x064A, 0x066D, 0x066E,\n 0x066F, 0x0671, 0x0672, 0x0673, 0x0674, 0x0675, 0x0676, 0x0677, 0x0678,\n 0x0679, 0x067A, 0x067B, 0x067C, 0x067D, 0x067E, 0x067F, 0x0680, 0x0681,\n 0x0682, 0x0683, 0x0684, 0x0685, 0x0686, 0x0687, 0x0688, 0x0689, 0x068A,\n 0x068B, 0x068C, 0x068D, 0x068E, 0x068F, 0x0690, 0x0691, 0x0692, 0x0693,\n 0x0694, 0x0695, 0x0696, 0x0697, 0x0698, 0x0699, 0x069A, 0x069B, 0x069C,\n 0x069D, 0x069E, 0x069F, 0x06A0, 0x06A1, 0x06A2, 0x06A3, 0x06A4, 0x06A5,\n 0x06A6, 0x06A7, 0x06A8, 0x06A9, 0x06AA, 0x06AB, 0x06AC, 0x06AD, 0x06AE,\n 0x06AF, 0x06B0, 0x06B1, 0x06B2, 0x06B3, 0x06B4, 0x06B5, 0x06B6, 0x06B7,\n 0x06B8, 0x06B9, 0x06BA, 0x06BB, 0x06BC, 0x06BD, 0x06BE, 0x06BF, 0x06C0,\n 0x06C1, 0x06C2, 0x06C3, 0x06C4, 0x06C5, 0x06C6, 0x06C7, 0x06C8, 0x06C9,\n 0x06CA, 0x06CB, 0x06CC, 0x06CD, 0x06CE, 0x06CF, 0x06D0, 0x06D1, 0x06D2,\n 0x06D3, 0x06D4, 0x06D5, 0x06E5, 0x06E6, 0x06EE, 0x06EF, 0x06FA, 0x06FB,\n 0x06FC, 0x06FD, 0x06FE, 0x06FF, 0x0700, 0x0701, 0x0702, 0x0703, 0x0704,\n 0x0705, 0x0706, 0x0707, 0x0708, 0x0709, 0x070A, 0x070B, 0x070C, 0x070D,\n 0x070F, 0x0710, 0x0712, 0x0713, 0x0714, 0x0715, 0x0716, 0x0717, 0x0718,\n 0x0719, 0x071A, 0x071B, 0x071C, 0x071D, 0x071E, 0x071F, 0x0720, 0x0721,\n 0x0722, 0x0723, 0x0724, 0x0725, 0x0726, 0x0727, 0x0728, 0x0729, 0x072A,\n 0x072B, 0x072C, 0x072D, 0x072E, 0x072F, 0x074D, 0x074E, 0x074F, 0x0750,\n 0x0751, 0x0752, 0x0753, 0x0754, 0x0755, 0x0756, 0x0757, 0x0758, 0x0759,\n 0x075A, 0x075B, 0x075C, 0x075D, 0x075E, 0x075F, 0x0760, 0x0761, 0x0762,\n 0x0763, 0x0764, 0x0765, 0x0766, 0x0767, 0x0768, 0x0769, 0x076A, 0x076B,\n 0x076C, 0x076D, 0x076E, 0x076F, 0x0770, 0x0771, 0x0772, 0x0773, 0x0774,\n 0x0775, 0x0776, 0x0777, 0x0778, 0x0779, 0x077A, 0x077B, 0x077C, 0x077D,\n 0x077E, 0x077F, 0x0780, 0x0781, 0x0782, 0x0783, 0x0784, 0x0785, 0x0786,\n 0x0787, 0x0788, 0x0789, 0x078A, 0x078B, 0x078C, 0x078D, 0x078E, 0x078F,\n 0x0790, 0x0791, 0x0792, 0x0793, 0x0794, 0x0795, 0x0796, 0x0797, 0x0798,\n 0x0799, 0x079A, 0x079B, 0x079C, 0x079D, 0x079E, 0x079F, 0x07A0, 0x07A1,\n 0x07A2, 0x07A3, 0x07A4, 0x07A5, 0x07B1, 0x07C0, 0x07C1, 0x07C2, 0x07C3,\n 0x07C4, 0x07C5, 0x07C6, 0x07C7, 0x07C8, 0x07C9, 0x07CA, 0x07CB, 0x07CC,\n 0x07CD, 0x07CE, 0x07CF, 0x07D0, 0x07D1, 0x07D2, 0x07D3, 0x07D4, 0x07D5,\n 0x07D6, 0x07D7, 0x07D8, 0x07D9, 0x07DA, 0x07DB, 0x07DC, 0x07DD, 0x07DE,\n 0x07DF, 0x07E0, 0x07E1, 0x07E2, 0x07E3, 0x07E4, 0x07E5, 0x07E6, 0x07E7,\n 0x07E8, 0x07E9, 0x07EA, 0x07F4, 0x07F5, 0x07FA, 0x0800, 0x0801, 0x0802,\n 0x0803, 0x0804, 0x0805, 0x0806, 0x0807, 0x0808, 0x0809, 0x080A, 0x080B,\n 0x080C, 0x080D, 0x080E, 0x080F, 0x0810, 0x0811, 0x0812, 0x0813, 0x0814,\n 0x0815, 0x081A, 0x0824, 0x0828, 0x0830, 0x0831, 0x0832, 0x0833, 0x0834,\n 0x0835, 0x0836, 0x0837, 0x0838, 0x0839, 0x083A, 0x083B, 0x083C, 0x083D,\n 0x083E, 0x0840, 0x0841, 0x0842, 0x0843, 0x0844, 0x0845, 0x0846, 0x0847,\n 0x0848, 0x0849, 0x084A, 0x084B, 0x084C, 0x084D, 0x084E, 0x084F, 0x0850,\n 0x0851, 0x0852, 0x0853, 0x0854, 0x0855, 0x0856, 0x0857, 0x0858, 0x085E,\n 0x08A0, 0x08A2, 0x08A3, 0x08A4, 0x08A5, 0x08A6, 0x08A7, 0x08A8, 0x08A9,\n 0x08AA, 0x08AB, 0x08AC, 0x200F, 0xFB1D, 0xFB1F, 0xFB20, 0xFB21, 0xFB22,\n 0xFB23, 0xFB24, 0xFB25, 0xFB26, 0xFB27, 0xFB28, 0xFB2A, 0xFB2B, 0xFB2C,\n 0xFB2D, 0xFB2E, 0xFB2F, 0xFB30, 0xFB31, 0xFB32, 0xFB33, 0xFB34, 0xFB35,\n 0xFB36, 0xFB38, 0xFB39, 0xFB3A, 0xFB3B, 0xFB3C, 0xFB3E, 0xFB40, 0xFB41,\n 0xFB43, 0xFB44, 0xFB46, 0xFB47, 0xFB48, 0xFB49, 0xFB4A, 0xFB4B, 0xFB4C,\n 0xFB4D, 0xFB4E, 0xFB4F, 0xFB50, 0xFB51, 0xFB52, 0xFB53, 0xFB54, 0xFB55,\n 0xFB56, 0xFB57, 0xFB58, 0xFB59, 0xFB5A, 0xFB5B, 0xFB5C, 0xFB5D, 0xFB5E,\n 0xFB5F, 0xFB60, 0xFB61, 0xFB62, 0xFB63, 0xFB64, 0xFB65, 0xFB66, 0xFB67,\n 0xFB68, 0xFB69, 0xFB6A, 0xFB6B, 0xFB6C, 0xFB6D, 0xFB6E, 0xFB6F, 0xFB70,\n 0xFB71, 0xFB72, 0xFB73, 0xFB74, 0xFB75, 0xFB76, 0xFB77, 0xFB78, 0xFB79,\n 0xFB7A, 0xFB7B, 0xFB7C, 0xFB7D, 0xFB7E, 0xFB7F, 0xFB80, 0xFB81, 0xFB82,\n 0xFB83, 0xFB84, 0xFB85, 0xFB86, 0xFB87, 0xFB88, 0xFB89, 0xFB8A, 0xFB8B,\n 0xFB8C, 0xFB8D, 0xFB8E, 0xFB8F, 0xFB90, 0xFB91, 0xFB92, 0xFB93, 0xFB94,\n 0xFB95, 0xFB96, 0xFB97, 0xFB98, 0xFB99, 0xFB9A, 0xFB9B, 0xFB9C, 0xFB9D,\n 0xFB9E, 0xFB9F, 0xFBA0, 0xFBA1, 0xFBA2, 0xFBA3, 0xFBA4, 0xFBA5, 0xFBA6,\n 0xFBA7, 0xFBA8, 0xFBA9, 0xFBAA, 0xFBAB, 0xFBAC, 0xFBAD, 0xFBAE, 0xFBAF,\n 0xFBB0, 0xFBB1, 0xFBB2, 0xFBB3, 0xFBB4, 0xFBB5, 0xFBB6, 0xFBB7, 0xFBB8,\n 0xFBB9, 0xFBBA, 0xFBBB, 0xFBBC, 0xFBBD, 0xFBBE, 0xFBBF, 0xFBC0, 0xFBC1,\n 0xFBD3, 0xFBD4, 0xFBD5, 0xFBD6, 0xFBD7, 0xFBD8, 0xFBD9, 0xFBDA, 0xFBDB,\n 0xFBDC, 0xFBDD, 0xFBDE, 0xFBDF, 0xFBE0, 0xFBE1, 0xFBE2, 0xFBE3, 0xFBE4,\n 0xFBE5, 0xFBE6, 0xFBE7, 0xFBE8, 0xFBE9, 0xFBEA, 0xFBEB, 0xFBEC, 0xFBED,\n 0xFBEE, 0xFBEF, 0xFBF0, 0xFBF1, 0xFBF2, 0xFBF3, 0xFBF4, 0xFBF5, 0xFBF6,\n 0xFBF7, 0xFBF8, 0xFBF9, 0xFBFA, 0xFBFB, 0xFBFC, 0xFBFD, 0xFBFE, 0xFBFF,\n 0xFC00, 0xFC01, 0xFC02, 0xFC03, 0xFC04, 0xFC05, 0xFC06, 0xFC07, 0xFC08,\n 0xFC09, 0xFC0A, 0xFC0B, 0xFC0C, 0xFC0D, 0xFC0E, 0xFC0F, 0xFC10, 0xFC11,\n 0xFC12, 0xFC13, 0xFC14, 0xFC15, 0xFC16, 0xFC17, 0xFC18, 0xFC19, 0xFC1A,\n 0xFC1B, 0xFC1C, 0xFC1D, 0xFC1E, 0xFC1F, 0xFC20, 0xFC21, 0xFC22, 0xFC23,\n 0xFC24, 0xFC25, 0xFC26, 0xFC27, 0xFC28, 0xFC29, 0xFC2A, 0xFC2B, 0xFC2C,\n 0xFC2D, 0xFC2E, 0xFC2F, 0xFC30, 0xFC31, 0xFC32, 0xFC33, 0xFC34, 0xFC35,\n 0xFC36, 0xFC37, 0xFC38, 0xFC39, 0xFC3A, 0xFC3B, 0xFC3C, 0xFC3D, 0xFC3E,\n 0xFC3F, 0xFC40, 0xFC41, 0xFC42, 0xFC43, 0xFC44, 0xFC45, 0xFC46, 0xFC47,\n 0xFC48, 0xFC49, 0xFC4A, 0xFC4B, 0xFC4C, 0xFC4D, 0xFC4E, 0xFC4F, 0xFC50,\n 0xFC51, 0xFC52, 0xFC53, 0xFC54, 0xFC55, 0xFC56, 0xFC57, 0xFC58, 0xFC59,\n 0xFC5A, 0xFC5B, 0xFC5C, 0xFC5D, 0xFC5E, 0xFC5F, 0xFC60, 0xFC61, 0xFC62,\n 0xFC63, 0xFC64, 0xFC65, 0xFC66, 0xFC67, 0xFC68, 0xFC69, 0xFC6A, 0xFC6B,\n 0xFC6C, 0xFC6D, 0xFC6E, 0xFC6F, 0xFC70, 0xFC71, 0xFC72, 0xFC73, 0xFC74,\n 0xFC75, 0xFC76, 0xFC77, 0xFC78, 0xFC79, 0xFC7A, 0xFC7B, 0xFC7C, 0xFC7D,\n 0xFC7E, 0xFC7F, 0xFC80, 0xFC81, 0xFC82, 0xFC83, 0xFC84, 0xFC85, 0xFC86,\n 0xFC87, 0xFC88, 0xFC89, 0xFC8A, 0xFC8B, 0xFC8C, 0xFC8D, 0xFC8E, 0xFC8F,\n 0xFC90, 0xFC91, 0xFC92, 0xFC93, 0xFC94, 0xFC95, 0xFC96, 0xFC97, 0xFC98,\n 0xFC99, 0xFC9A, 0xFC9B, 0xFC9C, 0xFC9D, 0xFC9E, 0xFC9F, 0xFCA0, 0xFCA1,\n 0xFCA2, 0xFCA3, 0xFCA4, 0xFCA5, 0xFCA6, 0xFCA7, 0xFCA8, 0xFCA9, 0xFCAA,\n 0xFCAB, 0xFCAC, 0xFCAD, 0xFCAE, 0xFCAF, 0xFCB0, 0xFCB1, 0xFCB2, 0xFCB3,\n 0xFCB4, 0xFCB5, 0xFCB6, 0xFCB7, 0xFCB8, 0xFCB9, 0xFCBA, 0xFCBB, 0xFCBC,\n 0xFCBD, 0xFCBE, 0xFCBF, 0xFCC0, 0xFCC1, 0xFCC2, 0xFCC3, 0xFCC4, 0xFCC5,\n 0xFCC6, 0xFCC7, 0xFCC8, 0xFCC9, 0xFCCA, 0xFCCB, 0xFCCC, 0xFCCD, 0xFCCE,\n 0xFCCF, 0xFCD0, 0xFCD1, 0xFCD2, 0xFCD3, 0xFCD4, 0xFCD5, 0xFCD6, 0xFCD7,\n 0xFCD8, 0xFCD9, 0xFCDA, 0xFCDB, 0xFCDC, 0xFCDD, 0xFCDE, 0xFCDF, 0xFCE0,\n 0xFCE1, 0xFCE2, 0xFCE3, 0xFCE4, 0xFCE5, 0xFCE6, 0xFCE7, 0xFCE8, 0xFCE9,\n 0xFCEA, 0xFCEB, 0xFCEC, 0xFCED, 0xFCEE, 0xFCEF, 0xFCF0, 0xFCF1, 0xFCF2,\n 0xFCF3, 0xFCF4, 0xFCF5, 0xFCF6, 0xFCF7, 0xFCF8, 0xFCF9, 0xFCFA, 0xFCFB,\n 0xFCFC, 0xFCFD, 0xFCFE, 0xFCFF, 0xFD00, 0xFD01, 0xFD02, 0xFD03, 0xFD04,\n 0xFD05, 0xFD06, 0xFD07, 0xFD08, 0xFD09, 0xFD0A, 0xFD0B, 0xFD0C, 0xFD0D,\n 0xFD0E, 0xFD0F, 0xFD10, 0xFD11, 0xFD12, 0xFD13, 0xFD14, 0xFD15, 0xFD16,\n 0xFD17, 0xFD18, 0xFD19, 0xFD1A, 0xFD1B, 0xFD1C, 0xFD1D, 0xFD1E, 0xFD1F,\n 0xFD20, 0xFD21, 0xFD22, 0xFD23, 0xFD24, 0xFD25, 0xFD26, 0xFD27, 0xFD28,\n 0xFD29, 0xFD2A, 0xFD2B, 0xFD2C, 0xFD2D, 0xFD2E, 0xFD2F, 0xFD30, 0xFD31,\n 0xFD32, 0xFD33, 0xFD34, 0xFD35, 0xFD36, 0xFD37, 0xFD38, 0xFD39, 0xFD3A,\n 0xFD3B, 0xFD3C, 0xFD3D, 0xFD50, 0xFD51, 0xFD52, 0xFD53, 0xFD54, 0xFD55,\n 0xFD56, 0xFD57, 0xFD58, 0xFD59, 0xFD5A, 0xFD5B, 0xFD5C, 0xFD5D, 0xFD5E,\n 0xFD5F, 0xFD60, 0xFD61, 0xFD62, 0xFD63, 0xFD64, 0xFD65, 0xFD66, 0xFD67,\n 0xFD68, 0xFD69, 0xFD6A, 0xFD6B, 0xFD6C, 0xFD6D, 0xFD6E, 0xFD6F, 0xFD70,\n 0xFD71, 0xFD72, 0xFD73, 0xFD74, 0xFD75, 0xFD76, 0xFD77, 0xFD78, 0xFD79,\n 0xFD7A, 0xFD7B, 0xFD7C, 0xFD7D, 0xFD7E, 0xFD7F, 0xFD80, 0xFD81, 0xFD82,\n 0xFD83, 0xFD84, 0xFD85, 0xFD86, 0xFD87, 0xFD88, 0xFD89, 0xFD8A, 0xFD8B,\n 0xFD8C, 0xFD8D, 0xFD8E, 0xFD8F, 0xFD92, 0xFD93, 0xFD94, 0xFD95, 0xFD96,\n 0xFD97, 0xFD98, 0xFD99, 0xFD9A, 0xFD9B, 0xFD9C, 0xFD9D, 0xFD9E, 0xFD9F,\n 0xFDA0, 0xFDA1, 0xFDA2, 0xFDA3, 0xFDA4, 0xFDA5, 0xFDA6, 0xFDA7, 0xFDA8,\n 0xFDA9, 0xFDAA, 0xFDAB, 0xFDAC, 0xFDAD, 0xFDAE, 0xFDAF, 0xFDB0, 0xFDB1,\n 0xFDB2, 0xFDB3, 0xFDB4, 0xFDB5, 0xFDB6, 0xFDB7, 0xFDB8, 0xFDB9, 0xFDBA,\n 0xFDBB, 0xFDBC, 0xFDBD, 0xFDBE, 0xFDBF, 0xFDC0, 0xFDC1, 0xFDC2, 0xFDC3,\n 0xFDC4, 0xFDC5, 0xFDC6, 0xFDC7, 0xFDF0, 0xFDF1, 0xFDF2, 0xFDF3, 0xFDF4,\n 0xFDF5, 0xFDF6, 0xFDF7, 0xFDF8, 0xFDF9, 0xFDFA, 0xFDFB, 0xFDFC, 0xFE70,\n 0xFE71, 0xFE72, 0xFE73, 0xFE74, 0xFE76, 0xFE77, 0xFE78, 0xFE79, 0xFE7A,\n 0xFE7B, 0xFE7C, 0xFE7D, 0xFE7E, 0xFE7F, 0xFE80, 0xFE81, 0xFE82, 0xFE83,\n 0xFE84, 0xFE85, 0xFE86, 0xFE87, 0xFE88, 0xFE89, 0xFE8A, 0xFE8B, 0xFE8C,\n 0xFE8D, 0xFE8E, 0xFE8F, 0xFE90, 0xFE91, 0xFE92, 0xFE93, 0xFE94, 0xFE95,\n 0xFE96, 0xFE97, 0xFE98, 0xFE99, 0xFE9A, 0xFE9B, 0xFE9C, 0xFE9D, 0xFE9E,\n 0xFE9F, 0xFEA0, 0xFEA1, 0xFEA2, 0xFEA3, 0xFEA4, 0xFEA5, 0xFEA6, 0xFEA7,\n 0xFEA8, 0xFEA9, 0xFEAA, 0xFEAB, 0xFEAC, 0xFEAD, 0xFEAE, 0xFEAF, 0xFEB0,\n 0xFEB1, 0xFEB2, 0xFEB3, 0xFEB4, 0xFEB5, 0xFEB6, 0xFEB7, 0xFEB8, 0xFEB9,\n 0xFEBA, 0xFEBB, 0xFEBC, 0xFEBD, 0xFEBE, 0xFEBF, 0xFEC0, 0xFEC1, 0xFEC2,\n 0xFEC3, 0xFEC4, 0xFEC5, 0xFEC6, 0xFEC7, 0xFEC8, 0xFEC9, 0xFECA, 0xFECB,\n 0xFECC, 0xFECD, 0xFECE, 0xFECF, 0xFED0, 0xFED1, 0xFED2, 0xFED3, 0xFED4,\n 0xFED5, 0xFED6, 0xFED7, 0xFED8, 0xFED9, 0xFEDA, 0xFEDB, 0xFEDC, 0xFEDD,\n 0xFEDE, 0xFEDF, 0xFEE0, 0xFEE1, 0xFEE2, 0xFEE3, 0xFEE4, 0xFEE5, 0xFEE6,\n 0xFEE7, 0xFEE8, 0xFEE9, 0xFEEA, 0xFEEB, 0xFEEC, 0xFEED, 0xFEEE, 0xFEEF,\n 0xFEF0, 0xFEF1, 0xFEF2, 0xFEF3, 0xFEF4, 0xFEF5, 0xFEF6, 0xFEF7, 0xFEF8,\n 0xFEF9, 0xFEFA, 0xFEFB, 0xFEFC, 0x10800, 0x10801, 0x10802, 0x10803,\n 0x10804, 0x10805, 0x10808, 0x1080A, 0x1080B, 0x1080C, 0x1080D, 0x1080E,\n 0x1080F, 0x10810, 0x10811, 0x10812, 0x10813, 0x10814, 0x10815, 0x10816,\n 0x10817, 0x10818, 0x10819, 0x1081A, 0x1081B, 0x1081C, 0x1081D, 0x1081E,\n 0x1081F, 0x10820, 0x10821, 0x10822, 0x10823, 0x10824, 0x10825, 0x10826,\n 0x10827, 0x10828, 0x10829, 0x1082A, 0x1082B, 0x1082C, 0x1082D, 0x1082E,\n 0x1082F, 0x10830, 0x10831, 0x10832, 0x10833, 0x10834, 0x10835, 0x10837,\n 0x10838, 0x1083C, 0x1083F, 0x10840, 0x10841, 0x10842, 0x10843, 0x10844,\n 0x10845, 0x10846, 0x10847, 0x10848, 0x10849, 0x1084A, 0x1084B, 0x1084C,\n 0x1084D, 0x1084E, 0x1084F, 0x10850, 0x10851, 0x10852, 0x10853, 0x10854,\n 0x10855, 0x10857, 0x10858, 0x10859, 0x1085A, 0x1085B, 0x1085C, 0x1085D,\n 0x1085E, 0x1085F, 0x10900, 0x10901, 0x10902, 0x10903, 0x10904, 0x10905,\n 0x10906, 0x10907, 0x10908, 0x10909, 0x1090A, 0x1090B, 0x1090C, 0x1090D,\n 0x1090E, 0x1090F, 0x10910, 0x10911, 0x10912, 0x10913, 0x10914, 0x10915,\n 0x10916, 0x10917, 0x10918, 0x10919, 0x1091A, 0x1091B, 0x10920, 0x10921,\n 0x10922, 0x10923, 0x10924, 0x10925, 0x10926, 0x10927, 0x10928, 0x10929,\n 0x1092A, 0x1092B, 0x1092C, 0x1092D, 0x1092E, 0x1092F, 0x10930, 0x10931,\n 0x10932, 0x10933, 0x10934, 0x10935, 0x10936, 0x10937, 0x10938, 0x10939,\n 0x1093F, 0x10980, 0x10981, 0x10982, 0x10983, 0x10984, 0x10985, 0x10986,\n 0x10987, 0x10988, 0x10989, 0x1098A, 0x1098B, 0x1098C, 0x1098D, 0x1098E,\n 0x1098F, 0x10990, 0x10991, 0x10992, 0x10993, 0x10994, 0x10995, 0x10996,\n 0x10997, 0x10998, 0x10999, 0x1099A, 0x1099B, 0x1099C, 0x1099D, 0x1099E,\n 0x1099F, 0x109A0, 0x109A1, 0x109A2, 0x109A3, 0x109A4, 0x109A5, 0x109A6,\n 0x109A7, 0x109A8, 0x109A9, 0x109AA, 0x109AB, 0x109AC, 0x109AD, 0x109AE,\n 0x109AF, 0x109B0, 0x109B1, 0x109B2, 0x109B3, 0x109B4, 0x109B5, 0x109B6,\n 0x109B7, 0x109BE, 0x109BF, 0x10A00, 0x10A10, 0x10A11, 0x10A12, 0x10A13,\n 0x10A15, 0x10A16, 0x10A17, 0x10A19, 0x10A1A, 0x10A1B, 0x10A1C, 0x10A1D,\n 0x10A1E, 0x10A1F, 0x10A20, 0x10A21, 0x10A22, 0x10A23, 0x10A24, 0x10A25,\n 0x10A26, 0x10A27, 0x10A28, 0x10A29, 0x10A2A, 0x10A2B, 0x10A2C, 0x10A2D,\n 0x10A2E, 0x10A2F, 0x10A30, 0x10A31, 0x10A32, 0x10A33, 0x10A40, 0x10A41,\n 0x10A42, 0x10A43, 0x10A44, 0x10A45, 0x10A46, 0x10A47, 0x10A50, 0x10A51,\n 0x10A52, 0x10A53, 0x10A54, 0x10A55, 0x10A56, 0x10A57, 0x10A58, 0x10A60,\n 0x10A61, 0x10A62, 0x10A63, 0x10A64, 0x10A65, 0x10A66, 0x10A67, 0x10A68,\n 0x10A69, 0x10A6A, 0x10A6B, 0x10A6C, 0x10A6D, 0x10A6E, 0x10A6F, 0x10A70,\n 0x10A71, 0x10A72, 0x10A73, 0x10A74, 0x10A75, 0x10A76, 0x10A77, 0x10A78,\n 0x10A79, 0x10A7A, 0x10A7B, 0x10A7C, 0x10A7D, 0x10A7E, 0x10A7F, 0x10B00,\n 0x10B01, 0x10B02, 0x10B03, 0x10B04, 0x10B05, 0x10B06, 0x10B07, 0x10B08,\n 0x10B09, 0x10B0A, 0x10B0B, 0x10B0C, 0x10B0D, 0x10B0E, 0x10B0F, 0x10B10,\n 0x10B11, 0x10B12, 0x10B13, 0x10B14, 0x10B15, 0x10B16, 0x10B17, 0x10B18,\n 0x10B19, 0x10B1A, 0x10B1B, 0x10B1C, 0x10B1D, 0x10B1E, 0x10B1F, 0x10B20,\n 0x10B21, 0x10B22, 0x10B23, 0x10B24, 0x10B25, 0x10B26, 0x10B27, 0x10B28,\n 0x10B29, 0x10B2A, 0x10B2B, 0x10B2C, 0x10B2D, 0x10B2E, 0x10B2F, 0x10B30,\n 0x10B31, 0x10B32, 0x10B33, 0x10B34, 0x10B35, 0x10B40, 0x10B41, 0x10B42,\n 0x10B43, 0x10B44, 0x10B45, 0x10B46, 0x10B47, 0x10B48, 0x10B49, 0x10B4A,\n 0x10B4B, 0x10B4C, 0x10B4D, 0x10B4E, 0x10B4F, 0x10B50, 0x10B51, 0x10B52,\n 0x10B53, 0x10B54, 0x10B55, 0x10B58, 0x10B59, 0x10B5A, 0x10B5B, 0x10B5C,\n 0x10B5D, 0x10B5E, 0x10B5F, 0x10B60, 0x10B61, 0x10B62, 0x10B63, 0x10B64,\n 0x10B65, 0x10B66, 0x10B67, 0x10B68, 0x10B69, 0x10B6A, 0x10B6B, 0x10B6C,\n 0x10B6D, 0x10B6E, 0x10B6F, 0x10B70, 0x10B71, 0x10B72, 0x10B78, 0x10B79,\n 0x10B7A, 0x10B7B, 0x10B7C, 0x10B7D, 0x10B7E, 0x10B7F, 0x10C00, 0x10C01,\n 0x10C02, 0x10C03, 0x10C04, 0x10C05, 0x10C06, 0x10C07, 0x10C08, 0x10C09,\n 0x10C0A, 0x10C0B, 0x10C0C, 0x10C0D, 0x10C0E, 0x10C0F, 0x10C10, 0x10C11,\n 0x10C12, 0x10C13, 0x10C14, 0x10C15, 0x10C16, 0x10C17, 0x10C18, 0x10C19,\n 0x10C1A, 0x10C1B, 0x10C1C, 0x10C1D, 0x10C1E, 0x10C1F, 0x10C20, 0x10C21,\n 0x10C22, 0x10C23, 0x10C24, 0x10C25, 0x10C26, 0x10C27, 0x10C28, 0x10C29,\n 0x10C2A, 0x10C2B, 0x10C2C, 0x10C2D, 0x10C2E, 0x10C2F, 0x10C30, 0x10C31,\n 0x10C32, 0x10C33, 0x10C34, 0x10C35, 0x10C36, 0x10C37, 0x10C38, 0x10C39,\n 0x10C3A, 0x10C3B, 0x10C3C, 0x10C3D, 0x10C3E, 0x10C3F, 0x10C40, 0x10C41,\n 0x10C42, 0x10C43, 0x10C44, 0x10C45, 0x10C46, 0x10C47, 0x10C48, 0x1EE00,\n 0x1EE01, 0x1EE02, 0x1EE03, 0x1EE05, 0x1EE06, 0x1EE07, 0x1EE08, 0x1EE09,\n 0x1EE0A, 0x1EE0B, 0x1EE0C, 0x1EE0D, 0x1EE0E, 0x1EE0F, 0x1EE10, 0x1EE11,\n 0x1EE12, 0x1EE13, 0x1EE14, 0x1EE15, 0x1EE16, 0x1EE17, 0x1EE18, 0x1EE19,\n 0x1EE1A, 0x1EE1B, 0x1EE1C, 0x1EE1D, 0x1EE1E, 0x1EE1F, 0x1EE21, 0x1EE22,\n 0x1EE24, 0x1EE27, 0x1EE29, 0x1EE2A, 0x1EE2B, 0x1EE2C, 0x1EE2D, 0x1EE2E,\n 0x1EE2F, 0x1EE30, 0x1EE31, 0x1EE32, 0x1EE34, 0x1EE35, 0x1EE36, 0x1EE37,\n 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE4D, 0x1EE4E,\n 0x1EE4F, 0x1EE51, 0x1EE52, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D,\n 0x1EE5F, 0x1EE61, 0x1EE62, 0x1EE64, 0x1EE67, 0x1EE68, 0x1EE69, 0x1EE6A,\n 0x1EE6C, 0x1EE6D, 0x1EE6E, 0x1EE6F, 0x1EE70, 0x1EE71, 0x1EE72, 0x1EE74,\n 0x1EE75, 0x1EE76, 0x1EE77, 0x1EE79, 0x1EE7A, 0x1EE7B, 0x1EE7C, 0x1EE7E,\n 0x1EE80, 0x1EE81, 0x1EE82, 0x1EE83, 0x1EE84, 0x1EE85, 0x1EE86, 0x1EE87,\n 0x1EE88, 0x1EE89, 0x1EE8B, 0x1EE8C, 0x1EE8D, 0x1EE8E, 0x1EE8F, 0x1EE90,\n 0x1EE91, 0x1EE92, 0x1EE93, 0x1EE94, 0x1EE95, 0x1EE96, 0x1EE97, 0x1EE98,\n 0x1EE99, 0x1EE9A, 0x1EE9B, 0x1EEA1, 0x1EEA2, 0x1EEA3, 0x1EEA5, 0x1EEA6,\n 0x1EEA7, 0x1EEA8, 0x1EEA9, 0x1EEAB, 0x1EEAC, 0x1EEAD, 0x1EEAE, 0x1EEAF,\n 0x1EEB0, 0x1EEB1, 0x1EEB2, 0x1EEB3, 0x1EEB4, 0x1EEB5, 0x1EEB6, 0x1EEB7,\n 0x1EEB8, 0x1EEB9, 0x1EEBA, 0x1EEBB, 0x10FFFD];\n\n function determineBidi(cueDiv) {\n var nodeStack = [],\n text = \"\",\n charCode;\n\n if (!cueDiv || !cueDiv.childNodes) {\n return \"ltr\";\n }\n\n function pushNodes(nodeStack, node) {\n for (var i = node.childNodes.length - 1; i >= 0; i--) {\n nodeStack.push(node.childNodes[i]);\n }\n }\n\n function nextTextNode(nodeStack) {\n if (!nodeStack || !nodeStack.length) {\n return null;\n }\n\n var node = nodeStack.pop(),\n text = node.textContent || node.innerText;\n if (text) {\n // TODO: This should match all unicode type B characters (paragraph\n // separator characters). See issue #115.\n var m = text.match(/^.*(\\n|\\r)/);\n if (m) {\n nodeStack.length = 0;\n return m[0];\n }\n return text;\n }\n if (node.tagName === \"ruby\") {\n return nextTextNode(nodeStack);\n }\n if (node.childNodes) {\n pushNodes(nodeStack, node);\n return nextTextNode(nodeStack);\n }\n }\n\n pushNodes(nodeStack, cueDiv);\n while ((text = nextTextNode(nodeStack))) {\n for (var i = 0; i < text.length; i++) {\n charCode = text.charCodeAt(i);\n for (var j = 0; j < strongRTLChars.length; j++) {\n if (strongRTLChars[j] === charCode) {\n return \"rtl\";\n }\n }\n }\n }\n return \"ltr\";\n }\n\n function computeLinePos(cue) {\n if (typeof cue.line === \"number\" &&\n (cue.snapToLines || (cue.line >= 0 && cue.line <= 100))) {\n return cue.line;\n }\n if (!cue.track || !cue.track.textTrackList ||\n !cue.track.textTrackList.mediaElement) {\n return -1;\n }\n var track = cue.track,\n trackList = track.textTrackList,\n count = 0;\n for (var i = 0; i < trackList.length && trackList[i] !== track; i++) {\n if (trackList[i].mode === \"showing\") {\n count++;\n }\n }\n return ++count * -1;\n }\n\n function StyleBox() {\n }\n\n // Apply styles to a div. If there is no div passed then it defaults to the\n // div on 'this'.\n StyleBox.prototype.applyStyles = function(styles, div) {\n div = div || this.div;\n for (var prop in styles) {\n if (styles.hasOwnProperty(prop)) {\n div.style[prop] = styles[prop];\n }\n }\n };\n\n StyleBox.prototype.formatStyle = function(val, unit) {\n return val === 0 ? 0 : val + unit;\n };\n\n // Constructs the computed display state of the cue (a div). Places the div\n // into the overlay which should be a block level element (usually a div).\n function CueStyleBox(window, cue, styleOptions) {\n var isIE8 = (/MSIE\\s8\\.0/).test(navigator.userAgent);\n var color = \"rgba(255, 255, 255, 1)\";\n var backgroundColor = \"rgba(0, 0, 0, 0.8)\";\n\n if (isIE8) {\n color = \"rgb(255, 255, 255)\";\n backgroundColor = \"rgb(0, 0, 0)\";\n }\n\n StyleBox.call(this);\n this.cue = cue;\n\n // Parse our cue's text into a DOM tree rooted at 'cueDiv'. This div will\n // have inline positioning and will function as the cue background box.\n this.cueDiv = parseContent(window, cue.text);\n var styles = {\n color: color,\n backgroundColor: backgroundColor,\n position: \"relative\",\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n display: \"inline\"\n };\n\n if (!isIE8) {\n styles.writingMode = cue.vertical === \"\" ? \"horizontal-tb\"\n : cue.vertical === \"lr\" ? \"vertical-lr\"\n : \"vertical-rl\";\n styles.unicodeBidi = \"plaintext\";\n }\n this.applyStyles(styles, this.cueDiv);\n\n // Create an absolutely positioned div that will be used to position the cue\n // div. Note, all WebVTT cue-setting alignments are equivalent to the CSS\n // mirrors of them except \"middle\" which is \"center\" in CSS.\n this.div = window.document.createElement(\"div\");\n styles = {\n textAlign: cue.align === \"middle\" ? \"center\" : cue.align,\n font: styleOptions.font,\n whiteSpace: \"pre-line\",\n position: \"absolute\"\n };\n\n if (!isIE8) {\n styles.direction = determineBidi(this.cueDiv);\n styles.writingMode = cue.vertical === \"\" ? \"horizontal-tb\"\n : cue.vertical === \"lr\" ? \"vertical-lr\"\n : \"vertical-rl\".\n stylesunicodeBidi = \"plaintext\";\n }\n\n this.applyStyles(styles);\n\n this.div.appendChild(this.cueDiv);\n\n // Calculate the distance from the reference edge of the viewport to the text\n // position of the cue box. The reference edge will be resolved later when\n // the box orientation styles are applied.\n var textPos = 0;\n switch (cue.positionAlign) {\n case \"start\":\n textPos = cue.position;\n break;\n case \"middle\":\n textPos = cue.position - (cue.size / 2);\n break;\n case \"end\":\n textPos = cue.position - cue.size;\n break;\n }\n\n // Horizontal box orientation; textPos is the distance from the left edge of the\n // area to the left edge of the box and cue.size is the distance extending to\n // the right from there.\n if (cue.vertical === \"\") {\n this.applyStyles({\n left: this.formatStyle(textPos, \"%\"),\n width: this.formatStyle(cue.size, \"%\"),\n });\n // Vertical box orientation; textPos is the distance from the top edge of the\n // area to the top edge of the box and cue.size is the height extending\n // downwards from there.\n } else {\n this.applyStyles({\n top: this.formatStyle(textPos, \"%\"),\n height: this.formatStyle(cue.size, \"%\")\n });\n }\n\n this.move = function(box) {\n this.applyStyles({\n top: this.formatStyle(box.top, \"px\"),\n bottom: this.formatStyle(box.bottom, \"px\"),\n left: this.formatStyle(box.left, \"px\"),\n right: this.formatStyle(box.right, \"px\"),\n height: this.formatStyle(box.height, \"px\"),\n width: this.formatStyle(box.width, \"px\"),\n });\n };\n }\n CueStyleBox.prototype = _objCreate(StyleBox.prototype);\n CueStyleBox.prototype.constructor = CueStyleBox;\n\n // Represents the co-ordinates of an Element in a way that we can easily\n // compute things with such as if it overlaps or intersects with another Element.\n // Can initialize it with either a StyleBox or another BoxPosition.\n function BoxPosition(obj) {\n var isIE8 = (/MSIE\\s8\\.0/).test(navigator.userAgent);\n\n // Either a BoxPosition was passed in and we need to copy it, or a StyleBox\n // was passed in and we need to copy the results of 'getBoundingClientRect'\n // as the object returned is readonly. All co-ordinate values are in reference\n // to the viewport origin (top left).\n var lh, height, width, top;\n if (obj.div) {\n height = obj.div.offsetHeight;\n width = obj.div.offsetWidth;\n top = obj.div.offsetTop;\n\n var rects = (rects = obj.div.childNodes) && (rects = rects[0]) &&\n rects.getClientRects && rects.getClientRects();\n obj = obj.div.getBoundingClientRect();\n // In certain cases the outter div will be slightly larger then the sum of\n // the inner div's lines. This could be due to bold text, etc, on some platforms.\n // In this case we should get the average line height and use that. This will\n // result in the desired behaviour.\n lh = rects ? Math.max((rects[0] && rects[0].height) || 0, obj.height / rects.length)\n : 0;\n\n }\n this.left = obj.left;\n this.right = obj.right;\n this.top = obj.top || top;\n this.height = obj.height || height;\n this.bottom = obj.bottom || (top + (obj.height || height));\n this.width = obj.width || width;\n this.lineHeight = lh !== undefined ? lh : obj.lineHeight;\n\n if (isIE8 && !this.lineHeight) {\n this.lineHeight = 13;\n }\n }\n\n // Move the box along a particular axis. Optionally pass in an amount to move\n // the box. If no amount is passed then the default is the line height of the\n // box.\n BoxPosition.prototype.move = function(axis, toMove) {\n toMove = toMove !== undefined ? toMove : this.lineHeight;\n switch (axis) {\n case \"+x\":\n this.left += toMove;\n this.right += toMove;\n break;\n case \"-x\":\n this.left -= toMove;\n this.right -= toMove;\n break;\n case \"+y\":\n this.top += toMove;\n this.bottom += toMove;\n break;\n case \"-y\":\n this.top -= toMove;\n this.bottom -= toMove;\n break;\n }\n };\n\n // Check if this box overlaps another box, b2.\n BoxPosition.prototype.overlaps = function(b2) {\n return this.left < b2.right &&\n this.right > b2.left &&\n this.top < b2.bottom &&\n this.bottom > b2.top;\n };\n\n // Check if this box overlaps any other boxes in boxes.\n BoxPosition.prototype.overlapsAny = function(boxes) {\n for (var i = 0; i < boxes.length; i++) {\n if (this.overlaps(boxes[i])) {\n return true;\n }\n }\n return false;\n };\n\n // Check if this box is within another box.\n BoxPosition.prototype.within = function(container) {\n return this.top >= container.top &&\n this.bottom <= container.bottom &&\n this.left >= container.left &&\n this.right <= container.right;\n };\n\n // Check if this box is entirely within the container or it is overlapping\n // on the edge opposite of the axis direction passed. For example, if \"+x\" is\n // passed and the box is overlapping on the left edge of the container, then\n // return true.\n BoxPosition.prototype.overlapsOppositeAxis = function(container, axis) {\n switch (axis) {\n case \"+x\":\n return this.left < container.left;\n case \"-x\":\n return this.right > container.right;\n case \"+y\":\n return this.top < container.top;\n case \"-y\":\n return this.bottom > container.bottom;\n }\n };\n\n // Find the percentage of the area that this box is overlapping with another\n // box.\n BoxPosition.prototype.intersectPercentage = function(b2) {\n var x = Math.max(0, Math.min(this.right, b2.right) - Math.max(this.left, b2.left)),\n y = Math.max(0, Math.min(this.bottom, b2.bottom) - Math.max(this.top, b2.top)),\n intersectArea = x * y;\n return intersectArea / (this.height * this.width);\n };\n\n // Convert the positions from this box to CSS compatible positions using\n // the reference container's positions. This has to be done because this\n // box's positions are in reference to the viewport origin, whereas, CSS\n // values are in referecne to their respective edges.\n BoxPosition.prototype.toCSSCompatValues = function(reference) {\n return {\n top: this.top - reference.top,\n bottom: reference.bottom - this.bottom,\n left: this.left - reference.left,\n right: reference.right - this.right,\n height: this.height,\n width: this.width\n };\n };\n\n // Get an object that represents the box's position without anything extra.\n // Can pass a StyleBox, HTMLElement, or another BoxPositon.\n BoxPosition.getSimpleBoxPosition = function(obj) {\n var height = obj.div ? obj.div.offsetHeight : obj.tagName ? obj.offsetHeight : 0;\n var width = obj.div ? obj.div.offsetWidth : obj.tagName ? obj.offsetWidth : 0;\n var top = obj.div ? obj.div.offsetTop : obj.tagName ? obj.offsetTop : 0;\n\n obj = obj.div ? obj.div.getBoundingClientRect() :\n obj.tagName ? obj.getBoundingClientRect() : obj;\n var ret = {\n left: obj.left,\n right: obj.right,\n top: obj.top || top,\n height: obj.height || height,\n bottom: obj.bottom || (top + (obj.height || height)),\n width: obj.width || width\n };\n return ret;\n };\n\n // Move a StyleBox to its specified, or next best, position. The containerBox\n // is the box that contains the StyleBox, such as a div. boxPositions are\n // a list of other boxes that the styleBox can't overlap with.\n function moveBoxToLinePosition(window, styleBox, containerBox, boxPositions) {\n\n // Find the best position for a cue box, b, on the video. The axis parameter\n // is a list of axis, the order of which, it will move the box along. For example:\n // Passing [\"+x\", \"-x\"] will move the box first along the x axis in the positive\n // direction. If it doesn't find a good position for it there it will then move\n // it along the x axis in the negative direction.\n function findBestPosition(b, axis) {\n var bestPosition,\n specifiedPosition = new BoxPosition(b),\n percentage = 1; // Highest possible so the first thing we get is better.\n\n for (var i = 0; i < axis.length; i++) {\n while (b.overlapsOppositeAxis(containerBox, axis[i]) ||\n (b.within(containerBox) && b.overlapsAny(boxPositions))) {\n b.move(axis[i]);\n }\n // We found a spot where we aren't overlapping anything. This is our\n // best position.\n if (b.within(containerBox)) {\n return b;\n }\n var p = b.intersectPercentage(containerBox);\n // If we're outside the container box less then we were on our last try\n // then remember this position as the best position.\n if (percentage > p) {\n bestPosition = new BoxPosition(b);\n percentage = p;\n }\n // Reset the box position to the specified position.\n b = new BoxPosition(specifiedPosition);\n }\n return bestPosition || specifiedPosition;\n }\n\n var boxPosition = new BoxPosition(styleBox),\n cue = styleBox.cue,\n linePos = computeLinePos(cue),\n axis = [];\n\n // If we have a line number to align the cue to.\n if (cue.snapToLines) {\n var size;\n switch (cue.vertical) {\n case \"\":\n axis = [ \"+y\", \"-y\" ];\n size = \"height\";\n break;\n case \"rl\":\n axis = [ \"+x\", \"-x\" ];\n size = \"width\";\n break;\n case \"lr\":\n axis = [ \"-x\", \"+x\" ];\n size = \"width\";\n break;\n }\n\n var step = boxPosition.lineHeight,\n position = step * Math.round(linePos),\n maxPosition = containerBox[size] + step,\n initialAxis = axis[0];\n\n // If the specified intial position is greater then the max position then\n // clamp the box to the amount of steps it would take for the box to\n // reach the max position.\n if (Math.abs(position) > maxPosition) {\n position = position < 0 ? -1 : 1;\n position *= Math.ceil(maxPosition / step) * step;\n }\n\n // If computed line position returns negative then line numbers are\n // relative to the bottom of the video instead of the top. Therefore, we\n // need to increase our initial position by the length or width of the\n // video, depending on the writing direction, and reverse our axis directions.\n if (linePos < 0) {\n position += cue.vertical === \"\" ? containerBox.height : containerBox.width;\n axis = axis.reverse();\n }\n\n // Move the box to the specified position. This may not be its best\n // position.\n boxPosition.move(initialAxis, position);\n\n } else {\n // If we have a percentage line value for the cue.\n var calculatedPercentage = (boxPosition.lineHeight / containerBox.height) * 100;\n\n switch (cue.lineAlign) {\n case \"middle\":\n linePos -= (calculatedPercentage / 2);\n break;\n case \"end\":\n linePos -= calculatedPercentage;\n break;\n }\n\n // Apply initial line position to the cue box.\n switch (cue.vertical) {\n case \"\":\n styleBox.applyStyles({\n top: styleBox.formatStyle(linePos, \"%\")\n });\n break;\n case \"rl\":\n styleBox.applyStyles({\n left: styleBox.formatStyle(linePos, \"%\")\n });\n break;\n case \"lr\":\n styleBox.applyStyles({\n right: styleBox.formatStyle(linePos, \"%\")\n });\n break;\n }\n\n axis = [ \"+y\", \"-x\", \"+x\", \"-y\" ];\n\n // Get the box position again after we've applied the specified positioning\n // to it.\n boxPosition = new BoxPosition(styleBox);\n }\n\n var bestPosition = findBestPosition(boxPosition, axis);\n styleBox.move(bestPosition.toCSSCompatValues(containerBox));\n }\n\n function WebVTT() {\n // Nothing\n }\n\n // Helper to allow strings to be decoded instead of the default binary utf8 data.\n WebVTT.StringDecoder = function() {\n return {\n decode: function(data) {\n if (!data) {\n return \"\";\n }\n if (typeof data !== \"string\") {\n throw new Error(\"Error - expected string data.\");\n }\n return decodeURIComponent(encodeURIComponent(data));\n }\n };\n };\n\n WebVTT.convertCueToDOMTree = function(window, cuetext) {\n if (!window || !cuetext) {\n return null;\n }\n return parseContent(window, cuetext);\n };\n\n var FONT_SIZE_PERCENT = 0.05;\n var FONT_STYLE = \"sans-serif\";\n var CUE_BACKGROUND_PADDING = \"1.5%\";\n\n // Runs the processing model over the cues and regions passed to it.\n // @param overlay A block level element (usually a div) that the computed cues\n // and regions will be placed into.\n WebVTT.processCues = function(window, cues, overlay) {\n if (!window || !cues || !overlay) {\n return null;\n }\n\n // Remove all previous children.\n while (overlay.firstChild) {\n overlay.removeChild(overlay.firstChild);\n }\n\n var paddedOverlay = window.document.createElement(\"div\");\n paddedOverlay.style.position = \"absolute\";\n paddedOverlay.style.left = \"0\";\n paddedOverlay.style.right = \"0\";\n paddedOverlay.style.top = \"0\";\n paddedOverlay.style.bottom = \"0\";\n paddedOverlay.style.margin = CUE_BACKGROUND_PADDING;\n overlay.appendChild(paddedOverlay);\n\n // Determine if we need to compute the display states of the cues. This could\n // be the case if a cue's state has been changed since the last computation or\n // if it has not been computed yet.\n function shouldCompute(cues) {\n for (var i = 0; i < cues.length; i++) {\n if (cues[i].hasBeenReset || !cues[i].displayState) {\n return true;\n }\n }\n return false;\n }\n\n // We don't need to recompute the cues' display states. Just reuse them.\n if (!shouldCompute(cues)) {\n for (var i = 0; i < cues.length; i++) {\n paddedOverlay.appendChild(cues[i].displayState);\n }\n return;\n }\n\n var boxPositions = [],\n containerBox = BoxPosition.getSimpleBoxPosition(paddedOverlay),\n fontSize = Math.round(containerBox.height * FONT_SIZE_PERCENT * 100) / 100;\n var styleOptions = {\n font: fontSize + \"px \" + FONT_STYLE\n };\n\n (function() {\n var styleBox, cue;\n\n for (var i = 0; i < cues.length; i++) {\n cue = cues[i];\n\n // Compute the intial position and styles of the cue div.\n styleBox = new CueStyleBox(window, cue, styleOptions);\n paddedOverlay.appendChild(styleBox.div);\n\n // Move the cue div to it's correct line position.\n moveBoxToLinePosition(window, styleBox, containerBox, boxPositions);\n\n // Remember the computed div so that we don't have to recompute it later\n // if we don't have too.\n cue.displayState = styleBox.div;\n\n boxPositions.push(BoxPosition.getSimpleBoxPosition(styleBox));\n }\n })();\n };\n\n WebVTT.Parser = function(window, vttjs, decoder) {\n if (!decoder) {\n decoder = vttjs;\n vttjs = {};\n }\n if (!vttjs) {\n vttjs = {};\n }\n\n this.window = window;\n this.vttjs = vttjs;\n this.state = \"INITIAL\";\n this.buffer = \"\";\n this.decoder = decoder || new TextDecoder(\"utf8\");\n this.regionList = [];\n };\n\n WebVTT.Parser.prototype = {\n // If the error is a ParsingError then report it to the consumer if\n // possible. If it's not a ParsingError then throw it like normal.\n reportOrThrowError: function(e) {\n if (e instanceof ParsingError) {\n this.onparsingerror && this.onparsingerror(e);\n } else {\n throw e;\n }\n },\n parse: function (data) {\n var self = this;\n\n // If there is no data then we won't decode it, but will just try to parse\n // whatever is in buffer already. This may occur in circumstances, for\n // example when flush() is called.\n if (data) {\n // Try to decode the data that we received.\n self.buffer += self.decoder.decode(data, {stream: true});\n }\n\n function collectNextLine() {\n var buffer = self.buffer;\n var pos = 0;\n while (pos < buffer.length && buffer[pos] !== '\\r' && buffer[pos] !== '\\n') {\n ++pos;\n }\n var line = buffer.substr(0, pos);\n // Advance the buffer early in case we fail below.\n if (buffer[pos] === '\\r') {\n ++pos;\n }\n if (buffer[pos] === '\\n') {\n ++pos;\n }\n self.buffer = buffer.substr(pos);\n return line;\n }\n\n // 3.4 WebVTT region and WebVTT region settings syntax\n function parseRegion(input) {\n var settings = new Settings();\n\n parseOptions(input, function (k, v) {\n switch (k) {\n case \"id\":\n settings.set(k, v);\n break;\n case \"width\":\n settings.percent(k, v);\n break;\n case \"lines\":\n settings.integer(k, v);\n break;\n case \"regionanchor\":\n case \"viewportanchor\":\n var xy = v.split(',');\n if (xy.length !== 2) {\n break;\n }\n // We have to make sure both x and y parse, so use a temporary\n // settings object here.\n var anchor = new Settings();\n anchor.percent(\"x\", xy[0]);\n anchor.percent(\"y\", xy[1]);\n if (!anchor.has(\"x\") || !anchor.has(\"y\")) {\n break;\n }\n settings.set(k + \"X\", anchor.get(\"x\"));\n settings.set(k + \"Y\", anchor.get(\"y\"));\n break;\n case \"scroll\":\n settings.alt(k, v, [\"up\"]);\n break;\n }\n }, /=/, /\\s/);\n\n // Create the region, using default values for any values that were not\n // specified.\n if (settings.has(\"id\")) {\n var region = new (self.vttjs.VTTRegion || self.window.VTTRegion)();\n region.width = settings.get(\"width\", 100);\n region.lines = settings.get(\"lines\", 3);\n region.regionAnchorX = settings.get(\"regionanchorX\", 0);\n region.regionAnchorY = settings.get(\"regionanchorY\", 100);\n region.viewportAnchorX = settings.get(\"viewportanchorX\", 0);\n region.viewportAnchorY = settings.get(\"viewportanchorY\", 100);\n region.scroll = settings.get(\"scroll\", \"\");\n // Register the region.\n self.onregion && self.onregion(region);\n // Remember the VTTRegion for later in case we parse any VTTCues that\n // reference it.\n self.regionList.push({\n id: settings.get(\"id\"),\n region: region\n });\n }\n }\n\n // 3.2 WebVTT metadata header syntax\n function parseHeader(input) {\n parseOptions(input, function (k, v) {\n switch (k) {\n case \"Region\":\n // 3.3 WebVTT region metadata header syntax\n parseRegion(v);\n break;\n }\n }, /:/);\n }\n\n // 5.1 WebVTT file parsing.\n try {\n var line;\n if (self.state === \"INITIAL\") {\n // We can't start parsing until we have the first line.\n if (!/\\r\\n|\\n/.test(self.buffer)) {\n return this;\n }\n\n line = collectNextLine();\n\n var m = line.match(/^WEBVTT([ \\t].*)?$/);\n if (!m || !m[0]) {\n throw new ParsingError(ParsingError.Errors.BadSignature);\n }\n\n self.state = \"HEADER\";\n }\n\n var alreadyCollectedLine = false;\n while (self.buffer) {\n // We can't parse a line until we have the full line.\n if (!/\\r\\n|\\n/.test(self.buffer)) {\n return this;\n }\n\n if (!alreadyCollectedLine) {\n line = collectNextLine();\n } else {\n alreadyCollectedLine = false;\n }\n\n switch (self.state) {\n case \"HEADER\":\n // 13-18 - Allow a header (metadata) under the WEBVTT line.\n if (/:/.test(line)) {\n parseHeader(line);\n } else if (!line) {\n // An empty line terminates the header and starts the body (cues).\n self.state = \"ID\";\n }\n continue;\n case \"NOTE\":\n // Ignore NOTE blocks.\n if (!line) {\n self.state = \"ID\";\n }\n continue;\n case \"ID\":\n // Check for the start of NOTE blocks.\n if (/^NOTE($|[ \\t])/.test(line)) {\n self.state = \"NOTE\";\n break;\n }\n // 19-29 - Allow any number of line terminators, then initialize new cue values.\n if (!line) {\n continue;\n }\n self.cue = new (self.vttjs.VTTCue || self.window.VTTCue)(0, 0, \"\");\n self.state = \"CUE\";\n // 30-39 - Check if self line contains an optional identifier or timing data.\n if (line.indexOf(\"-->\") === -1) {\n self.cue.id = line;\n continue;\n }\n // Process line as start of a cue.\n /*falls through*/\n case \"CUE\":\n // 40 - Collect cue timings and settings.\n try {\n parseCue(line, self.cue, self.regionList);\n } catch (e) {\n self.reportOrThrowError(e);\n // In case of an error ignore rest of the cue.\n self.cue = null;\n self.state = \"BADCUE\";\n continue;\n }\n self.state = \"CUETEXT\";\n continue;\n case \"CUETEXT\":\n var hasSubstring = line.indexOf(\"-->\") !== -1;\n // 34 - If we have an empty line then report the cue.\n // 35 - If we have the special substring '-->' then report the cue,\n // but do not collect the line as we need to process the current\n // one as a new cue.\n if (!line || hasSubstring && (alreadyCollectedLine = true)) {\n // We are done parsing self cue.\n self.oncue && self.oncue(self.cue);\n self.cue = null;\n self.state = \"ID\";\n continue;\n }\n if (self.cue.text) {\n self.cue.text += \"\\n\";\n }\n self.cue.text += line;\n continue;\n case \"BADCUE\": // BADCUE\n // 54-62 - Collect and discard the remaining cue.\n if (!line) {\n self.state = \"ID\";\n }\n continue;\n }\n }\n } catch (e) {\n self.reportOrThrowError(e);\n\n // If we are currently parsing a cue, report what we have.\n if (self.state === \"CUETEXT\" && self.cue && self.oncue) {\n self.oncue(self.cue);\n }\n self.cue = null;\n // Enter BADWEBVTT state if header was not parsed correctly otherwise\n // another exception occurred so enter BADCUE state.\n self.state = self.state === \"INITIAL\" ? \"BADWEBVTT\" : \"BADCUE\";\n }\n return this;\n },\n flush: function () {\n var self = this;\n try {\n // Finish decoding the stream.\n self.buffer += self.decoder.decode();\n // Synthesize the end of the current cue or region.\n if (self.cue || self.state === \"HEADER\") {\n self.buffer += \"\\n\\n\";\n self.parse();\n }\n // If we've flushed, parsed, and we're still on the INITIAL state then\n // that means we don't have enough of the stream to parse the first\n // line.\n if (self.state === \"INITIAL\") {\n throw new ParsingError(ParsingError.Errors.BadSignature);\n }\n } catch(e) {\n self.reportOrThrowError(e);\n }\n self.onflush && self.onflush();\n return this;\n }\n };\n\n global.WebVTT = WebVTT;\n\n}(this, (this.vttjs || {})));\n\n//# sourceMappingURL=video.js.map"}}},{"rowIdx":459,"cells":{"target":{"kind":"string","value":"lib/components/admin/field-trip-windows.js"},"feat_repo_name":{"kind":"string","value":"opentripplanner/otp-react-redux"},"text":{"kind":"string","value":"import React from 'react'\nimport { connect } from 'react-redux'\n\nimport FieldTripDetails from './field-trip-details'\nimport FieldTripList from './field-trip-list'\n\nconst WINDOW_WIDTH = 450\nconst MARGIN = 15\n\n/**\n * Collects the various draggable windows for the Field Trip module.\n */\nconst FieldTripWindows = ({callTaker}) => {\n const {fieldTrip} = callTaker\n // Do not render details or list if visible is false.\n if (!fieldTrip.visible) return null\n return (\n <>\n \n \n \n )\n}\n\nconst mapStateToProps = (state, ownProps) => {\n return {\n callTaker: state.callTaker\n }\n}\n\nexport default connect(mapStateToProps)(FieldTripWindows)\n"}}},{"rowIdx":460,"cells":{"target":{"kind":"string","value":"js/vendor/jquery-1.11.3.min.js"},"feat_repo_name":{"kind":"string","value":"ergum/ESAT-Microsites"},"text":{"kind":"string","value":"/*! jQuery v1.11.3 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */\n!function(a,b){\"object\"==typeof module&&\"object\"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error(\"jQuery requires a window with a document\");return b(a)}:b(a)}(\"undefined\"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=\"1.11.3\",m=function(a,b){return new m.fn.init(a,b)},n=/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,o=/^-ms-/,p=/-([\\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:\"\",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for(\"boolean\"==typeof g&&(j=g,g=arguments[h]||{},h++),\"object\"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:\"jQuery\"+(l+Math.random()).replace(/\\D/g,\"\"),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return\"function\"===m.type(a)},isArray:Array.isArray||function(a){return\"array\"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||\"object\"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,\"constructor\")&&!j.call(a.constructor.prototype,\"isPrototypeOf\"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+\"\":\"object\"==typeof a||\"function\"==typeof a?h[i.call(a)]||\"object\":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,\"ms-\").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?\"\":(a+\"\").replace(n,\"\")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,\"string\"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.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,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return\"string\"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each(\"Boolean Number String Function Array Date RegExp Object Error\".split(\" \"),function(a,b){h[\"[object \"+b+\"]\"]=b.toLowerCase()});function r(a){var b=\"length\"in a&&a.length,c=m.type(a);return\"function\"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:\"array\"===c||0===b||\"number\"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u=\"sizzle\"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K=\"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped\",L=\"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",M=\"(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+\",N=M.replace(\"w\",\"w#\"),O=\"\\\\[\"+L+\"*(\"+M+\")(?:\"+L+\"*([*^$|!~]?=)\"+L+\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\"+N+\"))|)\"+L+\"*\\\\]\",P=\":(\"+M+\")(?:\\\\((('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\"+O+\")*)|.*)\\\\)|)\",Q=new RegExp(L+\"+\",\"g\"),R=new RegExp(\"^\"+L+\"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\"+L+\"+$\",\"g\"),S=new RegExp(\"^\"+L+\"*,\"+L+\"*\"),T=new RegExp(\"^\"+L+\"*([>+~]|\"+L+\")\"+L+\"*\"),U=new RegExp(\"=\"+L+\"*([^\\\\]'\\\"]*?)\"+L+\"*\\\\]\",\"g\"),V=new RegExp(P),W=new RegExp(\"^\"+N+\"$\"),X={ID:new RegExp(\"^#(\"+M+\")\"),CLASS:new RegExp(\"^\\\\.(\"+M+\")\"),TAG:new RegExp(\"^(\"+M.replace(\"w\",\"w*\")+\")\"),ATTR:new RegExp(\"^\"+O),PSEUDO:new RegExp(\"^\"+P),CHILD:new RegExp(\"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\"+L+\"*(even|odd|(([+-]|)(\\\\d*)n|)\"+L+\"*(?:([+-]|)\"+L+\"*(\\\\d+)|))\"+L+\"*\\\\)|)\",\"i\"),bool:new RegExp(\"^(?:\"+K+\")$\",\"i\"),needsContext:new RegExp(\"^\"+L+\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\"+L+\"*((?:-\\\\d)?\\\\d*)\"+L+\"*\\\\)|)(?=[^-]|$)\",\"i\")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\\d$/i,$=/^[^{]+\\{\\s*\\[native \\w/,_=/^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,aa=/[+~]/,ba=/'|\\\\/g,ca=new RegExp(\"\\\\\\\\([\\\\da-f]{1,6}\"+L+\"?|(\"+L+\")|.)\",\"ig\"),da=function(a,b,c){var d=\"0x\"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,\"string\"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&\"object\"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute(\"id\"))?s=r.replace(ba,\"\\\\$&\"):b.setAttribute(\"id\",s),s=\"[id='\"+s+\"'] \",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(\",\")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute(\"id\")}}}return i(a.replace(R,\"$1\"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+\" \")>d.cacheLength&&delete b[a.shift()],b[c+\" \"]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement(\"div\");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split(\"|\"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return\"input\"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return(\"input\"===c||\"button\"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&\"undefined\"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?\"HTML\"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener(\"unload\",ea,!1):e.attachEvent&&e.attachEvent(\"onunload\",ea)),p=!f(g),c.attributes=ja(function(a){return a.className=\"i\",!a.getAttribute(\"className\")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment(\"\")),!a.getElementsByTagName(\"*\").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(\"undefined\"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute(\"id\")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c=\"undefined\"!=typeof a.getAttributeNode&&a.getAttributeNode(\"id\");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return\"undefined\"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if(\"*\"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML=\"\",a.querySelectorAll(\"[msallowcapture^='']\").length&&q.push(\"[*^$]=\"+L+\"*(?:''|\\\"\\\")\"),a.querySelectorAll(\"[selected]\").length||q.push(\"\\\\[\"+L+\"*(?:value|\"+K+\")\"),a.querySelectorAll(\"[id~=\"+u+\"-]\").length||q.push(\"~=\"),a.querySelectorAll(\":checked\").length||q.push(\":checked\"),a.querySelectorAll(\"a#\"+u+\"+*\").length||q.push(\".#.+[+~]\")}),ja(function(a){var b=g.createElement(\"input\");b.setAttribute(\"type\",\"hidden\"),a.appendChild(b).setAttribute(\"name\",\"D\"),a.querySelectorAll(\"[name=d]\").length&&q.push(\"name\"+L+\"*[*^$|!~]?=\"),a.querySelectorAll(\":enabled\").length||q.push(\":enabled\",\":disabled\"),a.querySelectorAll(\"*,:x\"),q.push(\",.*:\")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,\"div\"),s.call(a,\"[s!='']:x\"),r.push(\"!=\",P)}),q=q.length&&new RegExp(q.join(\"|\")),r=r.length&&new RegExp(r.join(\"|\")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.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):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,\"='$1']\"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error(\"Syntax error, unrecognized expression: \"+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c=\"\",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if(\"string\"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{\">\":{dir:\"parentNode\",first:!0},\" \":{dir:\"parentNode\"},\"+\":{dir:\"previousSibling\",first:!0},\"~\":{dir:\"previousSibling\"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||\"\").replace(ca,da),\"~=\"===a[2]&&(a[3]=\" \"+a[3]+\" \"),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),\"nth\"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*(\"even\"===a[3]||\"odd\"===a[3])),a[5]=+(a[7]+a[8]||\"odd\"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||\"\":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(\")\",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return\"*\"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+\" \"];return b||(b=new RegExp(\"(^|\"+L+\")\"+a+\"(\"+L+\"|$)\"))&&y(a,function(a){return b.test(\"string\"==typeof a.className&&a.className||\"undefined\"!=typeof a.getAttribute&&a.getAttribute(\"class\")||\"\")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?\"!=\"===b:b?(e+=\"\",\"=\"===b?e===c:\"!=\"===b?e!==c:\"^=\"===b?c&&0===e.indexOf(c):\"*=\"===b?c&&e.indexOf(c)>-1:\"$=\"===b?c&&e.slice(-c.length)===c:\"~=\"===b?(\" \"+e.replace(Q,\" \")+\" \").indexOf(c)>-1:\"|=\"===b?e===c||e.slice(0,c.length+1)===c+\"-\":!1):!0}},CHILD:function(a,b,c,d,e){var f=\"nth\"!==a.slice(0,3),g=\"last\"!==a.slice(-4),h=\"of-type\"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?\"nextSibling\":\"previousSibling\",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p=\"only\"===a&&!o&&\"nextSibling\"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error(\"unsupported pseudo: \"+a);return e[u]?e(b):e.length>1?(c=[a,a,\"\",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,\"$1\"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||\"\")||ga.error(\"unsupported lang: \"+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute(\"xml:lang\")||b.getAttribute(\"lang\"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+\"-\");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},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},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return\"input\"===b&&\"button\"===a.type||\"button\"===b},text:function(a){var b;return\"input\"===a.nodeName.toLowerCase()&&\"text\"===a.type&&(null==(b=a.getAttribute(\"type\"))||\"text\"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&\"parentNode\"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(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 wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||\"*\",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[\" \"],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:\" \"===a[i-2].type?\"*\":\"\"})).replace(R,\"$1\"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q=\"0\",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG(\"*\",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+\" \"];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n=\"function\"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&\"ID\"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split(\"\").sort(B).join(\"\")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement(\"div\"))}),ja(function(a){return a.innerHTML=\"\",\"#\"===a.firstChild.getAttribute(\"href\")})||ka(\"type|href|height|width\",function(a,b,c){return c?void 0:a.getAttribute(b,\"type\"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML=\"\",a.firstChild.setAttribute(\"value\",\"\"),\"\"===a.firstChild.getAttribute(\"value\")})||ka(\"value\",function(a,b,c){return c||\"input\"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute(\"disabled\")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);m.find=s,m.expr=s.selectors,m.expr[\":\"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,v=/^.[^:#\\[\\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if(\"string\"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=\":not(\"+a+\")\"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if(\"string\"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+\" \"+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,\"string\"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if(\"string\"==typeof a){if(c=\"<\"===a.charAt(0)&&\">\"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?\"undefined\"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||\"string\"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?\"string\"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,\"parentNode\")},parentsUntil:function(a,b,c){return m.dir(a,\"parentNode\",c)},next:function(a){return D(a,\"nextSibling\")},prev:function(a){return D(a,\"previousSibling\")},nextAll:function(a){return m.dir(a,\"nextSibling\")},prevAll:function(a){return m.dir(a,\"previousSibling\")},nextUntil:function(a,b,c){return m.dir(a,\"nextSibling\",c)},prevUntil:function(a,b,c){return m.dir(a,\"previousSibling\",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,\"iframe\")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return\"Until\"!==a.slice(-5)&&(d=c),d&&\"string\"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a=\"string\"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);\"function\"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&\"string\"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[[\"resolve\",\"done\",m.Callbacks(\"once memory\"),\"resolved\"],[\"reject\",\"fail\",m.Callbacks(\"once memory\"),\"rejected\"],[\"notify\",\"progress\",m.Callbacks(\"memory\")]],c=\"pending\",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+\"With\"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.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]]=function(){return e[f[0]+\"With\"](this===e?d:this,arguments),this},e[f[0]+\"With\"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler(\"ready\"),m(y).off(\"ready\")))}}});function I(){y.addEventListener?(y.removeEventListener(\"DOMContentLoaded\",J,!1),a.removeEventListener(\"load\",J,!1)):(y.detachEvent(\"onreadystatechange\",J),a.detachEvent(\"onload\",J))}function J(){(y.addEventListener||\"load\"===event.type||\"complete\"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),\"complete\"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener(\"DOMContentLoaded\",J,!1),a.addEventListener(\"load\",J,!1);else{y.attachEvent(\"onreadystatechange\",J),a.attachEvent(\"onload\",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll(\"left\")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K=\"undefined\",L;for(L in m(k))break;k.ownLast=\"0\"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName(\"body\")[0],c&&c.style&&(b=y.createElement(\"div\"),d=y.createElement(\"div\"),d.style.cssText=\"position:absolute;border:0;width:0;height:0;top:0;left:-9999px\",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText=\"display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1\",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement(\"div\");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+\" \").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute(\"classid\")===b};var M=/^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d=\"data-\"+b.replace(N,\"-$1\").toLowerCase();if(c=a.getAttribute(d),\"string\"==typeof c){try{c=\"true\"===c?!0:\"false\"===c?!1:\"null\"===c?null:+c+\"\"===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if((\"data\"!==b||!m.isEmptyObject(a[b]))&&\"toJSON\"!==b)return!1;\n\nreturn!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||\"string\"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),(\"object\"==typeof b||\"function\"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),\"string\"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(\" \")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{\"applet \":!0,\"embed \":!0,\"object \":\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,\"parsedAttrs\"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf(\"data-\")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,\"parsedAttrs\",!0)}return e}return\"object\"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||\"fx\")+\"queue\",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||\"fx\";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.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 m._data(a,c)||m._data(a,c,{empty:m.Callbacks(\"once memory\").add(function(){m._removeData(a,b+\"queue\"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return\"string\"!=typeof a&&(b=a,a=\"fx\",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement(\"input\"),b=y.createElement(\"div\"),c=y.createDocumentFragment();if(b.innerHTML=\"
    a\",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName(\"tbody\").length,k.htmlSerialize=!!b.getElementsByTagName(\"link\").length,k.html5Clone=\"<:nav>\"!==y.createElement(\"nav\").cloneNode(!0).outerHTML,a.type=\"checkbox\",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML=\"\",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML=\"\",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent(\"onclick\",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement(\"div\");for(b in{submit:!0,change:!0,focusin:!0})c=\"on\"+b,(k[b+\"Bubbles\"]=c in a)||(d.setAttribute(c,\"t\"),k[b+\"Bubbles\"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\\.(.+)|)$/;function aa(){return!0}function ba(){return!1}function ca(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||\"\").match(E)||[\"\"],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||\"\").split(\".\").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(\".\")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent(\"on\"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||\"\").match(E)||[\"\"],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||\"\").split(\".\").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp(\"(^|\\\\.)\"+p.join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&(\"**\"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,\"events\"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,\"type\")?b.type:b,q=j.call(b,\"namespace\")?b.namespace.split(\".\"):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(\".\")>=0&&(q=p.split(\".\"),p=q.shift(),q.sort()),g=p.indexOf(\":\")<0&&\"on\"+p,b=b[m.expando]?b:new m.Event(p,\"object\"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join(\".\"),b.namespace_re=b.namespace?new RegExp(\"(^|\\\\.)\"+q.join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,\"events\")||{})[b.type]&&m._data(h,\"handle\"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,\"events\")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||\"click\"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||\"click\"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+\" \",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]\",\"i\"),ha=/^\\s+/,ia=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi,ja=/<([\\w:]+)/,ka=/\\s*$/g,ra={option:[1,\"\"],legend:[1,\"
    \",\"
    \"],area:[1,\"\",\"\"],param:[1,\"\",\"\"],thead:[1,\"\",\"
    \"],tr:[2,\"\",\"
    \"],col:[2,\"\",\"
    \"],td:[3,\"\",\"
    \"],_default:k.htmlSerialize?[0,\"\",\"\"]:[1,\"X
    \",\"
    \"]},sa=da(y),ta=sa.appendChild(y.createElement(\"div\"));ra.optgroup=ra.option,ra.tbody=ra.tfoot=ra.colgroup=ra.caption=ra.thead,ra.th=ra.td;function ua(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||\"*\"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||\"*\"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ua(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function va(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wa(a,b){return m.nodeName(a,\"table\")&&m.nodeName(11!==b.nodeType?b:b.firstChild,\"tr\")?a.getElementsByTagName(\"tbody\")[0]||a.appendChild(a.ownerDocument.createElement(\"tbody\")):a}function xa(a){return a.type=(null!==m.find.attr(a,\"type\"))+\"/\"+a.type,a}function ya(a){var b=pa.exec(a.type);return b?a.type=b[1]:a.removeAttribute(\"type\"),a}function za(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,\"globalEval\",!b||m._data(b[d],\"globalEval\"))}function Aa(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._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++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Ba(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}\"script\"===c&&b.text!==a.text?(xa(b).text=a.text,ya(b)):\"object\"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):\"input\"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):\"option\"===c?b.defaultSelected=b.selected=a.defaultSelected:(\"input\"===c||\"textarea\"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!ga.test(\"<\"+a.nodeName+\">\")?f=a.cloneNode(!0):(ta.innerHTML=a.outerHTML,ta.removeChild(f=ta.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ua(f),h=ua(a),g=0;null!=(e=h[g]);++g)d[g]&&Ba(e,d[g]);if(b)if(c)for(h=h||ua(a),d=d||ua(f),g=0;null!=(e=h[g]);g++)Aa(e,d[g]);else Aa(a,f);return d=ua(f,\"script\"),d.length>0&&za(d,!i&&ua(a,\"script\")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=da(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if(\"object\"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(la.test(f)){h=h||o.appendChild(b.createElement(\"div\")),i=(ja.exec(f)||[\"\",\"\"])[1].toLowerCase(),l=ra[i]||ra._default,h.innerHTML=l[1]+f.replace(ia,\"<$1>\")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&ha.test(f)&&p.push(b.createTextNode(ha.exec(f)[0])),!k.tbody){f=\"table\"!==i||ka.test(f)?\"\"!==l[1]||ka.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],\"tbody\")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent=\"\";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ua(p,\"input\"),va),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ua(o.appendChild(f),\"script\"),g&&za(h),c)){e=0;while(f=h[e++])oa.test(f.type||\"\")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ua(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&za(ua(c,\"script\")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ua(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,\"select\")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fa,\"\"):void 0;if(!(\"string\"!=typeof a||ma.test(a)||!k.htmlSerialize&&ga.test(a)||!k.leadingWhitespace&&ha.test(a)||ra[(ja.exec(a)||[\"\",\"\"])[1].toLowerCase()])){a=a.replace(ia,\"<$1>\");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ua(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ua(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&\"string\"==typeof p&&!k.checkClone&&na.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ua(i,\"script\"),xa),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ua(d,\"script\"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,ya),j=0;f>j;j++)d=g[j],oa.test(d.type||\"\")&&!m._data(d,\"globalEval\")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||\"\").replace(qa,\"\")));i=c=null}return this}}),m.each({appendTo:\"append\",prependTo:\"prepend\",insertBefore:\"before\",insertAfter:\"after\",replaceAll:\"replaceWith\"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Ca,Da={};function Ea(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],\"display\");return e.detach(),f}function Fa(a){var b=y,c=Da[a];return c||(c=Ea(a,b),\"none\"!==c&&c||(Ca=(Ca||m(\"