@clappr/player 0.11.16 → 0.12.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -83,7 +83,7 @@
83
83
  function _createForOfIteratorHelper(r, e) {
84
84
  var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
85
85
  if (!t) {
86
- if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) {
86
+ if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
87
87
  t && (r = t);
88
88
  var n = 0,
89
89
  F = function () {};
@@ -245,8 +245,8 @@
245
245
  return t;
246
246
  }
247
247
  function _superPropGet$1(t, o, e, r) {
248
- var p = _get$1(_getPrototypeOf$1(t.prototype), o, e);
249
- return "function" == typeof p ? function (t) {
248
+ var p = _get$1(_getPrototypeOf$1(1 & r ? t.prototype : t), o, e);
249
+ return 2 & r && "function" == typeof p ? function (t) {
250
250
  return p.apply(e, t);
251
251
  } : p;
252
252
  }
@@ -257,11 +257,11 @@
257
257
  if ("object" != typeof t || !t) return t;
258
258
  var e = t[Symbol.toPrimitive];
259
259
  if (void 0 !== e) {
260
- var i = e.call(t, r);
260
+ var i = e.call(t, r || "default");
261
261
  if ("object" != typeof i) return i;
262
262
  throw new TypeError("@@toPrimitive must return a primitive value.");
263
263
  }
264
- return String(t);
264
+ return ("string" === r ? String : Number)(t);
265
265
  }
266
266
  function _toPropertyKey$1(t) {
267
267
  var i = _toPrimitive$1(t, "string");
@@ -288,1830 +288,1837 @@
288
288
  }
289
289
 
290
290
  /* Zepto v1.2.0 - zepto ajax callbacks deferred event ie selector - zeptojs.com/license */
291
- var Zepto = function () {
292
- var undefined$1,
293
- key,
294
- $,
295
- classList,
296
- emptyArray = [],
297
- concat = emptyArray.concat,
298
- filter = emptyArray.filter,
299
- slice = emptyArray.slice,
300
- document = window.document,
301
- elementDisplay = {},
302
- classCache = {},
303
- cssNumber = {
304
- 'column-count': 1,
305
- 'columns': 1,
306
- 'font-weight': 1,
307
- 'line-height': 1,
308
- 'opacity': 1,
309
- 'z-index': 1,
310
- 'zoom': 1
311
- },
312
- fragmentRE = /^\s*<(\w+|!)[^>]*>/,
313
- singleTagRE = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
314
- tagExpanderRE = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
315
- rootNodeRE = /^(?:body|html)$/i,
316
- capitalRE = /([A-Z])/g,
317
- // special attributes that should be get/set via method calls
318
- methodAttributes = ['val', 'css', 'html', 'text', 'data', 'width', 'height', 'offset'],
319
- adjacencyOperators = ['after', 'prepend', 'before', 'append'],
320
- table = document.createElement('table'),
321
- tableRow = document.createElement('tr'),
322
- containers = {
323
- 'tr': document.createElement('tbody'),
324
- 'tbody': table,
325
- 'thead': table,
326
- 'tfoot': table,
327
- 'td': tableRow,
328
- 'th': tableRow,
329
- '*': document.createElement('div')
330
- },
331
- readyRE = /complete|loaded|interactive/,
332
- simpleSelectorRE = /^[\w-]*$/,
333
- class2type = {},
334
- toString = class2type.toString,
335
- zepto = {},
336
- camelize,
337
- uniq,
338
- tempParent = document.createElement('div'),
339
- propMap = {
340
- 'tabindex': 'tabIndex',
341
- 'readonly': 'readOnly',
342
- 'for': 'htmlFor',
343
- 'class': 'className',
344
- 'maxlength': 'maxLength',
345
- 'cellspacing': 'cellSpacing',
346
- 'cellpadding': 'cellPadding',
347
- 'rowspan': 'rowSpan',
348
- 'colspan': 'colSpan',
349
- 'usemap': 'useMap',
350
- 'frameborder': 'frameBorder',
351
- 'contenteditable': 'contentEditable'
352
- },
353
- isArray = Array.isArray || function (object) {
354
- return object instanceof Array;
291
+ var zepto;
292
+ var hasRequiredZepto;
293
+ function requireZepto() {
294
+ if (hasRequiredZepto) return zepto;
295
+ hasRequiredZepto = 1;
296
+ var Zepto = function () {
297
+ var undefined$1,
298
+ key,
299
+ $,
300
+ classList,
301
+ emptyArray = [],
302
+ concat = emptyArray.concat,
303
+ filter = emptyArray.filter,
304
+ slice = emptyArray.slice,
305
+ document = window.document,
306
+ elementDisplay = {},
307
+ classCache = {},
308
+ cssNumber = {
309
+ 'column-count': 1,
310
+ 'columns': 1,
311
+ 'font-weight': 1,
312
+ 'line-height': 1,
313
+ 'opacity': 1,
314
+ 'z-index': 1,
315
+ 'zoom': 1
316
+ },
317
+ fragmentRE = /^\s*<(\w+|!)[^>]*>/,
318
+ singleTagRE = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
319
+ tagExpanderRE = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
320
+ rootNodeRE = /^(?:body|html)$/i,
321
+ capitalRE = /([A-Z])/g,
322
+ // special attributes that should be get/set via method calls
323
+ methodAttributes = ['val', 'css', 'html', 'text', 'data', 'width', 'height', 'offset'],
324
+ adjacencyOperators = ['after', 'prepend', 'before', 'append'],
325
+ table = document.createElement('table'),
326
+ tableRow = document.createElement('tr'),
327
+ containers = {
328
+ 'tr': document.createElement('tbody'),
329
+ 'tbody': table,
330
+ 'thead': table,
331
+ 'tfoot': table,
332
+ 'td': tableRow,
333
+ 'th': tableRow,
334
+ '*': document.createElement('div')
335
+ },
336
+ readyRE = /complete|loaded|interactive/,
337
+ simpleSelectorRE = /^[\w-]*$/,
338
+ class2type = {},
339
+ toString = class2type.toString,
340
+ zepto = {},
341
+ camelize,
342
+ uniq,
343
+ tempParent = document.createElement('div'),
344
+ propMap = {
345
+ 'tabindex': 'tabIndex',
346
+ 'readonly': 'readOnly',
347
+ 'for': 'htmlFor',
348
+ 'class': 'className',
349
+ 'maxlength': 'maxLength',
350
+ 'cellspacing': 'cellSpacing',
351
+ 'cellpadding': 'cellPadding',
352
+ 'rowspan': 'rowSpan',
353
+ 'colspan': 'colSpan',
354
+ 'usemap': 'useMap',
355
+ 'frameborder': 'frameBorder',
356
+ 'contenteditable': 'contentEditable'
357
+ },
358
+ isArray = Array.isArray || function (object) {
359
+ return object instanceof Array;
360
+ };
361
+ zepto.matches = function (element, selector) {
362
+ if (!selector || !element || element.nodeType !== 1) return false;
363
+ var matchesSelector = element.matches || element.webkitMatchesSelector || element.mozMatchesSelector || element.oMatchesSelector || element.matchesSelector;
364
+ if (matchesSelector) return matchesSelector.call(element, selector);
365
+ // fall back to performing a selector:
366
+ var match,
367
+ parent = element.parentNode,
368
+ temp = !parent;
369
+ if (temp) (parent = tempParent).appendChild(element);
370
+ match = ~zepto.qsa(parent, selector).indexOf(element);
371
+ temp && tempParent.removeChild(element);
372
+ return match;
355
373
  };
356
- zepto.matches = function (element, selector) {
357
- if (!selector || !element || element.nodeType !== 1) return false;
358
- var matchesSelector = element.matches || element.webkitMatchesSelector || element.mozMatchesSelector || element.oMatchesSelector || element.matchesSelector;
359
- if (matchesSelector) return matchesSelector.call(element, selector);
360
- // fall back to performing a selector:
361
- var match,
362
- parent = element.parentNode,
363
- temp = !parent;
364
- if (temp) (parent = tempParent).appendChild(element);
365
- match = ~zepto.qsa(parent, selector).indexOf(element);
366
- temp && tempParent.removeChild(element);
367
- return match;
368
- };
369
- function type(obj) {
370
- return obj == null ? String(obj) : class2type[toString.call(obj)] || "object";
371
- }
372
- function isFunction(value) {
373
- return type(value) == "function";
374
- }
375
- function isWindow(obj) {
376
- return obj != null && obj == obj.window;
377
- }
378
- function isDocument(obj) {
379
- return obj != null && obj.nodeType == obj.DOCUMENT_NODE;
380
- }
381
- function isObject(obj) {
382
- return type(obj) == "object";
383
- }
384
- function isPlainObject(obj) {
385
- return isObject(obj) && !isWindow(obj) && Object.getPrototypeOf(obj) == Object.prototype;
386
- }
387
- function likeArray(obj) {
388
- var length = !!obj && 'length' in obj && obj.length,
389
- type = $.type(obj);
390
- return 'function' != type && !isWindow(obj) && ('array' == type || length === 0 || typeof length == 'number' && length > 0 && length - 1 in obj);
391
- }
392
- function compact(array) {
393
- return filter.call(array, function (item) {
394
- return item != null;
395
- });
396
- }
397
- function flatten(array) {
398
- return array.length > 0 ? $.fn.concat.apply([], array) : array;
399
- }
400
- camelize = function (str) {
401
- return str.replace(/-+(.)?/g, function (match, chr) {
402
- return chr ? chr.toUpperCase() : '';
403
- });
404
- };
405
- function dasherize(str) {
406
- return str.replace(/::/g, '/').replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2').replace(/([a-z\d])([A-Z])/g, '$1_$2').replace(/_/g, '-').toLowerCase();
407
- }
408
- uniq = function (array) {
409
- return filter.call(array, function (item, idx) {
410
- return array.indexOf(item) == idx;
411
- });
412
- };
413
- function classRE(name) {
414
- return name in classCache ? classCache[name] : classCache[name] = new RegExp('(^|\\s)' + name + '(\\s|$)');
415
- }
416
- function maybeAddPx(name, value) {
417
- return typeof value == "number" && !cssNumber[dasherize(name)] ? value + "px" : value;
418
- }
419
- function defaultDisplay(nodeName) {
420
- var element, display;
421
- if (!elementDisplay[nodeName]) {
422
- element = document.createElement(nodeName);
423
- document.body.appendChild(element);
424
- display = getComputedStyle(element, '').getPropertyValue("display");
425
- element.parentNode.removeChild(element);
426
- display == "none" && (display = "block");
427
- elementDisplay[nodeName] = display;
428
- }
429
- return elementDisplay[nodeName];
430
- }
431
- function children(element) {
432
- return 'children' in element ? slice.call(element.children) : $.map(element.childNodes, function (node) {
433
- if (node.nodeType == 1) return node;
434
- });
435
- }
436
- function Z(dom, selector) {
437
- var i,
438
- len = dom ? dom.length : 0;
439
- for (i = 0; i < len; i++) this[i] = dom[i];
440
- this.length = len;
441
- this.selector = selector || '';
442
- }
443
-
444
- // `$.zepto.fragment` takes a html string and an optional tag name
445
- // to generate DOM nodes from the given html string.
446
- // The generated DOM nodes are returned as an array.
447
- // This function can be overridden in plugins for example to make
448
- // it compatible with browsers that don't support the DOM fully.
449
- zepto.fragment = function (html, name, properties) {
450
- var dom, nodes, container;
451
-
452
- // A special case optimization for a single tag
453
- if (singleTagRE.test(html)) dom = $(document.createElement(RegExp.$1));
454
- if (!dom) {
455
- if (html.replace) html = html.replace(tagExpanderRE, "<$1></$2>");
456
- if (name === undefined$1) name = fragmentRE.test(html) && RegExp.$1;
457
- if (!(name in containers)) name = '*';
458
- container = containers[name];
459
- container.innerHTML = '' + html;
460
- dom = $.each(slice.call(container.childNodes), function () {
461
- container.removeChild(this);
374
+ function type(obj) {
375
+ return obj == null ? String(obj) : class2type[toString.call(obj)] || "object";
376
+ }
377
+ function isFunction(value) {
378
+ return type(value) == "function";
379
+ }
380
+ function isWindow(obj) {
381
+ return obj != null && obj == obj.window;
382
+ }
383
+ function isDocument(obj) {
384
+ return obj != null && obj.nodeType == obj.DOCUMENT_NODE;
385
+ }
386
+ function isObject(obj) {
387
+ return type(obj) == "object";
388
+ }
389
+ function isPlainObject(obj) {
390
+ return isObject(obj) && !isWindow(obj) && Object.getPrototypeOf(obj) == Object.prototype;
391
+ }
392
+ function likeArray(obj) {
393
+ var length = !!obj && 'length' in obj && obj.length,
394
+ type = $.type(obj);
395
+ return 'function' != type && !isWindow(obj) && ('array' == type || length === 0 || typeof length == 'number' && length > 0 && length - 1 in obj);
396
+ }
397
+ function compact(array) {
398
+ return filter.call(array, function (item) {
399
+ return item != null;
462
400
  });
463
401
  }
464
- if (isPlainObject(properties)) {
465
- nodes = $(dom);
466
- $.each(properties, function (key, value) {
467
- if (methodAttributes.indexOf(key) > -1) nodes[key](value);else nodes.attr(key, value);
402
+ function flatten(array) {
403
+ return array.length > 0 ? $.fn.concat.apply([], array) : array;
404
+ }
405
+ camelize = function (str) {
406
+ return str.replace(/-+(.)?/g, function (match, chr) {
407
+ return chr ? chr.toUpperCase() : '';
468
408
  });
409
+ };
410
+ function dasherize(str) {
411
+ return str.replace(/::/g, '/').replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2').replace(/([a-z\d])([A-Z])/g, '$1_$2').replace(/_/g, '-').toLowerCase();
469
412
  }
470
- return dom;
471
- };
472
-
473
- // `$.zepto.Z` swaps out the prototype of the given `dom` array
474
- // of nodes with `$.fn` and thus supplying all the Zepto functions
475
- // to the array. This method can be overridden in plugins.
476
- zepto.Z = function (dom, selector) {
477
- return new Z(dom, selector);
478
- };
479
-
480
- // `$.zepto.isZ` should return `true` if the given object is a Zepto
481
- // collection. This method can be overridden in plugins.
482
- zepto.isZ = function (object) {
483
- return object instanceof zepto.Z;
484
- };
485
-
486
- // `$.zepto.init` is Zepto's counterpart to jQuery's `$.fn.init` and
487
- // takes a CSS selector and an optional context (and handles various
488
- // special cases).
489
- // This method can be overridden in plugins.
490
- zepto.init = function (selector, context) {
491
- var dom;
492
- // If nothing given, return an empty Zepto collection
493
- if (!selector) return zepto.Z();
494
- // Optimize for string selectors
495
- else if (typeof selector == 'string') {
496
- selector = selector.trim();
497
- // If it's a html fragment, create nodes from it
498
- // Note: In both Chrome 21 and Firefox 15, DOM error 12
499
- // is thrown if the fragment doesn't begin with <
500
- if (selector[0] == '<' && fragmentRE.test(selector)) dom = zepto.fragment(selector, RegExp.$1, context), selector = null;
501
- // If there's a context, create a collection on that context first, and select
502
- // nodes from there
503
- else if (context !== undefined$1) return $(context).find(selector);
504
- // If it's a CSS selector, use it to select nodes.
505
- else dom = zepto.qsa(document, selector);
506
- }
507
- // If a function is given, call it when the DOM is ready
508
- else if (isFunction(selector)) return $(document).ready(selector);
509
- // If a Zepto collection is given, just return it
510
- else if (zepto.isZ(selector)) return selector;else {
511
- // normalize array if an array of nodes is given
512
- if (isArray(selector)) dom = compact(selector);
513
- // Wrap DOM nodes.
514
- else if (isObject(selector)) dom = [selector], selector = null;
515
- // If it's a html fragment, create nodes from it
516
- else if (fragmentRE.test(selector)) dom = zepto.fragment(selector.trim(), RegExp.$1, context), selector = null;
517
- // If there's a context, create a collection on that context first, and select
518
- // nodes from there
519
- else if (context !== undefined$1) return $(context).find(selector);
520
- // And last but no least, if it's a CSS selector, use it to select nodes.
521
- else dom = zepto.qsa(document, selector);
522
- }
523
- // create a new Zepto collection from the nodes found
524
- return zepto.Z(dom, selector);
525
- };
413
+ uniq = function (array) {
414
+ return filter.call(array, function (item, idx) {
415
+ return array.indexOf(item) == idx;
416
+ });
417
+ };
418
+ function classRE(name) {
419
+ return name in classCache ? classCache[name] : classCache[name] = new RegExp('(^|\\s)' + name + '(\\s|$)');
420
+ }
421
+ function maybeAddPx(name, value) {
422
+ return typeof value == "number" && !cssNumber[dasherize(name)] ? value + "px" : value;
423
+ }
424
+ function defaultDisplay(nodeName) {
425
+ var element, display;
426
+ if (!elementDisplay[nodeName]) {
427
+ element = document.createElement(nodeName);
428
+ document.body.appendChild(element);
429
+ display = getComputedStyle(element, '').getPropertyValue("display");
430
+ element.parentNode.removeChild(element);
431
+ display == "none" && (display = "block");
432
+ elementDisplay[nodeName] = display;
433
+ }
434
+ return elementDisplay[nodeName];
435
+ }
436
+ function children(element) {
437
+ return 'children' in element ? slice.call(element.children) : $.map(element.childNodes, function (node) {
438
+ if (node.nodeType == 1) return node;
439
+ });
440
+ }
441
+ function Z(dom, selector) {
442
+ var i,
443
+ len = dom ? dom.length : 0;
444
+ for (i = 0; i < len; i++) this[i] = dom[i];
445
+ this.length = len;
446
+ this.selector = selector || '';
447
+ }
448
+
449
+ // `$.zepto.fragment` takes a html string and an optional tag name
450
+ // to generate DOM nodes from the given html string.
451
+ // The generated DOM nodes are returned as an array.
452
+ // This function can be overridden in plugins for example to make
453
+ // it compatible with browsers that don't support the DOM fully.
454
+ zepto.fragment = function (html, name, properties) {
455
+ var dom, nodes, container;
456
+
457
+ // A special case optimization for a single tag
458
+ if (singleTagRE.test(html)) dom = $(document.createElement(RegExp.$1));
459
+ if (!dom) {
460
+ if (html.replace) html = html.replace(tagExpanderRE, "<$1></$2>");
461
+ if (name === undefined$1) name = fragmentRE.test(html) && RegExp.$1;
462
+ if (!(name in containers)) name = '*';
463
+ container = containers[name];
464
+ container.innerHTML = '' + html;
465
+ dom = $.each(slice.call(container.childNodes), function () {
466
+ container.removeChild(this);
467
+ });
468
+ }
469
+ if (isPlainObject(properties)) {
470
+ nodes = $(dom);
471
+ $.each(properties, function (key, value) {
472
+ if (methodAttributes.indexOf(key) > -1) nodes[key](value);else nodes.attr(key, value);
473
+ });
474
+ }
475
+ return dom;
476
+ };
526
477
 
527
- // `$` will be the base `Zepto` object. When calling this
528
- // function just call `$.zepto.init, which makes the implementation
529
- // details of selecting nodes and creating Zepto collections
530
- // patchable in plugins.
531
- $ = function (selector, context) {
532
- return zepto.init(selector, context);
533
- };
534
- function extend(target, source, deep) {
535
- for (key in source) if (deep && (isPlainObject(source[key]) || isArray(source[key]))) {
536
- if (isPlainObject(source[key]) && !isPlainObject(target[key])) target[key] = {};
537
- if (isArray(source[key]) && !isArray(target[key])) target[key] = [];
538
- extend(target[key], source[key], deep);
539
- } else if (source[key] !== undefined$1) target[key] = source[key];
540
- }
478
+ // `$.zepto.Z` swaps out the prototype of the given `dom` array
479
+ // of nodes with `$.fn` and thus supplying all the Zepto functions
480
+ // to the array. This method can be overridden in plugins.
481
+ zepto.Z = function (dom, selector) {
482
+ return new Z(dom, selector);
483
+ };
541
484
 
542
- // Copy all but undefined properties from one or more
543
- // objects to the `target` object.
544
- $.extend = function (target) {
545
- var deep,
546
- args = slice.call(arguments, 1);
547
- if (typeof target == 'boolean') {
548
- deep = target;
549
- target = args.shift();
550
- }
551
- args.forEach(function (arg) {
552
- extend(target, arg, deep);
553
- });
554
- return target;
555
- };
485
+ // `$.zepto.isZ` should return `true` if the given object is a Zepto
486
+ // collection. This method can be overridden in plugins.
487
+ zepto.isZ = function (object) {
488
+ return object instanceof zepto.Z;
489
+ };
556
490
 
557
- // `$.zepto.qsa` is Zepto's CSS selector implementation which
558
- // uses `document.querySelectorAll` and optimizes for some special cases, like `#id`.
559
- // This method can be overridden in plugins.
560
- zepto.qsa = function (element, selector) {
561
- var found,
562
- maybeID = selector[0] == '#',
563
- maybeClass = !maybeID && selector[0] == '.',
564
- nameOnly = maybeID || maybeClass ? selector.slice(1) : selector,
565
- // Ensure that a 1 char tag name still gets checked
566
- isSimple = simpleSelectorRE.test(nameOnly);
567
- return element.getElementById && isSimple && maybeID ?
568
- // Safari DocumentFragment doesn't have getElementById
569
- (found = element.getElementById(nameOnly)) ? [found] : [] : element.nodeType !== 1 && element.nodeType !== 9 && element.nodeType !== 11 ? [] : slice.call(isSimple && !maybeID && element.getElementsByClassName ?
570
- // DocumentFragment doesn't have getElementsByClassName/TagName
571
- maybeClass ? element.getElementsByClassName(nameOnly) :
572
- // If it's simple, it could be a class
573
- element.getElementsByTagName(selector) :
574
- // Or a tag
575
- element.querySelectorAll(selector) // Or it's not simple, and we need to query all
576
- );
577
- };
578
- function filtered(nodes, selector) {
579
- return selector == null ? $(nodes) : $(nodes).filter(selector);
580
- }
581
- $.contains = document.documentElement.contains ? function (parent, node) {
582
- return parent !== node && parent.contains(node);
583
- } : function (parent, node) {
584
- while (node && (node = node.parentNode)) if (node === parent) return true;
585
- return false;
586
- };
587
- function funcArg(context, arg, idx, payload) {
588
- return isFunction(arg) ? arg.call(context, idx, payload) : arg;
589
- }
590
- function setAttribute(node, name, value) {
591
- value == null ? node.removeAttribute(name) : node.setAttribute(name, value);
592
- }
491
+ // `$.zepto.init` is Zepto's counterpart to jQuery's `$.fn.init` and
492
+ // takes a CSS selector and an optional context (and handles various
493
+ // special cases).
494
+ // This method can be overridden in plugins.
495
+ zepto.init = function (selector, context) {
496
+ var dom;
497
+ // If nothing given, return an empty Zepto collection
498
+ if (!selector) return zepto.Z();
499
+ // Optimize for string selectors
500
+ else if (typeof selector == 'string') {
501
+ selector = selector.trim();
502
+ // If it's a html fragment, create nodes from it
503
+ // Note: In both Chrome 21 and Firefox 15, DOM error 12
504
+ // is thrown if the fragment doesn't begin with <
505
+ if (selector[0] == '<' && fragmentRE.test(selector)) dom = zepto.fragment(selector, RegExp.$1, context), selector = null;
506
+ // If there's a context, create a collection on that context first, and select
507
+ // nodes from there
508
+ else if (context !== undefined$1) return $(context).find(selector);
509
+ // If it's a CSS selector, use it to select nodes.
510
+ else dom = zepto.qsa(document, selector);
511
+ }
512
+ // If a function is given, call it when the DOM is ready
513
+ else if (isFunction(selector)) return $(document).ready(selector);
514
+ // If a Zepto collection is given, just return it
515
+ else if (zepto.isZ(selector)) return selector;else {
516
+ // normalize array if an array of nodes is given
517
+ if (isArray(selector)) dom = compact(selector);
518
+ // Wrap DOM nodes.
519
+ else if (isObject(selector)) dom = [selector], selector = null;
520
+ // If it's a html fragment, create nodes from it
521
+ else if (fragmentRE.test(selector)) dom = zepto.fragment(selector.trim(), RegExp.$1, context), selector = null;
522
+ // If there's a context, create a collection on that context first, and select
523
+ // nodes from there
524
+ else if (context !== undefined$1) return $(context).find(selector);
525
+ // And last but no least, if it's a CSS selector, use it to select nodes.
526
+ else dom = zepto.qsa(document, selector);
527
+ }
528
+ // create a new Zepto collection from the nodes found
529
+ return zepto.Z(dom, selector);
530
+ };
593
531
 
594
- // access className property while respecting SVGAnimatedString
595
- function className(node, value) {
596
- var klass = node.className || '',
597
- svg = klass && klass.baseVal !== undefined$1;
598
- if (value === undefined$1) return svg ? klass.baseVal : klass;
599
- svg ? klass.baseVal = value : node.className = value;
600
- }
532
+ // `$` will be the base `Zepto` object. When calling this
533
+ // function just call `$.zepto.init, which makes the implementation
534
+ // details of selecting nodes and creating Zepto collections
535
+ // patchable in plugins.
536
+ $ = function (selector, context) {
537
+ return zepto.init(selector, context);
538
+ };
539
+ function extend(target, source, deep) {
540
+ for (key in source) if (deep && (isPlainObject(source[key]) || isArray(source[key]))) {
541
+ if (isPlainObject(source[key]) && !isPlainObject(target[key])) target[key] = {};
542
+ if (isArray(source[key]) && !isArray(target[key])) target[key] = [];
543
+ extend(target[key], source[key], deep);
544
+ } else if (source[key] !== undefined$1) target[key] = source[key];
545
+ }
546
+
547
+ // Copy all but undefined properties from one or more
548
+ // objects to the `target` object.
549
+ $.extend = function (target) {
550
+ var deep,
551
+ args = slice.call(arguments, 1);
552
+ if (typeof target == 'boolean') {
553
+ deep = target;
554
+ target = args.shift();
555
+ }
556
+ args.forEach(function (arg) {
557
+ extend(target, arg, deep);
558
+ });
559
+ return target;
560
+ };
601
561
 
602
- // "true" => true
603
- // "false" => false
604
- // "null" => null
605
- // "42" => 42
606
- // "42.5" => 42.5
607
- // "08" => "08"
608
- // JSON => parse if valid
609
- // String => self
610
- function deserializeValue(value) {
611
- try {
612
- return value ? value == "true" || (value == "false" ? false : value == "null" ? null : +value + "" == value ? +value : /^[\[\{]/.test(value) ? $.parseJSON(value) : value) : value;
613
- } catch (e) {
614
- return value;
562
+ // `$.zepto.qsa` is Zepto's CSS selector implementation which
563
+ // uses `document.querySelectorAll` and optimizes for some special cases, like `#id`.
564
+ // This method can be overridden in plugins.
565
+ zepto.qsa = function (element, selector) {
566
+ var found,
567
+ maybeID = selector[0] == '#',
568
+ maybeClass = !maybeID && selector[0] == '.',
569
+ nameOnly = maybeID || maybeClass ? selector.slice(1) : selector,
570
+ // Ensure that a 1 char tag name still gets checked
571
+ isSimple = simpleSelectorRE.test(nameOnly);
572
+ return element.getElementById && isSimple && maybeID ?
573
+ // Safari DocumentFragment doesn't have getElementById
574
+ (found = element.getElementById(nameOnly)) ? [found] : [] : element.nodeType !== 1 && element.nodeType !== 9 && element.nodeType !== 11 ? [] : slice.call(isSimple && !maybeID && element.getElementsByClassName ?
575
+ // DocumentFragment doesn't have getElementsByClassName/TagName
576
+ maybeClass ? element.getElementsByClassName(nameOnly) :
577
+ // If it's simple, it could be a class
578
+ element.getElementsByTagName(selector) :
579
+ // Or a tag
580
+ element.querySelectorAll(selector) // Or it's not simple, and we need to query all
581
+ );
582
+ };
583
+ function filtered(nodes, selector) {
584
+ return selector == null ? $(nodes) : $(nodes).filter(selector);
615
585
  }
616
- }
617
- $.type = type;
618
- $.isFunction = isFunction;
619
- $.isWindow = isWindow;
620
- $.isArray = isArray;
621
- $.isPlainObject = isPlainObject;
622
- $.isEmptyObject = function (obj) {
623
- var name;
624
- for (name in obj) return false;
625
- return true;
626
- };
627
- $.isNumeric = function (val) {
628
- var num = Number(val),
629
- type = typeof val;
630
- return val != null && type != 'boolean' && (type != 'string' || val.length) && !isNaN(num) && isFinite(num) || false;
631
- };
632
- $.inArray = function (elem, array, i) {
633
- return emptyArray.indexOf.call(array, elem, i);
634
- };
635
- $.camelCase = camelize;
636
- $.trim = function (str) {
637
- return str == null ? "" : String.prototype.trim.call(str);
638
- };
639
-
640
- // plugin compatibility
641
- $.uuid = 0;
642
- $.support = {};
643
- $.expr = {};
644
- $.noop = function () {};
645
- $.map = function (elements, callback) {
646
- var value,
647
- values = [],
648
- i,
649
- key;
650
- if (likeArray(elements)) for (i = 0; i < elements.length; i++) {
651
- value = callback(elements[i], i);
652
- if (value != null) values.push(value);
653
- } else for (key in elements) {
654
- value = callback(elements[key], key);
655
- if (value != null) values.push(value);
656
- }
657
- return flatten(values);
658
- };
659
- $.each = function (elements, callback) {
660
- var i, key;
661
- if (likeArray(elements)) {
662
- for (i = 0; i < elements.length; i++) if (callback.call(elements[i], i, elements[i]) === false) return elements;
663
- } else {
664
- for (key in elements) if (callback.call(elements[key], key, elements[key]) === false) return elements;
586
+ $.contains = document.documentElement.contains ? function (parent, node) {
587
+ return parent !== node && parent.contains(node);
588
+ } : function (parent, node) {
589
+ while (node && (node = node.parentNode)) if (node === parent) return true;
590
+ return false;
591
+ };
592
+ function funcArg(context, arg, idx, payload) {
593
+ return isFunction(arg) ? arg.call(context, idx, payload) : arg;
594
+ }
595
+ function setAttribute(node, name, value) {
596
+ value == null ? node.removeAttribute(name) : node.setAttribute(name, value);
597
+ }
598
+
599
+ // access className property while respecting SVGAnimatedString
600
+ function className(node, value) {
601
+ var klass = node.className || '',
602
+ svg = klass && klass.baseVal !== undefined$1;
603
+ if (value === undefined$1) return svg ? klass.baseVal : klass;
604
+ svg ? klass.baseVal = value : node.className = value;
605
+ }
606
+
607
+ // "true" => true
608
+ // "false" => false
609
+ // "null" => null
610
+ // "42" => 42
611
+ // "42.5" => 42.5
612
+ // "08" => "08"
613
+ // JSON => parse if valid
614
+ // String => self
615
+ function deserializeValue(value) {
616
+ try {
617
+ return value ? value == "true" || (value == "false" ? false : value == "null" ? null : +value + "" == value ? +value : /^[\[\{]/.test(value) ? $.parseJSON(value) : value) : value;
618
+ } catch (e) {
619
+ return value;
620
+ }
665
621
  }
666
- return elements;
667
- };
668
- $.grep = function (elements, callback) {
669
- return filter.call(elements, callback);
670
- };
671
- if (window.JSON) $.parseJSON = JSON.parse;
672
-
673
- // Populate the class2type map
674
- $.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function (i, name) {
675
- class2type["[object " + name + "]"] = name.toLowerCase();
676
- });
622
+ $.type = type;
623
+ $.isFunction = isFunction;
624
+ $.isWindow = isWindow;
625
+ $.isArray = isArray;
626
+ $.isPlainObject = isPlainObject;
627
+ $.isEmptyObject = function (obj) {
628
+ var name;
629
+ for (name in obj) return false;
630
+ return true;
631
+ };
632
+ $.isNumeric = function (val) {
633
+ var num = Number(val),
634
+ type = typeof val;
635
+ return val != null && type != 'boolean' && (type != 'string' || val.length) && !isNaN(num) && isFinite(num) || false;
636
+ };
637
+ $.inArray = function (elem, array, i) {
638
+ return emptyArray.indexOf.call(array, elem, i);
639
+ };
640
+ $.camelCase = camelize;
641
+ $.trim = function (str) {
642
+ return str == null ? "" : String.prototype.trim.call(str);
643
+ };
677
644
 
678
- // Define methods that will be available on all
679
- // Zepto collections
680
- $.fn = {
681
- constructor: zepto.Z,
682
- length: 0,
683
- // Because a collection acts like an array
684
- // copy over these useful array functions.
685
- forEach: emptyArray.forEach,
686
- reduce: emptyArray.reduce,
687
- push: emptyArray.push,
688
- sort: emptyArray.sort,
689
- splice: emptyArray.splice,
690
- indexOf: emptyArray.indexOf,
691
- concat: function () {
692
- var i,
693
- value,
694
- args = [];
695
- for (i = 0; i < arguments.length; i++) {
696
- value = arguments[i];
697
- args[i] = zepto.isZ(value) ? value.toArray() : value;
645
+ // plugin compatibility
646
+ $.uuid = 0;
647
+ $.support = {};
648
+ $.expr = {};
649
+ $.noop = function () {};
650
+ $.map = function (elements, callback) {
651
+ var value,
652
+ values = [],
653
+ i,
654
+ key;
655
+ if (likeArray(elements)) for (i = 0; i < elements.length; i++) {
656
+ value = callback(elements[i], i);
657
+ if (value != null) values.push(value);
658
+ } else for (key in elements) {
659
+ value = callback(elements[key], key);
660
+ if (value != null) values.push(value);
661
+ }
662
+ return flatten(values);
663
+ };
664
+ $.each = function (elements, callback) {
665
+ var i, key;
666
+ if (likeArray(elements)) {
667
+ for (i = 0; i < elements.length; i++) if (callback.call(elements[i], i, elements[i]) === false) return elements;
668
+ } else {
669
+ for (key in elements) if (callback.call(elements[key], key, elements[key]) === false) return elements;
698
670
  }
699
- return concat.apply(zepto.isZ(this) ? this.toArray() : this, args);
700
- },
701
- // `map` and `slice` in the jQuery API work differently
702
- // from their array counterparts
703
- map: function (fn) {
704
- return $($.map(this, function (el, i) {
705
- return fn.call(el, i, el);
706
- }));
707
- },
708
- slice: function () {
709
- return $(slice.apply(this, arguments));
710
- },
711
- ready: function (callback) {
712
- // need to check if document.body exists for IE as that browser reports
713
- // document ready when it hasn't yet created the body element
714
- if (readyRE.test(document.readyState) && document.body) callback($);else document.addEventListener('DOMContentLoaded', function () {
715
- callback($);
716
- }, false);
717
- return this;
718
- },
719
- get: function (idx) {
720
- return idx === undefined$1 ? slice.call(this) : this[idx >= 0 ? idx : idx + this.length];
721
- },
722
- toArray: function () {
723
- return this.get();
724
- },
725
- size: function () {
726
- return this.length;
727
- },
728
- remove: function () {
729
- return this.each(function () {
730
- if (this.parentNode != null) this.parentNode.removeChild(this);
731
- });
732
- },
733
- each: function (callback) {
734
- emptyArray.every.call(this, function (el, idx) {
735
- return callback.call(el, idx, el) !== false;
736
- });
737
- return this;
738
- },
739
- filter: function (selector) {
740
- if (isFunction(selector)) return this.not(this.not(selector));
741
- return $(filter.call(this, function (element) {
742
- return zepto.matches(element, selector);
743
- }));
744
- },
745
- add: function (selector, context) {
746
- return $(uniq(this.concat($(selector, context))));
747
- },
748
- is: function (selector) {
749
- return this.length > 0 && zepto.matches(this[0], selector);
750
- },
751
- not: function (selector) {
752
- var nodes = [];
753
- if (isFunction(selector) && selector.call !== undefined$1) this.each(function (idx) {
754
- if (!selector.call(this, idx)) nodes.push(this);
755
- });else {
756
- var excludes = typeof selector == 'string' ? this.filter(selector) : likeArray(selector) && isFunction(selector.item) ? slice.call(selector) : $(selector);
757
- this.forEach(function (el) {
758
- if (excludes.indexOf(el) < 0) nodes.push(el);
671
+ return elements;
672
+ };
673
+ $.grep = function (elements, callback) {
674
+ return filter.call(elements, callback);
675
+ };
676
+ if (window.JSON) $.parseJSON = JSON.parse;
677
+
678
+ // Populate the class2type map
679
+ $.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function (i, name) {
680
+ class2type["[object " + name + "]"] = name.toLowerCase();
681
+ });
682
+
683
+ // Define methods that will be available on all
684
+ // Zepto collections
685
+ $.fn = {
686
+ constructor: zepto.Z,
687
+ length: 0,
688
+ // Because a collection acts like an array
689
+ // copy over these useful array functions.
690
+ forEach: emptyArray.forEach,
691
+ reduce: emptyArray.reduce,
692
+ push: emptyArray.push,
693
+ sort: emptyArray.sort,
694
+ splice: emptyArray.splice,
695
+ indexOf: emptyArray.indexOf,
696
+ concat: function () {
697
+ var i,
698
+ value,
699
+ args = [];
700
+ for (i = 0; i < arguments.length; i++) {
701
+ value = arguments[i];
702
+ args[i] = zepto.isZ(value) ? value.toArray() : value;
703
+ }
704
+ return concat.apply(zepto.isZ(this) ? this.toArray() : this, args);
705
+ },
706
+ // `map` and `slice` in the jQuery API work differently
707
+ // from their array counterparts
708
+ map: function (fn) {
709
+ return $($.map(this, function (el, i) {
710
+ return fn.call(el, i, el);
711
+ }));
712
+ },
713
+ slice: function () {
714
+ return $(slice.apply(this, arguments));
715
+ },
716
+ ready: function (callback) {
717
+ // need to check if document.body exists for IE as that browser reports
718
+ // document ready when it hasn't yet created the body element
719
+ if (readyRE.test(document.readyState) && document.body) callback($);else document.addEventListener('DOMContentLoaded', function () {
720
+ callback($);
721
+ }, false);
722
+ return this;
723
+ },
724
+ get: function (idx) {
725
+ return idx === undefined$1 ? slice.call(this) : this[idx >= 0 ? idx : idx + this.length];
726
+ },
727
+ toArray: function () {
728
+ return this.get();
729
+ },
730
+ size: function () {
731
+ return this.length;
732
+ },
733
+ remove: function () {
734
+ return this.each(function () {
735
+ if (this.parentNode != null) this.parentNode.removeChild(this);
759
736
  });
760
- }
761
- return $(nodes);
762
- },
763
- has: function (selector) {
764
- return this.filter(function () {
765
- return isObject(selector) ? $.contains(this, selector) : $(this).find(selector).size();
766
- });
767
- },
768
- eq: function (idx) {
769
- return idx === -1 ? this.slice(idx) : this.slice(idx, +idx + 1);
770
- },
771
- first: function () {
772
- var el = this[0];
773
- return el && !isObject(el) ? el : $(el);
774
- },
775
- last: function () {
776
- var el = this[this.length - 1];
777
- return el && !isObject(el) ? el : $(el);
778
- },
779
- find: function (selector) {
780
- var result,
781
- $this = this;
782
- if (!selector) result = $();else if (typeof selector == 'object') result = $(selector).filter(function () {
783
- var node = this;
784
- return emptyArray.some.call($this, function (parent) {
785
- return $.contains(parent, node);
737
+ },
738
+ each: function (callback) {
739
+ emptyArray.every.call(this, function (el, idx) {
740
+ return callback.call(el, idx, el) !== false;
786
741
  });
787
- });else if (this.length == 1) result = $(zepto.qsa(this[0], selector));else result = this.map(function () {
788
- return zepto.qsa(this, selector);
789
- });
790
- return result;
791
- },
792
- closest: function (selector, context) {
793
- var nodes = [],
794
- collection = typeof selector == 'object' && $(selector);
795
- this.each(function (_, node) {
796
- while (node && !(collection ? collection.indexOf(node) >= 0 : zepto.matches(node, selector))) node = node !== context && !isDocument(node) && node.parentNode;
797
- if (node && nodes.indexOf(node) < 0) nodes.push(node);
798
- });
799
- return $(nodes);
800
- },
801
- parents: function (selector) {
802
- var ancestors = [],
803
- nodes = this;
804
- while (nodes.length > 0) nodes = $.map(nodes, function (node) {
805
- if ((node = node.parentNode) && !isDocument(node) && ancestors.indexOf(node) < 0) {
806
- ancestors.push(node);
807
- return node;
742
+ return this;
743
+ },
744
+ filter: function (selector) {
745
+ if (isFunction(selector)) return this.not(this.not(selector));
746
+ return $(filter.call(this, function (element) {
747
+ return zepto.matches(element, selector);
748
+ }));
749
+ },
750
+ add: function (selector, context) {
751
+ return $(uniq(this.concat($(selector, context))));
752
+ },
753
+ is: function (selector) {
754
+ return this.length > 0 && zepto.matches(this[0], selector);
755
+ },
756
+ not: function (selector) {
757
+ var nodes = [];
758
+ if (isFunction(selector) && selector.call !== undefined$1) this.each(function (idx) {
759
+ if (!selector.call(this, idx)) nodes.push(this);
760
+ });else {
761
+ var excludes = typeof selector == 'string' ? this.filter(selector) : likeArray(selector) && isFunction(selector.item) ? slice.call(selector) : $(selector);
762
+ this.forEach(function (el) {
763
+ if (excludes.indexOf(el) < 0) nodes.push(el);
764
+ });
808
765
  }
809
- });
810
- return filtered(ancestors, selector);
811
- },
812
- parent: function (selector) {
813
- return filtered(uniq(this.pluck('parentNode')), selector);
814
- },
815
- children: function (selector) {
816
- return filtered(this.map(function () {
817
- return children(this);
818
- }), selector);
819
- },
820
- contents: function () {
821
- return this.map(function () {
822
- return this.contentDocument || slice.call(this.childNodes);
823
- });
824
- },
825
- siblings: function (selector) {
826
- return filtered(this.map(function (i, el) {
827
- return filter.call(children(el.parentNode), function (child) {
828
- return child !== el;
766
+ return $(nodes);
767
+ },
768
+ has: function (selector) {
769
+ return this.filter(function () {
770
+ return isObject(selector) ? $.contains(this, selector) : $(this).find(selector).size();
829
771
  });
830
- }), selector);
831
- },
832
- empty: function () {
833
- return this.each(function () {
834
- this.innerHTML = '';
835
- });
836
- },
837
- // `pluck` is borrowed from Prototype.js
838
- pluck: function (property) {
839
- return $.map(this, function (el) {
840
- return el[property];
841
- });
842
- },
843
- show: function () {
844
- return this.each(function () {
845
- this.style.display == "none" && (this.style.display = '');
846
- if (getComputedStyle(this, '').getPropertyValue("display") == "none") this.style.display = defaultDisplay(this.nodeName);
847
- });
848
- },
849
- replaceWith: function (newContent) {
850
- return this.before(newContent).remove();
851
- },
852
- wrap: function (structure) {
853
- var func = isFunction(structure);
854
- if (this[0] && !func) var dom = $(structure).get(0),
855
- clone = dom.parentNode || this.length > 1;
856
- return this.each(function (index) {
857
- $(this).wrapAll(func ? structure.call(this, index) : clone ? dom.cloneNode(true) : dom);
858
- });
859
- },
860
- wrapAll: function (structure) {
861
- if (this[0]) {
862
- $(this[0]).before(structure = $(structure));
863
- var children;
864
- // drill down to the inmost element
865
- while ((children = structure.children()).length) structure = children.first();
866
- $(structure).append(this);
867
- }
868
- return this;
869
- },
870
- wrapInner: function (structure) {
871
- var func = isFunction(structure);
872
- return this.each(function (index) {
873
- var self = $(this),
874
- contents = self.contents(),
875
- dom = func ? structure.call(this, index) : structure;
876
- contents.length ? contents.wrapAll(dom) : self.append(dom);
877
- });
878
- },
879
- unwrap: function () {
880
- this.parent().each(function () {
881
- $(this).replaceWith($(this).children());
882
- });
883
- return this;
884
- },
885
- clone: function () {
886
- return this.map(function () {
887
- return this.cloneNode(true);
888
- });
889
- },
890
- hide: function () {
891
- return this.css("display", "none");
892
- },
893
- toggle: function (setting) {
894
- return this.each(function () {
895
- var el = $(this);
896
- (setting === undefined$1 ? el.css("display") == "none" : setting) ? el.show() : el.hide();
897
- });
898
- },
899
- prev: function (selector) {
900
- return $(this.pluck('previousElementSibling')).filter(selector || '*');
901
- },
902
- next: function (selector) {
903
- return $(this.pluck('nextElementSibling')).filter(selector || '*');
904
- },
905
- html: function (html) {
906
- return 0 in arguments ? this.each(function (idx) {
907
- var originHtml = this.innerHTML;
908
- $(this).empty().append(funcArg(this, html, idx, originHtml));
909
- }) : 0 in this ? this[0].innerHTML : null;
910
- },
911
- text: function (text) {
912
- return 0 in arguments ? this.each(function (idx) {
913
- var newText = funcArg(this, text, idx, this.textContent);
914
- this.textContent = newText == null ? '' : '' + newText;
915
- }) : 0 in this ? this.pluck('textContent').join("") : null;
916
- },
917
- attr: function (name, value) {
918
- var result;
919
- return typeof name == 'string' && !(1 in arguments) ? 0 in this && this[0].nodeType == 1 && (result = this[0].getAttribute(name)) != null ? result : undefined$1 : this.each(function (idx) {
920
- if (this.nodeType !== 1) return;
921
- if (isObject(name)) for (key in name) setAttribute(this, key, name[key]);else setAttribute(this, name, funcArg(this, value, idx, this.getAttribute(name)));
922
- });
923
- },
924
- removeAttr: function (name) {
925
- return this.each(function () {
926
- this.nodeType === 1 && name.split(' ').forEach(function (attribute) {
927
- setAttribute(this, attribute);
928
- }, this);
929
- });
930
- },
931
- prop: function (name, value) {
932
- name = propMap[name] || name;
933
- return 1 in arguments ? this.each(function (idx) {
934
- this[name] = funcArg(this, value, idx, this[name]);
935
- }) : this[0] && this[0][name];
936
- },
937
- removeProp: function (name) {
938
- name = propMap[name] || name;
939
- return this.each(function () {
940
- delete this[name];
941
- });
942
- },
943
- data: function (name, value) {
944
- var attrName = 'data-' + name.replace(capitalRE, '-$1').toLowerCase();
945
- var data = 1 in arguments ? this.attr(attrName, value) : this.attr(attrName);
946
- return data !== null ? deserializeValue(data) : undefined$1;
947
- },
948
- val: function (value) {
949
- if (0 in arguments) {
950
- if (value == null) value = "";
951
- return this.each(function (idx) {
952
- this.value = funcArg(this, value, idx, this.value);
772
+ },
773
+ eq: function (idx) {
774
+ return idx === -1 ? this.slice(idx) : this.slice(idx, +idx + 1);
775
+ },
776
+ first: function () {
777
+ var el = this[0];
778
+ return el && !isObject(el) ? el : $(el);
779
+ },
780
+ last: function () {
781
+ var el = this[this.length - 1];
782
+ return el && !isObject(el) ? el : $(el);
783
+ },
784
+ find: function (selector) {
785
+ var result,
786
+ $this = this;
787
+ if (!selector) result = $();else if (typeof selector == 'object') result = $(selector).filter(function () {
788
+ var node = this;
789
+ return emptyArray.some.call($this, function (parent) {
790
+ return $.contains(parent, node);
791
+ });
792
+ });else if (this.length == 1) result = $(zepto.qsa(this[0], selector));else result = this.map(function () {
793
+ return zepto.qsa(this, selector);
953
794
  });
954
- } else {
955
- return this[0] && (this[0].multiple ? $(this[0]).find('option').filter(function () {
956
- return this.selected;
957
- }).pluck('value') : this[0].value);
958
- }
959
- },
960
- offset: function (coordinates) {
961
- if (coordinates) return this.each(function (index) {
962
- var $this = $(this),
963
- coords = funcArg(this, coordinates, index, $this.offset()),
964
- parentOffset = $this.offsetParent().offset(),
965
- props = {
966
- top: coords.top - parentOffset.top,
967
- left: coords.left - parentOffset.left
968
- };
969
- if ($this.css('position') == 'static') props['position'] = 'relative';
970
- $this.css(props);
971
- });
972
- if (!this.length) return null;
973
- if (document.documentElement !== this[0] && !$.contains(document.documentElement, this[0])) return {
974
- top: 0,
975
- left: 0
976
- };
977
- var obj = this[0].getBoundingClientRect();
978
- return {
979
- left: obj.left + window.pageXOffset,
980
- top: obj.top + window.pageYOffset,
981
- width: Math.round(obj.width),
982
- height: Math.round(obj.height)
983
- };
984
- },
985
- css: function (property, value) {
986
- if (arguments.length < 2) {
987
- var element = this[0];
988
- if (typeof property == 'string') {
989
- if (!element) return;
990
- return element.style[camelize(property)] || getComputedStyle(element, '').getPropertyValue(property);
991
- } else if (isArray(property)) {
992
- if (!element) return;
993
- var props = {};
994
- var computedStyle = getComputedStyle(element, '');
995
- $.each(property, function (_, prop) {
996
- props[prop] = element.style[camelize(prop)] || computedStyle.getPropertyValue(prop);
795
+ return result;
796
+ },
797
+ closest: function (selector, context) {
798
+ var nodes = [],
799
+ collection = typeof selector == 'object' && $(selector);
800
+ this.each(function (_, node) {
801
+ while (node && !(collection ? collection.indexOf(node) >= 0 : zepto.matches(node, selector))) node = node !== context && !isDocument(node) && node.parentNode;
802
+ if (node && nodes.indexOf(node) < 0) nodes.push(node);
803
+ });
804
+ return $(nodes);
805
+ },
806
+ parents: function (selector) {
807
+ var ancestors = [],
808
+ nodes = this;
809
+ while (nodes.length > 0) nodes = $.map(nodes, function (node) {
810
+ if ((node = node.parentNode) && !isDocument(node) && ancestors.indexOf(node) < 0) {
811
+ ancestors.push(node);
812
+ return node;
813
+ }
814
+ });
815
+ return filtered(ancestors, selector);
816
+ },
817
+ parent: function (selector) {
818
+ return filtered(uniq(this.pluck('parentNode')), selector);
819
+ },
820
+ children: function (selector) {
821
+ return filtered(this.map(function () {
822
+ return children(this);
823
+ }), selector);
824
+ },
825
+ contents: function () {
826
+ return this.map(function () {
827
+ return this.contentDocument || slice.call(this.childNodes);
828
+ });
829
+ },
830
+ siblings: function (selector) {
831
+ return filtered(this.map(function (i, el) {
832
+ return filter.call(children(el.parentNode), function (child) {
833
+ return child !== el;
997
834
  });
998
- return props;
835
+ }), selector);
836
+ },
837
+ empty: function () {
838
+ return this.each(function () {
839
+ this.innerHTML = '';
840
+ });
841
+ },
842
+ // `pluck` is borrowed from Prototype.js
843
+ pluck: function (property) {
844
+ return $.map(this, function (el) {
845
+ return el[property];
846
+ });
847
+ },
848
+ show: function () {
849
+ return this.each(function () {
850
+ this.style.display == "none" && (this.style.display = '');
851
+ if (getComputedStyle(this, '').getPropertyValue("display") == "none") this.style.display = defaultDisplay(this.nodeName);
852
+ });
853
+ },
854
+ replaceWith: function (newContent) {
855
+ return this.before(newContent).remove();
856
+ },
857
+ wrap: function (structure) {
858
+ var func = isFunction(structure);
859
+ if (this[0] && !func) var dom = $(structure).get(0),
860
+ clone = dom.parentNode || this.length > 1;
861
+ return this.each(function (index) {
862
+ $(this).wrapAll(func ? structure.call(this, index) : clone ? dom.cloneNode(true) : dom);
863
+ });
864
+ },
865
+ wrapAll: function (structure) {
866
+ if (this[0]) {
867
+ $(this[0]).before(structure = $(structure));
868
+ var children;
869
+ // drill down to the inmost element
870
+ while ((children = structure.children()).length) structure = children.first();
871
+ $(structure).append(this);
999
872
  }
1000
- }
1001
- var css = '';
1002
- if (type(property) == 'string') {
1003
- if (!value && value !== 0) this.each(function () {
1004
- this.style.removeProperty(dasherize(property));
1005
- });else css = dasherize(property) + ":" + maybeAddPx(property, value);
1006
- } else {
1007
- for (key in property) if (!property[key] && property[key] !== 0) this.each(function () {
1008
- this.style.removeProperty(dasherize(key));
1009
- });else css += dasherize(key) + ':' + maybeAddPx(key, property[key]) + ';';
1010
- }
1011
- return this.each(function () {
1012
- this.style.cssText += ';' + css;
1013
- });
1014
- },
1015
- index: function (element) {
1016
- return element ? this.indexOf($(element)[0]) : this.parent().children().indexOf(this[0]);
1017
- },
1018
- hasClass: function (name) {
1019
- if (!name) return false;
1020
- return emptyArray.some.call(this, function (el) {
1021
- return this.test(className(el));
1022
- }, classRE(name));
1023
- },
1024
- addClass: function (name) {
1025
- if (!name) return this;
1026
- return this.each(function (idx) {
1027
- if (!('className' in this)) return;
1028
- classList = [];
1029
- var cls = className(this),
1030
- newName = funcArg(this, name, idx, cls);
1031
- newName.split(/\s+/g).forEach(function (klass) {
1032
- if (!$(this).hasClass(klass)) classList.push(klass);
1033
- }, this);
1034
- classList.length && className(this, cls + (cls ? " " : "") + classList.join(" "));
1035
- });
1036
- },
1037
- removeClass: function (name) {
1038
- return this.each(function (idx) {
1039
- if (!('className' in this)) return;
1040
- if (name === undefined$1) return className(this, '');
1041
- classList = className(this);
1042
- funcArg(this, name, idx, classList).split(/\s+/g).forEach(function (klass) {
1043
- classList = classList.replace(classRE(klass), " ");
873
+ return this;
874
+ },
875
+ wrapInner: function (structure) {
876
+ var func = isFunction(structure);
877
+ return this.each(function (index) {
878
+ var self = $(this),
879
+ contents = self.contents(),
880
+ dom = func ? structure.call(this, index) : structure;
881
+ contents.length ? contents.wrapAll(dom) : self.append(dom);
1044
882
  });
1045
- className(this, classList.trim());
1046
- });
1047
- },
1048
- toggleClass: function (name, when) {
1049
- if (!name) return this;
1050
- return this.each(function (idx) {
1051
- var $this = $(this),
1052
- names = funcArg(this, name, idx, className(this));
1053
- names.split(/\s+/g).forEach(function (klass) {
1054
- (when === undefined$1 ? !$this.hasClass(klass) : when) ? $this.addClass(klass) : $this.removeClass(klass);
883
+ },
884
+ unwrap: function () {
885
+ this.parent().each(function () {
886
+ $(this).replaceWith($(this).children());
1055
887
  });
1056
- });
1057
- },
1058
- scrollTop: function (value) {
1059
- if (!this.length) return;
1060
- var hasScrollTop = 'scrollTop' in this[0];
1061
- if (value === undefined$1) return hasScrollTop ? this[0].scrollTop : this[0].pageYOffset;
1062
- return this.each(hasScrollTop ? function () {
1063
- this.scrollTop = value;
1064
- } : function () {
1065
- this.scrollTo(this.scrollX, value);
1066
- });
1067
- },
1068
- scrollLeft: function (value) {
1069
- if (!this.length) return;
1070
- var hasScrollLeft = 'scrollLeft' in this[0];
1071
- if (value === undefined$1) return hasScrollLeft ? this[0].scrollLeft : this[0].pageXOffset;
1072
- return this.each(hasScrollLeft ? function () {
1073
- this.scrollLeft = value;
1074
- } : function () {
1075
- this.scrollTo(value, this.scrollY);
1076
- });
1077
- },
1078
- position: function () {
1079
- if (!this.length) return;
1080
- var elem = this[0],
1081
- // Get *real* offsetParent
1082
- offsetParent = this.offsetParent(),
1083
- // Get correct offsets
1084
- offset = this.offset(),
1085
- parentOffset = rootNodeRE.test(offsetParent[0].nodeName) ? {
888
+ return this;
889
+ },
890
+ clone: function () {
891
+ return this.map(function () {
892
+ return this.cloneNode(true);
893
+ });
894
+ },
895
+ hide: function () {
896
+ return this.css("display", "none");
897
+ },
898
+ toggle: function (setting) {
899
+ return this.each(function () {
900
+ var el = $(this);
901
+ (setting === undefined$1 ? el.css("display") == "none" : setting) ? el.show() : el.hide();
902
+ });
903
+ },
904
+ prev: function (selector) {
905
+ return $(this.pluck('previousElementSibling')).filter(selector || '*');
906
+ },
907
+ next: function (selector) {
908
+ return $(this.pluck('nextElementSibling')).filter(selector || '*');
909
+ },
910
+ html: function (html) {
911
+ return 0 in arguments ? this.each(function (idx) {
912
+ var originHtml = this.innerHTML;
913
+ $(this).empty().append(funcArg(this, html, idx, originHtml));
914
+ }) : 0 in this ? this[0].innerHTML : null;
915
+ },
916
+ text: function (text) {
917
+ return 0 in arguments ? this.each(function (idx) {
918
+ var newText = funcArg(this, text, idx, this.textContent);
919
+ this.textContent = newText == null ? '' : '' + newText;
920
+ }) : 0 in this ? this.pluck('textContent').join("") : null;
921
+ },
922
+ attr: function (name, value) {
923
+ var result;
924
+ return typeof name == 'string' && !(1 in arguments) ? 0 in this && this[0].nodeType == 1 && (result = this[0].getAttribute(name)) != null ? result : undefined$1 : this.each(function (idx) {
925
+ if (this.nodeType !== 1) return;
926
+ if (isObject(name)) for (key in name) setAttribute(this, key, name[key]);else setAttribute(this, name, funcArg(this, value, idx, this.getAttribute(name)));
927
+ });
928
+ },
929
+ removeAttr: function (name) {
930
+ return this.each(function () {
931
+ this.nodeType === 1 && name.split(' ').forEach(function (attribute) {
932
+ setAttribute(this, attribute);
933
+ }, this);
934
+ });
935
+ },
936
+ prop: function (name, value) {
937
+ name = propMap[name] || name;
938
+ return 1 in arguments ? this.each(function (idx) {
939
+ this[name] = funcArg(this, value, idx, this[name]);
940
+ }) : this[0] && this[0][name];
941
+ },
942
+ removeProp: function (name) {
943
+ name = propMap[name] || name;
944
+ return this.each(function () {
945
+ delete this[name];
946
+ });
947
+ },
948
+ data: function (name, value) {
949
+ var attrName = 'data-' + name.replace(capitalRE, '-$1').toLowerCase();
950
+ var data = 1 in arguments ? this.attr(attrName, value) : this.attr(attrName);
951
+ return data !== null ? deserializeValue(data) : undefined$1;
952
+ },
953
+ val: function (value) {
954
+ if (0 in arguments) {
955
+ if (value == null) value = "";
956
+ return this.each(function (idx) {
957
+ this.value = funcArg(this, value, idx, this.value);
958
+ });
959
+ } else {
960
+ return this[0] && (this[0].multiple ? $(this[0]).find('option').filter(function () {
961
+ return this.selected;
962
+ }).pluck('value') : this[0].value);
963
+ }
964
+ },
965
+ offset: function (coordinates) {
966
+ if (coordinates) return this.each(function (index) {
967
+ var $this = $(this),
968
+ coords = funcArg(this, coordinates, index, $this.offset()),
969
+ parentOffset = $this.offsetParent().offset(),
970
+ props = {
971
+ top: coords.top - parentOffset.top,
972
+ left: coords.left - parentOffset.left
973
+ };
974
+ if ($this.css('position') == 'static') props['position'] = 'relative';
975
+ $this.css(props);
976
+ });
977
+ if (!this.length) return null;
978
+ if (document.documentElement !== this[0] && !$.contains(document.documentElement, this[0])) return {
1086
979
  top: 0,
1087
980
  left: 0
1088
- } : offsetParent.offset();
1089
-
1090
- // Subtract element margins
1091
- // note: when an element has margin: auto the offsetLeft and marginLeft
1092
- // are the same in Safari causing offset.left to incorrectly be 0
1093
- offset.top -= parseFloat($(elem).css('margin-top')) || 0;
1094
- offset.left -= parseFloat($(elem).css('margin-left')) || 0;
1095
-
1096
- // Add offsetParent borders
1097
- parentOffset.top += parseFloat($(offsetParent[0]).css('border-top-width')) || 0;
1098
- parentOffset.left += parseFloat($(offsetParent[0]).css('border-left-width')) || 0;
1099
-
1100
- // Subtract the two offsets
1101
- return {
1102
- top: offset.top - parentOffset.top,
1103
- left: offset.left - parentOffset.left
1104
- };
1105
- },
1106
- offsetParent: function () {
1107
- return this.map(function () {
1108
- var parent = this.offsetParent || document.body;
1109
- while (parent && !rootNodeRE.test(parent.nodeName) && $(parent).css("position") == "static") parent = parent.offsetParent;
1110
- return parent;
1111
- });
1112
- }
1113
- };
1114
-
1115
- // for now
1116
- $.fn.detach = $.fn.remove
1117
-
1118
- // Generate the `width` and `height` functions
1119
- ;
1120
- ['width', 'height'].forEach(function (dimension) {
1121
- var dimensionProperty = dimension.replace(/./, function (m) {
1122
- return m[0].toUpperCase();
1123
- });
1124
- $.fn[dimension] = function (value) {
1125
- var offset,
1126
- el = this[0];
1127
- if (value === undefined$1) return isWindow(el) ? el['inner' + dimensionProperty] : isDocument(el) ? el.documentElement['scroll' + dimensionProperty] : (offset = this.offset()) && offset[dimension];else return this.each(function (idx) {
1128
- el = $(this);
1129
- el.css(dimension, funcArg(this, value, idx, el[dimension]()));
1130
- });
1131
- };
1132
- });
1133
- function traverseNode(node, fun) {
1134
- fun(node);
1135
- for (var i = 0, len = node.childNodes.length; i < len; i++) traverseNode(node.childNodes[i], fun);
1136
- }
1137
-
1138
- // Generate the `after`, `prepend`, `before`, `append`,
1139
- // `insertAfter`, `insertBefore`, `appendTo`, and `prependTo` methods.
1140
- adjacencyOperators.forEach(function (operator, operatorIndex) {
1141
- var inside = operatorIndex % 2; //=> prepend, append
1142
-
1143
- $.fn[operator] = function () {
1144
- // arguments can be nodes, arrays of nodes, Zepto objects and HTML strings
1145
- var argType,
1146
- nodes = $.map(arguments, function (arg) {
1147
- var arr = [];
1148
- argType = type(arg);
1149
- if (argType == "array") {
1150
- arg.forEach(function (el) {
1151
- if (el.nodeType !== undefined$1) return arr.push(el);else if ($.zepto.isZ(el)) return arr = arr.concat(el.get());
1152
- arr = arr.concat(zepto.fragment(el));
981
+ };
982
+ var obj = this[0].getBoundingClientRect();
983
+ return {
984
+ left: obj.left + window.pageXOffset,
985
+ top: obj.top + window.pageYOffset,
986
+ width: Math.round(obj.width),
987
+ height: Math.round(obj.height)
988
+ };
989
+ },
990
+ css: function (property, value) {
991
+ if (arguments.length < 2) {
992
+ var element = this[0];
993
+ if (typeof property == 'string') {
994
+ if (!element) return;
995
+ return element.style[camelize(property)] || getComputedStyle(element, '').getPropertyValue(property);
996
+ } else if (isArray(property)) {
997
+ if (!element) return;
998
+ var props = {};
999
+ var computedStyle = getComputedStyle(element, '');
1000
+ $.each(property, function (_, prop) {
1001
+ props[prop] = element.style[camelize(prop)] || computedStyle.getPropertyValue(prop);
1153
1002
  });
1154
- return arr;
1003
+ return props;
1155
1004
  }
1156
- return argType == "object" || arg == null ? arg : zepto.fragment(arg);
1157
- }),
1158
- parent,
1159
- copyByClone = this.length > 1;
1160
- if (nodes.length < 1) return this;
1161
- return this.each(function (_, target) {
1162
- parent = inside ? target : target.parentNode;
1163
-
1164
- // convert all methods to a "before" operation
1165
- target = operatorIndex == 0 ? target.nextSibling : operatorIndex == 1 ? target.firstChild : operatorIndex == 2 ? target : null;
1166
- var parentInDocument = $.contains(document.documentElement, parent);
1167
- nodes.forEach(function (node) {
1168
- if (copyByClone) node = node.cloneNode(true);else if (!parent) return $(node).remove();
1169
- parent.insertBefore(node, target);
1170
- if (parentInDocument) traverseNode(node, function (el) {
1171
- if (el.nodeName != null && el.nodeName.toUpperCase() === 'SCRIPT' && (!el.type || el.type === 'text/javascript') && !el.src) {
1172
- var target = el.ownerDocument ? el.ownerDocument.defaultView : window;
1173
- target['eval'].call(target, el.innerHTML);
1174
- }
1005
+ }
1006
+ var css = '';
1007
+ if (type(property) == 'string') {
1008
+ if (!value && value !== 0) this.each(function () {
1009
+ this.style.removeProperty(dasherize(property));
1010
+ });else css = dasherize(property) + ":" + maybeAddPx(property, value);
1011
+ } else {
1012
+ for (key in property) if (!property[key] && property[key] !== 0) this.each(function () {
1013
+ this.style.removeProperty(dasherize(key));
1014
+ });else css += dasherize(key) + ':' + maybeAddPx(key, property[key]) + ';';
1015
+ }
1016
+ return this.each(function () {
1017
+ this.style.cssText += ';' + css;
1018
+ });
1019
+ },
1020
+ index: function (element) {
1021
+ return element ? this.indexOf($(element)[0]) : this.parent().children().indexOf(this[0]);
1022
+ },
1023
+ hasClass: function (name) {
1024
+ if (!name) return false;
1025
+ return emptyArray.some.call(this, function (el) {
1026
+ return this.test(className(el));
1027
+ }, classRE(name));
1028
+ },
1029
+ addClass: function (name) {
1030
+ if (!name) return this;
1031
+ return this.each(function (idx) {
1032
+ if (!('className' in this)) return;
1033
+ classList = [];
1034
+ var cls = className(this),
1035
+ newName = funcArg(this, name, idx, cls);
1036
+ newName.split(/\s+/g).forEach(function (klass) {
1037
+ if (!$(this).hasClass(klass)) classList.push(klass);
1038
+ }, this);
1039
+ classList.length && className(this, cls + (cls ? " " : "") + classList.join(" "));
1040
+ });
1041
+ },
1042
+ removeClass: function (name) {
1043
+ return this.each(function (idx) {
1044
+ if (!('className' in this)) return;
1045
+ if (name === undefined$1) return className(this, '');
1046
+ classList = className(this);
1047
+ funcArg(this, name, idx, classList).split(/\s+/g).forEach(function (klass) {
1048
+ classList = classList.replace(classRE(klass), " ");
1175
1049
  });
1050
+ className(this, classList.trim());
1176
1051
  });
1177
- });
1178
- };
1179
-
1180
- // after => insertAfter
1181
- // prepend => prependTo
1182
- // before => insertBefore
1183
- // append => appendTo
1184
- $.fn[inside ? operator + 'To' : 'insert' + (operatorIndex ? 'Before' : 'After')] = function (html) {
1185
- $(html)[operator](this);
1186
- return this;
1052
+ },
1053
+ toggleClass: function (name, when) {
1054
+ if (!name) return this;
1055
+ return this.each(function (idx) {
1056
+ var $this = $(this),
1057
+ names = funcArg(this, name, idx, className(this));
1058
+ names.split(/\s+/g).forEach(function (klass) {
1059
+ (when === undefined$1 ? !$this.hasClass(klass) : when) ? $this.addClass(klass) : $this.removeClass(klass);
1060
+ });
1061
+ });
1062
+ },
1063
+ scrollTop: function (value) {
1064
+ if (!this.length) return;
1065
+ var hasScrollTop = 'scrollTop' in this[0];
1066
+ if (value === undefined$1) return hasScrollTop ? this[0].scrollTop : this[0].pageYOffset;
1067
+ return this.each(hasScrollTop ? function () {
1068
+ this.scrollTop = value;
1069
+ } : function () {
1070
+ this.scrollTo(this.scrollX, value);
1071
+ });
1072
+ },
1073
+ scrollLeft: function (value) {
1074
+ if (!this.length) return;
1075
+ var hasScrollLeft = 'scrollLeft' in this[0];
1076
+ if (value === undefined$1) return hasScrollLeft ? this[0].scrollLeft : this[0].pageXOffset;
1077
+ return this.each(hasScrollLeft ? function () {
1078
+ this.scrollLeft = value;
1079
+ } : function () {
1080
+ this.scrollTo(value, this.scrollY);
1081
+ });
1082
+ },
1083
+ position: function () {
1084
+ if (!this.length) return;
1085
+ var elem = this[0],
1086
+ // Get *real* offsetParent
1087
+ offsetParent = this.offsetParent(),
1088
+ // Get correct offsets
1089
+ offset = this.offset(),
1090
+ parentOffset = rootNodeRE.test(offsetParent[0].nodeName) ? {
1091
+ top: 0,
1092
+ left: 0
1093
+ } : offsetParent.offset();
1094
+
1095
+ // Subtract element margins
1096
+ // note: when an element has margin: auto the offsetLeft and marginLeft
1097
+ // are the same in Safari causing offset.left to incorrectly be 0
1098
+ offset.top -= parseFloat($(elem).css('margin-top')) || 0;
1099
+ offset.left -= parseFloat($(elem).css('margin-left')) || 0;
1100
+
1101
+ // Add offsetParent borders
1102
+ parentOffset.top += parseFloat($(offsetParent[0]).css('border-top-width')) || 0;
1103
+ parentOffset.left += parseFloat($(offsetParent[0]).css('border-left-width')) || 0;
1104
+
1105
+ // Subtract the two offsets
1106
+ return {
1107
+ top: offset.top - parentOffset.top,
1108
+ left: offset.left - parentOffset.left
1109
+ };
1110
+ },
1111
+ offsetParent: function () {
1112
+ return this.map(function () {
1113
+ var parent = this.offsetParent || document.body;
1114
+ while (parent && !rootNodeRE.test(parent.nodeName) && $(parent).css("position") == "static") parent = parent.offsetParent;
1115
+ return parent;
1116
+ });
1117
+ }
1187
1118
  };
1188
- });
1189
- zepto.Z.prototype = Z.prototype = $.fn;
1190
-
1191
- // Export internal API functions in the `$.zepto` namespace
1192
- zepto.uniq = uniq;
1193
- zepto.deserializeValue = deserializeValue;
1194
- $.zepto = zepto;
1195
- return $;
1196
- }();
1197
- window.Zepto = Zepto;
1198
- window.$ === undefined && (window.$ = Zepto);
1199
- (function ($) {
1200
- var jsonpID = +new Date(),
1201
- document = window.document,
1202
- key,
1203
- name,
1204
- rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
1205
- scriptTypeRE = /^(?:text|application)\/javascript/i,
1206
- xmlTypeRE = /^(?:text|application)\/xml/i,
1207
- jsonType = 'application/json',
1208
- htmlType = 'text/html',
1209
- blankRE = /^\s*$/,
1210
- originAnchor = document.createElement('a');
1211
- originAnchor.href = window.location.href;
1212
-
1213
- // trigger a custom event and return false if it was cancelled
1214
- function triggerAndReturn(context, eventName, data) {
1215
- var event = $.Event(eventName);
1216
- $(context).trigger(event, data);
1217
- return !event.isDefaultPrevented();
1218
- }
1219
1119
 
1220
- // trigger an Ajax "global" event
1221
- function triggerGlobal(settings, context, eventName, data) {
1222
- if (settings.global) return triggerAndReturn(context || document, eventName, data);
1223
- }
1120
+ // for now
1121
+ $.fn.detach = $.fn.remove
1224
1122
 
1225
- // Number of active Ajax requests
1226
- $.active = 0;
1227
- function ajaxStart(settings) {
1228
- if (settings.global && $.active++ === 0) triggerGlobal(settings, null, 'ajaxStart');
1229
- }
1230
- function ajaxStop(settings) {
1231
- if (settings.global && ! --$.active) triggerGlobal(settings, null, 'ajaxStop');
1232
- }
1123
+ // Generate the `width` and `height` functions
1124
+ ;
1125
+ ['width', 'height'].forEach(function (dimension) {
1126
+ var dimensionProperty = dimension.replace(/./, function (m) {
1127
+ return m[0].toUpperCase();
1128
+ });
1129
+ $.fn[dimension] = function (value) {
1130
+ var offset,
1131
+ el = this[0];
1132
+ if (value === undefined$1) return isWindow(el) ? el['inner' + dimensionProperty] : isDocument(el) ? el.documentElement['scroll' + dimensionProperty] : (offset = this.offset()) && offset[dimension];else return this.each(function (idx) {
1133
+ el = $(this);
1134
+ el.css(dimension, funcArg(this, value, idx, el[dimension]()));
1135
+ });
1136
+ };
1137
+ });
1138
+ function traverseNode(node, fun) {
1139
+ fun(node);
1140
+ for (var i = 0, len = node.childNodes.length; i < len; i++) traverseNode(node.childNodes[i], fun);
1141
+ }
1142
+
1143
+ // Generate the `after`, `prepend`, `before`, `append`,
1144
+ // `insertAfter`, `insertBefore`, `appendTo`, and `prependTo` methods.
1145
+ adjacencyOperators.forEach(function (operator, operatorIndex) {
1146
+ var inside = operatorIndex % 2; //=> prepend, append
1147
+
1148
+ $.fn[operator] = function () {
1149
+ // arguments can be nodes, arrays of nodes, Zepto objects and HTML strings
1150
+ var argType,
1151
+ nodes = $.map(arguments, function (arg) {
1152
+ var arr = [];
1153
+ argType = type(arg);
1154
+ if (argType == "array") {
1155
+ arg.forEach(function (el) {
1156
+ if (el.nodeType !== undefined$1) return arr.push(el);else if ($.zepto.isZ(el)) return arr = arr.concat(el.get());
1157
+ arr = arr.concat(zepto.fragment(el));
1158
+ });
1159
+ return arr;
1160
+ }
1161
+ return argType == "object" || arg == null ? arg : zepto.fragment(arg);
1162
+ }),
1163
+ parent,
1164
+ copyByClone = this.length > 1;
1165
+ if (nodes.length < 1) return this;
1166
+ return this.each(function (_, target) {
1167
+ parent = inside ? target : target.parentNode;
1168
+
1169
+ // convert all methods to a "before" operation
1170
+ target = operatorIndex == 0 ? target.nextSibling : operatorIndex == 1 ? target.firstChild : operatorIndex == 2 ? target : null;
1171
+ var parentInDocument = $.contains(document.documentElement, parent);
1172
+ nodes.forEach(function (node) {
1173
+ if (copyByClone) node = node.cloneNode(true);else if (!parent) return $(node).remove();
1174
+ parent.insertBefore(node, target);
1175
+ if (parentInDocument) traverseNode(node, function (el) {
1176
+ if (el.nodeName != null && el.nodeName.toUpperCase() === 'SCRIPT' && (!el.type || el.type === 'text/javascript') && !el.src) {
1177
+ var target = el.ownerDocument ? el.ownerDocument.defaultView : window;
1178
+ target['eval'].call(target, el.innerHTML);
1179
+ }
1180
+ });
1181
+ });
1182
+ });
1183
+ };
1233
1184
 
1234
- // triggers an extra global event "ajaxBeforeSend" that's like "ajaxSend" but cancelable
1235
- function ajaxBeforeSend(xhr, settings) {
1236
- var context = settings.context;
1237
- if (settings.beforeSend.call(context, xhr, settings) === false || triggerGlobal(settings, context, 'ajaxBeforeSend', [xhr, settings]) === false) return false;
1238
- triggerGlobal(settings, context, 'ajaxSend', [xhr, settings]);
1239
- }
1240
- function ajaxSuccess(data, xhr, settings, deferred) {
1241
- var context = settings.context,
1242
- status = 'success';
1243
- settings.success.call(context, data, status, xhr);
1244
- if (deferred) deferred.resolveWith(context, [data, status, xhr]);
1245
- triggerGlobal(settings, context, 'ajaxSuccess', [xhr, settings, data]);
1246
- ajaxComplete(status, xhr, settings);
1247
- }
1248
- // type: "timeout", "error", "abort", "parsererror"
1249
- function ajaxError(error, type, xhr, settings, deferred) {
1250
- var context = settings.context;
1251
- settings.error.call(context, xhr, type, error);
1252
- if (deferred) deferred.rejectWith(context, [xhr, type, error]);
1253
- triggerGlobal(settings, context, 'ajaxError', [xhr, settings, error || type]);
1254
- ajaxComplete(type, xhr, settings);
1255
- }
1256
- // status: "success", "notmodified", "error", "timeout", "abort", "parsererror"
1257
- function ajaxComplete(status, xhr, settings) {
1258
- var context = settings.context;
1259
- settings.complete.call(context, xhr, status);
1260
- triggerGlobal(settings, context, 'ajaxComplete', [xhr, settings]);
1261
- ajaxStop(settings);
1262
- }
1263
- function ajaxDataFilter(data, type, settings) {
1264
- if (settings.dataFilter == empty) return data;
1265
- var context = settings.context;
1266
- return settings.dataFilter.call(context, data, type);
1267
- }
1185
+ // after => insertAfter
1186
+ // prepend => prependTo
1187
+ // before => insertBefore
1188
+ // append => appendTo
1189
+ $.fn[inside ? operator + 'To' : 'insert' + (operatorIndex ? 'Before' : 'After')] = function (html) {
1190
+ $(html)[operator](this);
1191
+ return this;
1192
+ };
1193
+ });
1194
+ zepto.Z.prototype = Z.prototype = $.fn;
1268
1195
 
1269
- // Empty function, used as default callback
1270
- function empty() {}
1271
- $.ajaxJSONP = function (options, deferred) {
1272
- if (!('type' in options)) return $.ajax(options);
1273
- var _callbackName = options.jsonpCallback,
1274
- callbackName = ($.isFunction(_callbackName) ? _callbackName() : _callbackName) || 'Zepto' + jsonpID++,
1275
- script = document.createElement('script'),
1276
- originalCallback = window[callbackName],
1277
- responseData,
1278
- abort = function (errorType) {
1279
- $(script).triggerHandler('error', errorType || 'abort');
1280
- },
1281
- xhr = {
1282
- abort: abort
1283
- },
1284
- abortTimeout;
1285
- if (deferred) deferred.promise(xhr);
1286
- $(script).on('load error', function (e, errorType) {
1287
- clearTimeout(abortTimeout);
1288
- $(script).off().remove();
1289
- if (e.type == 'error' || !responseData) {
1290
- ajaxError(null, errorType || 'error', xhr, options, deferred);
1291
- } else {
1292
- ajaxSuccess(responseData[0], xhr, options, deferred);
1196
+ // Export internal API functions in the `$.zepto` namespace
1197
+ zepto.uniq = uniq;
1198
+ zepto.deserializeValue = deserializeValue;
1199
+ $.zepto = zepto;
1200
+ return $;
1201
+ }();
1202
+ window.Zepto = Zepto;
1203
+ window.$ === undefined && (window.$ = Zepto);
1204
+ (function ($) {
1205
+ var jsonpID = +new Date(),
1206
+ document = window.document,
1207
+ key,
1208
+ name,
1209
+ rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
1210
+ scriptTypeRE = /^(?:text|application)\/javascript/i,
1211
+ xmlTypeRE = /^(?:text|application)\/xml/i,
1212
+ jsonType = 'application/json',
1213
+ htmlType = 'text/html',
1214
+ blankRE = /^\s*$/,
1215
+ originAnchor = document.createElement('a');
1216
+ originAnchor.href = window.location.href;
1217
+
1218
+ // trigger a custom event and return false if it was cancelled
1219
+ function triggerAndReturn(context, eventName, data) {
1220
+ var event = $.Event(eventName);
1221
+ $(context).trigger(event, data);
1222
+ return !event.isDefaultPrevented();
1223
+ }
1224
+
1225
+ // trigger an Ajax "global" event
1226
+ function triggerGlobal(settings, context, eventName, data) {
1227
+ if (settings.global) return triggerAndReturn(context || document, eventName, data);
1228
+ }
1229
+
1230
+ // Number of active Ajax requests
1231
+ $.active = 0;
1232
+ function ajaxStart(settings) {
1233
+ if (settings.global && $.active++ === 0) triggerGlobal(settings, null, 'ajaxStart');
1234
+ }
1235
+ function ajaxStop(settings) {
1236
+ if (settings.global && ! --$.active) triggerGlobal(settings, null, 'ajaxStop');
1237
+ }
1238
+
1239
+ // triggers an extra global event "ajaxBeforeSend" that's like "ajaxSend" but cancelable
1240
+ function ajaxBeforeSend(xhr, settings) {
1241
+ var context = settings.context;
1242
+ if (settings.beforeSend.call(context, xhr, settings) === false || triggerGlobal(settings, context, 'ajaxBeforeSend', [xhr, settings]) === false) return false;
1243
+ triggerGlobal(settings, context, 'ajaxSend', [xhr, settings]);
1244
+ }
1245
+ function ajaxSuccess(data, xhr, settings, deferred) {
1246
+ var context = settings.context,
1247
+ status = 'success';
1248
+ settings.success.call(context, data, status, xhr);
1249
+ if (deferred) deferred.resolveWith(context, [data, status, xhr]);
1250
+ triggerGlobal(settings, context, 'ajaxSuccess', [xhr, settings, data]);
1251
+ ajaxComplete(status, xhr, settings);
1252
+ }
1253
+ // type: "timeout", "error", "abort", "parsererror"
1254
+ function ajaxError(error, type, xhr, settings, deferred) {
1255
+ var context = settings.context;
1256
+ settings.error.call(context, xhr, type, error);
1257
+ if (deferred) deferred.rejectWith(context, [xhr, type, error]);
1258
+ triggerGlobal(settings, context, 'ajaxError', [xhr, settings, error || type]);
1259
+ ajaxComplete(type, xhr, settings);
1260
+ }
1261
+ // status: "success", "notmodified", "error", "timeout", "abort", "parsererror"
1262
+ function ajaxComplete(status, xhr, settings) {
1263
+ var context = settings.context;
1264
+ settings.complete.call(context, xhr, status);
1265
+ triggerGlobal(settings, context, 'ajaxComplete', [xhr, settings]);
1266
+ ajaxStop(settings);
1267
+ }
1268
+ function ajaxDataFilter(data, type, settings) {
1269
+ if (settings.dataFilter == empty) return data;
1270
+ var context = settings.context;
1271
+ return settings.dataFilter.call(context, data, type);
1272
+ }
1273
+
1274
+ // Empty function, used as default callback
1275
+ function empty() {}
1276
+ $.ajaxJSONP = function (options, deferred) {
1277
+ if (!('type' in options)) return $.ajax(options);
1278
+ var _callbackName = options.jsonpCallback,
1279
+ callbackName = ($.isFunction(_callbackName) ? _callbackName() : _callbackName) || 'Zepto' + jsonpID++,
1280
+ script = document.createElement('script'),
1281
+ originalCallback = window[callbackName],
1282
+ responseData,
1283
+ abort = function (errorType) {
1284
+ $(script).triggerHandler('error', errorType || 'abort');
1285
+ },
1286
+ xhr = {
1287
+ abort: abort
1288
+ },
1289
+ abortTimeout;
1290
+ if (deferred) deferred.promise(xhr);
1291
+ $(script).on('load error', function (e, errorType) {
1292
+ clearTimeout(abortTimeout);
1293
+ $(script).off().remove();
1294
+ if (e.type == 'error' || !responseData) {
1295
+ ajaxError(null, errorType || 'error', xhr, options, deferred);
1296
+ } else {
1297
+ ajaxSuccess(responseData[0], xhr, options, deferred);
1298
+ }
1299
+ window[callbackName] = originalCallback;
1300
+ if (responseData && $.isFunction(originalCallback)) originalCallback(responseData[0]);
1301
+ originalCallback = responseData = undefined;
1302
+ });
1303
+ if (ajaxBeforeSend(xhr, options) === false) {
1304
+ abort('abort');
1305
+ return xhr;
1293
1306
  }
1294
- window[callbackName] = originalCallback;
1295
- if (responseData && $.isFunction(originalCallback)) originalCallback(responseData[0]);
1296
- originalCallback = responseData = undefined;
1297
- });
1298
- if (ajaxBeforeSend(xhr, options) === false) {
1299
- abort('abort');
1307
+ window[callbackName] = function () {
1308
+ responseData = arguments;
1309
+ };
1310
+ script.src = options.url.replace(/\?(.+)=\?/, '?$1=' + callbackName);
1311
+ document.head.appendChild(script);
1312
+ if (options.timeout > 0) abortTimeout = setTimeout(function () {
1313
+ abort('timeout');
1314
+ }, options.timeout);
1300
1315
  return xhr;
1301
- }
1302
- window[callbackName] = function () {
1303
- responseData = arguments;
1304
1316
  };
1305
- script.src = options.url.replace(/\?(.+)=\?/, '?$1=' + callbackName);
1306
- document.head.appendChild(script);
1307
- if (options.timeout > 0) abortTimeout = setTimeout(function () {
1308
- abort('timeout');
1309
- }, options.timeout);
1310
- return xhr;
1311
- };
1312
- $.ajaxSettings = {
1313
- // Default type of request
1314
- type: 'GET',
1315
- // Callback that is executed before request
1316
- beforeSend: empty,
1317
- // Callback that is executed if the request succeeds
1318
- success: empty,
1319
- // Callback that is executed the the server drops error
1320
- error: empty,
1321
- // Callback that is executed on request complete (both: error and success)
1322
- complete: empty,
1323
- // The context for the callbacks
1324
- context: null,
1325
- // Whether to trigger "global" Ajax events
1326
- global: true,
1327
- // Transport
1328
- xhr: function () {
1329
- return new window.XMLHttpRequest();
1330
- },
1331
- // MIME types mapping
1332
- // IIS returns Javascript as "application/x-javascript"
1333
- accepts: {
1334
- script: 'text/javascript, application/javascript, application/x-javascript',
1335
- json: jsonType,
1336
- xml: 'application/xml, text/xml',
1337
- html: htmlType,
1338
- text: 'text/plain'
1339
- },
1340
- // Whether the request is to another domain
1341
- crossDomain: false,
1342
- // Default timeout
1343
- timeout: 0,
1344
- // Whether data should be serialized to string
1345
- processData: true,
1346
- // Whether the browser should be allowed to cache GET responses
1347
- cache: true,
1348
- //Used to handle the raw response data of XMLHttpRequest.
1349
- //This is a pre-filtering function to sanitize the response.
1350
- //The sanitized response should be returned
1351
- dataFilter: empty
1352
- };
1353
- function mimeToDataType(mime) {
1354
- if (mime) mime = mime.split(';', 2)[0];
1355
- return mime && (mime == htmlType ? 'html' : mime == jsonType ? 'json' : scriptTypeRE.test(mime) ? 'script' : xmlTypeRE.test(mime) && 'xml') || 'text';
1356
- }
1357
- function appendQuery(url, query) {
1358
- if (query == '') return url;
1359
- return (url + '&' + query).replace(/[&?]{1,2}/, '?');
1360
- }
1361
-
1362
- // serialize payload and append it to the URL for GET requests
1363
- function serializeData(options) {
1364
- if (options.processData && options.data && $.type(options.data) != "string") options.data = $.param(options.data, options.traditional);
1365
- if (options.data && (!options.type || options.type.toUpperCase() == 'GET' || 'jsonp' == options.dataType)) options.url = appendQuery(options.url, options.data), options.data = undefined;
1366
- }
1367
- $.ajax = function (options) {
1368
- var settings = $.extend({}, options || {}),
1369
- deferred = $.Deferred && $.Deferred(),
1370
- urlAnchor,
1371
- hashIndex;
1372
- for (key in $.ajaxSettings) if (settings[key] === undefined) settings[key] = $.ajaxSettings[key];
1373
- ajaxStart(settings);
1374
- if (!settings.crossDomain) {
1375
- urlAnchor = document.createElement('a');
1376
- urlAnchor.href = settings.url;
1377
- // cleans up URL for .href (IE only), see https://github.com/madrobby/zepto/pull/1049
1378
- urlAnchor.href = urlAnchor.href;
1379
- settings.crossDomain = originAnchor.protocol + '//' + originAnchor.host !== urlAnchor.protocol + '//' + urlAnchor.host;
1380
- }
1381
- if (!settings.url) settings.url = window.location.toString();
1382
- if ((hashIndex = settings.url.indexOf('#')) > -1) settings.url = settings.url.slice(0, hashIndex);
1383
- serializeData(settings);
1384
- var dataType = settings.dataType,
1385
- hasPlaceholder = /\?.+=\?/.test(settings.url);
1386
- if (hasPlaceholder) dataType = 'jsonp';
1387
- if (settings.cache === false || (!options || options.cache !== true) && ('script' == dataType || 'jsonp' == dataType)) settings.url = appendQuery(settings.url, '_=' + Date.now());
1388
- if ('jsonp' == dataType) {
1389
- if (!hasPlaceholder) settings.url = appendQuery(settings.url, settings.jsonp ? settings.jsonp + '=?' : settings.jsonp === false ? '' : 'callback=?');
1390
- return $.ajaxJSONP(settings, deferred);
1391
- }
1392
- var mime = settings.accepts[dataType],
1393
- headers = {},
1394
- setHeader = function (name, value) {
1395
- headers[name.toLowerCase()] = [name, value];
1317
+ $.ajaxSettings = {
1318
+ // Default type of request
1319
+ type: 'GET',
1320
+ // Callback that is executed before request
1321
+ beforeSend: empty,
1322
+ // Callback that is executed if the request succeeds
1323
+ success: empty,
1324
+ // Callback that is executed the the server drops error
1325
+ error: empty,
1326
+ // Callback that is executed on request complete (both: error and success)
1327
+ complete: empty,
1328
+ // The context for the callbacks
1329
+ context: null,
1330
+ // Whether to trigger "global" Ajax events
1331
+ global: true,
1332
+ // Transport
1333
+ xhr: function () {
1334
+ return new window.XMLHttpRequest();
1396
1335
  },
1397
- protocol = /^([\w-]+:)\/\//.test(settings.url) ? RegExp.$1 : window.location.protocol,
1398
- xhr = settings.xhr(),
1399
- nativeSetHeader = xhr.setRequestHeader,
1400
- abortTimeout;
1401
- if (deferred) deferred.promise(xhr);
1402
- if (!settings.crossDomain) setHeader('X-Requested-With', 'XMLHttpRequest');
1403
- setHeader('Accept', mime || '*/*');
1404
- if (mime = settings.mimeType || mime) {
1405
- if (mime.indexOf(',') > -1) mime = mime.split(',', 2)[0];
1406
- xhr.overrideMimeType && xhr.overrideMimeType(mime);
1407
- }
1408
- if (settings.contentType || settings.contentType !== false && settings.data && settings.type.toUpperCase() != 'GET') setHeader('Content-Type', settings.contentType || 'application/x-www-form-urlencoded');
1409
- if (settings.headers) for (name in settings.headers) setHeader(name, settings.headers[name]);
1410
- xhr.setRequestHeader = setHeader;
1411
- xhr.onreadystatechange = function () {
1412
- if (xhr.readyState == 4) {
1413
- xhr.onreadystatechange = empty;
1414
- clearTimeout(abortTimeout);
1415
- var result,
1416
- error = false;
1417
- if (xhr.status >= 200 && xhr.status < 300 || xhr.status == 304 || xhr.status == 0 && protocol == 'file:') {
1418
- dataType = dataType || mimeToDataType(settings.mimeType || xhr.getResponseHeader('content-type'));
1419
- if (xhr.responseType == 'arraybuffer' || xhr.responseType == 'blob') result = xhr.response;else {
1420
- result = xhr.responseText;
1421
- try {
1422
- // http://perfectionkills.com/global-eval-what-are-the-options/
1423
- // sanitize response accordingly if data filter callback provided
1424
- result = ajaxDataFilter(result, dataType, settings);
1425
- if (dataType == 'script') (1, eval)(result);else if (dataType == 'xml') result = xhr.responseXML;else if (dataType == 'json') result = blankRE.test(result) ? null : $.parseJSON(result);
1426
- } catch (e) {
1427
- error = e;
1336
+ // MIME types mapping
1337
+ // IIS returns Javascript as "application/x-javascript"
1338
+ accepts: {
1339
+ script: 'text/javascript, application/javascript, application/x-javascript',
1340
+ json: jsonType,
1341
+ xml: 'application/xml, text/xml',
1342
+ html: htmlType,
1343
+ text: 'text/plain'
1344
+ },
1345
+ // Whether the request is to another domain
1346
+ crossDomain: false,
1347
+ // Default timeout
1348
+ timeout: 0,
1349
+ // Whether data should be serialized to string
1350
+ processData: true,
1351
+ // Whether the browser should be allowed to cache GET responses
1352
+ cache: true,
1353
+ //Used to handle the raw response data of XMLHttpRequest.
1354
+ //This is a pre-filtering function to sanitize the response.
1355
+ //The sanitized response should be returned
1356
+ dataFilter: empty
1357
+ };
1358
+ function mimeToDataType(mime) {
1359
+ if (mime) mime = mime.split(';', 2)[0];
1360
+ return mime && (mime == htmlType ? 'html' : mime == jsonType ? 'json' : scriptTypeRE.test(mime) ? 'script' : xmlTypeRE.test(mime) && 'xml') || 'text';
1361
+ }
1362
+ function appendQuery(url, query) {
1363
+ if (query == '') return url;
1364
+ return (url + '&' + query).replace(/[&?]{1,2}/, '?');
1365
+ }
1366
+
1367
+ // serialize payload and append it to the URL for GET requests
1368
+ function serializeData(options) {
1369
+ if (options.processData && options.data && $.type(options.data) != "string") options.data = $.param(options.data, options.traditional);
1370
+ if (options.data && (!options.type || options.type.toUpperCase() == 'GET' || 'jsonp' == options.dataType)) options.url = appendQuery(options.url, options.data), options.data = undefined;
1371
+ }
1372
+ $.ajax = function (options) {
1373
+ var settings = $.extend({}, options || {}),
1374
+ deferred = $.Deferred && $.Deferred(),
1375
+ urlAnchor,
1376
+ hashIndex;
1377
+ for (key in $.ajaxSettings) if (settings[key] === undefined) settings[key] = $.ajaxSettings[key];
1378
+ ajaxStart(settings);
1379
+ if (!settings.crossDomain) {
1380
+ urlAnchor = document.createElement('a');
1381
+ urlAnchor.href = settings.url;
1382
+ // cleans up URL for .href (IE only), see https://github.com/madrobby/zepto/pull/1049
1383
+ urlAnchor.href = urlAnchor.href;
1384
+ settings.crossDomain = originAnchor.protocol + '//' + originAnchor.host !== urlAnchor.protocol + '//' + urlAnchor.host;
1385
+ }
1386
+ if (!settings.url) settings.url = window.location.toString();
1387
+ if ((hashIndex = settings.url.indexOf('#')) > -1) settings.url = settings.url.slice(0, hashIndex);
1388
+ serializeData(settings);
1389
+ var dataType = settings.dataType,
1390
+ hasPlaceholder = /\?.+=\?/.test(settings.url);
1391
+ if (hasPlaceholder) dataType = 'jsonp';
1392
+ if (settings.cache === false || (!options || options.cache !== true) && ('script' == dataType || 'jsonp' == dataType)) settings.url = appendQuery(settings.url, '_=' + Date.now());
1393
+ if ('jsonp' == dataType) {
1394
+ if (!hasPlaceholder) settings.url = appendQuery(settings.url, settings.jsonp ? settings.jsonp + '=?' : settings.jsonp === false ? '' : 'callback=?');
1395
+ return $.ajaxJSONP(settings, deferred);
1396
+ }
1397
+ var mime = settings.accepts[dataType],
1398
+ headers = {},
1399
+ setHeader = function (name, value) {
1400
+ headers[name.toLowerCase()] = [name, value];
1401
+ },
1402
+ protocol = /^([\w-]+:)\/\//.test(settings.url) ? RegExp.$1 : window.location.protocol,
1403
+ xhr = settings.xhr(),
1404
+ nativeSetHeader = xhr.setRequestHeader,
1405
+ abortTimeout;
1406
+ if (deferred) deferred.promise(xhr);
1407
+ if (!settings.crossDomain) setHeader('X-Requested-With', 'XMLHttpRequest');
1408
+ setHeader('Accept', mime || '*/*');
1409
+ if (mime = settings.mimeType || mime) {
1410
+ if (mime.indexOf(',') > -1) mime = mime.split(',', 2)[0];
1411
+ xhr.overrideMimeType && xhr.overrideMimeType(mime);
1412
+ }
1413
+ if (settings.contentType || settings.contentType !== false && settings.data && settings.type.toUpperCase() != 'GET') setHeader('Content-Type', settings.contentType || 'application/x-www-form-urlencoded');
1414
+ if (settings.headers) for (name in settings.headers) setHeader(name, settings.headers[name]);
1415
+ xhr.setRequestHeader = setHeader;
1416
+ xhr.onreadystatechange = function () {
1417
+ if (xhr.readyState == 4) {
1418
+ xhr.onreadystatechange = empty;
1419
+ clearTimeout(abortTimeout);
1420
+ var result,
1421
+ error = false;
1422
+ if (xhr.status >= 200 && xhr.status < 300 || xhr.status == 304 || xhr.status == 0 && protocol == 'file:') {
1423
+ dataType = dataType || mimeToDataType(settings.mimeType || xhr.getResponseHeader('content-type'));
1424
+ if (xhr.responseType == 'arraybuffer' || xhr.responseType == 'blob') result = xhr.response;else {
1425
+ result = xhr.responseText;
1426
+ try {
1427
+ // http://perfectionkills.com/global-eval-what-are-the-options/
1428
+ // sanitize response accordingly if data filter callback provided
1429
+ result = ajaxDataFilter(result, dataType, settings);
1430
+ if (dataType == 'script') (1, eval)(result);else if (dataType == 'xml') result = xhr.responseXML;else if (dataType == 'json') result = blankRE.test(result) ? null : $.parseJSON(result);
1431
+ } catch (e) {
1432
+ error = e;
1433
+ }
1434
+ if (error) return ajaxError(error, 'parsererror', xhr, settings, deferred);
1428
1435
  }
1429
- if (error) return ajaxError(error, 'parsererror', xhr, settings, deferred);
1436
+ ajaxSuccess(result, xhr, settings, deferred);
1437
+ } else {
1438
+ ajaxError(xhr.statusText || null, xhr.status ? 'error' : 'abort', xhr, settings, deferred);
1430
1439
  }
1431
- ajaxSuccess(result, xhr, settings, deferred);
1432
- } else {
1433
- ajaxError(xhr.statusText || null, xhr.status ? 'error' : 'abort', xhr, settings, deferred);
1434
1440
  }
1435
- }
1436
- };
1437
- if (ajaxBeforeSend(xhr, settings) === false) {
1438
- xhr.abort();
1439
- ajaxError(null, 'abort', xhr, settings, deferred);
1441
+ };
1442
+ if (ajaxBeforeSend(xhr, settings) === false) {
1443
+ xhr.abort();
1444
+ ajaxError(null, 'abort', xhr, settings, deferred);
1445
+ return xhr;
1446
+ }
1447
+ var async = 'async' in settings ? settings.async : true;
1448
+ xhr.open(settings.type, settings.url, async, settings.username, settings.password);
1449
+ if (settings.xhrFields) for (name in settings.xhrFields) xhr[name] = settings.xhrFields[name];
1450
+ for (name in headers) nativeSetHeader.apply(xhr, headers[name]);
1451
+ if (settings.timeout > 0) abortTimeout = setTimeout(function () {
1452
+ xhr.onreadystatechange = empty;
1453
+ xhr.abort();
1454
+ ajaxError(null, 'timeout', xhr, settings, deferred);
1455
+ }, settings.timeout);
1456
+
1457
+ // avoid sending empty string (#319)
1458
+ xhr.send(settings.data ? settings.data : null);
1440
1459
  return xhr;
1441
- }
1442
- var async = 'async' in settings ? settings.async : true;
1443
- xhr.open(settings.type, settings.url, async, settings.username, settings.password);
1444
- if (settings.xhrFields) for (name in settings.xhrFields) xhr[name] = settings.xhrFields[name];
1445
- for (name in headers) nativeSetHeader.apply(xhr, headers[name]);
1446
- if (settings.timeout > 0) abortTimeout = setTimeout(function () {
1447
- xhr.onreadystatechange = empty;
1448
- xhr.abort();
1449
- ajaxError(null, 'timeout', xhr, settings, deferred);
1450
- }, settings.timeout);
1451
-
1452
- // avoid sending empty string (#319)
1453
- xhr.send(settings.data ? settings.data : null);
1454
- return xhr;
1455
- };
1460
+ };
1456
1461
 
1457
- // handle optional data/success arguments
1458
- function parseArguments(url, data, success, dataType) {
1459
- if ($.isFunction(data)) dataType = success, success = data, data = undefined;
1460
- if (!$.isFunction(success)) dataType = success, success = undefined;
1461
- return {
1462
- url: url,
1463
- data: data,
1464
- success: success,
1465
- dataType: dataType
1462
+ // handle optional data/success arguments
1463
+ function parseArguments(url, data, success, dataType) {
1464
+ if ($.isFunction(data)) dataType = success, success = data, data = undefined;
1465
+ if (!$.isFunction(success)) dataType = success, success = undefined;
1466
+ return {
1467
+ url: url,
1468
+ data: data,
1469
+ success: success,
1470
+ dataType: dataType
1471
+ };
1472
+ }
1473
+ $.get = function /* url, data, success, dataType */
1474
+ () {
1475
+ return $.ajax(parseArguments.apply(null, arguments));
1476
+ };
1477
+ $.post = function /* url, data, success, dataType */
1478
+ () {
1479
+ var options = parseArguments.apply(null, arguments);
1480
+ options.type = 'POST';
1481
+ return $.ajax(options);
1482
+ };
1483
+ $.getJSON = function /* url, data, success */
1484
+ () {
1485
+ var options = parseArguments.apply(null, arguments);
1486
+ options.dataType = 'json';
1487
+ return $.ajax(options);
1466
1488
  };
1467
- }
1468
- $.get = function /* url, data, success, dataType */
1469
- () {
1470
- return $.ajax(parseArguments.apply(null, arguments));
1471
- };
1472
- $.post = function /* url, data, success, dataType */
1473
- () {
1474
- var options = parseArguments.apply(null, arguments);
1475
- options.type = 'POST';
1476
- return $.ajax(options);
1477
- };
1478
- $.getJSON = function /* url, data, success */
1479
- () {
1480
- var options = parseArguments.apply(null, arguments);
1481
- options.dataType = 'json';
1482
- return $.ajax(options);
1483
- };
1484
- $.fn.load = function (url, data, success) {
1485
- if (!this.length) return this;
1486
- var self = this,
1487
- parts = url.split(/\s/),
1488
- selector,
1489
- options = parseArguments(url, data, success),
1490
- callback = options.success;
1491
- if (parts.length > 1) options.url = parts[0], selector = parts[1];
1492
- options.success = function (response) {
1493
- self.html(selector ? $('<div>').html(response.replace(rscript, "")).find(selector) : response);
1494
- callback && callback.apply(self, arguments);
1489
+ $.fn.load = function (url, data, success) {
1490
+ if (!this.length) return this;
1491
+ var self = this,
1492
+ parts = url.split(/\s/),
1493
+ selector,
1494
+ options = parseArguments(url, data, success),
1495
+ callback = options.success;
1496
+ if (parts.length > 1) options.url = parts[0], selector = parts[1];
1497
+ options.success = function (response) {
1498
+ self.html(selector ? $('<div>').html(response.replace(rscript, "")).find(selector) : response);
1499
+ callback && callback.apply(self, arguments);
1500
+ };
1501
+ $.ajax(options);
1502
+ return this;
1495
1503
  };
1496
- $.ajax(options);
1497
- return this;
1498
- };
1499
- var escape = encodeURIComponent;
1500
- function serialize(params, obj, traditional, scope) {
1501
- var type,
1502
- array = $.isArray(obj),
1503
- hash = $.isPlainObject(obj);
1504
- $.each(obj, function (key, value) {
1505
- type = $.type(value);
1506
- if (scope) key = traditional ? scope : scope + '[' + (hash || type == 'object' || type == 'array' ? key : '') + ']';
1507
- // handle data in serializeArray() format
1508
- if (!scope && array) params.add(value.name, value.value);
1509
- // recurse into nested objects
1510
- else if (type == "array" || !traditional && type == "object") serialize(params, value, traditional, key);else params.add(key, value);
1511
- });
1512
- }
1513
- $.param = function (obj, traditional) {
1514
- var params = [];
1515
- params.add = function (key, value) {
1516
- if ($.isFunction(value)) value = value();
1517
- if (value == null) value = "";
1518
- this.push(escape(key) + '=' + escape(value));
1504
+ var escape = encodeURIComponent;
1505
+ function serialize(params, obj, traditional, scope) {
1506
+ var type,
1507
+ array = $.isArray(obj),
1508
+ hash = $.isPlainObject(obj);
1509
+ $.each(obj, function (key, value) {
1510
+ type = $.type(value);
1511
+ if (scope) key = traditional ? scope : scope + '[' + (hash || type == 'object' || type == 'array' ? key : '') + ']';
1512
+ // handle data in serializeArray() format
1513
+ if (!scope && array) params.add(value.name, value.value);
1514
+ // recurse into nested objects
1515
+ else if (type == "array" || !traditional && type == "object") serialize(params, value, traditional, key);else params.add(key, value);
1516
+ });
1517
+ }
1518
+ $.param = function (obj, traditional) {
1519
+ var params = [];
1520
+ params.add = function (key, value) {
1521
+ if ($.isFunction(value)) value = value();
1522
+ if (value == null) value = "";
1523
+ this.push(escape(key) + '=' + escape(value));
1524
+ };
1525
+ serialize(params, obj, traditional);
1526
+ return params.join('&').replace(/%20/g, '+');
1519
1527
  };
1520
- serialize(params, obj, traditional);
1521
- return params.join('&').replace(/%20/g, '+');
1522
- };
1523
- })(Zepto);
1524
- (function ($) {
1525
- // Create a collection of callbacks to be fired in a sequence, with configurable behaviour
1526
- // Option flags:
1527
- // - once: Callbacks fired at most one time.
1528
- // - memory: Remember the most recent context and arguments
1529
- // - stopOnFalse: Cease iterating over callback list
1530
- // - unique: Permit adding at most one instance of the same callback
1531
- $.Callbacks = function (options) {
1532
- options = $.extend({}, options);
1533
- var memory,
1534
- // Last fire value (for non-forgettable lists)
1535
- fired,
1536
- // Flag to know if list was already fired
1537
- firing,
1538
- // Flag to know if list is currently firing
1539
- firingStart,
1540
- // First callback to fire (used internally by add and fireWith)
1541
- firingLength,
1542
- // End of the loop when firing
1543
- firingIndex,
1544
- // Index of currently firing callback (modified by remove if needed)
1545
- list = [],
1546
- // Actual callback list
1547
- stack = !options.once && [],
1548
- // Stack of fire calls for repeatable lists
1549
- fire = function (data) {
1550
- memory = options.memory && data;
1551
- fired = true;
1552
- firingIndex = firingStart || 0;
1553
- firingStart = 0;
1554
- firingLength = list.length;
1555
- firing = true;
1556
- for (; list && firingIndex < firingLength; ++firingIndex) {
1557
- if (list[firingIndex].apply(data[0], data[1]) === false && options.stopOnFalse) {
1558
- memory = false;
1559
- break;
1528
+ })(Zepto);
1529
+ (function ($) {
1530
+ // Create a collection of callbacks to be fired in a sequence, with configurable behaviour
1531
+ // Option flags:
1532
+ // - once: Callbacks fired at most one time.
1533
+ // - memory: Remember the most recent context and arguments
1534
+ // - stopOnFalse: Cease iterating over callback list
1535
+ // - unique: Permit adding at most one instance of the same callback
1536
+ $.Callbacks = function (options) {
1537
+ options = $.extend({}, options);
1538
+ var memory,
1539
+ // Last fire value (for non-forgettable lists)
1540
+ fired,
1541
+ // Flag to know if list was already fired
1542
+ firing,
1543
+ // Flag to know if list is currently firing
1544
+ firingStart,
1545
+ // First callback to fire (used internally by add and fireWith)
1546
+ firingLength,
1547
+ // End of the loop when firing
1548
+ firingIndex,
1549
+ // Index of currently firing callback (modified by remove if needed)
1550
+ list = [],
1551
+ // Actual callback list
1552
+ stack = !options.once && [],
1553
+ // Stack of fire calls for repeatable lists
1554
+ fire = function (data) {
1555
+ memory = options.memory && data;
1556
+ fired = true;
1557
+ firingIndex = firingStart || 0;
1558
+ firingStart = 0;
1559
+ firingLength = list.length;
1560
+ firing = true;
1561
+ for (; list && firingIndex < firingLength; ++firingIndex) {
1562
+ if (list[firingIndex].apply(data[0], data[1]) === false && options.stopOnFalse) {
1563
+ memory = false;
1564
+ break;
1565
+ }
1560
1566
  }
1561
- }
1562
- firing = false;
1563
- if (list) {
1564
- if (stack) stack.length && fire(stack.shift());else if (memory) list.length = 0;else Callbacks.disable();
1565
- }
1566
- },
1567
- Callbacks = {
1568
- add: function () {
1567
+ firing = false;
1569
1568
  if (list) {
1570
- var start = list.length,
1571
- add = function (args) {
1572
- $.each(args, function (_, arg) {
1573
- if (typeof arg === "function") {
1574
- if (!options.unique || !Callbacks.has(arg)) list.push(arg);
1575
- } else if (arg && arg.length && typeof arg !== 'string') add(arg);
1576
- });
1577
- };
1578
- add(arguments);
1579
- if (firing) firingLength = list.length;else if (memory) {
1580
- firingStart = start;
1581
- fire(memory);
1582
- }
1569
+ if (stack) stack.length && fire(stack.shift());else if (memory) list.length = 0;else Callbacks.disable();
1583
1570
  }
1584
- return this;
1585
1571
  },
1586
- remove: function () {
1587
- if (list) {
1588
- $.each(arguments, function (_, arg) {
1589
- var index;
1590
- while ((index = $.inArray(arg, list, index)) > -1) {
1591
- list.splice(index, 1);
1592
- // Handle firing indexes
1593
- if (firing) {
1594
- if (index <= firingLength) --firingLength;
1595
- if (index <= firingIndex) --firingIndex;
1596
- }
1572
+ Callbacks = {
1573
+ add: function () {
1574
+ if (list) {
1575
+ var start = list.length,
1576
+ add = function (args) {
1577
+ $.each(args, function (_, arg) {
1578
+ if (typeof arg === "function") {
1579
+ if (!options.unique || !Callbacks.has(arg)) list.push(arg);
1580
+ } else if (arg && arg.length && typeof arg !== 'string') add(arg);
1581
+ });
1582
+ };
1583
+ add(arguments);
1584
+ if (firing) firingLength = list.length;else if (memory) {
1585
+ firingStart = start;
1586
+ fire(memory);
1597
1587
  }
1598
- });
1588
+ }
1589
+ return this;
1590
+ },
1591
+ remove: function () {
1592
+ if (list) {
1593
+ $.each(arguments, function (_, arg) {
1594
+ var index;
1595
+ while ((index = $.inArray(arg, list, index)) > -1) {
1596
+ list.splice(index, 1);
1597
+ // Handle firing indexes
1598
+ if (firing) {
1599
+ if (index <= firingLength) --firingLength;
1600
+ if (index <= firingIndex) --firingIndex;
1601
+ }
1602
+ }
1603
+ });
1604
+ }
1605
+ return this;
1606
+ },
1607
+ has: function (fn) {
1608
+ return !!(list && (fn ? $.inArray(fn, list) > -1 : list.length));
1609
+ },
1610
+ empty: function () {
1611
+ firingLength = list.length = 0;
1612
+ return this;
1613
+ },
1614
+ disable: function () {
1615
+ list = stack = memory = undefined;
1616
+ return this;
1617
+ },
1618
+ disabled: function () {
1619
+ return !list;
1620
+ },
1621
+ lock: function () {
1622
+ stack = undefined;
1623
+ if (!memory) Callbacks.disable();
1624
+ return this;
1625
+ },
1626
+ locked: function () {
1627
+ return !stack;
1628
+ },
1629
+ fireWith: function (context, args) {
1630
+ if (list && (!fired || stack)) {
1631
+ args = args || [];
1632
+ args = [context, args.slice ? args.slice() : args];
1633
+ if (firing) stack.push(args);else fire(args);
1634
+ }
1635
+ return this;
1636
+ },
1637
+ fire: function () {
1638
+ return Callbacks.fireWith(this, arguments);
1639
+ },
1640
+ fired: function () {
1641
+ return !!fired;
1599
1642
  }
1600
- return this;
1601
- },
1602
- has: function (fn) {
1603
- return !!(list && (fn ? $.inArray(fn, list) > -1 : list.length));
1604
- },
1605
- empty: function () {
1606
- firingLength = list.length = 0;
1607
- return this;
1608
- },
1609
- disable: function () {
1610
- list = stack = memory = undefined;
1611
- return this;
1612
- },
1613
- disabled: function () {
1614
- return !list;
1615
- },
1616
- lock: function () {
1617
- stack = undefined;
1618
- if (!memory) Callbacks.disable();
1619
- return this;
1620
- },
1621
- locked: function () {
1622
- return !stack;
1623
- },
1624
- fireWith: function (context, args) {
1625
- if (list && (!fired || stack)) {
1626
- args = args || [];
1627
- args = [context, args.slice ? args.slice() : args];
1628
- if (firing) stack.push(args);else fire(args);
1643
+ };
1644
+ return Callbacks;
1645
+ };
1646
+ })(Zepto);
1647
+ (function ($) {
1648
+ var slice = Array.prototype.slice;
1649
+ function Deferred(func) {
1650
+ var tuples = [
1651
+ // action, add listener, listener list, final state
1652
+ ["resolve", "done", $.Callbacks({
1653
+ once: 1,
1654
+ memory: 1
1655
+ }), "resolved"], ["reject", "fail", $.Callbacks({
1656
+ once: 1,
1657
+ memory: 1
1658
+ }), "rejected"], ["notify", "progress", $.Callbacks({
1659
+ memory: 1
1660
+ })]],
1661
+ state = "pending",
1662
+ promise = {
1663
+ state: function () {
1664
+ return state;
1665
+ },
1666
+ always: function () {
1667
+ deferred.done(arguments).fail(arguments);
1668
+ return this;
1669
+ },
1670
+ then: function /* fnDone [, fnFailed [, fnProgress]] */
1671
+ () {
1672
+ var fns = arguments;
1673
+ return Deferred(function (defer) {
1674
+ $.each(tuples, function (i, tuple) {
1675
+ var fn = $.isFunction(fns[i]) && fns[i];
1676
+ deferred[tuple[1]](function () {
1677
+ var returned = fn && fn.apply(this, arguments);
1678
+ if (returned && $.isFunction(returned.promise)) {
1679
+ returned.promise().done(defer.resolve).fail(defer.reject).progress(defer.notify);
1680
+ } else {
1681
+ var context = this === promise ? defer.promise() : this,
1682
+ values = fn ? [returned] : arguments;
1683
+ defer[tuple[0] + "With"](context, values);
1684
+ }
1685
+ });
1686
+ });
1687
+ fns = null;
1688
+ }).promise();
1689
+ },
1690
+ promise: function (obj) {
1691
+ return obj != null ? $.extend(obj, promise) : promise;
1629
1692
  }
1630
- return this;
1631
1693
  },
1632
- fire: function () {
1633
- return Callbacks.fireWith(this, arguments);
1634
- },
1635
- fired: function () {
1636
- return !!fired;
1694
+ deferred = {};
1695
+ $.each(tuples, function (i, tuple) {
1696
+ var list = tuple[2],
1697
+ stateString = tuple[3];
1698
+ promise[tuple[1]] = list.add;
1699
+ if (stateString) {
1700
+ list.add(function () {
1701
+ state = stateString;
1702
+ }, tuples[i ^ 1][2].disable, tuples[2][2].lock);
1637
1703
  }
1638
- };
1639
- return Callbacks;
1640
- };
1641
- })(Zepto);
1642
- (function ($) {
1643
- var slice = Array.prototype.slice;
1644
- function Deferred(func) {
1645
- var tuples = [
1646
- // action, add listener, listener list, final state
1647
- ["resolve", "done", $.Callbacks({
1648
- once: 1,
1649
- memory: 1
1650
- }), "resolved"], ["reject", "fail", $.Callbacks({
1651
- once: 1,
1652
- memory: 1
1653
- }), "rejected"], ["notify", "progress", $.Callbacks({
1654
- memory: 1
1655
- })]],
1656
- state = "pending",
1657
- promise = {
1658
- state: function () {
1659
- return state;
1660
- },
1661
- always: function () {
1662
- deferred.done(arguments).fail(arguments);
1704
+ deferred[tuple[0]] = function () {
1705
+ deferred[tuple[0] + "With"](this === deferred ? promise : this, arguments);
1663
1706
  return this;
1664
- },
1665
- then: function /* fnDone [, fnFailed [, fnProgress]] */
1666
- () {
1667
- var fns = arguments;
1668
- return Deferred(function (defer) {
1669
- $.each(tuples, function (i, tuple) {
1670
- var fn = $.isFunction(fns[i]) && fns[i];
1671
- deferred[tuple[1]](function () {
1672
- var returned = fn && fn.apply(this, arguments);
1673
- if (returned && $.isFunction(returned.promise)) {
1674
- returned.promise().done(defer.resolve).fail(defer.reject).progress(defer.notify);
1675
- } else {
1676
- var context = this === promise ? defer.promise() : this,
1677
- values = fn ? [returned] : arguments;
1678
- defer[tuple[0] + "With"](context, values);
1679
- }
1680
- });
1681
- });
1682
- fns = null;
1683
- }).promise();
1684
- },
1685
- promise: function (obj) {
1686
- return obj != null ? $.extend(obj, promise) : promise;
1707
+ };
1708
+ deferred[tuple[0] + "With"] = list.fireWith;
1709
+ });
1710
+ promise.promise(deferred);
1711
+ if (func) func.call(deferred, deferred);
1712
+ return deferred;
1713
+ }
1714
+ $.when = function (sub) {
1715
+ var resolveValues = slice.call(arguments),
1716
+ len = resolveValues.length,
1717
+ i = 0,
1718
+ remain = len !== 1 || sub && $.isFunction(sub.promise) ? len : 0,
1719
+ deferred = remain === 1 ? sub : Deferred(),
1720
+ progressValues,
1721
+ progressContexts,
1722
+ resolveContexts,
1723
+ updateFn = function (i, ctx, val) {
1724
+ return function (value) {
1725
+ ctx[i] = this;
1726
+ val[i] = arguments.length > 1 ? slice.call(arguments) : value;
1727
+ if (val === progressValues) {
1728
+ deferred.notifyWith(ctx, val);
1729
+ } else if (! --remain) {
1730
+ deferred.resolveWith(ctx, val);
1731
+ }
1732
+ };
1733
+ };
1734
+ if (len > 1) {
1735
+ progressValues = new Array(len);
1736
+ progressContexts = new Array(len);
1737
+ resolveContexts = new Array(len);
1738
+ for (; i < len; ++i) {
1739
+ if (resolveValues[i] && $.isFunction(resolveValues[i].promise)) {
1740
+ resolveValues[i].promise().done(updateFn(i, resolveContexts, resolveValues)).fail(deferred.reject).progress(updateFn(i, progressContexts, progressValues));
1741
+ } else {
1742
+ --remain;
1743
+ }
1687
1744
  }
1745
+ }
1746
+ if (!remain) deferred.resolveWith(resolveContexts, resolveValues);
1747
+ return deferred.promise();
1748
+ };
1749
+ $.Deferred = Deferred;
1750
+ })(Zepto);
1751
+ (function ($) {
1752
+ var _zid = 1,
1753
+ undefined$1,
1754
+ slice = Array.prototype.slice,
1755
+ isFunction = $.isFunction,
1756
+ isString = function (obj) {
1757
+ return typeof obj == 'string';
1688
1758
  },
1689
- deferred = {};
1690
- $.each(tuples, function (i, tuple) {
1691
- var list = tuple[2],
1692
- stateString = tuple[3];
1693
- promise[tuple[1]] = list.add;
1694
- if (stateString) {
1695
- list.add(function () {
1696
- state = stateString;
1697
- }, tuples[i ^ 1][2].disable, tuples[2][2].lock);
1698
- }
1699
- deferred[tuple[0]] = function () {
1700
- deferred[tuple[0] + "With"](this === deferred ? promise : this, arguments);
1701
- return this;
1759
+ handlers = {},
1760
+ specialEvents = {},
1761
+ focusinSupported = 'onfocusin' in window,
1762
+ focus = {
1763
+ focus: 'focusin',
1764
+ blur: 'focusout'
1765
+ },
1766
+ hover = {
1767
+ mouseenter: 'mouseover',
1768
+ mouseleave: 'mouseout'
1702
1769
  };
1703
- deferred[tuple[0] + "With"] = list.fireWith;
1704
- });
1705
- promise.promise(deferred);
1706
- if (func) func.call(deferred, deferred);
1707
- return deferred;
1708
- }
1709
- $.when = function (sub) {
1710
- var resolveValues = slice.call(arguments),
1711
- len = resolveValues.length,
1712
- i = 0,
1713
- remain = len !== 1 || sub && $.isFunction(sub.promise) ? len : 0,
1714
- deferred = remain === 1 ? sub : Deferred(),
1715
- progressValues,
1716
- progressContexts,
1717
- resolveContexts,
1718
- updateFn = function (i, ctx, val) {
1719
- return function (value) {
1720
- ctx[i] = this;
1721
- val[i] = arguments.length > 1 ? slice.call(arguments) : value;
1722
- if (val === progressValues) {
1723
- deferred.notifyWith(ctx, val);
1724
- } else if (! --remain) {
1725
- deferred.resolveWith(ctx, val);
1726
- }
1727
- };
1770
+ specialEvents.click = specialEvents.mousedown = specialEvents.mouseup = specialEvents.mousemove = 'MouseEvents';
1771
+ function zid(element) {
1772
+ return element._zid || (element._zid = _zid++);
1773
+ }
1774
+ function findHandlers(element, event, fn, selector) {
1775
+ event = parse(event);
1776
+ if (event.ns) var matcher = matcherFor(event.ns);
1777
+ return (handlers[zid(element)] || []).filter(function (handler) {
1778
+ return handler && (!event.e || handler.e == event.e) && (!event.ns || matcher.test(handler.ns)) && (!fn || zid(handler.fn) === zid(fn)) && (!selector || handler.sel == selector);
1779
+ });
1780
+ }
1781
+ function parse(event) {
1782
+ var parts = ('' + event).split('.');
1783
+ return {
1784
+ e: parts[0],
1785
+ ns: parts.slice(1).sort().join(' ')
1728
1786
  };
1729
- if (len > 1) {
1730
- progressValues = new Array(len);
1731
- progressContexts = new Array(len);
1732
- resolveContexts = new Array(len);
1733
- for (; i < len; ++i) {
1734
- if (resolveValues[i] && $.isFunction(resolveValues[i].promise)) {
1735
- resolveValues[i].promise().done(updateFn(i, resolveContexts, resolveValues)).fail(deferred.reject).progress(updateFn(i, progressContexts, progressValues));
1787
+ }
1788
+ function matcherFor(ns) {
1789
+ return new RegExp('(?:^| )' + ns.replace(' ', ' .* ?') + '(?: |$)');
1790
+ }
1791
+ function eventCapture(handler, captureSetting) {
1792
+ return handler.del && !focusinSupported && handler.e in focus || !!captureSetting;
1793
+ }
1794
+ function realEvent(type) {
1795
+ return hover[type] || focusinSupported && focus[type] || type;
1796
+ }
1797
+ function add(element, events, fn, data, selector, delegator, capture) {
1798
+ var id = zid(element),
1799
+ set = handlers[id] || (handlers[id] = []);
1800
+ events.split(/\s/).forEach(function (event) {
1801
+ if (event == 'ready') return $(document).ready(fn);
1802
+ var handler = parse(event);
1803
+ handler.fn = fn;
1804
+ handler.sel = selector;
1805
+ // emulate mouseenter, mouseleave
1806
+ if (handler.e in hover) fn = function (e) {
1807
+ var related = e.relatedTarget;
1808
+ if (!related || related !== this && !$.contains(this, related)) return handler.fn.apply(this, arguments);
1809
+ };
1810
+ handler.del = delegator;
1811
+ var callback = delegator || fn;
1812
+ handler.proxy = function (e) {
1813
+ e = compatible(e);
1814
+ if (e.isImmediatePropagationStopped()) return;
1815
+ e.data = data;
1816
+ var result = callback.apply(element, e._args == undefined$1 ? [e] : [e].concat(e._args));
1817
+ if (result === false) e.preventDefault(), e.stopPropagation();
1818
+ return result;
1819
+ };
1820
+ handler.i = set.length;
1821
+ set.push(handler);
1822
+ if ('addEventListener' in element) element.addEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture));
1823
+ });
1824
+ }
1825
+ function remove(element, events, fn, selector, capture) {
1826
+ var id = zid(element);
1827
+ (events || '').split(/\s/).forEach(function (event) {
1828
+ findHandlers(element, event, fn, selector).forEach(function (handler) {
1829
+ delete handlers[id][handler.i];
1830
+ if ('removeEventListener' in element) element.removeEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture));
1831
+ });
1832
+ });
1833
+ }
1834
+ $.event = {
1835
+ add: add,
1836
+ remove: remove
1837
+ };
1838
+ $.proxy = function (fn, context) {
1839
+ var args = 2 in arguments && slice.call(arguments, 2);
1840
+ if (isFunction(fn)) {
1841
+ var proxyFn = function () {
1842
+ return fn.apply(context, args ? args.concat(slice.call(arguments)) : arguments);
1843
+ };
1844
+ proxyFn._zid = zid(fn);
1845
+ return proxyFn;
1846
+ } else if (isString(context)) {
1847
+ if (args) {
1848
+ args.unshift(fn[context], fn);
1849
+ return $.proxy.apply(null, args);
1736
1850
  } else {
1737
- --remain;
1851
+ return $.proxy(fn[context], fn);
1738
1852
  }
1853
+ } else {
1854
+ throw new TypeError("expected function");
1739
1855
  }
1740
- }
1741
- if (!remain) deferred.resolveWith(resolveContexts, resolveValues);
1742
- return deferred.promise();
1743
- };
1744
- $.Deferred = Deferred;
1745
- })(Zepto);
1746
- (function ($) {
1747
- var _zid = 1,
1748
- undefined$1,
1749
- slice = Array.prototype.slice,
1750
- isFunction = $.isFunction,
1751
- isString = function (obj) {
1752
- return typeof obj == 'string';
1753
- },
1754
- handlers = {},
1755
- specialEvents = {},
1756
- focusinSupported = 'onfocusin' in window,
1757
- focus = {
1758
- focus: 'focusin',
1759
- blur: 'focusout'
1760
- },
1761
- hover = {
1762
- mouseenter: 'mouseover',
1763
- mouseleave: 'mouseout'
1764
1856
  };
1765
- specialEvents.click = specialEvents.mousedown = specialEvents.mouseup = specialEvents.mousemove = 'MouseEvents';
1766
- function zid(element) {
1767
- return element._zid || (element._zid = _zid++);
1768
- }
1769
- function findHandlers(element, event, fn, selector) {
1770
- event = parse(event);
1771
- if (event.ns) var matcher = matcherFor(event.ns);
1772
- return (handlers[zid(element)] || []).filter(function (handler) {
1773
- return handler && (!event.e || handler.e == event.e) && (!event.ns || matcher.test(handler.ns)) && (!fn || zid(handler.fn) === zid(fn)) && (!selector || handler.sel == selector);
1774
- });
1775
- }
1776
- function parse(event) {
1777
- var parts = ('' + event).split('.');
1778
- return {
1779
- e: parts[0],
1780
- ns: parts.slice(1).sort().join(' ')
1857
+ $.fn.bind = function (event, data, callback) {
1858
+ return this.on(event, data, callback);
1781
1859
  };
1782
- }
1783
- function matcherFor(ns) {
1784
- return new RegExp('(?:^| )' + ns.replace(' ', ' .* ?') + '(?: |$)');
1785
- }
1786
- function eventCapture(handler, captureSetting) {
1787
- return handler.del && !focusinSupported && handler.e in focus || !!captureSetting;
1788
- }
1789
- function realEvent(type) {
1790
- return hover[type] || focusinSupported && focus[type] || type;
1791
- }
1792
- function add(element, events, fn, data, selector, delegator, capture) {
1793
- var id = zid(element),
1794
- set = handlers[id] || (handlers[id] = []);
1795
- events.split(/\s/).forEach(function (event) {
1796
- if (event == 'ready') return $(document).ready(fn);
1797
- var handler = parse(event);
1798
- handler.fn = fn;
1799
- handler.sel = selector;
1800
- // emulate mouseenter, mouseleave
1801
- if (handler.e in hover) fn = function (e) {
1802
- var related = e.relatedTarget;
1803
- if (!related || related !== this && !$.contains(this, related)) return handler.fn.apply(this, arguments);
1804
- };
1805
- handler.del = delegator;
1806
- var callback = delegator || fn;
1807
- handler.proxy = function (e) {
1808
- e = compatible(e);
1809
- if (e.isImmediatePropagationStopped()) return;
1810
- e.data = data;
1811
- var result = callback.apply(element, e._args == undefined$1 ? [e] : [e].concat(e._args));
1812
- if (result === false) e.preventDefault(), e.stopPropagation();
1813
- return result;
1814
- };
1815
- handler.i = set.length;
1816
- set.push(handler);
1817
- if ('addEventListener' in element) element.addEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture));
1818
- });
1819
- }
1820
- function remove(element, events, fn, selector, capture) {
1821
- var id = zid(element);
1822
- (events || '').split(/\s/).forEach(function (event) {
1823
- findHandlers(element, event, fn, selector).forEach(function (handler) {
1824
- delete handlers[id][handler.i];
1825
- if ('removeEventListener' in element) element.removeEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture));
1826
- });
1827
- });
1828
- }
1829
- $.event = {
1830
- add: add,
1831
- remove: remove
1832
- };
1833
- $.proxy = function (fn, context) {
1834
- var args = 2 in arguments && slice.call(arguments, 2);
1835
- if (isFunction(fn)) {
1836
- var proxyFn = function () {
1837
- return fn.apply(context, args ? args.concat(slice.call(arguments)) : arguments);
1860
+ $.fn.unbind = function (event, callback) {
1861
+ return this.off(event, callback);
1862
+ };
1863
+ $.fn.one = function (event, selector, data, callback) {
1864
+ return this.on(event, selector, data, callback, 1);
1865
+ };
1866
+ var returnTrue = function () {
1867
+ return true;
1868
+ },
1869
+ returnFalse = function () {
1870
+ return false;
1871
+ },
1872
+ ignoreProperties = /^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,
1873
+ eventMethods = {
1874
+ preventDefault: 'isDefaultPrevented',
1875
+ stopImmediatePropagation: 'isImmediatePropagationStopped',
1876
+ stopPropagation: 'isPropagationStopped'
1838
1877
  };
1839
- proxyFn._zid = zid(fn);
1840
- return proxyFn;
1841
- } else if (isString(context)) {
1842
- if (args) {
1843
- args.unshift(fn[context], fn);
1844
- return $.proxy.apply(null, args);
1845
- } else {
1846
- return $.proxy(fn[context], fn);
1878
+ function compatible(event, source) {
1879
+ if (source || !event.isDefaultPrevented) {
1880
+ source || (source = event);
1881
+ $.each(eventMethods, function (name, predicate) {
1882
+ var sourceMethod = source[name];
1883
+ event[name] = function () {
1884
+ this[predicate] = returnTrue;
1885
+ return sourceMethod && sourceMethod.apply(source, arguments);
1886
+ };
1887
+ event[predicate] = returnFalse;
1888
+ });
1889
+ if (source.defaultPrevented !== undefined$1 ? source.defaultPrevented : 'returnValue' in source ? source.returnValue === false : source.getPreventDefault && source.getPreventDefault()) event.isDefaultPrevented = returnTrue;
1847
1890
  }
1848
- } else {
1849
- throw new TypeError("expected function");
1891
+ return event;
1850
1892
  }
1851
- };
1852
- $.fn.bind = function (event, data, callback) {
1853
- return this.on(event, data, callback);
1854
- };
1855
- $.fn.unbind = function (event, callback) {
1856
- return this.off(event, callback);
1857
- };
1858
- $.fn.one = function (event, selector, data, callback) {
1859
- return this.on(event, selector, data, callback, 1);
1860
- };
1861
- var returnTrue = function () {
1862
- return true;
1863
- },
1864
- returnFalse = function () {
1865
- return false;
1866
- },
1867
- ignoreProperties = /^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,
1868
- eventMethods = {
1869
- preventDefault: 'isDefaultPrevented',
1870
- stopImmediatePropagation: 'isImmediatePropagationStopped',
1871
- stopPropagation: 'isPropagationStopped'
1893
+ function createProxy(event) {
1894
+ var key,
1895
+ proxy = {
1896
+ originalEvent: event
1897
+ };
1898
+ for (key in event) if (!ignoreProperties.test(key) && event[key] !== undefined$1) proxy[key] = event[key];
1899
+ return compatible(proxy, event);
1900
+ }
1901
+ $.fn.delegate = function (selector, event, callback) {
1902
+ return this.on(event, selector, callback);
1903
+ };
1904
+ $.fn.undelegate = function (selector, event, callback) {
1905
+ return this.off(event, selector, callback);
1906
+ };
1907
+ $.fn.live = function (event, callback) {
1908
+ $(document.body).delegate(this.selector, event, callback);
1909
+ return this;
1910
+ };
1911
+ $.fn.die = function (event, callback) {
1912
+ $(document.body).undelegate(this.selector, event, callback);
1913
+ return this;
1872
1914
  };
1873
- function compatible(event, source) {
1874
- if (source || !event.isDefaultPrevented) {
1875
- source || (source = event);
1876
- $.each(eventMethods, function (name, predicate) {
1877
- var sourceMethod = source[name];
1878
- event[name] = function () {
1879
- this[predicate] = returnTrue;
1880
- return sourceMethod && sourceMethod.apply(source, arguments);
1915
+ $.fn.on = function (event, selector, data, callback, one) {
1916
+ var autoRemove,
1917
+ delegator,
1918
+ $this = this;
1919
+ if (event && !isString(event)) {
1920
+ $.each(event, function (type, fn) {
1921
+ $this.on(type, selector, data, fn, one);
1922
+ });
1923
+ return $this;
1924
+ }
1925
+ if (!isString(selector) && !isFunction(callback) && callback !== false) callback = data, data = selector, selector = undefined$1;
1926
+ if (callback === undefined$1 || data === false) callback = data, data = undefined$1;
1927
+ if (callback === false) callback = returnFalse;
1928
+ return $this.each(function (_, element) {
1929
+ if (one) autoRemove = function (e) {
1930
+ remove(element, e.type, callback);
1931
+ return callback.apply(this, arguments);
1932
+ };
1933
+ if (selector) delegator = function (e) {
1934
+ var evt,
1935
+ match = $(e.target).closest(selector, element).get(0);
1936
+ if (match && match !== element) {
1937
+ evt = $.extend(createProxy(e), {
1938
+ currentTarget: match,
1939
+ liveFired: element
1940
+ });
1941
+ return (autoRemove || callback).apply(match, [evt].concat(slice.call(arguments, 1)));
1942
+ }
1881
1943
  };
1882
- event[predicate] = returnFalse;
1944
+ add(element, event, callback, data, selector, delegator || autoRemove);
1883
1945
  });
1884
- event.timeStamp || (event.timeStamp = Date.now());
1885
- if (source.defaultPrevented !== undefined$1 ? source.defaultPrevented : 'returnValue' in source ? source.returnValue === false : source.getPreventDefault && source.getPreventDefault()) event.isDefaultPrevented = returnTrue;
1886
- }
1887
- return event;
1888
- }
1889
- function createProxy(event) {
1890
- var key,
1891
- proxy = {
1892
- originalEvent: event
1893
- };
1894
- for (key in event) if (!ignoreProperties.test(key) && event[key] !== undefined$1) proxy[key] = event[key];
1895
- return compatible(proxy, event);
1896
- }
1897
- $.fn.delegate = function (selector, event, callback) {
1898
- return this.on(event, selector, callback);
1899
- };
1900
- $.fn.undelegate = function (selector, event, callback) {
1901
- return this.off(event, selector, callback);
1902
- };
1903
- $.fn.live = function (event, callback) {
1904
- $(document.body).delegate(this.selector, event, callback);
1905
- return this;
1906
- };
1907
- $.fn.die = function (event, callback) {
1908
- $(document.body).undelegate(this.selector, event, callback);
1909
- return this;
1910
- };
1911
- $.fn.on = function (event, selector, data, callback, one) {
1912
- var autoRemove,
1913
- delegator,
1914
- $this = this;
1915
- if (event && !isString(event)) {
1916
- $.each(event, function (type, fn) {
1917
- $this.on(type, selector, data, fn, one);
1946
+ };
1947
+ $.fn.off = function (event, selector, callback) {
1948
+ var $this = this;
1949
+ if (event && !isString(event)) {
1950
+ $.each(event, function (type, fn) {
1951
+ $this.off(type, selector, fn);
1952
+ });
1953
+ return $this;
1954
+ }
1955
+ if (!isString(selector) && !isFunction(callback) && callback !== false) callback = selector, selector = undefined$1;
1956
+ if (callback === false) callback = returnFalse;
1957
+ return $this.each(function () {
1958
+ remove(this, event, callback, selector);
1918
1959
  });
1919
- return $this;
1920
- }
1921
- if (!isString(selector) && !isFunction(callback) && callback !== false) callback = data, data = selector, selector = undefined$1;
1922
- if (callback === undefined$1 || data === false) callback = data, data = undefined$1;
1923
- if (callback === false) callback = returnFalse;
1924
- return $this.each(function (_, element) {
1925
- if (one) autoRemove = function (e) {
1926
- remove(element, e.type, callback);
1927
- return callback.apply(this, arguments);
1928
- };
1929
- if (selector) delegator = function (e) {
1930
- var evt,
1931
- match = $(e.target).closest(selector, element).get(0);
1932
- if (match && match !== element) {
1933
- evt = $.extend(createProxy(e), {
1934
- currentTarget: match,
1935
- liveFired: element
1936
- });
1937
- return (autoRemove || callback).apply(match, [evt].concat(slice.call(arguments, 1)));
1938
- }
1939
- };
1940
- add(element, event, callback, data, selector, delegator || autoRemove);
1941
- });
1942
- };
1943
- $.fn.off = function (event, selector, callback) {
1944
- var $this = this;
1945
- if (event && !isString(event)) {
1946
- $.each(event, function (type, fn) {
1947
- $this.off(type, selector, fn);
1960
+ };
1961
+ $.fn.trigger = function (event, args) {
1962
+ event = isString(event) || $.isPlainObject(event) ? $.Event(event) : compatible(event);
1963
+ event._args = args;
1964
+ return this.each(function () {
1965
+ // handle focus(), blur() by calling them directly
1966
+ if (event.type in focus && typeof this[event.type] == "function") this[event.type]();
1967
+ // items in the collection might not be DOM elements
1968
+ else if ('dispatchEvent' in this) this.dispatchEvent(event);else $(this).triggerHandler(event, args);
1948
1969
  });
1949
- return $this;
1950
- }
1951
- if (!isString(selector) && !isFunction(callback) && callback !== false) callback = selector, selector = undefined$1;
1952
- if (callback === false) callback = returnFalse;
1953
- return $this.each(function () {
1954
- remove(this, event, callback, selector);
1955
- });
1956
- };
1957
- $.fn.trigger = function (event, args) {
1958
- event = isString(event) || $.isPlainObject(event) ? $.Event(event) : compatible(event);
1959
- event._args = args;
1960
- return this.each(function () {
1961
- // handle focus(), blur() by calling them directly
1962
- if (event.type in focus && typeof this[event.type] == "function") this[event.type]();
1963
- // items in the collection might not be DOM elements
1964
- else if ('dispatchEvent' in this) this.dispatchEvent(event);else $(this).triggerHandler(event, args);
1965
- });
1966
- };
1970
+ };
1967
1971
 
1968
- // triggers event handlers on current element just as if an event occurred,
1969
- // doesn't trigger an actual event, doesn't bubble
1970
- $.fn.triggerHandler = function (event, args) {
1971
- var e, result;
1972
- this.each(function (i, element) {
1973
- e = createProxy(isString(event) ? $.Event(event) : event);
1974
- e._args = args;
1975
- e.target = element;
1976
- $.each(findHandlers(element, event.type || event), function (i, handler) {
1977
- result = handler.proxy(e);
1978
- if (e.isImmediatePropagationStopped()) return false;
1972
+ // triggers event handlers on current element just as if an event occurred,
1973
+ // doesn't trigger an actual event, doesn't bubble
1974
+ $.fn.triggerHandler = function (event, args) {
1975
+ var e, result;
1976
+ this.each(function (i, element) {
1977
+ e = createProxy(isString(event) ? $.Event(event) : event);
1978
+ e._args = args;
1979
+ e.target = element;
1980
+ $.each(findHandlers(element, event.type || event), function (i, handler) {
1981
+ result = handler.proxy(e);
1982
+ if (e.isImmediatePropagationStopped()) return false;
1983
+ });
1979
1984
  });
1980
- });
1981
- return result;
1982
- }
1985
+ return result;
1986
+ }
1983
1987
 
1984
- // shortcut methods for `.bind(event, fn)` for each event type
1985
- ;
1986
- ('focusin focusout focus blur load resize scroll unload click dblclick ' + 'mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave ' + 'change select keydown keypress keyup error').split(' ').forEach(function (event) {
1987
- $.fn[event] = function (callback) {
1988
- return 0 in arguments ? this.bind(event, callback) : this.trigger(event);
1988
+ // shortcut methods for `.bind(event, fn)` for each event type
1989
+ ;
1990
+ ('focusin focusout focus blur load resize scroll unload click dblclick ' + 'mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave ' + 'change select keydown keypress keyup error').split(' ').forEach(function (event) {
1991
+ $.fn[event] = function (callback) {
1992
+ return 0 in arguments ? this.bind(event, callback) : this.trigger(event);
1993
+ };
1994
+ });
1995
+ $.Event = function (type, props) {
1996
+ if (!isString(type)) props = type, type = props.type;
1997
+ var event = document.createEvent(specialEvents[type] || 'Events'),
1998
+ bubbles = true;
1999
+ if (props) for (var name in props) name == 'bubbles' ? bubbles = !!props[name] : event[name] = props[name];
2000
+ event.initEvent(type, bubbles, true);
2001
+ return compatible(event);
1989
2002
  };
1990
- });
1991
- $.Event = function (type, props) {
1992
- if (!isString(type)) props = type, type = props.type;
1993
- var event = document.createEvent(specialEvents[type] || 'Events'),
1994
- bubbles = true;
1995
- if (props) for (var name in props) name == 'bubbles' ? bubbles = !!props[name] : event[name] = props[name];
1996
- event.initEvent(type, bubbles, true);
1997
- return compatible(event);
1998
- };
1999
- })(Zepto);
2000
- (function () {
2001
- // getComputedStyle shouldn't freak out when called
2002
- // without a valid element as argument
2003
- try {
2004
- getComputedStyle(undefined);
2005
- } catch (e) {
2006
- var nativeGetComputedStyle = getComputedStyle;
2007
- window.getComputedStyle = function (element, pseudoElement) {
2008
- try {
2009
- return nativeGetComputedStyle(element, pseudoElement);
2010
- } catch (e) {
2011
- return null;
2003
+ })(Zepto);
2004
+ (function () {
2005
+ // getComputedStyle shouldn't freak out when called
2006
+ // without a valid element as argument
2007
+ try {
2008
+ getComputedStyle(undefined);
2009
+ } catch (e) {
2010
+ var nativeGetComputedStyle = getComputedStyle;
2011
+ window.getComputedStyle = function (element, pseudoElement) {
2012
+ try {
2013
+ return nativeGetComputedStyle(element, pseudoElement);
2014
+ } catch (e) {
2015
+ return null;
2016
+ }
2017
+ };
2018
+ }
2019
+ })();
2020
+ (function ($) {
2021
+ var zepto = $.zepto,
2022
+ oldQsa = zepto.qsa,
2023
+ oldMatches = zepto.matches;
2024
+ function visible(elem) {
2025
+ elem = $(elem);
2026
+ return !!(elem.width() || elem.height()) && elem.css("display") !== "none";
2027
+ }
2028
+
2029
+ // Implements a subset from:
2030
+ // http://api.jquery.com/category/selectors/jquery-selector-extensions/
2031
+ //
2032
+ // Each filter function receives the current index, all nodes in the
2033
+ // considered set, and a value if there were parentheses. The value
2034
+ // of `this` is the node currently being considered. The function returns the
2035
+ // resulting node(s), null, or undefined.
2036
+ //
2037
+ // Complex selectors are not supported:
2038
+ // li:has(label:contains("foo")) + li:has(label:contains("bar"))
2039
+ // ul.inner:first > li
2040
+ var filters = $.expr[':'] = {
2041
+ visible: function () {
2042
+ if (visible(this)) return this;
2043
+ },
2044
+ hidden: function () {
2045
+ if (!visible(this)) return this;
2046
+ },
2047
+ selected: function () {
2048
+ if (this.selected) return this;
2049
+ },
2050
+ checked: function () {
2051
+ if (this.checked) return this;
2052
+ },
2053
+ parent: function () {
2054
+ return this.parentNode;
2055
+ },
2056
+ first: function (idx) {
2057
+ if (idx === 0) return this;
2058
+ },
2059
+ last: function (idx, nodes) {
2060
+ if (idx === nodes.length - 1) return this;
2061
+ },
2062
+ eq: function (idx, _, value) {
2063
+ if (idx === value) return this;
2064
+ },
2065
+ contains: function (idx, _, text) {
2066
+ if ($(this).text().indexOf(text) > -1) return this;
2067
+ },
2068
+ has: function (idx, _, sel) {
2069
+ if (zepto.qsa(this, sel).length) return this;
2012
2070
  }
2013
2071
  };
2014
- }
2015
- })();
2016
- (function ($) {
2017
- var zepto = $.zepto,
2018
- oldQsa = zepto.qsa,
2019
- oldMatches = zepto.matches;
2020
- function visible(elem) {
2021
- elem = $(elem);
2022
- return !!(elem.width() || elem.height()) && elem.css("display") !== "none";
2023
- }
2024
-
2025
- // Implements a subset from:
2026
- // http://api.jquery.com/category/selectors/jquery-selector-extensions/
2027
- //
2028
- // Each filter function receives the current index, all nodes in the
2029
- // considered set, and a value if there were parentheses. The value
2030
- // of `this` is the node currently being considered. The function returns the
2031
- // resulting node(s), null, or undefined.
2032
- //
2033
- // Complex selectors are not supported:
2034
- // li:has(label:contains("foo")) + li:has(label:contains("bar"))
2035
- // ul.inner:first > li
2036
- var filters = $.expr[':'] = {
2037
- visible: function () {
2038
- if (visible(this)) return this;
2039
- },
2040
- hidden: function () {
2041
- if (!visible(this)) return this;
2042
- },
2043
- selected: function () {
2044
- if (this.selected) return this;
2045
- },
2046
- checked: function () {
2047
- if (this.checked) return this;
2048
- },
2049
- parent: function () {
2050
- return this.parentNode;
2051
- },
2052
- first: function (idx) {
2053
- if (idx === 0) return this;
2054
- },
2055
- last: function (idx, nodes) {
2056
- if (idx === nodes.length - 1) return this;
2057
- },
2058
- eq: function (idx, _, value) {
2059
- if (idx === value) return this;
2060
- },
2061
- contains: function (idx, _, text) {
2062
- if ($(this).text().indexOf(text) > -1) return this;
2063
- },
2064
- has: function (idx, _, sel) {
2065
- if (zepto.qsa(this, sel).length) return this;
2066
- }
2067
- };
2068
- var filterRe = new RegExp('(.*):(\\w+)(?:\\(([^)]+)\\))?$\\s*'),
2069
- childRe = /^\s*>/,
2070
- classTag = 'Zepto' + +new Date();
2071
- function process(sel, fn) {
2072
- // quote the hash in `a[href^=#]` expression
2073
- sel = sel.replace(/=#\]/g, '="#"]');
2074
- var filter,
2075
- arg,
2076
- match = filterRe.exec(sel);
2077
- if (match && match[2] in filters) {
2078
- filter = filters[match[2]], arg = match[3];
2079
- sel = match[1];
2080
- if (arg) {
2081
- var num = Number(arg);
2082
- if (isNaN(num)) arg = arg.replace(/^["']|["']$/g, '');else arg = num;
2083
- }
2084
- }
2085
- return fn(sel, filter, arg);
2086
- }
2087
- zepto.qsa = function (node, selector) {
2088
- return process(selector, function (sel, filter, arg) {
2089
- try {
2090
- var taggedParent;
2091
- if (!sel && filter) sel = '*';else if (childRe.test(sel))
2092
- // support "> *" child queries by tagging the parent node with a
2093
- // unique class and prepending that classname onto the selector
2094
- taggedParent = $(node).addClass(classTag), sel = '.' + classTag + ' ' + sel;
2095
- var nodes = oldQsa(node, sel);
2096
- } catch (e) {
2097
- console.error('error performing selector: %o', selector);
2098
- throw e;
2099
- } finally {
2100
- if (taggedParent) taggedParent.removeClass(classTag);
2072
+ var filterRe = new RegExp('(.*):(\\w+)(?:\\(([^)]+)\\))?$\\s*'),
2073
+ childRe = /^\s*>/,
2074
+ classTag = 'Zepto' + +new Date();
2075
+ function process(sel, fn) {
2076
+ // quote the hash in `a[href^=#]` expression
2077
+ sel = sel.replace(/=#\]/g, '="#"]');
2078
+ var filter,
2079
+ arg,
2080
+ match = filterRe.exec(sel);
2081
+ if (match && match[2] in filters) {
2082
+ filter = filters[match[2]], arg = match[3];
2083
+ sel = match[1];
2084
+ if (arg) {
2085
+ var num = Number(arg);
2086
+ if (isNaN(num)) arg = arg.replace(/^["']|["']$/g, '');else arg = num;
2087
+ }
2101
2088
  }
2102
- return !filter ? nodes : zepto.uniq($.map(nodes, function (n, i) {
2103
- return filter.call(n, i, nodes, arg);
2104
- }));
2105
- });
2106
- };
2107
- zepto.matches = function (node, selector) {
2108
- return process(selector, function (sel, filter, arg) {
2109
- return (!sel || oldMatches(node, sel)) && (!filter || filter.call(node, null, arg) === node);
2110
- });
2111
- };
2112
- })(Zepto);
2113
- var zepto = Zepto;
2114
- var $ = /*@__PURE__*/getDefaultExportFromCjs(zepto);
2089
+ return fn(sel, filter, arg);
2090
+ }
2091
+ zepto.qsa = function (node, selector) {
2092
+ return process(selector, function (sel, filter, arg) {
2093
+ try {
2094
+ var taggedParent;
2095
+ if (!sel && filter) sel = '*';else if (childRe.test(sel))
2096
+ // support "> *" child queries by tagging the parent node with a
2097
+ // unique class and prepending that classname onto the selector
2098
+ taggedParent = $(node).addClass(classTag), sel = '.' + classTag + ' ' + sel;
2099
+ var nodes = oldQsa(node, sel);
2100
+ } catch (e) {
2101
+ console.error('error performing selector: %o', selector);
2102
+ throw e;
2103
+ } finally {
2104
+ if (taggedParent) taggedParent.removeClass(classTag);
2105
+ }
2106
+ return !filter ? nodes : zepto.uniq($.map(nodes, function (n, i) {
2107
+ return filter.call(n, i, nodes, arg);
2108
+ }));
2109
+ });
2110
+ };
2111
+ zepto.matches = function (node, selector) {
2112
+ return process(selector, function (sel, filter, arg) {
2113
+ return (!sel || oldMatches(node, sel)) && (!filter || filter.call(node, null, arg) === node);
2114
+ });
2115
+ };
2116
+ })(Zepto);
2117
+ zepto = Zepto;
2118
+ return zepto;
2119
+ }
2120
+ var zeptoExports = requireZepto();
2121
+ var $ = /*@__PURE__*/getDefaultExportFromCjs(zeptoExports);
2115
2122
 
2116
2123
  // Copyright 2014 Globo.com Player authors. All rights reserved.
2117
2124
  // Use of this source code is governed by a BSD-style
@@ -2267,73 +2274,71 @@
2267
2274
  mp4: mp4
2268
2275
  };
2269
2276
 
2270
- /* eslint-disable no-useless-escape */
2271
2277
  // The order of the following arrays is important, be careful if you change it.
2272
2278
 
2273
2279
  var BROWSER_DATA = [{
2274
2280
  name: 'Chromium',
2275
2281
  group: 'Chrome',
2276
- identifier: 'Chromium/([0-9\.]*)'
2282
+ identifier: 'Chromium/([0-9.]*)'
2277
2283
  }, {
2278
2284
  name: 'Chrome Mobile',
2279
2285
  group: 'Chrome',
2280
- identifier: 'Chrome/([0-9\.]*) Mobile',
2281
- versionIdentifier: 'Chrome/([0-9\.]*)'
2286
+ identifier: 'Chrome/([0-9.]*) Mobile',
2287
+ versionIdentifier: 'Chrome/([0-9.]*)'
2282
2288
  }, {
2283
2289
  name: 'Chrome',
2284
2290
  group: 'Chrome',
2285
- identifier: 'Chrome/([0-9\.]*)'
2291
+ identifier: 'Chrome/([0-9.]*)'
2286
2292
  }, {
2287
2293
  name: 'Chrome for iOS',
2288
2294
  group: 'Chrome',
2289
- identifier: 'CriOS/([0-9\.]*)'
2295
+ identifier: 'CriOS/([0-9.]*)'
2290
2296
  }, {
2291
2297
  name: 'Android Browser',
2292
2298
  group: 'Chrome',
2293
- identifier: 'CrMo/([0-9\.]*)'
2299
+ identifier: 'CrMo/([0-9.]*)'
2294
2300
  }, {
2295
2301
  name: 'Firefox',
2296
2302
  group: 'Firefox',
2297
- identifier: 'Firefox/([0-9\.]*)'
2303
+ identifier: 'Firefox/([0-9.]*)'
2298
2304
  }, {
2299
2305
  name: 'Opera Mini',
2300
2306
  group: 'Opera',
2301
- identifier: 'Opera Mini/([0-9\.]*)'
2307
+ identifier: 'Opera Mini/([0-9.]*)'
2302
2308
  }, {
2303
2309
  name: 'Opera',
2304
2310
  group: 'Opera',
2305
- identifier: 'Opera ([0-9\.]*)'
2311
+ identifier: 'Opera ([0-9.]*)'
2306
2312
  }, {
2307
2313
  name: 'Opera',
2308
2314
  group: 'Opera',
2309
- identifier: 'Opera/([0-9\.]*)',
2310
- versionIdentifier: 'Version/([0-9\.]*)'
2315
+ identifier: 'Opera/([0-9.]*)',
2316
+ versionIdentifier: 'Version/([0-9.]*)'
2311
2317
  }, {
2312
2318
  name: 'IEMobile',
2313
2319
  group: 'Explorer',
2314
- identifier: 'IEMobile/([0-9\.]*)'
2320
+ identifier: 'IEMobile/([0-9.]*)'
2315
2321
  }, {
2316
2322
  name: 'Internet Explorer',
2317
2323
  group: 'Explorer',
2318
- identifier: 'MSIE ([a-zA-Z0-9\.]*)'
2324
+ identifier: 'MSIE ([a-zA-Z0-9.]*)'
2319
2325
  }, {
2320
2326
  name: 'Internet Explorer',
2321
2327
  group: 'Explorer',
2322
- identifier: 'Trident/([0-9\.]*)',
2323
- versionIdentifier: 'rv:([0-9\.]*)'
2328
+ identifier: 'Trident/([0-9.]*)',
2329
+ versionIdentifier: 'rv:([0-9.]*)'
2324
2330
  }, {
2325
2331
  name: 'Spartan',
2326
2332
  group: 'Spartan',
2327
- identifier: 'Edge/([0-9\.]*)',
2328
- versionIdentifier: 'Edge/([0-9\.]*)'
2333
+ identifier: 'Edge/([0-9.]*)',
2334
+ versionIdentifier: 'Edge/([0-9.]*)'
2329
2335
  }, {
2330
2336
  name: 'Safari',
2331
2337
  group: 'Safari',
2332
- identifier: 'Safari/([0-9\.]*)',
2333
- versionIdentifier: 'Version/([0-9\.]*)'
2338
+ identifier: 'Safari/([0-9.]*)',
2339
+ versionIdentifier: 'Version/([0-9.]*)'
2334
2340
  }];
2335
2341
 
2336
- /* eslint-disable no-useless-escape */
2337
2342
  // The order of the following arrays is important, be careful if you change it.
2338
2343
 
2339
2344
  var OS_DATA = [{
@@ -2374,11 +2379,11 @@
2374
2379
  }, {
2375
2380
  name: 'Windows Phone',
2376
2381
  group: 'Windows Phone',
2377
- identifier: 'Windows Phone ([0-9\.]*)'
2382
+ identifier: 'Windows Phone ([0-9.]*)'
2378
2383
  }, {
2379
2384
  name: 'Windows Phone',
2380
2385
  group: 'Windows Phone',
2381
- identifier: 'Windows Phone OS ([0-9\.]*)'
2386
+ identifier: 'Windows Phone OS ([0-9.]*)'
2382
2387
  }, {
2383
2388
  name: 'Windows',
2384
2389
  group: 'Windows',
@@ -2391,95 +2396,95 @@
2391
2396
  name: 'Android',
2392
2397
  group: 'Android',
2393
2398
  identifier: 'Android',
2394
- versionIdentifier: 'Android ([a-zA-Z0-9\.-]*)'
2399
+ versionIdentifier: 'Android ([a-zA-Z0-9.-]*)'
2395
2400
  }, {
2396
2401
  name: 'iPad',
2397
2402
  group: 'iOS',
2398
2403
  identifier: 'iPad',
2399
2404
  versionIdentifier: 'OS ([0-9_]*)',
2400
- versionSeparator: '[_|\.]'
2405
+ versionSeparator: '[_.]'
2401
2406
  }, {
2402
2407
  name: 'iPod',
2403
2408
  group: 'iOS',
2404
2409
  identifier: 'iPod',
2405
2410
  versionIdentifier: 'OS ([0-9_]*)',
2406
- versionSeparator: '[_|\.]'
2411
+ versionSeparator: '[_.]'
2407
2412
  }, {
2408
2413
  name: 'iPhone',
2409
2414
  group: 'iOS',
2410
2415
  identifier: 'iPhone OS',
2411
2416
  versionIdentifier: 'OS ([0-9_]*)',
2412
- versionSeparator: '[_|\.]'
2417
+ versionSeparator: '[_.]'
2413
2418
  }, {
2414
2419
  name: 'Mac OS X High Sierra',
2415
2420
  group: 'Mac OS',
2416
- identifier: 'Mac OS X (10([_|\.])13([0-9_\.]*))',
2417
- versionSeparator: '[_|\.]'
2421
+ identifier: 'Mac OS X (10([_.])13([0-9_.]*))',
2422
+ versionSeparator: '[_.]'
2418
2423
  }, {
2419
2424
  name: 'Mac OS X Sierra',
2420
2425
  group: 'Mac OS',
2421
- identifier: 'Mac OS X (10([_|\.])12([0-9_\.]*))',
2422
- versionSeparator: '[_|\.]'
2426
+ identifier: 'Mac OS X (10([_.])12([0-9_.]*))',
2427
+ versionSeparator: '[_.]'
2423
2428
  }, {
2424
2429
  name: 'Mac OS X El Capitan',
2425
2430
  group: 'Mac OS',
2426
- identifier: 'Mac OS X (10([_|\.])11([0-9_\.]*))',
2427
- versionSeparator: '[_|\.]'
2431
+ identifier: 'Mac OS X (10([_.])11([0-9_.]*))',
2432
+ versionSeparator: '[_.]'
2428
2433
  }, {
2429
2434
  name: 'Mac OS X Yosemite',
2430
2435
  group: 'Mac OS',
2431
- identifier: 'Mac OS X (10([_|\.])10([0-9_\.]*))',
2432
- versionSeparator: '[_|\.]'
2436
+ identifier: 'Mac OS X (10([_.])10([0-9_.]*))',
2437
+ versionSeparator: '[_.]'
2433
2438
  }, {
2434
2439
  name: 'Mac OS X Mavericks',
2435
2440
  group: 'Mac OS',
2436
- identifier: 'Mac OS X (10([_|\.])9([0-9_\.]*))',
2437
- versionSeparator: '[_|\.]'
2441
+ identifier: 'Mac OS X (10([_.])9([0-9_.]*))',
2442
+ versionSeparator: '[_.]'
2438
2443
  }, {
2439
2444
  name: 'Mac OS X Mountain Lion',
2440
2445
  group: 'Mac OS',
2441
- identifier: 'Mac OS X (10([_|\.])8([0-9_\.]*))',
2442
- versionSeparator: '[_|\.]'
2446
+ identifier: 'Mac OS X (10([_.])8([0-9_.]*))',
2447
+ versionSeparator: '[_.]'
2443
2448
  }, {
2444
2449
  name: 'Mac OS X Lion',
2445
2450
  group: 'Mac OS',
2446
- identifier: 'Mac OS X (10([_|\.])7([0-9_\.]*))',
2447
- versionSeparator: '[_|\.]'
2451
+ identifier: 'Mac OS X (10([_.])7([0-9_.]*))',
2452
+ versionSeparator: '[_.]'
2448
2453
  }, {
2449
2454
  name: 'Mac OS X Snow Leopard',
2450
2455
  group: 'Mac OS',
2451
- identifier: 'Mac OS X (10([_|\.])6([0-9_\.]*))',
2452
- versionSeparator: '[_|\.]'
2456
+ identifier: 'Mac OS X (10([_.])6([0-9_.]*))',
2457
+ versionSeparator: '[_.]'
2453
2458
  }, {
2454
2459
  name: 'Mac OS X Leopard',
2455
2460
  group: 'Mac OS',
2456
- identifier: 'Mac OS X (10([_|\.])5([0-9_\.]*))',
2457
- versionSeparator: '[_|\.]'
2461
+ identifier: 'Mac OS X (10([_.])5([0-9_.]*))',
2462
+ versionSeparator: '[_.]'
2458
2463
  }, {
2459
2464
  name: 'Mac OS X Tiger',
2460
2465
  group: 'Mac OS',
2461
- identifier: 'Mac OS X (10([_|\.])4([0-9_\.]*))',
2462
- versionSeparator: '[_|\.]'
2466
+ identifier: 'Mac OS X (10([_.])4([0-9_.]*))',
2467
+ versionSeparator: '[_.]'
2463
2468
  }, {
2464
2469
  name: 'Mac OS X Panther',
2465
2470
  group: 'Mac OS',
2466
- identifier: 'Mac OS X (10([_|\.])3([0-9_\.]*))',
2467
- versionSeparator: '[_|\.]'
2471
+ identifier: 'Mac OS X (10([_.])3([0-9_.]*))',
2472
+ versionSeparator: '[_.]'
2468
2473
  }, {
2469
2474
  name: 'Mac OS X Jaguar',
2470
2475
  group: 'Mac OS',
2471
- identifier: 'Mac OS X (10([_|\.])2([0-9_\.]*))',
2472
- versionSeparator: '[_|\.]'
2476
+ identifier: 'Mac OS X (10([_.])2([0-9_.]*))',
2477
+ versionSeparator: '[_.]'
2473
2478
  }, {
2474
2479
  name: 'Mac OS X Puma',
2475
2480
  group: 'Mac OS',
2476
- identifier: 'Mac OS X (10([_|\.])1([0-9_\.]*))',
2477
- versionSeparator: '[_|\.]'
2481
+ identifier: 'Mac OS X (10([_.])1([0-9_.]*))',
2482
+ versionSeparator: '[_.]'
2478
2483
  }, {
2479
2484
  name: 'Mac OS X Cheetah',
2480
2485
  group: 'Mac OS',
2481
- identifier: 'Mac OS X (10([_|\.])0([0-9_\.]*))',
2482
- versionSeparator: '[_|\.]'
2486
+ identifier: 'Mac OS X (10([_.])0([0-9_.]*))',
2487
+ versionSeparator: '[_.]'
2483
2488
  }, {
2484
2489
  name: 'Mac OS',
2485
2490
  group: 'Mac OS',
@@ -2488,7 +2493,7 @@
2488
2493
  name: 'Ubuntu',
2489
2494
  group: 'Linux',
2490
2495
  identifier: 'Ubuntu',
2491
- versionIdentifier: 'Ubuntu/([0-9\.]*)'
2496
+ versionIdentifier: 'Ubuntu/([0-9.]*)'
2492
2497
  }, {
2493
2498
  name: 'Debian',
2494
2499
  group: 'Linux',
@@ -3723,9 +3728,17 @@
3723
3728
  * @param {boolean} state true if dvr enabled
3724
3729
  */
3725
3730
  Events.PLAYBACK_DVR = 'playback:dvr';
3726
- // TODO doc
3731
+ /**
3732
+ * Fired when the playback requests the media control to be disabled.
3733
+ *
3734
+ * @event PLAYBACK_MEDIACONTROL_DISABLE
3735
+ */
3727
3736
  Events.PLAYBACK_MEDIACONTROL_DISABLE = 'playback:mediacontrol:disable';
3728
- // TODO doc
3737
+ /**
3738
+ * Fired when the playback requests the media control to be enabled.
3739
+ *
3740
+ * @event PLAYBACK_MEDIACONTROL_ENABLE
3741
+ */
3729
3742
  Events.PLAYBACK_MEDIACONTROL_ENABLE = 'playback:mediacontrol:enable';
3730
3743
  /**
3731
3744
  * Fired when the media for a playback ends.
@@ -3782,9 +3795,21 @@
3782
3795
  * @param {String} name Playback name
3783
3796
  */
3784
3797
  Events.PLAYBACK_ERROR = 'playback:error';
3785
- // TODO doc
3798
+ /**
3799
+ * Fired when the playback has stats data to report.
3800
+ *
3801
+ * @event PLAYBACK_STATS_ADD
3802
+ * @param {Object} stats Data
3803
+ * stats object, its shape depends on the playback implementation
3804
+ */
3786
3805
  Events.PLAYBACK_STATS_ADD = 'playback:stats:add';
3787
- // TODO doc
3806
+ /**
3807
+ * Fired when a media fragment/segment has finished loading.
3808
+ *
3809
+ * @event PLAYBACK_FRAGMENT_LOADED
3810
+ * @param {Object} data Data
3811
+ * fragment metadata, its shape depends on the playback implementation
3812
+ */
3788
3813
  Events.PLAYBACK_FRAGMENT_LOADED = 'playback:fragment:loaded';
3789
3814
  /**
3790
3815
  * Fired when a fragment has been appended into buffer
@@ -3794,7 +3819,13 @@
3794
3819
  *
3795
3820
  */
3796
3821
  Events.PLAYBACK_FRAGMENT_BUFFERED = 'playback:fragment:buffered';
3797
- // TODO doc
3822
+ /**
3823
+ * Fired when the playback switches to a different quality level.
3824
+ *
3825
+ * @event PLAYBACK_LEVEL_SWITCH
3826
+ * @param {Object} data Data
3827
+ * level switch metadata, its shape depends on the playback implementation
3828
+ */
3798
3829
  Events.PLAYBACK_LEVEL_SWITCH = 'playback:level:switch';
3799
3830
  /**
3800
3831
  * Fired when subtitle is available on playback for display
@@ -4733,11 +4764,13 @@
4733
4764
  return extend$1(UICorePlugin, properties);
4734
4765
  };
4735
4766
  UICorePlugin.type = 'core';
4736
- var css_248z$5$1 = ".container[data-container] {\n position: absolute;\n background-color: black;\n height: 100%;\n width: 100%;\n max-width: 100%; }\n .container[data-container] .chromeless {\n cursor: default; }\n\n[data-player]:not(.nocursor) .container[data-container]:not(.chromeless).pointer-enabled {\n cursor: pointer; }\n";
4767
+ var css_248z$5$1 = ".container[data-container] {\n position: absolute;\n background-color: black;\n height: 100%;\n width: 100%;\n max-width: 100%;\n}\n.container[data-container] .chromeless {\n cursor: default;\n}\n\n[data-player]:not(.nocursor) .container[data-container]:not(.chromeless).pointer-enabled {\n cursor: pointer;\n}";
4737
4768
 
4738
4769
  /**
4739
- * An abstraction to represent a container for a given playback
4740
- * TODO: describe its responsabilities
4770
+ * An abstraction to represent a container for a given playback.
4771
+ * It wraps a playback instance, forwards its events, and exposes
4772
+ * playback controls (play, pause, seek, volume, fullscreen, etc.)
4773
+ * to the rest of the player.
4741
4774
  * @class Container
4742
4775
  * @constructor
4743
4776
  * @extends UIObject
@@ -6033,8 +6066,13 @@
6033
6066
  }
6034
6067
  }]);
6035
6068
  }(BaseObject);
6036
- var css_248z$4$1 = "[data-player] {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -o-user-select: none;\n user-select: none;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n transform: translate3d(0, 0, 0);\n position: relative;\n margin: 0;\n padding: 0;\n border: 0;\n font-style: normal;\n font-weight: normal;\n text-align: center;\n overflow: hidden;\n font-size: 100%;\n font-family: \"Roboto\", \"Open Sans\", Arial, sans-serif;\n text-shadow: 0 0 0;\n box-sizing: border-box; }\n [data-player]:focus {\n outline: 0; }\n [data-player] * {\n box-sizing: inherit; }\n [data-player] > * {\n float: none;\n max-width: none; }\n [data-player] > div {\n display: block; }\n [data-player].fullscreen {\n width: 100% !important;\n height: 100% !important;\n top: 0;\n left: 0; }\n [data-player].nocursor {\n cursor: none; }\n\n.clappr-style {\n display: none !important; }\n";
6037
- var css_248z$3$1 = "[data-player] div, [data-player] span, [data-player] applet, [data-player] object, [data-player] iframe,\n[data-player] h1, [data-player] h2, [data-player] h3, [data-player] h4, [data-player] h5, [data-player] h6, [data-player] p, [data-player] blockquote, [data-player] pre,\n[data-player] a, [data-player] abbr, [data-player] acronym, [data-player] address, [data-player] big, [data-player] cite, [data-player] code,\n[data-player] del, [data-player] dfn, [data-player] em, [data-player] img, [data-player] ins, [data-player] kbd, [data-player] q, [data-player] s, [data-player] samp,\n[data-player] small, [data-player] strike, [data-player] strong, [data-player] sub, [data-player] sup, [data-player] tt, [data-player] var,\n[data-player] b, [data-player] u, [data-player] i, [data-player] center,\n[data-player] dl, [data-player] dt, [data-player] dd, [data-player] ol, [data-player] ul, [data-player] li,\n[data-player] fieldset, [data-player] form, [data-player] label, [data-player] legend,\n[data-player] table, [data-player] caption, [data-player] tbody, [data-player] tfoot, [data-player] thead, [data-player] tr, [data-player] th, [data-player] td,\n[data-player] article, [data-player] aside, [data-player] canvas, [data-player] details, [data-player] embed,\n[data-player] figure, [data-player] figcaption, [data-player] footer, [data-player] header, [data-player] hgroup,\n[data-player] menu, [data-player] nav, [data-player] output, [data-player] ruby, [data-player] section, [data-player] summary,\n[data-player] time, [data-player] mark, [data-player] audio, [data-player] video {\n margin: 0;\n padding: 0;\n border: 0;\n font: inherit;\n font-size: 100%;\n vertical-align: baseline; }\n\n[data-player] table {\n border-collapse: collapse;\n border-spacing: 0; }\n\n[data-player] caption, [data-player] th, [data-player] td {\n text-align: left;\n font-weight: normal;\n vertical-align: middle; }\n\n[data-player] q, [data-player] blockquote {\n quotes: none; }\n [data-player] q:before, [data-player] q:after, [data-player] blockquote:before, [data-player] blockquote:after {\n content: \"\";\n content: none; }\n\n[data-player] a img {\n border: none; }\n";
6069
+ var css_248z$4$1 = "[data-player] {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -o-user-select: none;\n user-select: none;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n transform: translate3d(0, 0, 0);\n position: relative;\n margin: 0;\n padding: 0;\n border: 0;\n font-style: normal;\n font-weight: normal;\n text-align: center;\n overflow: hidden;\n font-size: 100%;\n font-family: \"Roboto\", \"Open Sans\", Arial, sans-serif;\n text-shadow: 0 0 0;\n box-sizing: border-box;\n}\n[data-player]:focus {\n outline: 0;\n}\n[data-player] * {\n box-sizing: inherit;\n}\n[data-player] > * {\n float: none;\n max-width: none;\n}\n[data-player] > div {\n display: block;\n}\n[data-player].fullscreen {\n width: 100% !important;\n height: 100% !important;\n top: 0;\n left: 0;\n}\n[data-player].nocursor {\n cursor: none;\n}\n\n.clappr-style {\n display: none !important;\n}";
6070
+ var css_248z$3$1 = "[data-player] div, [data-player] span, [data-player] applet, [data-player] object, [data-player] iframe,\n[data-player] h1, [data-player] h2, [data-player] h3, [data-player] h4, [data-player] h5, [data-player] h6, [data-player] p, [data-player] blockquote, [data-player] pre,\n[data-player] a, [data-player] abbr, [data-player] acronym, [data-player] address, [data-player] big, [data-player] cite, [data-player] code,\n[data-player] del, [data-player] dfn, [data-player] em, [data-player] img, [data-player] ins, [data-player] kbd, [data-player] q, [data-player] s, [data-player] samp,\n[data-player] small, [data-player] strike, [data-player] strong, [data-player] sub, [data-player] sup, [data-player] tt, [data-player] var,\n[data-player] b, [data-player] u, [data-player] i, [data-player] center,\n[data-player] dl, [data-player] dt, [data-player] dd, [data-player] ol, [data-player] ul, [data-player] li,\n[data-player] fieldset, [data-player] form, [data-player] label, [data-player] legend,\n[data-player] table, [data-player] caption, [data-player] tbody, [data-player] tfoot, [data-player] thead, [data-player] tr, [data-player] th, [data-player] td,\n[data-player] article, [data-player] aside, [data-player] canvas, [data-player] details, [data-player] embed,\n[data-player] figure, [data-player] figcaption, [data-player] footer, [data-player] header, [data-player] hgroup,\n[data-player] menu, [data-player] nav, [data-player] output, [data-player] ruby, [data-player] section, [data-player] summary,\n[data-player] time, [data-player] mark, [data-player] audio, [data-player] video {\n margin: 0;\n padding: 0;\n border: 0;\n font: inherit;\n font-size: 100%;\n vertical-align: baseline;\n}\n[data-player] table {\n border-collapse: collapse;\n border-spacing: 0;\n}\n[data-player] caption, [data-player] th, [data-player] td {\n text-align: left;\n font-weight: normal;\n vertical-align: middle;\n}\n[data-player] q, [data-player] blockquote {\n quotes: none;\n}\n[data-player] q:before, [data-player] q:after, [data-player] blockquote:before, [data-player] blockquote:after {\n content: \"\";\n content: none;\n}\n[data-player] a img {\n border: none;\n}";
6071
+ function isFullscreenPolicyBlocked(error) {
6072
+ if (!error) return false;
6073
+ var message = error.message || String(error);
6074
+ return /disallowed by permissions policy|permissions policy|fullscreen is not allowed/i.test(message);
6075
+ }
6038
6076
 
6039
6077
  /**
6040
6078
  * The Core is responsible to manage Containers and the player state.
@@ -6454,16 +6492,28 @@
6454
6492
  } else {
6455
6493
  var _fullscreenEl = Browser.isiOS ? this.activePlaybackEl : this.el;
6456
6494
  if (!_fullscreenEl) return;
6457
- Browser.isSafari || Browser.isiOS // Safari doesn't return a promise like the other browsers. See more in https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullScreen
6458
- ? Fullscreen$1.requestFullscreen(_fullscreenEl) : Fullscreen$1.requestFullscreen(_fullscreenEl).then(function (_) {
6459
- return _;
6460
- }, function (error) {
6461
- return setTimeout(function () {
6462
- // fixes the issue https://github.com/clappr/clappr/issues/1860
6463
- if (!_this6.isFullscreen()) throw new ReferenceError(error);
6464
- }, 600);
6465
- });
6466
- !Browser.isiOS && this.$el.addClass('fullscreen');
6495
+ var addFullscreenClass = function addFullscreenClass() {
6496
+ !Browser.isiOS && _this6.$el.addClass('fullscreen');
6497
+ };
6498
+ if (Browser.isSafari || Browser.isiOS) {
6499
+ // Safari doesn't return a promise like the other browsers. See more in https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullScreen
6500
+ Fullscreen$1.requestFullscreen(_fullscreenEl);
6501
+ addFullscreenClass();
6502
+ } else {
6503
+ var requestResult = Fullscreen$1.requestFullscreen(_fullscreenEl);
6504
+ var promise = requestResult != null && typeof requestResult.then === 'function' ? requestResult : Promise.resolve();
6505
+ addFullscreenClass();
6506
+ promise.then(function () {}, function (error) {
6507
+ setTimeout(function () {
6508
+ // fixes the issue https://github.com/clappr/clappr/issues/1860
6509
+ if (!_this6.isFullscreen()) {
6510
+ _this6.$el.removeClass('fullscreen');
6511
+ if (isFullscreenPolicyBlocked(error)) return;
6512
+ throw new ReferenceError(error.message || String(error));
6513
+ }
6514
+ }, 600);
6515
+ });
6516
+ }
6467
6517
  }
6468
6518
  }
6469
6519
  }, {
@@ -6680,7 +6730,7 @@
6680
6730
  plugins: {},
6681
6731
  playbacks: []
6682
6732
  };
6683
- var currentVersion = "0.13.2";
6733
+ var currentVersion = "0.14.3";
6684
6734
  return /*#__PURE__*/function () {
6685
6735
  /**
6686
6736
  * builds the loader
@@ -7231,6 +7281,18 @@
7231
7281
  });
7232
7282
  return this;
7233
7283
  }
7284
+ }, {
7285
+ key: "_unregisterOptionEventListeners",
7286
+ value: function _unregisterOptionEventListeners() {
7287
+ var _this3 = this;
7288
+ if (!this.options.events) return this;
7289
+ Object.keys(this.options.events).forEach(function (userEvent) {
7290
+ var eventType = _this3.eventsMapping[userEvent];
7291
+ var eventFunction = _this3.options.events[userEvent];
7292
+ if (eventType && eventFunction) _this3.off(eventType, eventFunction);
7293
+ });
7294
+ return this;
7295
+ }
7234
7296
  }, {
7235
7297
  key: "_containerChanged",
7236
7298
  value: function _containerChanged() {
@@ -7358,6 +7420,7 @@
7358
7420
  }, {
7359
7421
  key: "destroy",
7360
7422
  value: function destroy() {
7423
+ this._unregisterOptionEventListeners();
7361
7424
  this.stopListening();
7362
7425
  this.core.destroy();
7363
7426
  return this;
@@ -7746,7 +7809,7 @@
7746
7809
  };
7747
7810
  UIContainerPlugin.type = 'container';
7748
7811
  var tracksHTML = "<% for (var i = 0; i < tracks.length; i++) { %>\n <track data-html5-video-track=\"<%= i %>\" kind=\"<%= tracks[i].kind %>\" label=\"<%= tracks[i].label %>\" srclang=\"<%= tracks[i].lang %>\" src=\"<%= tracks[i].src %>\">\n<% }; %>\n";
7749
- var css_248z$2$1 = "[data-html5-video] {\n position: absolute;\n height: 100%;\n width: 100%;\n display: block; }\n";
7812
+ var css_248z$2$1 = "[data-html5-video] {\n position: absolute;\n height: 100%;\n width: 100%;\n display: block;\n}";
7750
7813
  var MIMETYPES = {
7751
7814
  mp4: ['avc1.42E01E', 'avc1.58A01E', 'avc1.4D401E', 'avc1.64001E', 'mp4v.20.8', 'mp4v.20.240', 'mp4a.40.2'].map(function (codec) {
7752
7815
  return 'video/mp4; codecs="' + codec + ', mp4a.40.2"';
@@ -7845,7 +7908,7 @@
7845
7908
  key: "supportedVersion",
7846
7909
  get: function get() {
7847
7910
  return {
7848
- min: "0.13.2"
7911
+ min: "0.14.3"
7849
7912
  };
7850
7913
  }
7851
7914
  }, {
@@ -7947,7 +8010,7 @@
7947
8010
  }, {
7948
8011
  key: "configure",
7949
8012
  value: function configure(options) {
7950
- _superPropGet$1(HTML5Video, "configure", this)([options]);
8013
+ _superPropGet$1(HTML5Video, "configure", this, 3)([options]);
7951
8014
  this.el.loop = !!options.loop;
7952
8015
  }
7953
8016
 
@@ -8094,13 +8157,13 @@
8094
8157
  value: function consent(cb) {
8095
8158
  var _this3 = this;
8096
8159
  if (this.isPlaying() || this.el._consented) {
8097
- _superPropGet$1(HTML5Video, "consent", this)([cb]);
8160
+ _superPropGet$1(HTML5Video, "consent", this, 3)([cb]);
8098
8161
  } else {
8099
8162
  var _eventHandler = function eventHandler() {
8100
8163
  _this3.el.removeEventListener('loadedmetadata', _eventHandler, false);
8101
8164
  _this3.el.removeEventListener('error', _eventHandler, false);
8102
8165
  _this3.el._consented = true; // Flag to call load() only once
8103
- _superPropGet$1(HTML5Video, "consent", _this3)([cb]);
8166
+ _superPropGet$1(HTML5Video, "consent", _this3, 3)([cb]);
8104
8167
  };
8105
8168
  this.el.addEventListener('loadedmetadata', _eventHandler, false);
8106
8169
  this.el.addEventListener('error', _eventHandler, false);
@@ -8375,7 +8438,7 @@
8375
8438
  this._stopPlayheadMovingChecks();
8376
8439
  this.handleTextTrackChange && this.el.textTracks.removeEventListener('change', this.handleTextTrackChange);
8377
8440
  this.$el.off('contextmenu');
8378
- _superPropGet$1(HTML5Video, "destroy", this)([]);
8441
+ _superPropGet$1(HTML5Video, "destroy", this, 3)([]);
8379
8442
  this.el.removeAttribute('src');
8380
8443
  this.el.load(); // load with no src to stop loading of the previous source and avoid leaks
8381
8444
  this._src = null;
@@ -8649,7 +8712,7 @@
8649
8712
  key: "supportedVersion",
8650
8713
  get: function get() {
8651
8714
  return {
8652
- min: "0.13.2"
8715
+ min: "0.14.3"
8653
8716
  };
8654
8717
  }
8655
8718
  }, {
@@ -8685,7 +8748,7 @@
8685
8748
  };
8686
8749
  return HTML5Video._canPlay('audio', mimetypes, resourceUrl, mimeType);
8687
8750
  };
8688
- var css_248z$1$1 = "[data-html-img] {\n max-width: 100%;\n max-height: 100%; }\n";
8751
+ var css_248z$1$1 = "[data-html-img] {\n max-width: 100%;\n max-height: 100%;\n}";
8689
8752
  var HTMLImg = /*#__PURE__*/function (_Playback) {
8690
8753
  function HTMLImg(params) {
8691
8754
  var _this;
@@ -8704,7 +8767,7 @@
8704
8767
  key: "supportedVersion",
8705
8768
  get: function get() {
8706
8769
  return {
8707
- min: "0.13.2"
8770
+ min: "0.14.3"
8708
8771
  };
8709
8772
  }
8710
8773
  }, {
@@ -8762,7 +8825,7 @@
8762
8825
  return /\.(png|jpg|jpeg|gif|bmp|tiff|pgm|pnm|webp)(|\?.*)$/i.test(resource);
8763
8826
  };
8764
8827
  var noOpHTML = "<canvas data-no-op-canvas></canvas>\n<p data-no-op-msg><%=message%></p><p>\n</p>";
8765
- var css_248z$8 = "[data-no-op] {\n position: absolute;\n height: 100%;\n width: 100%;\n text-align: center; }\n\n[data-no-op] p[data-no-op-msg] {\n position: absolute;\n text-align: center;\n font-size: 25px;\n left: 0;\n right: 0;\n color: white;\n padding: 10px;\n /* center vertically */\n top: 50%;\n transform: translateY(-50%);\n max-height: 100%;\n overflow: auto; }\n\n[data-no-op] canvas[data-no-op-canvas] {\n background-color: #777;\n height: 100%;\n width: 100%; }\n";
8828
+ var css_248z$8 = "[data-no-op] {\n position: absolute;\n height: 100%;\n width: 100%;\n text-align: center;\n}\n\n[data-no-op] p[data-no-op-msg] {\n position: absolute;\n text-align: center;\n font-size: 25px;\n left: 0;\n right: 0;\n color: white;\n padding: 10px;\n /* center vertically */\n top: 50%;\n transform: translateY(-50%);\n max-height: 100%;\n overflow: auto;\n}\n\n[data-no-op] canvas[data-no-op-canvas] {\n background-color: #777;\n height: 100%;\n width: 100%;\n}";
8766
8829
  var NoOp = /*#__PURE__*/function (_Playback) {
8767
8830
  function NoOp() {
8768
8831
  var _this;
@@ -8784,7 +8847,7 @@
8784
8847
  key: "supportedVersion",
8785
8848
  get: function get() {
8786
8849
  return {
8787
- min: "0.13.2"
8850
+ min: "0.14.3"
8788
8851
  };
8789
8852
  }
8790
8853
  }, {
@@ -8916,7 +8979,7 @@
8916
8979
  key: "supportedVersion",
8917
8980
  get: function get() {
8918
8981
  return {
8919
- min: "0.13.2"
8982
+ min: "0.14.3"
8920
8983
  };
8921
8984
  }
8922
8985
  }, {
@@ -9057,7 +9120,7 @@
9057
9120
  key: "supportedVersion",
9058
9121
  get: function get() {
9059
9122
  return {
9060
- min: "0.13.2"
9123
+ min: "0.14.3"
9061
9124
  };
9062
9125
  }
9063
9126
  }, {
@@ -9086,7 +9149,7 @@
9086
9149
  @type {string}
9087
9150
  @default
9088
9151
  */
9089
- var version$1 = "0.13.2";
9152
+ var version$1 = "0.14.3";
9090
9153
 
9091
9154
  // Built-in Plugins/Playbacks
9092
9155
 
@@ -9235,7 +9298,7 @@
9235
9298
  key: "supportedVersion",
9236
9299
  get: function get() {
9237
9300
  return {
9238
- min: "0.13.2"
9301
+ min: "0.14.3"
9239
9302
  };
9240
9303
  }
9241
9304
  }, {
@@ -9274,7 +9337,7 @@
9274
9337
  }(ContainerPlugin);
9275
9338
  var ccIcon = "<svg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 49 41.8\" style=\"enable-background:new 0 0 49 41.8;\" xml:space=\"preserve\">\n<path d=\"M47.1,0H3.2C1.6,0,0,1.2,0,2.8v31.5C0,35.9,1.6,37,3.2,37h11.9l3.2,1.9l4.7,2.7c0.9,0.5,2-0.1,2-1.1V37h22.1\n\tc1.6,0,1.9-1.1,1.9-2.7V2.8C49,1.2,48.7,0,47.1,0z M7.2,18.6c0-4.8,3.5-9.3,9.9-9.3c4.8,0,7.1,2.7,7.1,2.7l-2.5,4\n\tc0,0-1.7-1.7-4.2-1.7c-2.8,0-4.3,2.1-4.3,4.3c0,2.1,1.5,4.4,4.5,4.4c2.5,0,4.9-2.1,4.9-2.1l2.2,4.2c0,0-2.7,2.9-7.6,2.9\n\tC10.8,27.9,7.2,23.5,7.2,18.6z M36.9,27.9c-6.4,0-9.9-4.4-9.9-9.3c0-4.8,3.5-9.3,9.9-9.3C41.7,9.3,44,12,44,12l-2.5,4\n\tc0,0-1.7-1.7-4.2-1.7c-2.8,0-4.3,2.1-4.3,4.3c0,2.1,1.5,4.4,4.5,4.4c2.5,0,4.9-2.1,4.9-2.1l2.2,4.2C44.5,25,41.9,27.9,36.9,27.9z\"/>\n</svg>";
9276
9339
  var ccHTML = "<button type=\"button\" class=\"cc-button media-control-button media-control-icon\" data-cc-button aria-label=\"<%= ariaLabel %>\"></button>\n<ul>\n <% if (title) { %>\n <li data-title><%= title %></li>\n <% }; %>\n <li><a href=\"#\" data-cc-select=\"-1\"><%= disabledLabel %></a></li>\n <% for (var i = 0; i < tracks.length; i++) { %>\n <li><a href=\"#\" data-cc-select=\"<%= tracks[i].id %>\"><%= tracks[i].label %></a></li>\n <% }; %>\n</ul>\n";
9277
- var css_248z$7 = ".cc-controls[data-cc-controls] {\n float: right;\n position: relative;\n display: none; }\n .cc-controls[data-cc-controls].available {\n display: block; }\n .cc-controls[data-cc-controls] .cc-button {\n padding: 6px !important; }\n .cc-controls[data-cc-controls] .cc-button.enabled {\n display: block;\n opacity: 1.0; }\n .cc-controls[data-cc-controls] .cc-button.enabled:hover {\n opacity: 1.0;\n text-shadow: none; }\n .cc-controls[data-cc-controls] > ul {\n list-style-type: none;\n position: absolute;\n bottom: 25px;\n border: 1px solid black;\n display: none;\n background-color: #e6e6e6; }\n .cc-controls[data-cc-controls] li {\n font-size: 10px; }\n .cc-controls[data-cc-controls] li[data-title] {\n background-color: #c3c2c2;\n padding: 5px; }\n .cc-controls[data-cc-controls] li a {\n color: #444;\n padding: 2px 10px;\n display: block;\n text-decoration: none; }\n .cc-controls[data-cc-controls] li a:hover {\n background-color: #555;\n color: white; }\n .cc-controls[data-cc-controls] li a:hover a {\n color: white;\n text-decoration: none; }\n .cc-controls[data-cc-controls] li.current a {\n color: #f00; }\n";
9340
+ var css_248z$7 = ".cc-controls[data-cc-controls] {\n float: right;\n position: relative;\n display: none;\n}\n.cc-controls[data-cc-controls].available {\n display: block;\n}\n.cc-controls[data-cc-controls] .cc-button {\n padding: 6px !important;\n}\n.cc-controls[data-cc-controls] .cc-button.enabled {\n display: block;\n opacity: 1;\n}\n.cc-controls[data-cc-controls] .cc-button.enabled:hover {\n opacity: 1;\n text-shadow: none;\n}\n.cc-controls[data-cc-controls] > ul {\n list-style-type: none;\n position: absolute;\n bottom: 25px;\n border: 1px solid black;\n display: none;\n background-color: #e6e6e6;\n}\n.cc-controls[data-cc-controls] li {\n font-size: 10px;\n}\n.cc-controls[data-cc-controls] li[data-title] {\n background-color: #c3c2c2;\n padding: 5px;\n}\n.cc-controls[data-cc-controls] li a {\n color: #444;\n padding: 2px 10px;\n display: block;\n text-decoration: none;\n}\n.cc-controls[data-cc-controls] li a:hover {\n background-color: #555;\n color: white;\n}\n.cc-controls[data-cc-controls] li a:hover a {\n color: white;\n text-decoration: none;\n}\n.cc-controls[data-cc-controls] li.current a {\n color: #f00;\n}";
9278
9341
  var ClosedCaptions$1 = /*#__PURE__*/function (_UICorePlugin) {
9279
9342
  function ClosedCaptions(core) {
9280
9343
  var _this;
@@ -9298,7 +9361,7 @@
9298
9361
  key: "supportedVersion",
9299
9362
  get: function get() {
9300
9363
  return {
9301
- min: "0.13.2"
9364
+ min: "0.14.3"
9302
9365
  };
9303
9366
  }
9304
9367
  }, {
@@ -9439,7 +9502,7 @@
9439
9502
  }]);
9440
9503
  }(UICorePlugin);
9441
9504
  var dvrHTML = "<div class=\"live-info\"><%= live %></div>\n<button type=\"button\" class=\"live-button\" aria-label=\"<%= backToLive %>\"><%= backToLive %></button>\n";
9442
- var css_248z$6 = ".dvr-controls[data-dvr-controls] {\n display: inline-block;\n float: left;\n color: #fff;\n line-height: 32px;\n font-size: 10px;\n font-weight: bold;\n margin-left: 6px; }\n .dvr-controls[data-dvr-controls] .live-info {\n cursor: default;\n font-family: \"Roboto\", \"Open Sans\", Arial, sans-serif;\n text-transform: uppercase; }\n .dvr-controls[data-dvr-controls] .live-info:before {\n content: \"\";\n display: inline-block;\n position: relative;\n width: 7px;\n height: 7px;\n border-radius: 3.5px;\n margin-right: 3.5px;\n background-color: #ff0101; }\n .dvr-controls[data-dvr-controls] .live-info.disabled {\n opacity: 0.3; }\n .dvr-controls[data-dvr-controls] .live-info.disabled:before {\n background-color: #fff; }\n .dvr-controls[data-dvr-controls] .live-button {\n cursor: pointer;\n outline: none;\n display: none;\n border: 0;\n color: #fff;\n background-color: transparent;\n height: 32px;\n padding: 0;\n opacity: 0.7;\n font-family: \"Roboto\", \"Open Sans\", Arial, sans-serif;\n text-transform: uppercase;\n transition: all 0.1s ease; }\n .dvr-controls[data-dvr-controls] .live-button:before {\n content: \"\";\n display: inline-block;\n position: relative;\n width: 7px;\n height: 7px;\n border-radius: 3.5px;\n margin-right: 3.5px;\n background-color: #fff; }\n .dvr-controls[data-dvr-controls] .live-button:hover {\n opacity: 1;\n text-shadow: rgba(255, 255, 255, 0.75) 0 0 5px; }\n\n.dvr .dvr-controls[data-dvr-controls] .live-info {\n display: none; }\n\n.dvr .dvr-controls[data-dvr-controls] .live-button {\n display: block; }\n\n.dvr.media-control.live[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar] {\n background-color: #005aff; }\n\n.media-control.live[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar] {\n background-color: #ff0101; }\n";
9505
+ var css_248z$6 = ".dvr-controls[data-dvr-controls] {\n display: inline-block;\n float: left;\n color: #fff;\n line-height: 32px;\n font-size: 10px;\n font-weight: bold;\n margin-left: 6px;\n}\n.dvr-controls[data-dvr-controls] .live-info {\n cursor: default;\n font-family: \"Roboto\", \"Open Sans\", Arial, sans-serif;\n text-transform: uppercase;\n}\n.dvr-controls[data-dvr-controls] .live-info:before {\n content: \"\";\n display: inline-block;\n position: relative;\n width: 7px;\n height: 7px;\n border-radius: 3.5px;\n margin-right: 3.5px;\n background-color: #ff0101;\n}\n.dvr-controls[data-dvr-controls] .live-info.disabled {\n opacity: 0.3;\n}\n.dvr-controls[data-dvr-controls] .live-info.disabled:before {\n background-color: #fff;\n}\n.dvr-controls[data-dvr-controls] .live-button {\n cursor: pointer;\n outline: none;\n display: none;\n border: 0;\n color: #fff;\n background-color: transparent;\n height: 32px;\n padding: 0;\n opacity: 0.7;\n font-family: \"Roboto\", \"Open Sans\", Arial, sans-serif;\n text-transform: uppercase;\n transition: all 0.1s ease;\n}\n.dvr-controls[data-dvr-controls] .live-button:before {\n content: \"\";\n display: inline-block;\n position: relative;\n width: 7px;\n height: 7px;\n border-radius: 3.5px;\n margin-right: 3.5px;\n background-color: #fff;\n}\n.dvr-controls[data-dvr-controls] .live-button:hover {\n opacity: 1;\n text-shadow: rgba(255, 255, 255, 0.75) 0 0 5px;\n}\n\n.dvr .dvr-controls[data-dvr-controls] .live-info {\n display: none;\n}\n.dvr .dvr-controls[data-dvr-controls] .live-button {\n display: block;\n}\n.dvr.media-control.live[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar] {\n background-color: #005aff;\n}\n\n.media-control.live[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar] {\n background-color: #ff0101;\n}";
9443
9506
  var DVRControls$1 = /*#__PURE__*/function (_UICorePlugin) {
9444
9507
  function DVRControls(core) {
9445
9508
  var _this;
@@ -9463,7 +9526,7 @@
9463
9526
  key: "supportedVersion",
9464
9527
  get: function get() {
9465
9528
  return {
9466
- min: "0.13.2"
9529
+ min: "0.14.3"
9467
9530
  };
9468
9531
  }
9469
9532
  }, {
@@ -9594,7 +9657,7 @@
9594
9657
  key: "supportedVersion",
9595
9658
  get: function get() {
9596
9659
  return {
9597
- min: "0.13.2"
9660
+ min: "0.14.3"
9598
9661
  };
9599
9662
  }
9600
9663
  }, {
@@ -9625,7 +9688,7 @@
9625
9688
  }(CorePlugin);
9626
9689
  var reloadIcon = "<svg fill=\"#FFFFFF\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z\"/>\n <path d=\"M0 0h24v24H0z\" fill=\"none\"/>\n</svg>";
9627
9690
  var templateHtml = "<div class=\"player-error-screen__content\" data-error-screen>\n <% if (icon) { %>\n <div class=\"player-error-screen__icon\" data-error-screen><%= icon %></div>\n <% } %>\n <div class=\"player-error-screen__title\" data-error-screen><%= title %></div>\n <div class=\"player-error-screen__message\" data-error-screen><%= message %></div>\n <div class=\"player-error-screen__code\" data-error-screen>Error code: <%= code %></div>\n <div class=\"player-error-screen__reload\" data-error-screen><%= reloadIcon %></div>\n</div>\n";
9628
- var css_248z$5 = "[data-player] .player-error-screen {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n color: #CCCACA;\n position: absolute;\n top: 0;\n height: 100%;\n width: 100%;\n background-color: rgba(0, 0, 0, 0.7);\n z-index: 2000;\n display: flex;\n flex-direction: column;\n justify-content: center; }\n [data-player] .player-error-screen__content[data-error-screen] {\n font-size: 14px;\n color: #CCCACA;\n margin-top: 45px; }\n [data-player] .player-error-screen__title[data-error-screen] {\n font-weight: bold;\n line-height: 30px;\n font-size: 18px; }\n [data-player] .player-error-screen__message[data-error-screen] {\n width: 90%;\n margin: 0 auto; }\n [data-player] .player-error-screen__code[data-error-screen] {\n font-size: 13px;\n margin-top: 15px; }\n [data-player] .player-error-screen__reload {\n cursor: pointer;\n width: 30px;\n margin: 15px auto 0 !important; }\n";
9691
+ var css_248z$5 = "[data-player] .player-error-screen {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n color: #CCCACA;\n position: absolute;\n top: 0;\n height: 100%;\n width: 100%;\n background-color: rgba(0, 0, 0, 0.7);\n z-index: 2000;\n display: flex;\n flex-direction: column;\n justify-content: center;\n}\n[data-player] .player-error-screen__content[data-error-screen] {\n font-size: 14px;\n color: #CCCACA;\n margin-top: 45px;\n}\n[data-player] .player-error-screen__title[data-error-screen] {\n font-weight: bold;\n line-height: 30px;\n font-size: 18px;\n}\n[data-player] .player-error-screen__message[data-error-screen] {\n width: 90%;\n margin: 0 auto;\n}\n[data-player] .player-error-screen__code[data-error-screen] {\n font-size: 13px;\n margin-top: 15px;\n}\n[data-player] .player-error-screen__reload {\n cursor: pointer;\n width: 30px;\n margin: 15px auto 0 !important;\n}";
9629
9692
  var ErrorScreen$1 = /*#__PURE__*/function (_UICorePlugin) {
9630
9693
  function ErrorScreen(core) {
9631
9694
  var _this;
@@ -9644,7 +9707,7 @@
9644
9707
  key: "supportedVersion",
9645
9708
  get: function get() {
9646
9709
  return {
9647
- min: "0.13.2"
9710
+ min: "0.14.3"
9648
9711
  };
9649
9712
  }
9650
9713
  }, {
@@ -9764,7 +9827,7 @@
9764
9827
  key: "supportedVersion",
9765
9828
  get: function get() {
9766
9829
  return {
9767
- min: "0.13.2"
9830
+ min: "0.14.3"
9768
9831
  };
9769
9832
  }
9770
9833
  }, {
@@ -9887,7 +9950,7 @@
9887
9950
  key: "supportedVersion",
9888
9951
  get: function get() {
9889
9952
  return {
9890
- min: "0.13.2"
9953
+ min: "0.14.3"
9891
9954
  };
9892
9955
  }
9893
9956
  }, {
@@ -10324,7 +10387,7 @@
10324
10387
  var index = {
10325
10388
  Kibo: Kibo
10326
10389
  };
10327
- var css_248z$4 = ".media-control-notransition {\n transition: none !important; }\n\n.media-control[data-media-control] {\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 9999;\n pointer-events: none; }\n .media-control[data-media-control].dragging {\n pointer-events: auto;\n cursor: grabbing !important;\n cursor: url(\"closed-hand.cur\"), move; }\n .media-control[data-media-control].dragging * {\n cursor: grabbing !important;\n cursor: url(\"closed-hand.cur\"), move; }\n .media-control[data-media-control] .media-control-background[data-background] {\n position: absolute;\n height: 40%;\n width: 100%;\n bottom: 0;\n background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));\n will-change: transform, opacity;\n transition: opacity 0.6s ease-out; }\n .media-control[data-media-control] .media-control-icon {\n line-height: 0;\n letter-spacing: 0;\n speak: none;\n color: #fff;\n opacity: 0.5;\n vertical-align: middle;\n text-align: left;\n transition: all 0.1s ease; }\n .media-control[data-media-control] .media-control-icon:hover {\n color: white;\n opacity: 0.75;\n text-shadow: rgba(255, 255, 255, 0.8) 0 0 5px; }\n .media-control[data-media-control].media-control-hide .media-control-background[data-background] {\n opacity: 0; }\n .media-control[data-media-control].media-control-hide .media-control-layer[data-controls] {\n transform: translateY(50px); }\n .media-control[data-media-control].media-control-hide .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar] {\n opacity: 0; }\n .media-control[data-media-control] .media-control-layer[data-controls] {\n position: absolute;\n transform: translateY(-7px);\n bottom: 0;\n width: 100%;\n height: 32px;\n font-size: 0;\n vertical-align: middle;\n pointer-events: auto;\n transition: bottom 0.4s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-left-panel[data-media-control] {\n position: absolute;\n top: 0;\n left: 4px;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-center-panel[data-media-control] {\n height: 100%;\n text-align: center;\n line-height: 32px; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-right-panel[data-media-control] {\n position: absolute;\n top: 0;\n right: 4px;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button {\n background-color: transparent;\n border: 0;\n margin: 0 6px;\n padding: 0;\n cursor: pointer;\n display: inline-block;\n width: 32px;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button svg {\n width: 100%;\n height: 22px; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button svg path {\n fill: white; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button:focus {\n outline: none; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-play] {\n float: left;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-pause] {\n float: left;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-stop] {\n float: left;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-fullscreen] {\n float: right;\n background-color: transparent;\n border: 0;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator] {\n background-color: transparent;\n border: 0;\n cursor: default;\n display: none;\n float: right;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator].enabled {\n display: block;\n opacity: 1.0; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator].enabled:hover {\n opacity: 1.0;\n text-shadow: none; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-playpause] {\n float: left; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-playstop] {\n float: left; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-position], .media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration] {\n display: inline-block;\n font-size: 10px;\n color: white;\n cursor: default;\n line-height: 32px;\n position: relative; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-position] {\n margin: 0 6px 0 7px; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration] {\n color: rgba(255, 255, 255, 0.5);\n margin-right: 6px; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration]:before {\n content: \"|\";\n margin-right: 7px; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] {\n position: absolute;\n top: -20px;\n left: 0;\n display: inline-block;\n vertical-align: middle;\n width: 100%;\n height: 25px;\n cursor: pointer; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] {\n width: 100%;\n height: 1px;\n position: relative;\n top: 12px;\n background-color: #666666; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-1[data-seekbar] {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 100%;\n background-color: #c2c2c2;\n transition: all 0.1s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar] {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 100%;\n background-color: #005aff;\n transition: all 0.1s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-hover[data-seekbar] {\n opacity: 0;\n position: absolute;\n top: -3px;\n width: 5px;\n height: 7px;\n background-color: rgba(255, 255, 255, 0.5);\n transition: opacity 0.1s ease; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar]:hover .bar-background[data-seekbar] .bar-hover[data-seekbar] {\n opacity: 1; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar].seek-disabled {\n cursor: default; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar].seek-disabled:hover .bar-background[data-seekbar] .bar-hover[data-seekbar] {\n opacity: 0; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar] {\n position: absolute;\n transform: translateX(-50%);\n top: 2px;\n left: 0;\n width: 20px;\n height: 20px;\n opacity: 1;\n transition: all 0.1s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar] .bar-scrubber-icon[data-seekbar] {\n position: absolute;\n left: 6px;\n top: 6px;\n width: 8px;\n height: 8px;\n border-radius: 10px;\n box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.2);\n background-color: white; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] {\n float: right;\n display: inline-block;\n height: 32px;\n cursor: pointer;\n margin: 0 6px;\n box-sizing: border-box; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] {\n float: left;\n bottom: 0; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume] {\n background-color: transparent;\n border: 0;\n box-sizing: content-box;\n width: 32px;\n height: 32px;\n opacity: 0.5; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume]:hover {\n opacity: 0.75; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume] svg {\n height: 24px;\n position: relative;\n top: 3px; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume] svg path {\n fill: white; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume].muted svg {\n margin-left: 2px; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] {\n float: left;\n position: relative;\n overflow: hidden;\n top: 6px;\n width: 42px;\n height: 18px;\n padding: 3px 0;\n transition: width .2s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] {\n height: 1px;\n position: relative;\n top: 7px;\n margin: 0 3px;\n background-color: #666666; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] .bar-fill-1[data-volume] {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 100%;\n background-color: #c2c2c2;\n transition: all 0.1s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] .bar-fill-2[data-volume] {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 100%;\n background-color: #005aff;\n transition: all 0.1s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] .bar-hover[data-volume] {\n opacity: 0;\n position: absolute;\n top: -3px;\n width: 5px;\n height: 7px;\n background-color: rgba(255, 255, 255, 0.5);\n transition: opacity 0.1s ease; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-scrubber[data-volume] {\n position: absolute;\n transform: translateX(-50%);\n top: 0px;\n left: 0;\n width: 20px;\n height: 20px;\n opacity: 1;\n transition: all 0.1s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-scrubber[data-volume] .bar-scrubber-icon[data-volume] {\n position: absolute;\n left: 6px;\n top: 6px;\n width: 8px;\n height: 8px;\n border-radius: 10px;\n box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.2);\n background-color: white; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume] {\n float: left;\n width: 4px;\n padding-left: 2px;\n height: 12px;\n opacity: 0.5;\n box-shadow: inset 2px 0 0 white;\n transition: transform .2s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume].fill {\n box-shadow: inset 2px 0 0 #fff;\n opacity: 1; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume]:nth-of-type(1) {\n padding-left: 0; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume]:hover {\n transform: scaleY(1.5); }\n .media-control[data-media-control].w320 .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume].volume-bar-hide {\n width: 0;\n height: 12px;\n top: 9px;\n padding: 0; }\n";
10390
+ var css_248z$4 = ".media-control-notransition {\n transition: none !important;\n}\n\n.media-control[data-media-control] {\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 9999;\n pointer-events: none;\n}\n.media-control[data-media-control].dragging {\n pointer-events: auto;\n cursor: grabbing !important;\n cursor: url(\"closed-hand.cur\"), move;\n}\n.media-control[data-media-control].dragging * {\n cursor: grabbing !important;\n cursor: url(\"closed-hand.cur\"), move;\n}\n.media-control[data-media-control] .media-control-background[data-background] {\n position: absolute;\n height: 40%;\n width: 100%;\n bottom: 0;\n background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));\n will-change: transform, opacity;\n transition: opacity 0.6s ease-out;\n}\n.media-control[data-media-control] .media-control-icon {\n line-height: 0;\n letter-spacing: 0;\n speak: none;\n color: #fff;\n opacity: 0.5;\n vertical-align: middle;\n text-align: left;\n transition: all 0.1s ease;\n}\n.media-control[data-media-control] .media-control-icon:hover {\n color: white;\n opacity: 0.75;\n text-shadow: rgba(255, 255, 255, 0.8) 0 0 5px;\n}\n.media-control[data-media-control].media-control-hide .media-control-background[data-background] {\n opacity: 0;\n}\n.media-control[data-media-control].media-control-hide .media-control-layer[data-controls] {\n transform: translateY(50px);\n}\n.media-control[data-media-control].media-control-hide .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar] {\n opacity: 0;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] {\n position: absolute;\n transform: translateY(-7px);\n bottom: 0;\n width: 100%;\n height: 32px;\n font-size: 0;\n vertical-align: middle;\n pointer-events: auto;\n transition: bottom 0.4s ease-out;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] .media-control-left-panel[data-media-control] {\n position: absolute;\n top: 0;\n left: 4px;\n height: 100%;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] .media-control-center-panel[data-media-control] {\n height: 100%;\n text-align: center;\n line-height: 32px;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] .media-control-right-panel[data-media-control] {\n position: absolute;\n top: 0;\n right: 4px;\n height: 100%;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button {\n background-color: transparent;\n border: 0;\n margin: 0 6px;\n padding: 0;\n cursor: pointer;\n display: inline-block;\n width: 32px;\n height: 100%;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button svg {\n width: 100%;\n height: 22px;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button svg path {\n fill: white;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button:focus {\n outline: none;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-play] {\n float: left;\n height: 100%;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-pause] {\n float: left;\n height: 100%;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-stop] {\n float: left;\n height: 100%;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-fullscreen] {\n float: right;\n background-color: transparent;\n border: 0;\n height: 100%;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator] {\n background-color: transparent;\n border: 0;\n cursor: default;\n display: none;\n float: right;\n height: 100%;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator].enabled {\n display: block;\n opacity: 1;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator].enabled:hover {\n opacity: 1;\n text-shadow: none;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-playpause] {\n float: left;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-playstop] {\n float: left;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-position], .media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration] {\n display: inline-block;\n font-size: 10px;\n color: white;\n cursor: default;\n line-height: 32px;\n position: relative;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-position] {\n margin: 0 6px 0 7px;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration]:before {\n content: \"|\";\n margin-right: 7px;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration] {\n color: rgba(255, 255, 255, 0.5);\n margin-right: 6px;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] {\n position: absolute;\n top: -20px;\n left: 0;\n display: inline-block;\n vertical-align: middle;\n width: 100%;\n height: 25px;\n cursor: pointer;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] {\n width: 100%;\n height: 1px;\n position: relative;\n top: 12px;\n background-color: #666666;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-1[data-seekbar] {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 100%;\n background-color: #c2c2c2;\n transition: all 0.1s ease-out;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar] {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 100%;\n background-color: #005aff;\n transition: all 0.1s ease-out;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-hover[data-seekbar] {\n opacity: 0;\n position: absolute;\n top: -3px;\n width: 5px;\n height: 7px;\n background-color: rgba(255, 255, 255, 0.5);\n transition: opacity 0.1s ease;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar]:hover .bar-background[data-seekbar] .bar-hover[data-seekbar] {\n opacity: 1;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar].seek-disabled {\n cursor: default;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar].seek-disabled:hover .bar-background[data-seekbar] .bar-hover[data-seekbar] {\n opacity: 0;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar] {\n position: absolute;\n transform: translateX(-50%);\n top: 2px;\n left: 0;\n width: 20px;\n height: 20px;\n opacity: 1;\n transition: all 0.1s ease-out;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar] .bar-scrubber-icon[data-seekbar] {\n position: absolute;\n left: 6px;\n top: 6px;\n width: 8px;\n height: 8px;\n border-radius: 10px;\n box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.2);\n background-color: white;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] {\n float: right;\n display: inline-block;\n height: 32px;\n cursor: pointer;\n margin: 0 6px;\n box-sizing: border-box;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] {\n float: left;\n bottom: 0;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume] {\n background-color: transparent;\n border: 0;\n box-sizing: content-box;\n width: 32px;\n height: 32px;\n opacity: 0.5;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume]:hover {\n opacity: 0.75;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume] svg {\n height: 24px;\n position: relative;\n top: 3px;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume] svg path {\n fill: white;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume].muted svg {\n margin-left: 2px;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] {\n float: left;\n position: relative;\n overflow: hidden;\n top: 6px;\n width: 42px;\n height: 18px;\n padding: 3px 0;\n transition: width 0.2s ease-out;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] {\n height: 1px;\n position: relative;\n top: 7px;\n margin: 0 3px;\n background-color: #666666;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] .bar-fill-1[data-volume] {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 100%;\n background-color: #c2c2c2;\n transition: all 0.1s ease-out;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] .bar-fill-2[data-volume] {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 100%;\n background-color: #005aff;\n transition: all 0.1s ease-out;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] .bar-hover[data-volume] {\n opacity: 0;\n position: absolute;\n top: -3px;\n width: 5px;\n height: 7px;\n background-color: rgba(255, 255, 255, 0.5);\n transition: opacity 0.1s ease;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-scrubber[data-volume] {\n position: absolute;\n transform: translateX(-50%);\n top: 0px;\n left: 0;\n width: 20px;\n height: 20px;\n opacity: 1;\n transition: all 0.1s ease-out;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-scrubber[data-volume] .bar-scrubber-icon[data-volume] {\n position: absolute;\n left: 6px;\n top: 6px;\n width: 8px;\n height: 8px;\n border-radius: 10px;\n box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.2);\n background-color: white;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume] {\n float: left;\n width: 4px;\n padding-left: 2px;\n height: 12px;\n opacity: 0.5;\n box-shadow: inset 2px 0 0 white;\n transition: transform 0.2s ease-out;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume].fill {\n box-shadow: inset 2px 0 0 #fff;\n opacity: 1;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume]:nth-of-type(1) {\n padding-left: 0;\n}\n.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume]:hover {\n transform: scaleY(1.5);\n}\n.media-control[data-media-control].w320 .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume].volume-bar-hide {\n width: 0;\n height: 12px;\n top: 9px;\n padding: 0;\n}";
10328
10391
  var mediaControlHTML = "<div class=\"media-control-background\" data-background></div>\n<div class=\"media-control-layer\" data-controls>\n <% var renderBar = function(name) { %>\n <div class=\"bar-container\" data-<%= name %>>\n <div class=\"bar-background\" data-<%= name %>>\n <div class=\"bar-fill-1\" data-<%= name %>></div>\n <div class=\"bar-fill-2\" data-<%= name %>></div>\n <div class=\"bar-hover\" data-<%= name %>></div>\n </div>\n <div class=\"bar-scrubber\" data-<%= name %>>\n <div class=\"bar-scrubber-icon\" data-<%= name %>></div>\n </div>\n </div>\n <% }; %>\n <% var renderSegmentedBar = function(name, segments) {\n segments = segments || 10; %>\n <div class=\"bar-container\" data-<%= name %>>\n <% for (var i = 0; i < segments; i++) { %>\n <div class=\"segmented-bar-element\" data-<%= name %>></div>\n <% } %>\n </div>\n <% }; %>\n <% var renderDrawer = function(name, renderContent) { %>\n <div class=\"drawer-container\" data-<%= name %>>\n <div class=\"drawer-icon-container\" data-<%= name %>>\n <div class=\"drawer-icon media-control-icon\" data-<%= name %>></div>\n <span class=\"drawer-text\" data-<%= name %>></span>\n </div>\n <% renderContent(name); %>\n </div>\n <% }; %>\n <% var renderIndicator = function(name) { %>\n <div class=\"media-control-indicator\" data-<%= name %>></div>\n <% }; %>\n <% var renderButton = function(name) { %>\n <button type=\"button\" class=\"media-control-button media-control-icon\" data-<%= name %> aria-label=\"<%= name %>\"></button>\n <% }; %>\n <% var templates = {\n bar: renderBar,\n segmentedBar: renderSegmentedBar,\n };\n var render = function(settingsList) {\n settingsList.forEach(function(setting) {\n if(setting === \"seekbar\") {\n renderBar(setting);\n } else if (setting === \"volume\") {\n renderDrawer(setting, settings.volumeBarTemplate ? templates[settings.volumeBarTemplate] : function(name) { return renderSegmentedBar(name); });\n } else if (setting === \"duration\" || setting === \"position\") {\n renderIndicator(setting);\n } else {\n renderButton(setting);\n }\n });\n }; %>\n <% if (settings.default && settings.default.length) { %>\n <div class=\"media-control-center-panel\" data-media-control>\n <% render(settings.default); %>\n </div>\n <% } %>\n <% if (settings.left && settings.left.length) { %>\n <div class=\"media-control-left-panel\" data-media-control>\n <% render(settings.left); %>\n </div>\n <% } %>\n <% if (settings.right && settings.right.length) { %>\n <div class=\"media-control-right-panel\" data-media-control>\n <% render(settings.right); %>\n </div>\n <% } %>\n</div>\n";
10329
10392
  var stopIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" fill=\"#010101\" d=\"M1.712 1.24h12.6v13.52h-12.6z\"/>\n</svg>";
10330
10393
  var volumeIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" fill=\"#010101\" d=\"M11.5 11h-.002v1.502L7.798 10H4.5V6h3.297l3.7-2.502V4.5h.003V11zM11 4.49L7.953 6.5H5v3h2.953L11 11.51V4.49z\"/>\n</svg>";
@@ -10337,12 +10400,14 @@
10337
10400
  formatTime$1 = Utils.formatTime,
10338
10401
  extend = Utils.extend,
10339
10402
  removeArrayItem = Utils.removeArrayItem;
10403
+ var defaultVolumeState = 100;
10340
10404
  var MediaControl$1 = /*#__PURE__*/function (_UICorePlugin) {
10341
10405
  function MediaControl(core) {
10342
10406
  var _this;
10343
10407
  _classCallCheck(this, MediaControl);
10344
10408
  _this = _callSuper(this, MediaControl, [core]);
10345
10409
  _this.persistConfig = _this.options.persistConfig;
10410
+ _this._previousVolumeState = null;
10346
10411
  _this.currentPositionValue = null;
10347
10412
  _this.currentDurationValue = null;
10348
10413
  _this.keepVisible = false;
@@ -10386,7 +10451,7 @@
10386
10451
  key: "supportedVersion",
10387
10452
  get: function get() {
10388
10453
  return {
10389
- min: "0.13.2"
10454
+ min: "0.14.3"
10390
10455
  };
10391
10456
  }
10392
10457
  }, {
@@ -10535,6 +10600,7 @@
10535
10600
  }, {
10536
10601
  key: "setInitialVolume",
10537
10602
  value: function setInitialVolume() {
10603
+ this._previousVolumeState = null;
10538
10604
  var initialVolume = this.persistConfig ? Config.restore('volume') : 100;
10539
10605
  var options = this.container && this.container.options || this.options;
10540
10606
  this.setVolume(options.mute ? 0 : initialVolume, true);
@@ -10706,7 +10772,16 @@
10706
10772
  }, {
10707
10773
  key: "toggleMute",
10708
10774
  value: function toggleMute() {
10709
- this.setVolume(this.muted ? 100 : 0);
10775
+ if (this.muted) {
10776
+ var stored = this._previousVolumeState;
10777
+ this._previousVolumeState = null;
10778
+ var restore = stored != null && stored > 0 ? stored : defaultVolumeState;
10779
+ this.setVolume(restore);
10780
+ return;
10781
+ }
10782
+ var current = this.volume;
10783
+ this._previousVolumeState = current > 0 ? current : null;
10784
+ this.setVolume(0);
10710
10785
  }
10711
10786
  }, {
10712
10787
  key: "setVolume",
@@ -11122,7 +11197,7 @@
11122
11197
  }, {
11123
11198
  key: "render",
11124
11199
  value: function render() {
11125
- var _this10 = this;
11200
+ var _this0 = this;
11126
11201
  var timeout = this.options.hideMediaControlDelay || 2000;
11127
11202
  this.settings && this.$el.html(this.template({
11128
11203
  settings: this.settings
@@ -11137,7 +11212,7 @@
11137
11212
  this.changeTogglePlay();
11138
11213
  if (this.container) {
11139
11214
  this.hideId = setTimeout(function () {
11140
- return _this10.hide();
11215
+ return _this0.hide();
11141
11216
  }, timeout);
11142
11217
  this.disabled && this.hide();
11143
11218
  }
@@ -11160,13 +11235,13 @@
11160
11235
  this.displayedSeekBarPercentage = null;
11161
11236
  this.setSeekPercentage(previousSeekPercentage);
11162
11237
  setTimeout(function () {
11163
- !_this10.settings.seekEnabled && _this10.$seekBarContainer.addClass('seek-disabled');
11164
- !Browser.isMobile && !_this10.options.disableKeyboardShortcuts && _this10.bindKeyEvents();
11165
- _this10.playerResize({
11166
- width: _this10.options.width,
11167
- height: _this10.options.height
11238
+ !_this0.settings.seekEnabled && _this0.$seekBarContainer.addClass('seek-disabled');
11239
+ !Browser.isMobile && !_this0.options.disableKeyboardShortcuts && _this0.bindKeyEvents();
11240
+ _this0.playerResize({
11241
+ width: _this0.options.width,
11242
+ height: _this0.options.height
11168
11243
  });
11169
- _this10.hideVolumeBar(0);
11244
+ _this0.hideVolumeBar(0);
11170
11245
  }, 0);
11171
11246
  this.parseColors();
11172
11247
  this.highDefinitionUpdate(this.isHD);
@@ -11182,7 +11257,7 @@
11182
11257
  return extend(MediaControl$1, properties);
11183
11258
  };
11184
11259
  var posterHTML = "<div class=\"play-wrapper\" data-poster></div>\n";
11185
- var css_248z$3 = ".player-poster[data-poster] {\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n height: 100%;\n width: 100%;\n z-index: 998;\n top: 0;\n left: 0;\n background-color: transparent;\n background-size: cover;\n background-repeat: no-repeat;\n background-position: 50% 50%; }\n .player-poster[data-poster].clickable {\n cursor: pointer; }\n .player-poster[data-poster]:hover .play-wrapper[data-poster] {\n opacity: 1; }\n .player-poster[data-poster] .play-wrapper[data-poster] {\n width: 100%;\n height: 25%;\n margin: 0 auto;\n opacity: 0.75;\n transition: opacity 0.1s ease; }\n .player-poster[data-poster] .play-wrapper[data-poster] svg {\n height: 100%; }\n .player-poster[data-poster] .play-wrapper[data-poster] svg path {\n fill: #fff; }\n";
11260
+ var css_248z$3 = ".player-poster[data-poster] {\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n height: 100%;\n width: 100%;\n z-index: 998;\n top: 0;\n left: 0;\n background-color: transparent;\n background-size: cover;\n background-repeat: no-repeat;\n background-position: 50% 50%;\n}\n.player-poster[data-poster].clickable {\n cursor: pointer;\n}\n.player-poster[data-poster]:hover .play-wrapper[data-poster] {\n opacity: 1;\n}\n.player-poster[data-poster] .play-wrapper[data-poster] {\n width: 100%;\n height: 25%;\n margin: 0 auto;\n opacity: 0.75;\n transition: opacity 0.1s ease;\n}\n.player-poster[data-poster] .play-wrapper[data-poster] svg {\n height: 100%;\n}\n.player-poster[data-poster] .play-wrapper[data-poster] svg path {\n fill: #fff;\n}";
11186
11261
  var PosterPlugin = /*#__PURE__*/function (_UIContainerPlugin) {
11187
11262
  function PosterPlugin(container) {
11188
11263
  var _this;
@@ -11206,7 +11281,7 @@
11206
11281
  key: "supportedVersion",
11207
11282
  get: function get() {
11208
11283
  return {
11209
- min: "0.13.2"
11284
+ min: "0.14.3"
11210
11285
  };
11211
11286
  }
11212
11287
  }, {
@@ -11394,7 +11469,7 @@
11394
11469
  }]);
11395
11470
  }(UIContainerPlugin);
11396
11471
  var seekTimeHTML = "<span data-seek-time></span>\n<span data-duration></span>\n";
11397
- var css_248z$2 = ".seek-time[data-seek-time] {\n position: absolute;\n white-space: nowrap;\n height: 20px;\n line-height: 20px;\n font-size: 0;\n left: -100%;\n bottom: 55px;\n background-color: rgba(2, 2, 2, 0.5);\n z-index: 9999;\n transition: opacity 0.1s ease; }\n .seek-time[data-seek-time].hidden[data-seek-time] {\n opacity: 0; }\n .seek-time[data-seek-time] [data-seek-time] {\n display: inline-block;\n color: white;\n font-size: 10px;\n padding-left: 7px;\n padding-right: 7px;\n vertical-align: top; }\n .seek-time[data-seek-time] [data-duration] {\n display: inline-block;\n color: rgba(255, 255, 255, 0.5);\n font-size: 10px;\n padding-right: 7px;\n vertical-align: top; }\n .seek-time[data-seek-time] [data-duration]:before {\n content: \"|\";\n margin-right: 7px; }\n";
11472
+ var css_248z$2 = ".seek-time[data-seek-time] {\n position: absolute;\n white-space: nowrap;\n height: 20px;\n line-height: 20px;\n font-size: 0;\n left: -100%;\n bottom: 55px;\n background-color: rgba(2, 2, 2, 0.5);\n z-index: 9999;\n transition: opacity 0.1s ease;\n}\n.seek-time[data-seek-time].hidden[data-seek-time] {\n opacity: 0;\n}\n.seek-time[data-seek-time] [data-seek-time] {\n display: inline-block;\n color: white;\n font-size: 10px;\n padding-left: 7px;\n padding-right: 7px;\n vertical-align: top;\n}\n.seek-time[data-seek-time] [data-duration] {\n display: inline-block;\n color: rgba(255, 255, 255, 0.5);\n font-size: 10px;\n padding-right: 7px;\n vertical-align: top;\n}\n.seek-time[data-seek-time] [data-duration]:before {\n content: \"|\";\n margin-right: 7px;\n}";
11398
11473
  var formatTime = Utils.formatTime;
11399
11474
  var SeekTime$1 = /*#__PURE__*/function (_UICorePlugin) {
11400
11475
  function SeekTime(core) {
@@ -11425,7 +11500,7 @@
11425
11500
  key: "supportedVersion",
11426
11501
  get: function get() {
11427
11502
  return {
11428
- min: "0.13.2"
11503
+ min: "0.14.3"
11429
11504
  };
11430
11505
  }
11431
11506
  }, {
@@ -11603,7 +11678,7 @@
11603
11678
  }]);
11604
11679
  }(UICorePlugin);
11605
11680
  var spinnerHTML = "<div data-bounce1></div><div data-bounce2></div><div data-bounce3></div>\n";
11606
- var css_248z$1 = ".spinner-three-bounce[data-spinner] {\n position: absolute;\n margin: 0 auto;\n width: 70px;\n text-align: center;\n z-index: 999;\n left: 0;\n right: 0;\n margin-left: auto;\n margin-right: auto;\n /* center vertically */\n top: 50%;\n transform: translateY(-50%); }\n .spinner-three-bounce[data-spinner] > div {\n width: 18px;\n height: 18px;\n background-color: #FFFFFF;\n border-radius: 100%;\n display: inline-block;\n animation: bouncedelay 1.4s infinite ease-in-out;\n /* Prevent first frame from flickering when animation starts */\n animation-fill-mode: both; }\n .spinner-three-bounce[data-spinner] [data-bounce1] {\n animation-delay: -0.32s; }\n .spinner-three-bounce[data-spinner] [data-bounce2] {\n animation-delay: -0.16s; }\n\n@keyframes bouncedelay {\n 0%, 80%, 100% {\n transform: scale(0); }\n 40% {\n transform: scale(1); } }\n";
11681
+ var css_248z$1 = ".spinner-three-bounce[data-spinner] {\n position: absolute;\n margin: 0 auto;\n width: 70px;\n text-align: center;\n z-index: 999;\n left: 0;\n right: 0;\n margin-left: auto;\n margin-right: auto;\n /* center vertically */\n top: 50%;\n transform: translateY(-50%);\n}\n.spinner-three-bounce[data-spinner] > div {\n width: 18px;\n height: 18px;\n background-color: #FFFFFF;\n border-radius: 100%;\n display: inline-block;\n animation: bouncedelay 1.4s infinite ease-in-out;\n /* Prevent first frame from flickering when animation starts */\n animation-fill-mode: both;\n}\n.spinner-three-bounce[data-spinner] [data-bounce1] {\n animation-delay: -0.32s;\n}\n.spinner-three-bounce[data-spinner] [data-bounce2] {\n animation-delay: -0.16s;\n}\n\n@keyframes bouncedelay {\n 0%, 80%, 100% {\n transform: scale(0);\n }\n 40% {\n transform: scale(1);\n }\n}";
11607
11682
  var SpinnerThreeBouncePlugin = /*#__PURE__*/function (_UIContainerPlugin) {
11608
11683
  function SpinnerThreeBouncePlugin(container) {
11609
11684
  var _this;
@@ -11629,7 +11704,7 @@
11629
11704
  key: "supportedVersion",
11630
11705
  get: function get() {
11631
11706
  return {
11632
- min: "0.13.2"
11707
+ min: "0.14.3"
11633
11708
  };
11634
11709
  }
11635
11710
  }, {
@@ -11711,7 +11786,7 @@
11711
11786
  key: "supportedVersion",
11712
11787
  get: function get() {
11713
11788
  return {
11714
- min: "0.13.2"
11789
+ min: "0.14.3"
11715
11790
  };
11716
11791
  }
11717
11792
  }, {
@@ -11819,7 +11894,7 @@
11819
11894
  }]);
11820
11895
  }(ContainerPlugin);
11821
11896
  var watermarkHTML = "<div class=\"clappr-watermark\" data-watermark data-watermark-<%=position %>>\n<% if(typeof imageLink !== 'undefined') { %>\n<a target=\"_blank\" href=\"<%= imageLink %>\">\n<% } %>\n<img src=\"<%= imageUrl %>\">\n<% if(typeof imageLink !== 'undefined') { %>\n</a>\n<% } %>\n</div>\n";
11822
- var css_248z = ".clappr-watermark[data-watermark] {\n position: absolute;\n min-width: 70px;\n max-width: 200px;\n width: 12%;\n text-align: center;\n z-index: 10; }\n\n.clappr-watermark[data-watermark] a {\n outline: none;\n cursor: pointer; }\n\n.clappr-watermark[data-watermark] img {\n max-width: 100%; }\n\n.clappr-watermark[data-watermark-bottom-left] {\n bottom: 10px;\n left: 10px; }\n\n.clappr-watermark[data-watermark-bottom-right] {\n bottom: 10px;\n right: 42px; }\n\n.clappr-watermark[data-watermark-top-left] {\n top: 10px;\n left: 10px; }\n\n.clappr-watermark[data-watermark-top-right] {\n top: 10px;\n right: 37px; }\n";
11897
+ var css_248z = ".clappr-watermark[data-watermark] {\n position: absolute;\n min-width: 70px;\n max-width: 200px;\n width: 12%;\n text-align: center;\n z-index: 10;\n}\n\n.clappr-watermark[data-watermark] a {\n outline: none;\n cursor: pointer;\n}\n\n.clappr-watermark[data-watermark] img {\n max-width: 100%;\n}\n\n.clappr-watermark[data-watermark-bottom-left] {\n bottom: 10px;\n left: 10px;\n}\n\n.clappr-watermark[data-watermark-bottom-right] {\n bottom: 10px;\n right: 42px;\n}\n\n.clappr-watermark[data-watermark-top-left] {\n top: 10px;\n left: 10px;\n}\n\n.clappr-watermark[data-watermark-top-right] {\n top: 10px;\n right: 37px;\n}";
11823
11898
  var WaterMarkPlugin = /*#__PURE__*/function (_UIContainerPlugin) {
11824
11899
  function WaterMarkPlugin(container) {
11825
11900
  var _this;
@@ -11838,7 +11913,7 @@
11838
11913
  key: "supportedVersion",
11839
11914
  get: function get() {
11840
11915
  return {
11841
- min: "0.13.2"
11916
+ min: "0.14.3"
11842
11917
  };
11843
11918
  }
11844
11919
  }, {
@@ -11912,7 +11987,7 @@
11912
11987
  WaterMark: WaterMarkPlugin
11913
11988
  };
11914
11989
 
11915
- var version = "0.11.16";
11990
+ var version = "0.12.3";
11916
11991
  for (var _i = 0, _Object$values = Object.values(Plugins); _i < _Object$values.length; _i++) {
11917
11992
  var plugin = _Object$values[_i];
11918
11993
  Loader.registerPlugin(plugin);