mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #458 from dkanada/site
Refactor several files and methods
This commit is contained in:
commit
0286cc60d5
34 changed files with 122 additions and 11259 deletions
12
README.md
12
README.md
|
@ -1,7 +1,15 @@
|
||||||
<h1 align="center">Jellyfin Web UI</h1>
|
<h1 align="center">Jellyfin Web</h1>
|
||||||
<h3 align="center">The Free Software Media System</h3>
|
<h3 align="center">The Free Software Media System</h3>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
Jellyfin is a free software media system that puts you in control of managing and streaming your media.
|
<img alt="Logo Banner" src="https://raw.githubusercontent.com/jellyfin/jellyfin-ux/master/branding/SVG/banner-logo-solid.svg?sanitize=true"/>
|
||||||
|
<br/><br/>
|
||||||
|
<a href="https://github.com/jellyfin/jellyfin-web"><img alt="GPL 2.0 License" src="https://img.shields.io/github/license/jellyfin/jellyfin-web.svg"/></a>
|
||||||
|
<a href="https://github.com/jellyfin/jellyfin-web/releases"><img alt="Current Release" src="https://img.shields.io/github/release/jellyfin/jellyfin-web.svg"/></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Jellyfin is a free software media system that puts you in control of managing and streaming your media.
|
||||||
|
|
|
@ -15,7 +15,12 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"jstree": "^3.3.7",
|
"jstree": "^3.3.7",
|
||||||
"hls.js": "^0.12.4"
|
"jquery": "^3.4.1",
|
||||||
|
"hls.js": "^0.12.4",
|
||||||
|
"howler": "^2.1.2",
|
||||||
|
"swiper": "^4.5.0",
|
||||||
|
"sortablejs": "^1.9.0",
|
||||||
|
"libjass": "^0.11.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "webpack --mode development",
|
"dev": "webpack --mode development",
|
||||||
|
|
139
src/bower_components/Sortable/Sortable.html
vendored
139
src/bower_components/Sortable/Sortable.html
vendored
|
@ -1,139 +0,0 @@
|
||||||
<link rel="import" href="../polymer/polymer.html">
|
|
||||||
<script src="./Sortable.js"></script>
|
|
||||||
|
|
||||||
<dom-module id="sortable-js">
|
|
||||||
<template>
|
|
||||||
<content></content>
|
|
||||||
</template>
|
|
||||||
</dom-module>
|
|
||||||
<script>
|
|
||||||
Polymer({
|
|
||||||
is: "sortable-js",
|
|
||||||
|
|
||||||
properties: {
|
|
||||||
group : { type: String, value: () => Math.random(), observer: "groupChanged" },
|
|
||||||
sort : { type: Boolean, value: true, observer: "sortChanged" },
|
|
||||||
disabled : { type: Boolean, value: false, observer: "disabledChanged" },
|
|
||||||
store : { type: Object, value: null, observer: "storeChanged" },
|
|
||||||
handle : { type: String, value: null, observer: "handleChanged" },
|
|
||||||
scrollSensitivity : { type: Number, value: 30, observer: "scrollSensitivityChanged" },
|
|
||||||
scrollSpeed : { type: Number, value: 10, observer: "scrollSpeedChanged" },
|
|
||||||
ghostClass : { type: String, value: "sortable-ghost", observer: "ghostClassChanged" },
|
|
||||||
chosenClass : { type: String, value: "sortable-chosen", observer: "chosenClassChanged" },
|
|
||||||
ignore : { type: String, value: "a, img", observer: "ignoreChanged" },
|
|
||||||
filter : { type: Object, value: null, observer: "filterChanged" },
|
|
||||||
animation : { type: Number, value: 0, observer: "animationChanged" },
|
|
||||||
dropBubble : { type: Boolean, value: false, observer: "dropBubbleChanged" },
|
|
||||||
dragoverBubble : { type: Boolean, value: false, observer: "dragoverBubbleChanged" },
|
|
||||||
dataIdAttr : { type: String, value: "data-id", observer: "dataIdAttrChanged" },
|
|
||||||
delay : { type: Number, value: 0, observer: "delayChanged" },
|
|
||||||
forceFallback : { type: Boolean, value: false, observer: "forceFallbackChanged" },
|
|
||||||
fallbackClass : { type: String, value: "sortable-fallback", observer: "fallbackClassChanged" },
|
|
||||||
fallbackOnBody : { type: Boolean, value: false, observer: "fallbackOnBodyChanged" },
|
|
||||||
draggable : {},
|
|
||||||
scroll : {}
|
|
||||||
},
|
|
||||||
|
|
||||||
created() {
|
|
||||||
// override default DOM property behavior
|
|
||||||
Object.defineProperties(this, {
|
|
||||||
draggable: { get() { return this._draggable || this.getAttribute("draggable") || ">*"}, set(value) { this._draggable = value; this.draggableChanged(value)} },
|
|
||||||
scroll: { get() { return this._scroll || JSON.parse(this.getAttribute("scroll") || "true") }, set(value) { this._scroll = value; this.scrollChanged(value)} }
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
attached: function() {
|
|
||||||
// Given
|
|
||||||
// <sortable-js>
|
|
||||||
// <template is="dom-repeat" items={{data}}>
|
|
||||||
// <div>
|
|
||||||
// <template is="dom-if" if="true">
|
|
||||||
// <span>hello</span></template></div>
|
|
||||||
// After render, it becomes
|
|
||||||
// <sortable-js>
|
|
||||||
// <div>
|
|
||||||
// <span>hello</span>
|
|
||||||
// <template is="dom-if">
|
|
||||||
// <tempalte is="dom-repeat">
|
|
||||||
var templates = this.querySelectorAll("template[is='dom-repeat']")
|
|
||||||
var template = templates[templates.length-1]
|
|
||||||
|
|
||||||
var options = {}
|
|
||||||
Object.keys(this.properties).forEach(key => {
|
|
||||||
options[key] = this[key]
|
|
||||||
})
|
|
||||||
|
|
||||||
this.sortable = Sortable.create(this, Object.assign(options, {
|
|
||||||
onUpdate: e => {
|
|
||||||
if (template) {
|
|
||||||
template.splice("items", e.newIndex, 0, template.splice("items", e.oldIndex, 1)[0])
|
|
||||||
}
|
|
||||||
this.fire("update", e)
|
|
||||||
},
|
|
||||||
|
|
||||||
onAdd: e => {
|
|
||||||
if (template) {
|
|
||||||
var froms = e.from.querySelectorAll("template[is='dom-repeat']")
|
|
||||||
var from = froms[froms.length-1]
|
|
||||||
var item = from.items[e.oldIndex]
|
|
||||||
template.splice("items", e.newIndex, 0, item)
|
|
||||||
}
|
|
||||||
this.fire("add", e)
|
|
||||||
},
|
|
||||||
|
|
||||||
onRemove: e => {
|
|
||||||
if (template) {
|
|
||||||
template.splice("items", e.oldIndex, 1)[0]
|
|
||||||
}
|
|
||||||
this.fire("remove", e)
|
|
||||||
},
|
|
||||||
|
|
||||||
onStart: e => {
|
|
||||||
this.fire("start", e)
|
|
||||||
},
|
|
||||||
|
|
||||||
onEnd: e => {
|
|
||||||
this.fire("end", e)
|
|
||||||
},
|
|
||||||
|
|
||||||
onSort: e => {
|
|
||||||
this.fire("sort", e)
|
|
||||||
},
|
|
||||||
|
|
||||||
onFilter: e => {
|
|
||||||
this.fire("filter", e)
|
|
||||||
},
|
|
||||||
|
|
||||||
onMove: e => {
|
|
||||||
this.fire("move", e)
|
|
||||||
}
|
|
||||||
}))
|
|
||||||
},
|
|
||||||
|
|
||||||
detached: function() {
|
|
||||||
this.sortable.destroy()
|
|
||||||
},
|
|
||||||
|
|
||||||
groupChanged : function(value) { this.sortable && this.sortable.option("group", value) },
|
|
||||||
sortChanged : function(value) { this.sortable && this.sortable.option("sort", value) },
|
|
||||||
disabledChanged : function(value) { this.sortable && this.sortable.option("disabled", value) },
|
|
||||||
storeChanged : function(value) { this.sortable && this.sortable.option("store", value) },
|
|
||||||
handleChanged : function(value) { this.sortable && this.sortable.option("handle", value) },
|
|
||||||
scrollChanged : function(value) { this.sortable && this.sortable.option("scroll", value) },
|
|
||||||
scrollSensitivityChanged : function(value) { this.sortable && this.sortable.option("scrollSensitivity", value) },
|
|
||||||
scrollSpeedChanged : function(value) { this.sortable && this.sortable.option("scrollSpeed", value) },
|
|
||||||
draggableChanged : function(value) { this.sortable && this.sortable.option("draggable", value) },
|
|
||||||
ghostClassChanged : function(value) { this.sortable && this.sortable.option("ghostClass", value) },
|
|
||||||
chosenClassChanged : function(value) { this.sortable && this.sortable.option("chosenClass", value) },
|
|
||||||
ignoreChanged : function(value) { this.sortable && this.sortable.option("ignore", value) },
|
|
||||||
filterChanged : function(value) { this.sortable && this.sortable.option("filter", value) },
|
|
||||||
animationChanged : function(value) { this.sortable && this.sortable.option("animation", value) },
|
|
||||||
dropBubbleChanged : function(value) { this.sortable && this.sortable.option("dropBubble", value) },
|
|
||||||
dragoverBubbleChanged : function(value) { this.sortable && this.sortable.option("dragoverBubble", value) },
|
|
||||||
dataIdAttrChanged : function(value) { this.sortable && this.sortable.option("dataIdAttr", value) },
|
|
||||||
delayChanged : function(value) { this.sortable && this.sortable.option("delay", value) },
|
|
||||||
forceFallbackChanged : function(value) { this.sortable && this.sortable.option("forceFallback", value) },
|
|
||||||
fallbackClassChanged : function(value) { this.sortable && this.sortable.option("fallbackClass", value) },
|
|
||||||
fallbackOnBodyChanged : function(value) { this.sortable && this.sortable.option("fallbackOnBody", value) }
|
|
||||||
})
|
|
||||||
</script>
|
|
393
src/bower_components/Sortable/Sortable.min.js
vendored
393
src/bower_components/Sortable/Sortable.min.js
vendored
|
@ -1,393 +0,0 @@
|
||||||
/*! Sortable 1.4.2 - MIT | git://github.com/rubaxa/Sortable.git */ ! function(a) {
|
|
||||||
"use strict";
|
|
||||||
"function" == typeof define && define.amd ? define(a) : "undefined" != typeof module && "undefined" != typeof module.exports ? module.exports = a() : "undefined" != typeof Package ? Sortable = a() : window.Sortable = a()
|
|
||||||
}(function() {
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
function a(a, b) {
|
|
||||||
if (!a || !a.nodeType || 1 !== a.nodeType) throw "Sortable: `el` must be HTMLElement, and not " + {}.toString.call(a);
|
|
||||||
this.el = a, this.options = b = r({}, b), a[L] = this;
|
|
||||||
var c = {
|
|
||||||
group: Math.random(),
|
|
||||||
sort: !0,
|
|
||||||
disabled: !1,
|
|
||||||
store: null,
|
|
||||||
handle: null,
|
|
||||||
scroll: !0,
|
|
||||||
scrollSensitivity: 30,
|
|
||||||
scrollSpeed: 10,
|
|
||||||
draggable: /[uo]l/i.test(a.nodeName) ? "li" : ">*",
|
|
||||||
ghostClass: "sortable-ghost",
|
|
||||||
chosenClass: "sortable-chosen",
|
|
||||||
ignore: "a, img",
|
|
||||||
filter: null,
|
|
||||||
animation: 0,
|
|
||||||
setData: function(a, b) {
|
|
||||||
a.setData("Text", b.textContent)
|
|
||||||
},
|
|
||||||
dropBubble: !1,
|
|
||||||
dragoverBubble: !1,
|
|
||||||
dataIdAttr: "data-id",
|
|
||||||
delay: 0,
|
|
||||||
forceFallback: !1,
|
|
||||||
fallbackClass: "sortable-fallback",
|
|
||||||
fallbackOnBody: !1
|
|
||||||
};
|
|
||||||
for (var d in c) !(d in b) && (b[d] = c[d]);
|
|
||||||
V(b);
|
|
||||||
for (var f in this) "_" === f.charAt(0) && (this[f] = this[f].bind(this));
|
|
||||||
this.nativeDraggable = b.forceFallback ? !1 : P, e(a, "mousedown", this._onTapStart), e(a, "touchstart", this._onTapStart), this.nativeDraggable && (e(a, "dragover", this), e(a, "dragenter", this)), T.push(this._onDragOver), b.store && this.sort(b.store.get(this))
|
|
||||||
}
|
|
||||||
|
|
||||||
function b(a) {
|
|
||||||
v && v.state !== a && (h(v, "display", a ? "none" : ""), !a && v.state && w.insertBefore(v, s), v.state = a)
|
|
||||||
}
|
|
||||||
|
|
||||||
function c(a, b, c) {
|
|
||||||
if (a) {
|
|
||||||
c = c || N, b = b.split(".");
|
|
||||||
var d = b.shift().toUpperCase(),
|
|
||||||
e = new RegExp("\\s(" + b.join("|") + ")(?=\\s)", "g");
|
|
||||||
do
|
|
||||||
if (">*" === d && a.parentNode === c || ("" === d || a.nodeName.toUpperCase() == d) && (!b.length || ((" " + a.className + " ").match(e) || []).length == b.length)) return a; while (a !== c && (a = a.parentNode))
|
|
||||||
}
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
|
|
||||||
function d(a) {
|
|
||||||
a.dataTransfer && (a.dataTransfer.dropEffect = "move"), a.preventDefault()
|
|
||||||
}
|
|
||||||
|
|
||||||
function e(a, b, c) {
|
|
||||||
a.addEventListener(b, c, !1)
|
|
||||||
}
|
|
||||||
|
|
||||||
function f(a, b, c) {
|
|
||||||
a.removeEventListener(b, c, !1)
|
|
||||||
}
|
|
||||||
|
|
||||||
function g(a, b, c) {
|
|
||||||
if (a)
|
|
||||||
if (a.classList) a.classList[c ? "add" : "remove"](b);
|
|
||||||
else {
|
|
||||||
var d = (" " + a.className + " ").replace(K, " ").replace(" " + b + " ", " ");
|
|
||||||
a.className = (d + (c ? " " + b : "")).replace(K, " ")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function h(a, b, c) {
|
|
||||||
var d = a && a.style;
|
|
||||||
if (d) {
|
|
||||||
if (void 0 === c) return N.defaultView && N.defaultView.getComputedStyle ? c = N.defaultView.getComputedStyle(a, "") : a.currentStyle && (c = a.currentStyle), void 0 === b ? c : c[b];
|
|
||||||
b in d || (b = "-webkit-" + b), d[b] = c + ("string" == typeof c ? "" : "px")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function i(a, b, c) {
|
|
||||||
if (a) {
|
|
||||||
var d = a.getElementsByTagName(b),
|
|
||||||
e = 0,
|
|
||||||
f = d.length;
|
|
||||||
if (c)
|
|
||||||
for (; f > e; e++) c(d[e], e);
|
|
||||||
return d
|
|
||||||
}
|
|
||||||
return []
|
|
||||||
}
|
|
||||||
|
|
||||||
function j(a, b, c, d, e, f, g) {
|
|
||||||
var h = N.createEvent("Event"),
|
|
||||||
i = (a || b[L]).options,
|
|
||||||
j = "on" + c.charAt(0).toUpperCase() + c.substr(1);
|
|
||||||
h.initEvent(c, !0, !0), h.to = b, h.from = e || b, h.item = d || b, h.clone = v, h.oldIndex = f, h.newIndex = g, b.dispatchEvent(h), i[j] && i[j].call(a, h)
|
|
||||||
}
|
|
||||||
|
|
||||||
function k(a, b, c, d, e, f) {
|
|
||||||
var g, h, i = a[L],
|
|
||||||
j = i.options.onMove;
|
|
||||||
return g = N.createEvent("Event"), g.initEvent("move", !0, !0), g.to = b, g.from = a, g.dragged = c, g.draggedRect = d, g.related = e || b, g.relatedRect = f || b.getBoundingClientRect(), a.dispatchEvent(g), j && (h = j.call(i, g)), h
|
|
||||||
}
|
|
||||||
|
|
||||||
function l(a) {
|
|
||||||
a.draggable = !1
|
|
||||||
}
|
|
||||||
|
|
||||||
function m() {
|
|
||||||
R = !1
|
|
||||||
}
|
|
||||||
|
|
||||||
function n(a, b) {
|
|
||||||
var c = a.lastElementChild,
|
|
||||||
d = c.getBoundingClientRect();
|
|
||||||
return (b.clientY - (d.top + d.height) > 5 || b.clientX - (d.right + d.width) > 5) && c
|
|
||||||
}
|
|
||||||
|
|
||||||
function o(a) {
|
|
||||||
for (var b = a.tagName + a.className + a.src + a.href + a.textContent, c = b.length, d = 0; c--;) d += b.charCodeAt(c);
|
|
||||||
return d.toString(36)
|
|
||||||
}
|
|
||||||
|
|
||||||
function p(a) {
|
|
||||||
var b = 0;
|
|
||||||
if (!a || !a.parentNode) return -1;
|
|
||||||
for (; a && (a = a.previousElementSibling);) "TEMPLATE" !== a.nodeName.toUpperCase() && b++;
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
function q(a, b) {
|
|
||||||
var c, d;
|
|
||||||
return function() {
|
|
||||||
void 0 === c && (c = arguments, d = this, setTimeout(function() {
|
|
||||||
1 === c.length ? a.call(d, c[0]) : a.apply(d, c), c = void 0
|
|
||||||
}, b))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function r(a, b) {
|
|
||||||
if (a && b)
|
|
||||||
for (var c in b) b.hasOwnProperty(c) && (a[c] = b[c]);
|
|
||||||
return a
|
|
||||||
}
|
|
||||||
var s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J = {},
|
|
||||||
K = /\s+/g,
|
|
||||||
L = "Sortable" + (new Date).getTime(),
|
|
||||||
M = window,
|
|
||||||
N = M.document,
|
|
||||||
O = M.parseInt,
|
|
||||||
P = !!("draggable" in N.createElement("div")),
|
|
||||||
Q = function(a) {
|
|
||||||
return a = N.createElement("x"), a.style.cssText = "pointer-events:auto", "auto" === a.style.pointerEvents
|
|
||||||
}(),
|
|
||||||
R = !1,
|
|
||||||
S = Math.abs,
|
|
||||||
T = ([].slice, []),
|
|
||||||
U = q(function(a, b, c) {
|
|
||||||
if (c && b.scroll) {
|
|
||||||
var d, e, f, g, h = b.scrollSensitivity,
|
|
||||||
i = b.scrollSpeed,
|
|
||||||
j = a.clientX,
|
|
||||||
k = a.clientY,
|
|
||||||
l = window.innerWidth,
|
|
||||||
m = window.innerHeight;
|
|
||||||
if (z !== c && (y = b.scroll, z = c, y === !0)) {
|
|
||||||
y = c;
|
|
||||||
do
|
|
||||||
if (y.offsetWidth < y.scrollWidth || y.offsetHeight < y.scrollHeight) break; while (y = y.parentNode)
|
|
||||||
}
|
|
||||||
y && (d = y, e = y.getBoundingClientRect(), f = (S(e.right - j) <= h) - (S(e.left - j) <= h), g = (S(e.bottom - k) <= h) - (S(e.top - k) <= h)), f || g || (f = (h >= l - j) - (h >= j), g = (h >= m - k) - (h >= k), (f || g) && (d = M)), (J.vx !== f || J.vy !== g || J.el !== d) && (J.el = d, J.vx = f, J.vy = g, clearInterval(J.pid), d && (J.pid = setInterval(function() {
|
|
||||||
d === M ? M.scrollTo(M.pageXOffset + f * i, M.pageYOffset + g * i) : (g && (d.scrollTop += g * i), f && (d.scrollLeft += f * i))
|
|
||||||
}, 24)))
|
|
||||||
}
|
|
||||||
}, 30),
|
|
||||||
V = function(a) {
|
|
||||||
var b = a.group;
|
|
||||||
b && "object" == typeof b || (b = a.group = {
|
|
||||||
name: b
|
|
||||||
}), ["pull", "put"].forEach(function(a) {
|
|
||||||
a in b || (b[a] = !0)
|
|
||||||
}), a.groups = " " + b.name + (b.put.join ? " " + b.put.join(" ") : "") + " "
|
|
||||||
};
|
|
||||||
return a.prototype = {
|
|
||||||
constructor: a,
|
|
||||||
_onTapStart: function(a) {
|
|
||||||
var b = this,
|
|
||||||
d = this.el,
|
|
||||||
e = this.options,
|
|
||||||
f = a.type,
|
|
||||||
g = a.touches && a.touches[0],
|
|
||||||
h = (g || a).target,
|
|
||||||
i = h,
|
|
||||||
k = e.filter;
|
|
||||||
if (!("mousedown" === f && 0 !== a.button || e.disabled) && (h = c(h, e.draggable, d))) {
|
|
||||||
if (D = p(h), "function" == typeof k) {
|
|
||||||
if (k.call(this, a, h, this)) return j(b, i, "filter", h, d, D), void a.preventDefault()
|
|
||||||
} else if (k && (k = k.split(",").some(function(a) {
|
|
||||||
return a = c(i, a.trim(), d), a ? (j(b, a, "filter", h, d, D), !0) : void 0
|
|
||||||
}))) return void a.preventDefault();
|
|
||||||
(!e.handle || c(i, e.handle, d)) && this._prepareDragStart(a, g, h)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
_prepareDragStart: function(a, b, c) {
|
|
||||||
var d, f = this,
|
|
||||||
h = f.el,
|
|
||||||
j = f.options,
|
|
||||||
k = h.ownerDocument;
|
|
||||||
c && !s && c.parentNode === h && (G = a, w = h, s = c, t = s.parentNode, x = s.nextSibling, F = j.group, d = function() {
|
|
||||||
f._disableDelayedDrag(), s.draggable = !0, g(s, f.options.chosenClass, !0), f._triggerDragStart(b)
|
|
||||||
}, j.ignore.split(",").forEach(function(a) {
|
|
||||||
i(s, a.trim(), l)
|
|
||||||
}), e(k, "mouseup", f._onDrop), e(k, "touchend", f._onDrop), e(k, "touchcancel", f._onDrop), j.delay ? (e(k, "mouseup", f._disableDelayedDrag), e(k, "touchend", f._disableDelayedDrag), e(k, "touchcancel", f._disableDelayedDrag), e(k, "mousemove", f._disableDelayedDrag), e(k, "touchmove", f._disableDelayedDrag), f._dragStartTimer = setTimeout(d, j.delay)) : d())
|
|
||||||
},
|
|
||||||
_disableDelayedDrag: function() {
|
|
||||||
var a = this.el.ownerDocument;
|
|
||||||
clearTimeout(this._dragStartTimer), f(a, "mouseup", this._disableDelayedDrag), f(a, "touchend", this._disableDelayedDrag), f(a, "touchcancel", this._disableDelayedDrag), f(a, "mousemove", this._disableDelayedDrag), f(a, "touchmove", this._disableDelayedDrag)
|
|
||||||
},
|
|
||||||
_triggerDragStart: function(a) {
|
|
||||||
a ? (G = {
|
|
||||||
target: s,
|
|
||||||
clientX: a.clientX,
|
|
||||||
clientY: a.clientY
|
|
||||||
}, this._onDragStart(G, "touch")) : this.nativeDraggable ? (e(s, "dragend", this), e(w, "dragstart", this._onDragStart)) : this._onDragStart(G, !0);
|
|
||||||
try {
|
|
||||||
N.selection ? N.selection.empty() : window.getSelection().removeAllRanges()
|
|
||||||
} catch (b) {}
|
|
||||||
},
|
|
||||||
_dragStarted: function() {
|
|
||||||
w && s && (g(s, this.options.ghostClass, !0), a.active = this, j(this, w, "start", s, w, D))
|
|
||||||
},
|
|
||||||
_emulateDragOver: function() {
|
|
||||||
if (H) {
|
|
||||||
if (this._lastX === H.clientX && this._lastY === H.clientY) return;
|
|
||||||
this._lastX = H.clientX, this._lastY = H.clientY, Q || h(u, "display", "none");
|
|
||||||
var a = N.elementFromPoint(H.clientX, H.clientY),
|
|
||||||
b = a,
|
|
||||||
c = " " + this.options.group.name,
|
|
||||||
d = T.length;
|
|
||||||
if (b)
|
|
||||||
do {
|
|
||||||
if (b[L] && b[L].options.groups.indexOf(c) > -1) {
|
|
||||||
for (; d--;) T[d]({
|
|
||||||
clientX: H.clientX,
|
|
||||||
clientY: H.clientY,
|
|
||||||
target: a,
|
|
||||||
rootEl: b
|
|
||||||
});
|
|
||||||
break
|
|
||||||
}
|
|
||||||
a = b
|
|
||||||
} while (b = b.parentNode);
|
|
||||||
Q || h(u, "display", "")
|
|
||||||
}
|
|
||||||
},
|
|
||||||
_onTouchMove: function(b) {
|
|
||||||
if (G) {
|
|
||||||
a.active || this._dragStarted(), this._appendGhost();
|
|
||||||
var c = b.touches ? b.touches[0] : b,
|
|
||||||
d = c.clientX - G.clientX,
|
|
||||||
e = c.clientY - G.clientY,
|
|
||||||
f = b.touches ? "translate3d(" + d + "px," + e + "px,0)" : "translate(" + d + "px," + e + "px)";
|
|
||||||
I = !0, H = c, h(u, "webkitTransform", f), h(u, "mozTransform", f), h(u, "msTransform", f), h(u, "transform", f), b.preventDefault()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
_appendGhost: function() {
|
|
||||||
if (!u) {
|
|
||||||
var a, b = s.getBoundingClientRect(),
|
|
||||||
c = h(s),
|
|
||||||
d = this.options;
|
|
||||||
u = s.cloneNode(!0), g(u, d.ghostClass, !1), g(u, d.fallbackClass, !0), h(u, "top", b.top - O(c.marginTop, 10)), h(u, "left", b.left - O(c.marginLeft, 10)), h(u, "width", b.width), h(u, "height", b.height), h(u, "opacity", "0.8"), h(u, "position", "fixed"), h(u, "zIndex", "100000"), h(u, "pointerEvents", "none"), d.fallbackOnBody && N.body.appendChild(u) || w.appendChild(u), a = u.getBoundingClientRect(), h(u, "width", 2 * b.width - a.width), h(u, "height", 2 * b.height - a.height)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
_onDragStart: function(a, b) {
|
|
||||||
var c = a.dataTransfer,
|
|
||||||
d = this.options;
|
|
||||||
this._offUpEvents(), "clone" == F.pull && (v = s.cloneNode(!0), h(v, "display", "none"), w.insertBefore(v, s)), b ? ("touch" === b ? (e(N, "touchmove", this._onTouchMove), e(N, "touchend", this._onDrop), e(N, "touchcancel", this._onDrop)) : (e(N, "mousemove", this._onTouchMove), e(N, "mouseup", this._onDrop)), this._loopId = setInterval(this._emulateDragOver, 50)) : (c && (c.effectAllowed = "move", d.setData && d.setData.call(this, c, s)), e(N, "drop", this), setTimeout(this._dragStarted, 0))
|
|
||||||
},
|
|
||||||
_onDragOver: function(a) {
|
|
||||||
var d, e, f, g = this.el,
|
|
||||||
i = this.options,
|
|
||||||
j = i.group,
|
|
||||||
l = j.put,
|
|
||||||
o = F === j,
|
|
||||||
p = i.sort;
|
|
||||||
if (void 0 !== a.preventDefault && (a.preventDefault(), !i.dragoverBubble && a.stopPropagation()), I = !0, F && !i.disabled && (o ? p || (f = !w.contains(s)) : F.pull && l && (F.name === j.name || l.indexOf && ~l.indexOf(F.name))) && (void 0 === a.rootEl || a.rootEl === this.el)) {
|
|
||||||
if (U(a, i, this.el), R) return;
|
|
||||||
if (d = c(a.target, i.draggable, g), e = s.getBoundingClientRect(), f) return b(!0), void(v || x ? w.insertBefore(s, v || x) : p || w.appendChild(s));
|
|
||||||
if (0 === g.children.length || g.children[0] === u || g === a.target && (d = n(g, a))) {
|
|
||||||
if (d) {
|
|
||||||
if (d.animated) return;
|
|
||||||
r = d.getBoundingClientRect()
|
|
||||||
}
|
|
||||||
b(o), k(w, g, s, e, d, r) !== !1 && (s.contains(g) || (g.appendChild(s), t = g), this._animate(e, s), d && this._animate(r, d))
|
|
||||||
} else if (d && !d.animated && d !== s && void 0 !== d.parentNode[L]) {
|
|
||||||
A !== d && (A = d, B = h(d), C = h(d.parentNode));
|
|
||||||
var q, r = d.getBoundingClientRect(),
|
|
||||||
y = r.right - r.left,
|
|
||||||
z = r.bottom - r.top,
|
|
||||||
D = /left|right|inline/.test(B.cssFloat + B.display) || "flex" == C.display && 0 === C["flex-direction"].indexOf("row"),
|
|
||||||
E = d.offsetWidth > s.offsetWidth,
|
|
||||||
G = d.offsetHeight > s.offsetHeight,
|
|
||||||
H = (D ? (a.clientX - r.left) / y : (a.clientY - r.top) / z) > .5,
|
|
||||||
J = d.nextElementSibling,
|
|
||||||
K = k(w, g, s, e, d, r);
|
|
||||||
if (K !== !1) {
|
|
||||||
if (R = !0, setTimeout(m, 30), b(o), 1 === K || -1 === K) q = 1 === K;
|
|
||||||
else if (D) {
|
|
||||||
var M = s.offsetTop,
|
|
||||||
N = d.offsetTop;
|
|
||||||
q = M === N ? d.previousElementSibling === s && !E || H && E : N > M
|
|
||||||
} else q = J !== s && !G || H && G;
|
|
||||||
s.contains(g) || (q && !J ? g.appendChild(s) : d.parentNode.insertBefore(s, q ? J : d)), t = s.parentNode, this._animate(e, s), this._animate(r, d)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
_animate: function(a, b) {
|
|
||||||
var c = this.options.animation;
|
|
||||||
if (c) {
|
|
||||||
var d = b.getBoundingClientRect();
|
|
||||||
h(b, "transition", "none"), h(b, "transform", "translate3d(" + (a.left - d.left) + "px," + (a.top - d.top) + "px,0)"), b.offsetWidth, h(b, "transition", "all " + c + "ms"), h(b, "transform", "translate3d(0,0,0)"), clearTimeout(b.animated), b.animated = setTimeout(function() {
|
|
||||||
h(b, "transition", ""), h(b, "transform", ""), b.animated = !1
|
|
||||||
}, c)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
_offUpEvents: function() {
|
|
||||||
var a = this.el.ownerDocument;
|
|
||||||
f(N, "touchmove", this._onTouchMove), f(a, "mouseup", this._onDrop), f(a, "touchend", this._onDrop), f(a, "touchcancel", this._onDrop)
|
|
||||||
},
|
|
||||||
_onDrop: function(b) {
|
|
||||||
var c = this.el,
|
|
||||||
d = this.options;
|
|
||||||
clearInterval(this._loopId), clearInterval(J.pid), clearTimeout(this._dragStartTimer), f(N, "mousemove", this._onTouchMove), this.nativeDraggable && (f(N, "drop", this), f(c, "dragstart", this._onDragStart)), this._offUpEvents(), b && (I && (b.preventDefault(), !d.dropBubble && b.stopPropagation()), u && u.parentNode.removeChild(u), s && (this.nativeDraggable && f(s, "dragend", this), l(s), g(s, this.options.ghostClass, !1), g(s, this.options.chosenClass, !1), w !== t ? (E = p(s), E >= 0 && (j(null, t, "sort", s, w, D, E), j(this, w, "sort", s, w, D, E), j(null, t, "add", s, w, D, E), j(this, w, "remove", s, w, D, E))) : (v && v.parentNode.removeChild(v), s.nextSibling !== x && (E = p(s), E >= 0 && (j(this, w, "update", s, w, D, E), j(this, w, "sort", s, w, D, E)))), a.active && ((null === E || -1 === E) && (E = D), j(this, w, "end", s, w, D, E), this.save())), w = s = t = u = x = v = y = z = G = H = I = E = A = B = F = a.active = null)
|
|
||||||
},
|
|
||||||
handleEvent: function(a) {
|
|
||||||
var b = a.type;
|
|
||||||
"dragover" === b || "dragenter" === b ? s && (this._onDragOver(a), d(a)) : ("drop" === b || "dragend" === b) && this._onDrop(a)
|
|
||||||
},
|
|
||||||
toArray: function() {
|
|
||||||
for (var a, b = [], d = this.el.children, e = 0, f = d.length, g = this.options; f > e; e++) a = d[e], c(a, g.draggable, this.el) && b.push(a.getAttribute(g.dataIdAttr) || o(a));
|
|
||||||
return b
|
|
||||||
},
|
|
||||||
sort: function(a) {
|
|
||||||
var b = {},
|
|
||||||
d = this.el;
|
|
||||||
this.toArray().forEach(function(a, e) {
|
|
||||||
var f = d.children[e];
|
|
||||||
c(f, this.options.draggable, d) && (b[a] = f)
|
|
||||||
}, this), a.forEach(function(a) {
|
|
||||||
b[a] && (d.removeChild(b[a]), d.appendChild(b[a]))
|
|
||||||
})
|
|
||||||
},
|
|
||||||
save: function() {
|
|
||||||
var a = this.options.store;
|
|
||||||
a && a.set(this)
|
|
||||||
},
|
|
||||||
closest: function(a, b) {
|
|
||||||
return c(a, b || this.options.draggable, this.el)
|
|
||||||
},
|
|
||||||
option: function(a, b) {
|
|
||||||
var c = this.options;
|
|
||||||
return void 0 === b ? c[a] : (c[a] = b, void("group" === a && V(c)))
|
|
||||||
},
|
|
||||||
destroy: function() {
|
|
||||||
var a = this.el;
|
|
||||||
a[L] = null, f(a, "mousedown", this._onTapStart), f(a, "touchstart", this._onTapStart), this.nativeDraggable && (f(a, "dragover", this), f(a, "dragenter", this)), Array.prototype.forEach.call(a.querySelectorAll("[draggable]"), function(a) {
|
|
||||||
a.removeAttribute("draggable")
|
|
||||||
}), T.splice(T.indexOf(this._onDragOver), 1), this._onDrop(), this.el = a = null
|
|
||||||
}
|
|
||||||
}, a.utils = {
|
|
||||||
on: e,
|
|
||||||
off: f,
|
|
||||||
css: h,
|
|
||||||
find: i,
|
|
||||||
is: function(a, b) {
|
|
||||||
return !!c(a, b, a)
|
|
||||||
},
|
|
||||||
extend: r,
|
|
||||||
throttle: q,
|
|
||||||
closest: c,
|
|
||||||
toggleClass: g,
|
|
||||||
index: p
|
|
||||||
}, a.create = function(b, c) {
|
|
||||||
return new a(b, c)
|
|
||||||
}, a.version = "1.4.2", a
|
|
||||||
});
|
|
344
src/bower_components/Sortable/index.html
vendored
344
src/bower_components/Sortable/index.html
vendored
|
@ -1,344 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8"/>
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
|
||||||
<meta property="og:image" content="/st/og-image.png"/>
|
|
||||||
|
|
||||||
<title>Sortable. No jQuery.</title>
|
|
||||||
|
|
||||||
<meta name="keywords" content="sortable, reorder, list, javascript, html5, drag and drop, dnd, animation, groups, angular, ng-sortable, react, mixin, effects, rubaxa"/>
|
|
||||||
<meta name="description" content="Sortable - is a minimalist JavaScript library for reorderable drag-and-drop lists on modern browsers and touch devices. No jQuery. Supports Meteor, AngularJS, React and any CSS library, e.g. Bootstrap."/>
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=0.5"/>
|
|
||||||
|
|
||||||
<link href="//rubaxa.github.io/Ply/ply.css" rel="stylesheet" type="text/css"/>
|
|
||||||
<link href="//fonts.googleapis.com/css?family=Roboto:300" rel="stylesheet" type="text/css"/>
|
|
||||||
|
|
||||||
<link href="st/app.css" rel="stylesheet" type="text/css"/>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<a href="https://github.com/RubaXa/Sortable"><img style="position: fixed; top: 0; right: 0; border: 0; z-index: 10000;" src="//s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png" alt="Fork me on GitHub"></a>
|
|
||||||
|
|
||||||
<div class="container">
|
|
||||||
<div style="padding: 80px 150px 0; height: 160px;">
|
|
||||||
<a class="logo" href="https://github.com/RubaXa/Sortable"><img src="st/logo.png"/></a>
|
|
||||||
<h1 data-force="40" data-force-y="2.5">The JavaScript library for modern browsers and touch devices. No jQuery.</h1>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Connected lists -->
|
|
||||||
<div class="container" style="height: 520px">
|
|
||||||
<div data-force="30" class="layer block" style="left: 14.5%; top: 0; width: 37%">
|
|
||||||
<div class="layer title">List A</div>
|
|
||||||
<ul id="foo" class="block__list block__list_words">
|
|
||||||
<li>бегемот</li>
|
|
||||||
<li>корм</li>
|
|
||||||
<li>антон</li>
|
|
||||||
<li>сало</li>
|
|
||||||
<li>железосталь</li>
|
|
||||||
<li>валик</li>
|
|
||||||
<li>кровать</li>
|
|
||||||
<li>краб</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div data-force="18" class="layer block" style="left: 58%; top: 143px; width: 40%;">
|
|
||||||
<div class="layer title">List B</div>
|
|
||||||
<ul id="bar" class="block__list block__list_tags">
|
|
||||||
<li>казнить</li>
|
|
||||||
<li>,</li>
|
|
||||||
<li>нельзя</li>
|
|
||||||
<li>помиловать</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Multi connected lists -->
|
|
||||||
<a name="m"></a>
|
|
||||||
<div class="container">
|
|
||||||
<div id="multi" style="margin-left: 30px">
|
|
||||||
<div><div data-force="5" class="layer title title_xl">Multi</div></div>
|
|
||||||
|
|
||||||
<div class="layer tile" data-force="30">
|
|
||||||
<div class="tile__name">Group A</div>
|
|
||||||
<div class="tile__list">
|
|
||||||
<img src="st/face-01.jpg"/><!--
|
|
||||||
--><img src="st/face-02.jpg"/><!--
|
|
||||||
--><img src="st/face-03.jpg"/><!--
|
|
||||||
--><img src="st/face-04.jpg"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="layer tile" data-force="25">
|
|
||||||
<div class="tile__name">Group B</div>
|
|
||||||
<div class="tile__list">
|
|
||||||
<img src="st/face-05.jpg"/><!--
|
|
||||||
--><img src="st/face-06.jpg"/><!--
|
|
||||||
--><img src="st/face-07.jpg"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="layer tile" data-force="20">
|
|
||||||
<div class="tile__name">Group C</div>
|
|
||||||
<div class="tile__list">
|
|
||||||
<img src="st/face-08.jpg"/><!--
|
|
||||||
--><img src="st/face-09.jpg"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Editable list -->
|
|
||||||
<a name="e"></a>
|
|
||||||
<div class="container" style="margin-top: 100px">
|
|
||||||
<div id="filter" style="margin-left: 30px">
|
|
||||||
<div><div data-force="5" class="layer title title_xl">Editable list</div></div>
|
|
||||||
|
|
||||||
<div style="margin-top: -8px; margin-left: 10px" class="block__list block__list_words">
|
|
||||||
<ul id="editable">
|
|
||||||
<li>Оля<i class="js-remove">✖</i></li>
|
|
||||||
<li>Владимир<i class="js-remove">✖</i></li>
|
|
||||||
<li>Алина<i class="js-remove">✖</i></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<button id="addUser">Add</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Advanced connected lists -->
|
|
||||||
<a name="ag"></a>
|
|
||||||
<div class="container" style="margin-top: 100px;">
|
|
||||||
<div id="advanced" style="margin-left: 30px;">
|
|
||||||
<div><div data-force="5" class="layer title title_xl">Advanced groups</div></div>
|
|
||||||
|
|
||||||
<div style="width: 25%; float: left; margin-top: 15px; margin-left: 10px" class="block__list block__list_words">
|
|
||||||
<div class="block__list-title">pull & put</div>
|
|
||||||
<ul id="advanced-1">
|
|
||||||
<li>Meat</li>
|
|
||||||
<li>Potato</li>
|
|
||||||
<li>Tea</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div style="width: 25%; float: left; margin-top: 15px; margin-left: 10px" class="block__list block__list_words">
|
|
||||||
<div class="block__list-title">only pull (clone) no reordering</div>
|
|
||||||
<ul id="advanced-2">
|
|
||||||
<li>Sex</li>
|
|
||||||
<li>Drugs</li>
|
|
||||||
<li>Rock'n'roll</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div style="width: 25%; float: left; margin-top: 15px; margin-left: 10px" class="block__list block__list_words">
|
|
||||||
<div class="block__list-title">only put</div>
|
|
||||||
<ul id="advanced-3">
|
|
||||||
<li>Money</li>
|
|
||||||
<li>Force</li>
|
|
||||||
<li>Agility</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div style="clear: both"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- 'handle' option -->
|
|
||||||
<a name="h"></a>
|
|
||||||
<div class="container" style="margin-top: 100px;">
|
|
||||||
<div id="handle" style="margin-left: 30px;">
|
|
||||||
<div><div data-force="5" class="layer title title_xl">Drag handle and selectable text</div></div>
|
|
||||||
|
|
||||||
<div style="width: 30%; margin-left: 10px" class="block__list_words">
|
|
||||||
<ul id="handle-1">
|
|
||||||
<li><span class="drag-handle">☰</span>Select text freely</li>
|
|
||||||
<li><span class="drag-handle">☰</span>Drag my handle</li>
|
|
||||||
<li><span class="drag-handle">☰</span>Best of both worlds</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div style="clear: both"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Angular -->
|
|
||||||
<a name="ng"></a>
|
|
||||||
<div id="todos" ng-app="todoApp" class="container" style="margin-top: 100px">
|
|
||||||
<div style="margin-left: 30px">
|
|
||||||
<div><div data-force="5" class="layer title title_xl">AngularJS / ng-sortable</div></div>
|
|
||||||
|
|
||||||
<div style="width: 30%; margin-top: -8px; margin-left: 10px; float: left;" class="block__list block__list_words">
|
|
||||||
<div ng-controller="TodoController">
|
|
||||||
<span style="padding-left: 20px">{{remaining()}} of {{todos.length}} remaining</span>
|
|
||||||
[ <a href="" ng-click="archive()">archive</a> ]
|
|
||||||
<ul ng-sortable="{ group: 'todo', animation: 150 }" class="unstyled">
|
|
||||||
<li ng-repeat="todo in todos">
|
|
||||||
<input type="checkbox" ng-model="todo.done">
|
|
||||||
<span class="done-{{todo.done}}">{{todo.text}}</span>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<form ng-submit="addTodo()" style="padding-left: 20px">
|
|
||||||
<input type="text" ng-model="todoText" size="30"
|
|
||||||
placeholder="add new todo here">
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div style="width: 30%; margin-top: -8px; margin-left: 10px; float: left;" class="block__list block__list_words">
|
|
||||||
<div ng-controller="TodoControllerNext">
|
|
||||||
<span style="padding-left: 20px">{{remaining()}} of {{todos.length}} remaining</span>
|
|
||||||
<ul ng-sortable="sortableConfig" class="unstyled">
|
|
||||||
<li ng-repeat="todo in todos">
|
|
||||||
<input type="checkbox" ng-model="todo.done">
|
|
||||||
<span class="done-{{todo.done}}">{{todo.text}}</span>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div style="clear: both"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Code example -->
|
|
||||||
<a name="c"></a>
|
|
||||||
<div class="container" style="margin-top: 100px">
|
|
||||||
<div style="margin-left: 30px">
|
|
||||||
<div><div class="layer title title_xl">Code example</div></div>
|
|
||||||
<pre data-force="100" class="layer javascript" style="margin-top: -8px; margin-left: 10px; width: 90%"><code>// Simple list
|
|
||||||
var list = document.getElementById("my-ui-list");
|
|
||||||
Sortable.create(list); // That's all.
|
|
||||||
|
|
||||||
|
|
||||||
// Grouping
|
|
||||||
var foo = document.getElementById("foo");
|
|
||||||
Sortable.create(foo, { group: "omega" });
|
|
||||||
|
|
||||||
var bar = document.getElementById("bar");
|
|
||||||
Sortable.create(bar, { group: "omega" });
|
|
||||||
|
|
||||||
|
|
||||||
// Or
|
|
||||||
var container = document.getElementById("multi");
|
|
||||||
var sort = Sortable.create(container, {
|
|
||||||
animation: 150, // ms, animation speed moving items when sorting, `0` — without animation
|
|
||||||
handle: ".tile__title", // Restricts sort start click/touch to the specified element
|
|
||||||
draggable: ".tile", // Specifies which items inside the element should be sortable
|
|
||||||
onUpdate: function (evt/**Event*/){
|
|
||||||
var item = evt.item; // the current dragged HTMLElement
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// ..
|
|
||||||
sort.destroy();
|
|
||||||
|
|
||||||
|
|
||||||
// Editable list
|
|
||||||
var editableList = Sortable.create(editable, {
|
|
||||||
filter: '.js-remove',
|
|
||||||
onFilter: function (evt) {
|
|
||||||
var el = editableList.closest(evt.item); // get dragged item
|
|
||||||
el && el.parentNode.removeChild(el);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</code></pre>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="container" style="margin: 100px 0;">
|
|
||||||
<div style="margin-left: 30px">
|
|
||||||
<div><div class="layer title title_xl">See also</div></div>
|
|
||||||
<div id="rubaxa-repos" data-force="100" class="layer" style="margin-top: -8px; margin-left: 10px; width: 90%; background-color: #fff;">Loading…</div>
|
|
||||||
<script src="//rubaxa.github.io/repos.js"></script>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script src="Sortable.js"></script>
|
|
||||||
<script src="//rubaxa.github.io/Ply/Ply.min.js"></script>
|
|
||||||
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js"></script>
|
|
||||||
<script src="ng-sortable.js"></script>
|
|
||||||
|
|
||||||
<script src="st/app.js"></script>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- highlight.js -->
|
|
||||||
<style>
|
|
||||||
/* Tomorrow Theme */
|
|
||||||
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
|
|
||||||
/* Original theme - https://github.com/chriskempson/tomorrow-theme */
|
|
||||||
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
|
|
||||||
.tomorrow-comment, pre .comment, pre .title {
|
|
||||||
color: #8e908c;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tomorrow-red, pre .variable, pre .attribute, pre .tag, pre .regexp, pre .ruby .constant, pre .xml .tag .title, pre .xml .pi, pre .xml .doctype, pre .html .doctype, pre .css .id, pre .css .class, pre .css .pseudo {
|
|
||||||
color: #c82829;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tomorrow-orange, pre .number, pre .preprocessor, pre .built_in, pre .literal, pre .params, pre .constant {
|
|
||||||
color: #f5871f;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tomorrow-yellow, pre .class, pre .ruby .class .title, pre .css .rules .attribute {
|
|
||||||
color: #eab700;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tomorrow-green, pre .string, pre .value, pre .inheritance, pre .header, pre .ruby .symbol, pre .xml .cdata {
|
|
||||||
color: #718c00;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tomorrow-aqua, pre .css .hexcolor {
|
|
||||||
color: #3e999f;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tomorrow-blue, pre .function, pre .python .decorator, pre .python .title, pre .ruby .function .title, pre .ruby .title .keyword, pre .perl .sub, pre .javascript .title, pre .coffeescript .title {
|
|
||||||
color: #4271ae;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tomorrow-purple, pre .keyword, pre .javascript .function {
|
|
||||||
color: #8959a8;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre {
|
|
||||||
border: 0;
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre code {
|
|
||||||
display: block;
|
|
||||||
color: #4d4d4c;
|
|
||||||
font-size: 15px;
|
|
||||||
font-family: Menlo, Monaco, Consolas, monospace;
|
|
||||||
line-height: 1.5;
|
|
||||||
padding: 30px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<script src="//yandex.st/highlightjs/7.5/highlight.min.js"></script>
|
|
||||||
<script>hljs.initHighlightingOnLoad();</script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
|
||||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
|
||||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
|
||||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
|
||||||
|
|
||||||
ga('create', 'UA-16483888-3', 'rubaxa.github.io');
|
|
||||||
ga('send', 'pageview');
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
17
src/bower_components/Sortable/jquery.binding.js
vendored
17
src/bower_components/Sortable/jquery.binding.js
vendored
|
@ -1,17 +0,0 @@
|
||||||
! function(factory) {
|
|
||||||
"use strict";
|
|
||||||
"function" == typeof define && define.amd ? define(["jquery"], factory) : factory(jQuery)
|
|
||||||
}(function($) {
|
|
||||||
"use strict";
|
|
||||||
$.fn.sortable = function(options) {
|
|
||||||
var retVal, args = arguments;
|
|
||||||
return this.each(function() {
|
|
||||||
var $el = $(this),
|
|
||||||
sortable = $el.data("sortable");
|
|
||||||
if (sortable || !(options instanceof Object) && options || (sortable = new Sortable(this, options), $el.data("sortable", sortable)), sortable) {
|
|
||||||
if ("widget" === options) return sortable;
|
|
||||||
"destroy" === options ? (sortable.destroy(), $el.removeData("sortable")) : "function" == typeof sortable[options] ? retVal = sortable[options].apply(sortable, [].slice.call(args, 1)) : options in sortable.options && (retVal = sortable.option.apply(sortable, args))
|
|
||||||
}
|
|
||||||
}), void 0 === retVal ? this : retVal
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,97 +0,0 @@
|
||||||
! function(factory) {
|
|
||||||
"use strict";
|
|
||||||
if ("function" == typeof define && define.amd) define(["knockout"], factory);
|
|
||||||
else if ("function" == typeof require && "object" == typeof exports && "object" == typeof module) {
|
|
||||||
var ko = require("knockout");
|
|
||||||
factory(ko)
|
|
||||||
} else factory(window.ko)
|
|
||||||
}(function(ko) {
|
|
||||||
"use strict";
|
|
||||||
var init = function(element, valueAccessor, allBindings, viewModel, bindingContext, sortableOptions) {
|
|
||||||
var options = buildOptions(valueAccessor, sortableOptions);
|
|
||||||
["onStart", "onEnd", "onRemove", "onAdd", "onUpdate", "onSort", "onFilter"].forEach(function(e) {
|
|
||||||
(options[e] || eventHandlers[e]) && (options[e] = function(eventType, parentVM, parentBindings, handler, e) {
|
|
||||||
var itemVM = ko.dataFor(e.item),
|
|
||||||
bindings = ko.utils.peekObservable(parentBindings()),
|
|
||||||
bindingHandlerBinding = bindings.sortable || bindings.draggable,
|
|
||||||
collection = bindingHandlerBinding.collection || bindingHandlerBinding.foreach;
|
|
||||||
handler && handler(e, itemVM, parentVM, collection, bindings), eventHandlers[eventType] && eventHandlers[eventType](e, itemVM, parentVM, collection, bindings)
|
|
||||||
}.bind(void 0, e, viewModel, allBindings, options[e]))
|
|
||||||
});
|
|
||||||
var sortableElement = Sortable.create(element, options);
|
|
||||||
return ko.utils.domNodeDisposal.addDisposeCallback(element, function() {
|
|
||||||
sortableElement.destroy()
|
|
||||||
}), ko.bindingHandlers.template.init(element, valueAccessor)
|
|
||||||
},
|
|
||||||
update = function(element, valueAccessor, allBindings, viewModel, bindingContext, sortableOptions) {
|
|
||||||
return ko.bindingHandlers.template.update(element, valueAccessor, allBindings, viewModel, bindingContext)
|
|
||||||
},
|
|
||||||
eventHandlers = function(handlers) {
|
|
||||||
var moveOperations = [],
|
|
||||||
tryMoveOperation = function(e, itemVM, parentVM, collection, parentBindings) {
|
|
||||||
var currentOperation = {
|
|
||||||
event: e,
|
|
||||||
itemVM: itemVM,
|
|
||||||
parentVM: parentVM,
|
|
||||||
collection: collection,
|
|
||||||
parentBindings: parentBindings
|
|
||||||
},
|
|
||||||
existingOperation = moveOperations.filter(function(op) {
|
|
||||||
return op.itemVM === currentOperation.itemVM
|
|
||||||
})[0];
|
|
||||||
if (existingOperation) {
|
|
||||||
moveOperations.splice(moveOperations.indexOf(existingOperation), 1);
|
|
||||||
var removeOperation = "remove" === currentOperation.event.type ? currentOperation : existingOperation,
|
|
||||||
addOperation = "add" === currentOperation.event.type ? currentOperation : existingOperation;
|
|
||||||
moveItem(itemVM, removeOperation.collection, addOperation.collection, addOperation.event.clone, addOperation.event)
|
|
||||||
} else moveOperations.push(currentOperation)
|
|
||||||
},
|
|
||||||
moveItem = function(itemVM, from, to, clone, e) {
|
|
||||||
var fromArray = from(),
|
|
||||||
originalIndex = fromArray.indexOf(itemVM),
|
|
||||||
newIndex = e.newIndex;
|
|
||||||
e.item.previousElementSibling && (newIndex = fromArray.indexOf(ko.dataFor(e.item.previousElementSibling)), originalIndex > newIndex && (newIndex += 1)), e.item.parentNode.removeChild(e.item), fromArray.splice(originalIndex, 1), from.valueHasMutated(), clone && from !== to && (fromArray.splice(originalIndex, 0, itemVM), from.valueHasMutated()), to().splice(newIndex, 0, itemVM), to.valueHasMutated()
|
|
||||||
};
|
|
||||||
return handlers.onRemove = tryMoveOperation, handlers.onAdd = tryMoveOperation, handlers.onUpdate = function(e, itemVM, parentVM, collection, parentBindings) {
|
|
||||||
moveItem(itemVM, collection, collection, !1, e)
|
|
||||||
}, handlers
|
|
||||||
}({}),
|
|
||||||
buildOptions = function(bindingOptions, options) {
|
|
||||||
var merge = function(into, from) {
|
|
||||||
for (var prop in from) "[object Object]" === Object.prototype.toString.call(from[prop]) ? ("[object Object]" !== Object.prototype.toString.call(into[prop]) && (into[prop] = {}), into[prop] = merge(into[prop], from[prop])) : into[prop] = from[prop];
|
|
||||||
return into
|
|
||||||
},
|
|
||||||
unwrappedOptions = ko.utils.peekObservable(bindingOptions()).options || {};
|
|
||||||
return options = merge({}, options), unwrappedOptions.group && "[object Object]" !== Object.prototype.toString.call(unwrappedOptions.group) && (unwrappedOptions.group = {
|
|
||||||
name: unwrappedOptions.group
|
|
||||||
}), merge(options, unwrappedOptions)
|
|
||||||
};
|
|
||||||
ko.bindingHandlers.draggable = {
|
|
||||||
sortableOptions: {
|
|
||||||
group: {
|
|
||||||
pull: "clone",
|
|
||||||
put: !1
|
|
||||||
},
|
|
||||||
sort: !1
|
|
||||||
},
|
|
||||||
init: function(element, valueAccessor, allBindings, viewModel, bindingContext) {
|
|
||||||
return init(element, valueAccessor, allBindings, viewModel, 0, ko.bindingHandlers.draggable.sortableOptions)
|
|
||||||
},
|
|
||||||
update: function(element, valueAccessor, allBindings, viewModel, bindingContext) {
|
|
||||||
return update(element, valueAccessor, allBindings, viewModel, bindingContext, ko.bindingHandlers.draggable.sortableOptions)
|
|
||||||
}
|
|
||||||
}, ko.bindingHandlers.sortable = {
|
|
||||||
sortableOptions: {
|
|
||||||
group: {
|
|
||||||
pull: !0,
|
|
||||||
put: !0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
init: function(element, valueAccessor, allBindings, viewModel, bindingContext) {
|
|
||||||
return init(element, valueAccessor, allBindings, viewModel, 0, ko.bindingHandlers.sortable.sortableOptions)
|
|
||||||
},
|
|
||||||
update: function(element, valueAccessor, allBindings, viewModel, bindingContext) {
|
|
||||||
return update(element, valueAccessor, allBindings, viewModel, bindingContext, ko.bindingHandlers.sortable.sortableOptions)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
87
src/bower_components/Sortable/ng-sortable.js
vendored
87
src/bower_components/Sortable/ng-sortable.js
vendored
|
@ -1,87 +0,0 @@
|
||||||
! function(factory) {
|
|
||||||
"use strict";
|
|
||||||
"function" == typeof define && define.amd ? define(["angular", "./Sortable"], factory) : "function" == typeof require && "object" == typeof exports && "object" == typeof module ? (require("angular"), factory(angular, require("./Sortable")), module.exports = "ng-sortable") : window.angular && window.Sortable && factory(angular, Sortable)
|
|
||||||
}(function(angular, Sortable) {
|
|
||||||
"use strict";
|
|
||||||
var expando = "Sortable:ng-sortable";
|
|
||||||
angular.module("ng-sortable", []).constant("ngSortableVersion", "0.4.0").constant("ngSortableConfig", {}).directive("ngSortable", ["$parse", "ngSortableConfig", function($parse, ngSortableConfig) {
|
|
||||||
var removed, nextSibling, getSourceFactory = function(el, scope) {
|
|
||||||
var ngRepeat = [].filter.call(el.childNodes, function(node) {
|
|
||||||
return 8 === node.nodeType && -1 !== node.nodeValue.indexOf("ngRepeat:")
|
|
||||||
})[0];
|
|
||||||
if (!ngRepeat) return function() {
|
|
||||||
return null
|
|
||||||
};
|
|
||||||
ngRepeat = ngRepeat.nodeValue.match(/ngRepeat:\s*(?:\(.*?,\s*)?([^\s)]+)[\s)]+in\s+([^\s|]+)/);
|
|
||||||
var itemsExpr = $parse(ngRepeat[2]);
|
|
||||||
return function() {
|
|
||||||
return itemsExpr(scope.$parent) || []
|
|
||||||
}
|
|
||||||
};
|
|
||||||
return {
|
|
||||||
restrict: "AC",
|
|
||||||
scope: {
|
|
||||||
ngSortable: "=?"
|
|
||||||
},
|
|
||||||
link: function(scope, $el) {
|
|
||||||
function _emitEvent(evt, item) {
|
|
||||||
var name = "on" + evt.type.charAt(0).toUpperCase() + evt.type.substr(1),
|
|
||||||
source = getSource();
|
|
||||||
options[name] && options[name]({
|
|
||||||
model: item || source[evt.newIndex],
|
|
||||||
models: source,
|
|
||||||
oldIndex: evt.oldIndex,
|
|
||||||
newIndex: evt.newIndex
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function _sync(evt) {
|
|
||||||
var items = getSource();
|
|
||||||
if (items) {
|
|
||||||
var oldIndex = evt.oldIndex,
|
|
||||||
newIndex = evt.newIndex;
|
|
||||||
if (el !== evt.from) {
|
|
||||||
var prevItems = evt.from[expando]();
|
|
||||||
removed = prevItems[oldIndex], evt.clone ? (removed = angular.copy(removed), prevItems.splice(Sortable.utils.index(evt.clone), 0, prevItems.splice(oldIndex, 1)[0]), evt.from.removeChild(evt.clone)) : prevItems.splice(oldIndex, 1), items.splice(newIndex, 0, removed), evt.from.insertBefore(evt.item, nextSibling)
|
|
||||||
} else items.splice(newIndex, 0, items.splice(oldIndex, 1)[0]);
|
|
||||||
scope.$apply()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var sortable, el = $el[0],
|
|
||||||
options = angular.extend(scope.ngSortable || {}, ngSortableConfig),
|
|
||||||
watchers = [],
|
|
||||||
getSource = getSourceFactory(el, scope);
|
|
||||||
el[expando] = getSource, sortable = Sortable.create(el, Object.keys(options).reduce(function(opts, name) {
|
|
||||||
return opts[name] = opts[name] || options[name], opts
|
|
||||||
}, {
|
|
||||||
onStart: function(evt) {
|
|
||||||
nextSibling = evt.item.nextSibling, _emitEvent(evt), scope.$apply()
|
|
||||||
},
|
|
||||||
onEnd: function(evt) {
|
|
||||||
_emitEvent(evt, removed), scope.$apply()
|
|
||||||
},
|
|
||||||
onAdd: function(evt) {
|
|
||||||
_sync(evt), _emitEvent(evt, removed), scope.$apply()
|
|
||||||
},
|
|
||||||
onUpdate: function(evt) {
|
|
||||||
_sync(evt), _emitEvent(evt)
|
|
||||||
},
|
|
||||||
onRemove: function(evt) {
|
|
||||||
_emitEvent(evt, removed)
|
|
||||||
},
|
|
||||||
onSort: function(evt) {
|
|
||||||
_emitEvent(evt)
|
|
||||||
}
|
|
||||||
})), $el.on("$destroy", function() {
|
|
||||||
angular.forEach(watchers, function(unwatch) {
|
|
||||||
unwatch()
|
|
||||||
}), sortable.destroy(), el[expando] = null, el = null, watchers = null, sortable = null, nextSibling = null
|
|
||||||
}), angular.forEach(["sort", "disabled", "draggable", "handle", "animation", "group", "ghostClass", "filter", "onStart", "onEnd", "onAdd", "onUpdate", "onRemove", "onSort"], function(name) {
|
|
||||||
watchers.push(scope.$watch("ngSortable." + name, function(value) {
|
|
||||||
void 0 !== value && (options[name] = value, /^on[A-Z]/.test(name) || sortable.option(name, value))
|
|
||||||
}))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}])
|
|
||||||
});
|
|
|
@ -1,71 +0,0 @@
|
||||||
! function(factory) {
|
|
||||||
"use strict";
|
|
||||||
"undefined" != typeof module && void 0 !== module.exports ? module.exports = factory(require("./Sortable")) : "function" == typeof define && define.amd ? define(["./Sortable"], factory) : window.SortableMixin = factory(Sortable)
|
|
||||||
}(function(Sortable) {
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
function _getModelName(component) {
|
|
||||||
return component.sortableOptions && component.sortableOptions.model || _defaultOptions.model
|
|
||||||
}
|
|
||||||
|
|
||||||
function _getModelItems(component) {
|
|
||||||
var name = _getModelName(component);
|
|
||||||
return (component.state && component.state[name] || component.props[name]).slice()
|
|
||||||
}
|
|
||||||
|
|
||||||
function _extend(dst, src) {
|
|
||||||
for (var key in src) src.hasOwnProperty(key) && (dst[key] = src[key]);
|
|
||||||
return dst
|
|
||||||
}
|
|
||||||
var _nextSibling, _activeComponent, _defaultOptions = {
|
|
||||||
ref: "list",
|
|
||||||
model: "items",
|
|
||||||
animation: 100,
|
|
||||||
onStart: "handleStart",
|
|
||||||
onEnd: "handleEnd",
|
|
||||||
onAdd: "handleAdd",
|
|
||||||
onUpdate: "handleUpdate",
|
|
||||||
onRemove: "handleRemove",
|
|
||||||
onSort: "handleSort",
|
|
||||||
onFilter: "handleFilter",
|
|
||||||
onMove: "handleMove"
|
|
||||||
};
|
|
||||||
return {
|
|
||||||
sortableMixinVersion: "0.1.1",
|
|
||||||
_sortableInstance: null,
|
|
||||||
componentDidMount: function() {
|
|
||||||
var DOMNode, options = _extend(_extend({}, _defaultOptions), this.sortableOptions || {}),
|
|
||||||
copyOptions = _extend({}, options),
|
|
||||||
emitEvent = function(type, evt) {
|
|
||||||
var method = this[options[type]];
|
|
||||||
method && method.call(this, evt, this._sortableInstance)
|
|
||||||
}.bind(this);
|
|
||||||
"onStart onEnd onAdd onSort onUpdate onRemove onFilter onMove".split(" ").forEach(function(name) {
|
|
||||||
copyOptions[name] = function(evt) {
|
|
||||||
if ("onStart" === name) _nextSibling = evt.item.nextElementSibling, _activeComponent = this;
|
|
||||||
else if ("onAdd" === name || "onUpdate" === name) {
|
|
||||||
evt.from.insertBefore(evt.item, _nextSibling);
|
|
||||||
var remoteItems, item, newState = {},
|
|
||||||
remoteState = {},
|
|
||||||
oldIndex = evt.oldIndex,
|
|
||||||
newIndex = evt.newIndex,
|
|
||||||
items = _getModelItems(this);
|
|
||||||
"onAdd" === name ? (remoteItems = _getModelItems(_activeComponent), item = remoteItems.splice(oldIndex, 1)[0], items.splice(newIndex, 0, item), remoteState[_getModelName(_activeComponent)] = remoteItems) : items.splice(newIndex, 0, items.splice(oldIndex, 1)[0]), newState[_getModelName(this)] = items, copyOptions.stateHandler ? this[copyOptions.stateHandler](newState) : this.setState(newState), this !== _activeComponent && _activeComponent.setState(remoteState)
|
|
||||||
}
|
|
||||||
setTimeout(function() {
|
|
||||||
emitEvent(name, evt)
|
|
||||||
}, 0)
|
|
||||||
}.bind(this)
|
|
||||||
}, this), DOMNode = this.getDOMNode() ? (this.refs[options.ref] || this).getDOMNode() : this.refs[options.ref] || this, this._sortableInstance = Sortable.create(DOMNode, copyOptions)
|
|
||||||
},
|
|
||||||
componentWillReceiveProps: function(nextProps) {
|
|
||||||
var newState = {},
|
|
||||||
modelName = _getModelName(this),
|
|
||||||
items = nextProps[modelName];
|
|
||||||
items && (newState[modelName] = items, this.setState(newState))
|
|
||||||
},
|
|
||||||
componentWillUnmount: function() {
|
|
||||||
this._sortableInstance.destroy(), this._sortableInstance = null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
582
src/bower_components/Swiper/dist/css/swiper.min.css
vendored
582
src/bower_components/Swiper/dist/css/swiper.min.css
vendored
|
@ -1,582 +0,0 @@
|
||||||
/**
|
|
||||||
* Swiper 3.3.1
|
|
||||||
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
|
||||||
*
|
|
||||||
* http://www.idangero.us/swiper/
|
|
||||||
*
|
|
||||||
* Copyright 2016, Vladimir Kharlampidi
|
|
||||||
* The iDangero.us
|
|
||||||
* http://www.idangero.us/
|
|
||||||
*
|
|
||||||
* Licensed under MIT
|
|
||||||
*
|
|
||||||
* Released on: February 7, 2016
|
|
||||||
*/
|
|
||||||
.swiper-container {
|
|
||||||
margin: 0 auto;
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
z-index: 1
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-no-flexbox .swiper-slide {
|
|
||||||
float: left
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-vertical>.swiper-wrapper {
|
|
||||||
-webkit-box-orient: vertical;
|
|
||||||
-moz-box-orient: vertical;
|
|
||||||
-ms-flex-direction: column;
|
|
||||||
-webkit-flex-direction: column;
|
|
||||||
flex-direction: column
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-wrapper {
|
|
||||||
position: relative;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
z-index: 1;
|
|
||||||
display: -webkit-box;
|
|
||||||
display: -moz-box;
|
|
||||||
display: -ms-flexbox;
|
|
||||||
display: -webkit-flex;
|
|
||||||
display: flex;
|
|
||||||
-webkit-transition-property: -webkit-transform;
|
|
||||||
-moz-transition-property: -moz-transform;
|
|
||||||
-o-transition-property: -o-transform;
|
|
||||||
-ms-transition-property: -ms-transform;
|
|
||||||
transition-property: transform;
|
|
||||||
-webkit-box-sizing: content-box;
|
|
||||||
-moz-box-sizing: content-box;
|
|
||||||
box-sizing: content-box
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-android .swiper-slide,
|
|
||||||
.swiper-wrapper {
|
|
||||||
-webkit-transform: translate3d(0, 0, 0);
|
|
||||||
-moz-transform: translate3d(0, 0, 0);
|
|
||||||
-o-transform: translate(0, 0);
|
|
||||||
-ms-transform: translate3d(0, 0, 0);
|
|
||||||
transform: translate3d(0, 0, 0)
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-multirow>.swiper-wrapper {
|
|
||||||
-webkit-box-lines: multiple;
|
|
||||||
-moz-box-lines: multiple;
|
|
||||||
-ms-flex-wrap: wrap;
|
|
||||||
-webkit-flex-wrap: wrap;
|
|
||||||
flex-wrap: wrap
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-free-mode>.swiper-wrapper {
|
|
||||||
-webkit-transition-timing-function: ease-out;
|
|
||||||
-moz-transition-timing-function: ease-out;
|
|
||||||
-ms-transition-timing-function: ease-out;
|
|
||||||
-o-transition-timing-function: ease-out;
|
|
||||||
transition-timing-function: ease-out;
|
|
||||||
margin: 0 auto
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-slide {
|
|
||||||
-webkit-flex-shrink: 0;
|
|
||||||
-ms-flex: 0 0 auto;
|
|
||||||
flex-shrink: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
position: relative
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-autoheight,
|
|
||||||
.swiper-container-autoheight .swiper-slide {
|
|
||||||
height: auto
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-autoheight .swiper-wrapper {
|
|
||||||
-webkit-box-align: start;
|
|
||||||
-ms-flex-align: start;
|
|
||||||
-webkit-align-items: flex-start;
|
|
||||||
align-items: flex-start;
|
|
||||||
-webkit-transition-property: -webkit-transform, height;
|
|
||||||
-moz-transition-property: -moz-transform;
|
|
||||||
-o-transition-property: -o-transform;
|
|
||||||
-ms-transition-property: -ms-transform;
|
|
||||||
transition-property: transform, height
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container .swiper-notification {
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
pointer-events: none;
|
|
||||||
opacity: 0;
|
|
||||||
z-index: -1000
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-wp8-horizontal {
|
|
||||||
-ms-touch-action: pan-y;
|
|
||||||
touch-action: pan-y
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-wp8-vertical {
|
|
||||||
-ms-touch-action: pan-x;
|
|
||||||
touch-action: pan-x
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-button-next,
|
|
||||||
.swiper-button-prev {
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
width: 27px;
|
|
||||||
height: 44px;
|
|
||||||
margin-top: -22px;
|
|
||||||
z-index: 10;
|
|
||||||
cursor: pointer;
|
|
||||||
-moz-background-size: 27px 44px;
|
|
||||||
-webkit-background-size: 27px 44px;
|
|
||||||
background-size: 27px 44px;
|
|
||||||
background-position: center;
|
|
||||||
background-repeat: no-repeat
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-button-next.swiper-button-disabled,
|
|
||||||
.swiper-button-prev.swiper-button-disabled {
|
|
||||||
opacity: .35;
|
|
||||||
cursor: auto;
|
|
||||||
pointer-events: none
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-button-prev,
|
|
||||||
.swiper-container-rtl .swiper-button-next {
|
|
||||||
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");
|
|
||||||
left: 10px;
|
|
||||||
right: auto
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-button-prev.swiper-button-black,
|
|
||||||
.swiper-container-rtl .swiper-button-next.swiper-button-black {
|
|
||||||
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E")
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-button-prev.swiper-button-white,
|
|
||||||
.swiper-container-rtl .swiper-button-next.swiper-button-white {
|
|
||||||
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-button-next,
|
|
||||||
.swiper-container-rtl .swiper-button-prev {
|
|
||||||
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");
|
|
||||||
right: 10px;
|
|
||||||
left: auto
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-button-next.swiper-button-black,
|
|
||||||
.swiper-container-rtl .swiper-button-prev.swiper-button-black {
|
|
||||||
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E")
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-button-next.swiper-button-white,
|
|
||||||
.swiper-container-rtl .swiper-button-prev.swiper-button-white {
|
|
||||||
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-pagination {
|
|
||||||
position: absolute;
|
|
||||||
text-align: center;
|
|
||||||
-webkit-transition: .3s;
|
|
||||||
-moz-transition: .3s;
|
|
||||||
-o-transition: .3s;
|
|
||||||
transition: .3s;
|
|
||||||
-webkit-transform: translate3d(0, 0, 0);
|
|
||||||
-ms-transform: translate3d(0, 0, 0);
|
|
||||||
-o-transform: translate3d(0, 0, 0);
|
|
||||||
transform: translate3d(0, 0, 0);
|
|
||||||
z-index: 10
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-pagination.swiper-pagination-hidden {
|
|
||||||
opacity: 0
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-horizontal>.swiper-pagination-bullets,
|
|
||||||
.swiper-pagination-custom,
|
|
||||||
.swiper-pagination-fraction {
|
|
||||||
bottom: 10px;
|
|
||||||
left: 0;
|
|
||||||
width: 100%
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-pagination-bullet {
|
|
||||||
width: 8px;
|
|
||||||
height: 8px;
|
|
||||||
display: inline-block;
|
|
||||||
border-radius: 100%;
|
|
||||||
background: #000;
|
|
||||||
opacity: .2
|
|
||||||
}
|
|
||||||
|
|
||||||
button.swiper-pagination-bullet {
|
|
||||||
border: none;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
box-shadow: none;
|
|
||||||
-moz-appearance: none;
|
|
||||||
-ms-appearance: none;
|
|
||||||
-webkit-appearance: none;
|
|
||||||
appearance: none
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-pagination-clickable .swiper-pagination-bullet {
|
|
||||||
cursor: pointer
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-pagination-white .swiper-pagination-bullet {
|
|
||||||
background: #fff
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-pagination-bullet-active {
|
|
||||||
opacity: 1;
|
|
||||||
background: #007aff
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-pagination-white .swiper-pagination-bullet-active {
|
|
||||||
background: #fff
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-pagination-black .swiper-pagination-bullet-active {
|
|
||||||
background: #000
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-vertical>.swiper-pagination-bullets {
|
|
||||||
right: 10px;
|
|
||||||
top: 50%;
|
|
||||||
-webkit-transform: translate3d(0, -50%, 0);
|
|
||||||
-moz-transform: translate3d(0, -50%, 0);
|
|
||||||
-o-transform: translate(0, -50%);
|
|
||||||
-ms-transform: translate3d(0, -50%, 0);
|
|
||||||
transform: translate3d(0, -50%, 0)
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-vertical>.swiper-pagination-bullets .swiper-pagination-bullet {
|
|
||||||
margin: 5px 0;
|
|
||||||
display: block
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet {
|
|
||||||
margin: 0 5px
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-pagination-progress {
|
|
||||||
background: rgba(0, 0, 0, .25);
|
|
||||||
position: absolute
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-pagination-progress .swiper-pagination-progressbar {
|
|
||||||
background: #007aff;
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
-webkit-transform: scale(0);
|
|
||||||
-ms-transform: scale(0);
|
|
||||||
-o-transform: scale(0);
|
|
||||||
transform: scale(0);
|
|
||||||
-webkit-transform-origin: left top;
|
|
||||||
-moz-transform-origin: left top;
|
|
||||||
-ms-transform-origin: left top;
|
|
||||||
-o-transform-origin: left top;
|
|
||||||
transform-origin: left top
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-rtl .swiper-pagination-progress .swiper-pagination-progressbar {
|
|
||||||
-webkit-transform-origin: right top;
|
|
||||||
-moz-transform-origin: right top;
|
|
||||||
-ms-transform-origin: right top;
|
|
||||||
-o-transform-origin: right top;
|
|
||||||
transform-origin: right top
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-horizontal>.swiper-pagination-progress {
|
|
||||||
width: 100%;
|
|
||||||
height: 4px;
|
|
||||||
left: 0;
|
|
||||||
top: 0
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-vertical>.swiper-pagination-progress {
|
|
||||||
width: 4px;
|
|
||||||
height: 100%;
|
|
||||||
left: 0;
|
|
||||||
top: 0
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-pagination-progress.swiper-pagination-white {
|
|
||||||
background: rgba(255, 255, 255, .5)
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-pagination-progress.swiper-pagination-white .swiper-pagination-progressbar {
|
|
||||||
background: #fff
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-pagination-progress.swiper-pagination-black .swiper-pagination-progressbar {
|
|
||||||
background: #000
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-3d {
|
|
||||||
-webkit-perspective: 1200px;
|
|
||||||
-moz-perspective: 1200px;
|
|
||||||
-o-perspective: 1200px;
|
|
||||||
perspective: 1200px
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-3d .swiper-cube-shadow,
|
|
||||||
.swiper-container-3d .swiper-slide,
|
|
||||||
.swiper-container-3d .swiper-slide-shadow-bottom,
|
|
||||||
.swiper-container-3d .swiper-slide-shadow-left,
|
|
||||||
.swiper-container-3d .swiper-slide-shadow-right,
|
|
||||||
.swiper-container-3d .swiper-slide-shadow-top,
|
|
||||||
.swiper-container-3d .swiper-wrapper {
|
|
||||||
-webkit-transform-style: preserve-3d;
|
|
||||||
-moz-transform-style: preserve-3d;
|
|
||||||
-ms-transform-style: preserve-3d;
|
|
||||||
transform-style: preserve-3d
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-3d .swiper-slide-shadow-bottom,
|
|
||||||
.swiper-container-3d .swiper-slide-shadow-left,
|
|
||||||
.swiper-container-3d .swiper-slide-shadow-right,
|
|
||||||
.swiper-container-3d .swiper-slide-shadow-top {
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
pointer-events: none;
|
|
||||||
z-index: 10
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-3d .swiper-slide-shadow-left {
|
|
||||||
background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, 0)));
|
|
||||||
background-image: -webkit-linear-gradient(right, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0));
|
|
||||||
background-image: -moz-linear-gradient(right, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0));
|
|
||||||
background-image: -o-linear-gradient(right, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0));
|
|
||||||
background-image: linear-gradient(to left, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0))
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-3d .swiper-slide-shadow-right {
|
|
||||||
background-image: -webkit-gradient(linear, right top, left top, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, 0)));
|
|
||||||
background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0));
|
|
||||||
background-image: -moz-linear-gradient(left, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0));
|
|
||||||
background-image: -o-linear-gradient(left, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0));
|
|
||||||
background-image: linear-gradient(to right, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0))
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-3d .swiper-slide-shadow-top {
|
|
||||||
background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, 0)));
|
|
||||||
background-image: -webkit-linear-gradient(bottom, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0));
|
|
||||||
background-image: -moz-linear-gradient(bottom, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0));
|
|
||||||
background-image: -o-linear-gradient(bottom, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0));
|
|
||||||
background-image: linear-gradient(to top, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0))
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-3d .swiper-slide-shadow-bottom {
|
|
||||||
background-image: -webkit-gradient(linear, left bottom, left top, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, 0)));
|
|
||||||
background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0));
|
|
||||||
background-image: -moz-linear-gradient(top, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0));
|
|
||||||
background-image: -o-linear-gradient(top, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0));
|
|
||||||
background-image: linear-gradient(to bottom, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0))
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-coverflow .swiper-wrapper,
|
|
||||||
.swiper-container-flip .swiper-wrapper {
|
|
||||||
-ms-perspective: 1200px
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-cube,
|
|
||||||
.swiper-container-flip {
|
|
||||||
overflow: visible
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-cube .swiper-slide,
|
|
||||||
.swiper-container-flip .swiper-slide {
|
|
||||||
pointer-events: none;
|
|
||||||
-webkit-backface-visibility: hidden;
|
|
||||||
-moz-backface-visibility: hidden;
|
|
||||||
-ms-backface-visibility: hidden;
|
|
||||||
backface-visibility: hidden;
|
|
||||||
z-index: 1
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-cube .swiper-slide .swiper-slide,
|
|
||||||
.swiper-container-flip .swiper-slide .swiper-slide {
|
|
||||||
pointer-events: none
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-cube .swiper-slide-active,
|
|
||||||
.swiper-container-cube .swiper-slide-active .swiper-slide-active,
|
|
||||||
.swiper-container-flip .swiper-slide-active,
|
|
||||||
.swiper-container-flip .swiper-slide-active .swiper-slide-active {
|
|
||||||
pointer-events: auto
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-cube .swiper-slide-shadow-bottom,
|
|
||||||
.swiper-container-cube .swiper-slide-shadow-left,
|
|
||||||
.swiper-container-cube .swiper-slide-shadow-right,
|
|
||||||
.swiper-container-cube .swiper-slide-shadow-top,
|
|
||||||
.swiper-container-flip .swiper-slide-shadow-bottom,
|
|
||||||
.swiper-container-flip .swiper-slide-shadow-left,
|
|
||||||
.swiper-container-flip .swiper-slide-shadow-right,
|
|
||||||
.swiper-container-flip .swiper-slide-shadow-top {
|
|
||||||
z-index: 0;
|
|
||||||
-webkit-backface-visibility: hidden;
|
|
||||||
-moz-backface-visibility: hidden;
|
|
||||||
-ms-backface-visibility: hidden;
|
|
||||||
backface-visibility: hidden
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-cube .swiper-slide {
|
|
||||||
visibility: hidden;
|
|
||||||
-webkit-transform-origin: 0 0;
|
|
||||||
-moz-transform-origin: 0 0;
|
|
||||||
-ms-transform-origin: 0 0;
|
|
||||||
transform-origin: 0 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-cube.swiper-container-rtl .swiper-slide {
|
|
||||||
-webkit-transform-origin: 100% 0;
|
|
||||||
-moz-transform-origin: 100% 0;
|
|
||||||
-ms-transform-origin: 100% 0;
|
|
||||||
transform-origin: 100% 0
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-cube .swiper-slide-active,
|
|
||||||
.swiper-container-cube .swiper-slide-next,
|
|
||||||
.swiper-container-cube .swiper-slide-next+.swiper-slide,
|
|
||||||
.swiper-container-cube .swiper-slide-prev {
|
|
||||||
pointer-events: auto;
|
|
||||||
visibility: visible
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-cube .swiper-cube-shadow {
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
bottom: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
background: #000;
|
|
||||||
opacity: .6;
|
|
||||||
-webkit-filter: blur(50px);
|
|
||||||
filter: blur(50px);
|
|
||||||
z-index: 0
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-fade.swiper-container-free-mode .swiper-slide {
|
|
||||||
-webkit-transition-timing-function: ease-out;
|
|
||||||
-moz-transition-timing-function: ease-out;
|
|
||||||
-ms-transition-timing-function: ease-out;
|
|
||||||
-o-transition-timing-function: ease-out;
|
|
||||||
transition-timing-function: ease-out
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-fade .swiper-slide {
|
|
||||||
pointer-events: none;
|
|
||||||
-webkit-transition-property: opacity;
|
|
||||||
-moz-transition-property: opacity;
|
|
||||||
-o-transition-property: opacity;
|
|
||||||
transition-property: opacity
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-fade .swiper-slide .swiper-slide {
|
|
||||||
pointer-events: none
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-fade .swiper-slide-active,
|
|
||||||
.swiper-container-fade .swiper-slide-active .swiper-slide-active {
|
|
||||||
pointer-events: auto
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-scrollbar {
|
|
||||||
border-radius: 10px;
|
|
||||||
position: relative;
|
|
||||||
-ms-touch-action: none;
|
|
||||||
background: rgba(0, 0, 0, .1)
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-horizontal>.swiper-scrollbar {
|
|
||||||
position: absolute;
|
|
||||||
left: 1%;
|
|
||||||
bottom: 3px;
|
|
||||||
z-index: 50;
|
|
||||||
height: 5px;
|
|
||||||
width: 98%
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-container-vertical>.swiper-scrollbar {
|
|
||||||
position: absolute;
|
|
||||||
right: 3px;
|
|
||||||
top: 1%;
|
|
||||||
z-index: 50;
|
|
||||||
width: 5px;
|
|
||||||
height: 98%
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-scrollbar-drag {
|
|
||||||
height: 100%;
|
|
||||||
width: 100%;
|
|
||||||
position: relative;
|
|
||||||
background: rgba(0, 0, 0, .5);
|
|
||||||
border-radius: 10px;
|
|
||||||
left: 0;
|
|
||||||
top: 0
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-scrollbar-cursor-drag {
|
|
||||||
cursor: move
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-lazy-preloader {
|
|
||||||
width: 42px;
|
|
||||||
height: 42px;
|
|
||||||
position: absolute;
|
|
||||||
left: 50%;
|
|
||||||
top: 50%;
|
|
||||||
margin-left: -21px;
|
|
||||||
margin-top: -21px;
|
|
||||||
z-index: 10;
|
|
||||||
-webkit-transform-origin: 50%;
|
|
||||||
-moz-transform-origin: 50%;
|
|
||||||
transform-origin: 50%;
|
|
||||||
-webkit-animation: swiper-preloader-spin 1s steps(12, end) infinite;
|
|
||||||
-moz-animation: swiper-preloader-spin 1s steps(12, end) infinite;
|
|
||||||
animation: swiper-preloader-spin 1s steps(12, end) infinite
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-lazy-preloader:after {
|
|
||||||
display: block;
|
|
||||||
content: "";
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%236c6c6c'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
|
|
||||||
background-position: 50%;
|
|
||||||
-webkit-background-size: 100%;
|
|
||||||
background-size: 100%;
|
|
||||||
background-repeat: no-repeat
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-lazy-preloader-white:after {
|
|
||||||
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%23fff'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")
|
|
||||||
}
|
|
||||||
|
|
||||||
@-webkit-keyframes swiper-preloader-spin {
|
|
||||||
100% {
|
|
||||||
-webkit-transform: rotate(360deg)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes swiper-preloader-spin {
|
|
||||||
100% {
|
|
||||||
transform: rotate(360deg)
|
|
||||||
}
|
|
||||||
}
|
|
1606
src/bower_components/Swiper/dist/js/swiper.min.js
vendored
1606
src/bower_components/Swiper/dist/js/swiper.min.js
vendored
File diff suppressed because it is too large
Load diff
9
src/bower_components/Swiper/package.js
vendored
9
src/bower_components/Swiper/package.js
vendored
|
@ -1,9 +0,0 @@
|
||||||
var version = "3.3.1";
|
|
||||||
Package.describe({
|
|
||||||
name: "nolimits4web:swiper",
|
|
||||||
summary: "iDangero.us Swiper - mobile touch slider with hardware accelerated transitions and native behavior",
|
|
||||||
version: version,
|
|
||||||
git: "https://github.com/nolimits4web/Swiper"
|
|
||||||
}), Package.onUse(function(api) {
|
|
||||||
api.versionsFrom("1.1.0.2"), api.addFiles(["dist/css/swiper.min.css", "dist/js/swiper.js"], ["client"])
|
|
||||||
}), Package.onTest(function(api) {});
|
|
853
src/bower_components/howlerjs/dist/howler.min.js
vendored
853
src/bower_components/howlerjs/dist/howler.min.js
vendored
|
@ -1,853 +0,0 @@
|
||||||
/*! howler.js v2.0.14 | (c) 2013-2018, James Simpson of GoldFire Studios | MIT License | howlerjs.com */ ! function() {
|
|
||||||
"use strict";
|
|
||||||
var e = function() {
|
|
||||||
this.init()
|
|
||||||
};
|
|
||||||
e.prototype = {
|
|
||||||
init: function() {
|
|
||||||
var e = this || n;
|
|
||||||
return e._counter = 1e3, e._codecs = {}, e._howls = [], e._muted = !1, e._volume = 1, e._canPlayEvent = "canplaythrough", e._navigator = "undefined" != typeof window && window.navigator ? window.navigator : null, e.masterGain = null, e.noAudio = !1, e.usingWebAudio = !0, e.autoSuspend = !0, e.ctx = null, e.mobileAutoEnable = !0, e._setup(), e
|
|
||||||
},
|
|
||||||
volume: function(e) {
|
|
||||||
var o = this || n;
|
|
||||||
if (e = parseFloat(e), o.ctx || _(), void 0 !== e && e >= 0 && e <= 1) {
|
|
||||||
if (o._volume = e, o._muted) return o;
|
|
||||||
o.usingWebAudio && o.masterGain.gain.setValueAtTime(e, n.ctx.currentTime);
|
|
||||||
for (var t = 0; t < o._howls.length; t++)
|
|
||||||
if (!o._howls[t]._webAudio)
|
|
||||||
for (var r = o._howls[t]._getSoundIds(), a = 0; a < r.length; a++) {
|
|
||||||
var u = o._howls[t]._soundById(r[a]);
|
|
||||||
u && u._node && (u._node.volume = u._volume * e)
|
|
||||||
}
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
return o._volume
|
|
||||||
},
|
|
||||||
mute: function(e) {
|
|
||||||
var o = this || n;
|
|
||||||
o.ctx || _(), o._muted = e, o.usingWebAudio && o.masterGain.gain.setValueAtTime(e ? 0 : o._volume, n.ctx.currentTime);
|
|
||||||
for (var t = 0; t < o._howls.length; t++)
|
|
||||||
if (!o._howls[t]._webAudio)
|
|
||||||
for (var r = o._howls[t]._getSoundIds(), a = 0; a < r.length; a++) {
|
|
||||||
var u = o._howls[t]._soundById(r[a]);
|
|
||||||
u && u._node && (u._node.muted = !!e || u._muted)
|
|
||||||
}
|
|
||||||
return o
|
|
||||||
},
|
|
||||||
unload: function() {
|
|
||||||
for (var e = this || n, o = e._howls.length - 1; o >= 0; o--) e._howls[o].unload();
|
|
||||||
return e.usingWebAudio && e.ctx && void 0 !== e.ctx.close && (e.ctx.close(), e.ctx = null, _()), e
|
|
||||||
},
|
|
||||||
codecs: function(e) {
|
|
||||||
return (this || n)._codecs[e.replace(/^x-/, "")]
|
|
||||||
},
|
|
||||||
_setup: function() {
|
|
||||||
var e = this || n;
|
|
||||||
if (e.state = e.ctx ? e.ctx.state || "running" : "running", e._autoSuspend(), !e.usingWebAudio)
|
|
||||||
if ("undefined" != typeof Audio) try {
|
|
||||||
var o = new Audio;
|
|
||||||
void 0 === o.oncanplaythrough && (e._canPlayEvent = "canplay")
|
|
||||||
} catch (n) {
|
|
||||||
e.noAudio = !0
|
|
||||||
} else e.noAudio = !0;
|
|
||||||
try {
|
|
||||||
var o = new Audio;
|
|
||||||
o.muted && (e.noAudio = !0)
|
|
||||||
} catch (e) {}
|
|
||||||
return e.noAudio || e._setupCodecs(), e
|
|
||||||
},
|
|
||||||
_setupCodecs: function() {
|
|
||||||
var e = this || n,
|
|
||||||
o = null;
|
|
||||||
try {
|
|
||||||
o = "undefined" != typeof Audio ? new Audio : null
|
|
||||||
} catch (n) {
|
|
||||||
return e
|
|
||||||
}
|
|
||||||
if (!o || "function" != typeof o.canPlayType) return e;
|
|
||||||
var t = o.canPlayType("audio/mpeg;").replace(/^no$/, ""),
|
|
||||||
r = e._navigator && e._navigator.userAgent.match(/OPR\/([0-6].)/g),
|
|
||||||
a = r && parseInt(r[0].split("/")[1], 10) < 33;
|
|
||||||
return e._codecs = {
|
|
||||||
mp3: !(a || !t && !o.canPlayType("audio/mp3;").replace(/^no$/, "")),
|
|
||||||
mpeg: !!t,
|
|
||||||
opus: !!o.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/, ""),
|
|
||||||
ogg: !!o.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, ""),
|
|
||||||
oga: !!o.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, ""),
|
|
||||||
wav: !!o.canPlayType('audio/wav; codecs="1"').replace(/^no$/, ""),
|
|
||||||
aac: !!o.canPlayType("audio/aac;").replace(/^no$/, ""),
|
|
||||||
caf: !!o.canPlayType("audio/x-caf;").replace(/^no$/, ""),
|
|
||||||
m4a: !!(o.canPlayType("audio/x-m4a;") || o.canPlayType("audio/m4a;") || o.canPlayType("audio/aac;")).replace(/^no$/, ""),
|
|
||||||
mp4: !!(o.canPlayType("audio/x-mp4;") || o.canPlayType("audio/mp4;") || o.canPlayType("audio/aac;")).replace(/^no$/, ""),
|
|
||||||
weba: !!o.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/, ""),
|
|
||||||
webm: !!o.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/, ""),
|
|
||||||
dolby: !!o.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/, ""),
|
|
||||||
flac: !!(o.canPlayType("audio/x-flac;") || o.canPlayType("audio/flac;")).replace(/^no$/, "")
|
|
||||||
}, e
|
|
||||||
},
|
|
||||||
_enableMobileAudio: function() {
|
|
||||||
var e = this || n,
|
|
||||||
o = /iPhone|iPad|iPod|Android|BlackBerry|BB10|Silk|Mobi|Chrome/i.test(e._navigator && e._navigator.userAgent);
|
|
||||||
if (!e._mobileEnabled && e.ctx && o) {
|
|
||||||
e._mobileEnabled = !1, e.mobileAutoEnable = !1, e._mobileUnloaded || 44100 === e.ctx.sampleRate || (e._mobileUnloaded = !0, e.unload()), e._scratchBuffer = e.ctx.createBuffer(1, 1, 22050);
|
|
||||||
var t = function(o) {
|
|
||||||
o.preventDefault(), n._autoResume();
|
|
||||||
var r = e.ctx.createBufferSource();
|
|
||||||
r.buffer = e._scratchBuffer, r.connect(e.ctx.destination), void 0 === r.start ? r.noteOn(0) : r.start(0), "function" == typeof e.ctx.resume && e.ctx.resume(), r.onended = function() {
|
|
||||||
r.disconnect(0), e._mobileEnabled = !0, document.removeEventListener("touchstart", t, !0), document.removeEventListener("touchend", t, !0), document.removeEventListener("click", t, !0);
|
|
||||||
for (var n = 0; n < e._howls.length; n++) e._howls[n]._emit("unlock")
|
|
||||||
}
|
|
||||||
};
|
|
||||||
return document.addEventListener("touchstart", t, !0), document.addEventListener("touchend", t, !0), document.addEventListener("click", t, !0), e
|
|
||||||
}
|
|
||||||
},
|
|
||||||
_autoSuspend: function() {
|
|
||||||
var e = this;
|
|
||||||
if (e.autoSuspend && e.ctx && void 0 !== e.ctx.suspend && n.usingWebAudio) {
|
|
||||||
for (var o = 0; o < e._howls.length; o++)
|
|
||||||
if (e._howls[o]._webAudio)
|
|
||||||
for (var t = 0; t < e._howls[o]._sounds.length; t++)
|
|
||||||
if (!e._howls[o]._sounds[t]._paused) return e;
|
|
||||||
return e._suspendTimer && clearTimeout(e._suspendTimer), e._suspendTimer = setTimeout(function() {
|
|
||||||
e.autoSuspend && (e._suspendTimer = null, e.state = "suspending", e.ctx.suspend().then(function() {
|
|
||||||
e.state = "suspended", e._resumeAfterSuspend && (delete e._resumeAfterSuspend, e._autoResume())
|
|
||||||
}))
|
|
||||||
}, 3e4), e
|
|
||||||
}
|
|
||||||
},
|
|
||||||
_autoResume: function() {
|
|
||||||
var e = this;
|
|
||||||
if (e.ctx && void 0 !== e.ctx.resume && n.usingWebAudio) return "running" === e.state && e._suspendTimer ? (clearTimeout(e._suspendTimer), e._suspendTimer = null) : "suspended" === e.state ? (e.ctx.resume().then(function() {
|
|
||||||
e.state = "running";
|
|
||||||
for (var n = 0; n < e._howls.length; n++) e._howls[n]._emit("resume")
|
|
||||||
}), e._suspendTimer && (clearTimeout(e._suspendTimer), e._suspendTimer = null)) : "suspending" === e.state && (e._resumeAfterSuspend = !0), e
|
|
||||||
}
|
|
||||||
};
|
|
||||||
var n = new e,
|
|
||||||
o = function(e) {
|
|
||||||
var n = this;
|
|
||||||
if (!e.src || 0 === e.src.length) return void console.error("An array of source files must be passed with any new Howl.");
|
|
||||||
n.init(e)
|
|
||||||
};
|
|
||||||
o.prototype = {
|
|
||||||
init: function(e) {
|
|
||||||
var o = this;
|
|
||||||
return n.ctx || _(), o._autoplay = e.autoplay || !1, o._format = "string" != typeof e.format ? e.format : [e.format], o._html5 = e.html5 || !1, o._muted = e.mute || !1, o._loop = e.loop || !1, o._pool = e.pool || 5, o._preload = "boolean" != typeof e.preload || e.preload, o._rate = e.rate || 1, o._sprite = e.sprite || {}, o._src = "string" != typeof e.src ? e.src : [e.src], o._volume = void 0 !== e.volume ? e.volume : 1, o._xhrWithCredentials = e.xhrWithCredentials || !1, o._duration = 0, o._state = "unloaded", o._sounds = [], o._endTimers = {}, o._queue = [], o._playLock = !1, o._onend = e.onend ? [{
|
|
||||||
fn: e.onend
|
|
||||||
}] : [], o._onfade = e.onfade ? [{
|
|
||||||
fn: e.onfade
|
|
||||||
}] : [], o._onload = e.onload ? [{
|
|
||||||
fn: e.onload
|
|
||||||
}] : [], o._onloaderror = e.onloaderror ? [{
|
|
||||||
fn: e.onloaderror
|
|
||||||
}] : [], o._onplayerror = e.onplayerror ? [{
|
|
||||||
fn: e.onplayerror
|
|
||||||
}] : [], o._onpause = e.onpause ? [{
|
|
||||||
fn: e.onpause
|
|
||||||
}] : [], o._onplay = e.onplay ? [{
|
|
||||||
fn: e.onplay
|
|
||||||
}] : [], o._onstop = e.onstop ? [{
|
|
||||||
fn: e.onstop
|
|
||||||
}] : [], o._onmute = e.onmute ? [{
|
|
||||||
fn: e.onmute
|
|
||||||
}] : [], o._onvolume = e.onvolume ? [{
|
|
||||||
fn: e.onvolume
|
|
||||||
}] : [], o._onrate = e.onrate ? [{
|
|
||||||
fn: e.onrate
|
|
||||||
}] : [], o._onseek = e.onseek ? [{
|
|
||||||
fn: e.onseek
|
|
||||||
}] : [], o._onunlock = e.onunlock ? [{
|
|
||||||
fn: e.onunlock
|
|
||||||
}] : [], o._onresume = [], o._webAudio = n.usingWebAudio && !o._html5, void 0 !== n.ctx && n.ctx && n.mobileAutoEnable && n._enableMobileAudio(), n._howls.push(o), o._autoplay && o._queue.push({
|
|
||||||
event: "play",
|
|
||||||
action: function() {
|
|
||||||
o.play()
|
|
||||||
}
|
|
||||||
}), o._preload && o.load(), o
|
|
||||||
},
|
|
||||||
load: function() {
|
|
||||||
var e = this,
|
|
||||||
o = null;
|
|
||||||
if (n.noAudio) return void e._emit("loaderror", null, "No audio support.");
|
|
||||||
"string" == typeof e._src && (e._src = [e._src]);
|
|
||||||
for (var r = 0; r < e._src.length; r++) {
|
|
||||||
var u, i;
|
|
||||||
if (e._format && e._format[r]) u = e._format[r];
|
|
||||||
else {
|
|
||||||
if ("string" != typeof(i = e._src[r])) {
|
|
||||||
e._emit("loaderror", null, "Non-string found in selected audio sources - ignoring.");
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
u = /^data:audio\/([^;,]+);/i.exec(i), u || (u = /\.([^.]+)$/.exec(i.split("?", 1)[0])), u && (u = u[1].toLowerCase())
|
|
||||||
}
|
|
||||||
if (u || console.warn('No file extension was found. Consider using the "format" property or specify an extension.'), u && n.codecs(u)) {
|
|
||||||
o = e._src[r];
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return o ? (e._src = o, e._state = "loading", "https:" === window.location.protocol && "http:" === o.slice(0, 5) && (e._html5 = !0, e._webAudio = !1), new t(e), e._webAudio && a(e), e) : void e._emit("loaderror", null, "No codec support for selected audio sources.")
|
|
||||||
},
|
|
||||||
play: function(e, o) {
|
|
||||||
var t = this,
|
|
||||||
r = null;
|
|
||||||
if ("number" == typeof e) r = e, e = null;
|
|
||||||
else {
|
|
||||||
if ("string" == typeof e && "loaded" === t._state && !t._sprite[e]) return null;
|
|
||||||
if (void 0 === e) {
|
|
||||||
e = "__default";
|
|
||||||
for (var a = 0, u = 0; u < t._sounds.length; u++) t._sounds[u]._paused && !t._sounds[u]._ended && (a++, r = t._sounds[u]._id);
|
|
||||||
1 === a ? e = null : r = null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var i = r ? t._soundById(r) : t._inactiveSound();
|
|
||||||
if (!i) return null;
|
|
||||||
if (r && !e && (e = i._sprite || "__default"), "loaded" !== t._state) {
|
|
||||||
i._sprite = e, i._ended = !1;
|
|
||||||
var d = i._id;
|
|
||||||
return t._queue.push({
|
|
||||||
event: "play",
|
|
||||||
action: function() {
|
|
||||||
t.play(d)
|
|
||||||
}
|
|
||||||
}), d
|
|
||||||
}
|
|
||||||
if (r && !i._paused) return o || t._loadQueue("play"), i._id;
|
|
||||||
t._webAudio && n._autoResume();
|
|
||||||
var _ = Math.max(0, i._seek > 0 ? i._seek : t._sprite[e][0] / 1e3),
|
|
||||||
s = Math.max(0, (t._sprite[e][0] + t._sprite[e][1]) / 1e3 - _),
|
|
||||||
l = 1e3 * s / Math.abs(i._rate);
|
|
||||||
if (i._paused = !1, i._ended = !1, i._sprite = e, i._seek = _, i._start = t._sprite[e][0] / 1e3, i._stop = (t._sprite[e][0] + t._sprite[e][1]) / 1e3, i._loop = !(!i._loop && !t._sprite[e][2]), i._seek >= i._stop) return void t._ended(i);
|
|
||||||
var c = i._node;
|
|
||||||
if (t._webAudio) {
|
|
||||||
var f = function() {
|
|
||||||
t._refreshBuffer(i);
|
|
||||||
var e = i._muted || t._muted ? 0 : i._volume;
|
|
||||||
c.gain.setValueAtTime(e, n.ctx.currentTime), i._playStart = n.ctx.currentTime, void 0 === c.bufferSource.start ? i._loop ? c.bufferSource.noteGrainOn(0, _, 86400) : c.bufferSource.noteGrainOn(0, _, s) : i._loop ? c.bufferSource.start(0, _, 86400) : c.bufferSource.start(0, _, s), l !== 1 / 0 && (t._endTimers[i._id] = setTimeout(t._ended.bind(t, i), l)), o || setTimeout(function() {
|
|
||||||
t._emit("play", i._id)
|
|
||||||
}, 0)
|
|
||||||
};
|
|
||||||
"running" === n.state ? f() : (t.once("resume", f), t._clearTimer(i._id))
|
|
||||||
} else {
|
|
||||||
var p = function() {
|
|
||||||
c.currentTime = _, c.muted = i._muted || t._muted || n._muted || c.muted, c.volume = i._volume * n.volume(), c.playbackRate = i._rate;
|
|
||||||
try {
|
|
||||||
var r = c.play();
|
|
||||||
if ("undefined" != typeof Promise && (r instanceof Promise || "function" == typeof r.then) ? (t._playLock = !0, r.then(function() {
|
|
||||||
t._playLock = !1, o || t._emit("play", i._id)
|
|
||||||
}).catch(function() {
|
|
||||||
t._playLock = !1, t._emit("playerror", i._id, "Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.")
|
|
||||||
})) : o || t._emit("play", i._id), c.playbackRate = i._rate, c.paused) return void t._emit("playerror", i._id, "Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");
|
|
||||||
"__default" !== e || i._loop ? t._endTimers[i._id] = setTimeout(t._ended.bind(t, i), l) : (t._endTimers[i._id] = function() {
|
|
||||||
t._ended(i), c.removeEventListener("ended", t._endTimers[i._id], !1)
|
|
||||||
}, c.addEventListener("ended", t._endTimers[i._id], !1))
|
|
||||||
} catch (e) {
|
|
||||||
t._emit("playerror", i._id, e)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
m = window && window.ejecta || !c.readyState && n._navigator.isCocoonJS;
|
|
||||||
if (c.readyState >= 3 || m) p();
|
|
||||||
else {
|
|
||||||
var v = function() {
|
|
||||||
p(), c.removeEventListener(n._canPlayEvent, v, !1)
|
|
||||||
};
|
|
||||||
c.addEventListener(n._canPlayEvent, v, !1), t._clearTimer(i._id)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return i._id
|
|
||||||
},
|
|
||||||
pause: function(e) {
|
|
||||||
var n = this;
|
|
||||||
if ("loaded" !== n._state || n._playLock) return n._queue.push({
|
|
||||||
event: "pause",
|
|
||||||
action: function() {
|
|
||||||
n.pause(e)
|
|
||||||
}
|
|
||||||
}), n;
|
|
||||||
for (var o = n._getSoundIds(e), t = 0; t < o.length; t++) {
|
|
||||||
n._clearTimer(o[t]);
|
|
||||||
var r = n._soundById(o[t]);
|
|
||||||
if (r && !r._paused && (r._seek = n.seek(o[t]), r._rateSeek = 0, r._paused = !0, n._stopFade(o[t]), r._node))
|
|
||||||
if (n._webAudio) {
|
|
||||||
if (!r._node.bufferSource) continue;
|
|
||||||
void 0 === r._node.bufferSource.stop ? r._node.bufferSource.noteOff(0) : r._node.bufferSource.stop(0), n._cleanBuffer(r._node)
|
|
||||||
} else isNaN(r._node.duration) && r._node.duration !== 1 / 0 || r._node.pause();
|
|
||||||
arguments[1] || n._emit("pause", r ? r._id : null)
|
|
||||||
}
|
|
||||||
return n
|
|
||||||
},
|
|
||||||
stop: function(e, n) {
|
|
||||||
var o = this;
|
|
||||||
if ("loaded" !== o._state || o._playLock) return o._queue.push({
|
|
||||||
event: "stop",
|
|
||||||
action: function() {
|
|
||||||
o.stop(e)
|
|
||||||
}
|
|
||||||
}), o;
|
|
||||||
for (var t = o._getSoundIds(e), r = 0; r < t.length; r++) {
|
|
||||||
o._clearTimer(t[r]);
|
|
||||||
var a = o._soundById(t[r]);
|
|
||||||
a && (a._seek = a._start || 0, a._rateSeek = 0, a._paused = !0, a._ended = !0, o._stopFade(t[r]), a._node && (o._webAudio ? a._node.bufferSource && (void 0 === a._node.bufferSource.stop ? a._node.bufferSource.noteOff(0) : a._node.bufferSource.stop(0), o._cleanBuffer(a._node)) : isNaN(a._node.duration) && a._node.duration !== 1 / 0 || (a._node.currentTime = a._start || 0, a._node.pause())), n || o._emit("stop", a._id))
|
|
||||||
}
|
|
||||||
return o
|
|
||||||
},
|
|
||||||
mute: function(e, o) {
|
|
||||||
var t = this;
|
|
||||||
if ("loaded" !== t._state || t._playLock) return t._queue.push({
|
|
||||||
event: "mute",
|
|
||||||
action: function() {
|
|
||||||
t.mute(e, o)
|
|
||||||
}
|
|
||||||
}), t;
|
|
||||||
if (void 0 === o) {
|
|
||||||
if ("boolean" != typeof e) return t._muted;
|
|
||||||
t._muted = e
|
|
||||||
}
|
|
||||||
for (var r = t._getSoundIds(o), a = 0; a < r.length; a++) {
|
|
||||||
var u = t._soundById(r[a]);
|
|
||||||
u && (u._muted = e, u._interval && t._stopFade(u._id), t._webAudio && u._node ? u._node.gain.setValueAtTime(e ? 0 : u._volume, n.ctx.currentTime) : u._node && (u._node.muted = !!n._muted || e), t._emit("mute", u._id))
|
|
||||||
}
|
|
||||||
return t
|
|
||||||
},
|
|
||||||
volume: function() {
|
|
||||||
var e, o, t = this,
|
|
||||||
r = arguments;
|
|
||||||
if (0 === r.length) return t._volume;
|
|
||||||
if (1 === r.length || 2 === r.length && void 0 === r[1]) {
|
|
||||||
t._getSoundIds().indexOf(r[0]) >= 0 ? o = parseInt(r[0], 10) : e = parseFloat(r[0])
|
|
||||||
} else r.length >= 2 && (e = parseFloat(r[0]), o = parseInt(r[1], 10));
|
|
||||||
var a;
|
|
||||||
if (!(void 0 !== e && e >= 0 && e <= 1)) return a = o ? t._soundById(o) : t._sounds[0], a ? a._volume : 0;
|
|
||||||
if ("loaded" !== t._state || t._playLock) return t._queue.push({
|
|
||||||
event: "volume",
|
|
||||||
action: function() {
|
|
||||||
t.volume.apply(t, r)
|
|
||||||
}
|
|
||||||
}), t;
|
|
||||||
void 0 === o && (t._volume = e), o = t._getSoundIds(o);
|
|
||||||
for (var u = 0; u < o.length; u++)(a = t._soundById(o[u])) && (a._volume = e, r[2] || t._stopFade(o[u]), t._webAudio && a._node && !a._muted ? a._node.gain.setValueAtTime(e, n.ctx.currentTime) : a._node && !a._muted && (a._node.volume = e * n.volume()), t._emit("volume", a._id));
|
|
||||||
return t
|
|
||||||
},
|
|
||||||
fade: function(e, o, t, r) {
|
|
||||||
var a = this;
|
|
||||||
if ("loaded" !== a._state || a._playLock) return a._queue.push({
|
|
||||||
event: "fade",
|
|
||||||
action: function() {
|
|
||||||
a.fade(e, o, t, r)
|
|
||||||
}
|
|
||||||
}), a;
|
|
||||||
a.volume(e, r);
|
|
||||||
for (var u = a._getSoundIds(r), i = 0; i < u.length; i++) {
|
|
||||||
var d = a._soundById(u[i]);
|
|
||||||
if (d) {
|
|
||||||
if (r || a._stopFade(u[i]), a._webAudio && !d._muted) {
|
|
||||||
var _ = n.ctx.currentTime,
|
|
||||||
s = _ + t / 1e3;
|
|
||||||
d._volume = e, d._node.gain.setValueAtTime(e, _), d._node.gain.linearRampToValueAtTime(o, s)
|
|
||||||
}
|
|
||||||
a._startFadeInterval(d, e, o, t, u[i], void 0 === r)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return a
|
|
||||||
},
|
|
||||||
_startFadeInterval: function(e, n, o, t, r, a) {
|
|
||||||
var u = this,
|
|
||||||
i = n,
|
|
||||||
d = o - n,
|
|
||||||
_ = Math.abs(d / .01),
|
|
||||||
s = Math.max(4, _ > 0 ? t / _ : t),
|
|
||||||
l = Date.now();
|
|
||||||
e._fadeTo = o, e._interval = setInterval(function() {
|
|
||||||
var r = (Date.now() - l) / t;
|
|
||||||
l = Date.now(), i += d * r, i = Math.max(0, i), i = Math.min(1, i), i = Math.round(100 * i) / 100, u._webAudio ? e._volume = i : u.volume(i, e._id, !0), a && (u._volume = i), (o < n && i <= o || o > n && i >= o) && (clearInterval(e._interval), e._interval = null, e._fadeTo = null, u.volume(o, e._id), u._emit("fade", e._id))
|
|
||||||
}, s)
|
|
||||||
},
|
|
||||||
_stopFade: function(e) {
|
|
||||||
var o = this,
|
|
||||||
t = o._soundById(e);
|
|
||||||
return t && t._interval && (o._webAudio && t._node.gain.cancelScheduledValues(n.ctx.currentTime), clearInterval(t._interval), t._interval = null, o.volume(t._fadeTo, e), t._fadeTo = null, o._emit("fade", e)), o
|
|
||||||
},
|
|
||||||
loop: function() {
|
|
||||||
var e, n, o, t = this,
|
|
||||||
r = arguments;
|
|
||||||
if (0 === r.length) return t._loop;
|
|
||||||
if (1 === r.length) {
|
|
||||||
if ("boolean" != typeof r[0]) return !!(o = t._soundById(parseInt(r[0], 10))) && o._loop;
|
|
||||||
e = r[0], t._loop = e
|
|
||||||
} else 2 === r.length && (e = r[0], n = parseInt(r[1], 10));
|
|
||||||
for (var a = t._getSoundIds(n), u = 0; u < a.length; u++)(o = t._soundById(a[u])) && (o._loop = e, t._webAudio && o._node && o._node.bufferSource && (o._node.bufferSource.loop = e, e && (o._node.bufferSource.loopStart = o._start || 0, o._node.bufferSource.loopEnd = o._stop)));
|
|
||||||
return t
|
|
||||||
},
|
|
||||||
rate: function() {
|
|
||||||
var e, o, t = this,
|
|
||||||
r = arguments;
|
|
||||||
if (0 === r.length) o = t._sounds[0]._id;
|
|
||||||
else if (1 === r.length) {
|
|
||||||
var a = t._getSoundIds(),
|
|
||||||
u = a.indexOf(r[0]);
|
|
||||||
u >= 0 ? o = parseInt(r[0], 10) : e = parseFloat(r[0])
|
|
||||||
} else 2 === r.length && (e = parseFloat(r[0]), o = parseInt(r[1], 10));
|
|
||||||
var i;
|
|
||||||
if ("number" != typeof e) return i = t._soundById(o), i ? i._rate : t._rate;
|
|
||||||
if ("loaded" !== t._state || t._playLock) return t._queue.push({
|
|
||||||
event: "rate",
|
|
||||||
action: function() {
|
|
||||||
t.rate.apply(t, r)
|
|
||||||
}
|
|
||||||
}), t;
|
|
||||||
void 0 === o && (t._rate = e), o = t._getSoundIds(o);
|
|
||||||
for (var d = 0; d < o.length; d++)
|
|
||||||
if (i = t._soundById(o[d])) {
|
|
||||||
i._rateSeek = t.seek(o[d]), i._playStart = t._webAudio ? n.ctx.currentTime : i._playStart, i._rate = e, t._webAudio && i._node && i._node.bufferSource ? i._node.bufferSource.playbackRate.setValueAtTime(e, n.ctx.currentTime) : i._node && (i._node.playbackRate = e);
|
|
||||||
var _ = t.seek(o[d]),
|
|
||||||
s = (t._sprite[i._sprite][0] + t._sprite[i._sprite][1]) / 1e3 - _,
|
|
||||||
l = 1e3 * s / Math.abs(i._rate);
|
|
||||||
!t._endTimers[o[d]] && i._paused || (t._clearTimer(o[d]), t._endTimers[o[d]] = setTimeout(t._ended.bind(t, i), l)), t._emit("rate", i._id)
|
|
||||||
} return t
|
|
||||||
},
|
|
||||||
seek: function() {
|
|
||||||
var e, o, t = this,
|
|
||||||
r = arguments;
|
|
||||||
if (0 === r.length) o = t._sounds[0]._id;
|
|
||||||
else if (1 === r.length) {
|
|
||||||
var a = t._getSoundIds(),
|
|
||||||
u = a.indexOf(r[0]);
|
|
||||||
u >= 0 ? o = parseInt(r[0], 10) : t._sounds.length && (o = t._sounds[0]._id, e = parseFloat(r[0]))
|
|
||||||
} else 2 === r.length && (e = parseFloat(r[0]), o = parseInt(r[1], 10));
|
|
||||||
if (void 0 === o) return t;
|
|
||||||
if ("loaded" !== t._state || t._playLock) return t._queue.push({
|
|
||||||
event: "seek",
|
|
||||||
action: function() {
|
|
||||||
t.seek.apply(t, r)
|
|
||||||
}
|
|
||||||
}), t;
|
|
||||||
var i = t._soundById(o);
|
|
||||||
if (i) {
|
|
||||||
if (!("number" == typeof e && e >= 0)) {
|
|
||||||
if (t._webAudio) {
|
|
||||||
var d = t.playing(o) ? n.ctx.currentTime - i._playStart : 0,
|
|
||||||
_ = i._rateSeek ? i._rateSeek - i._seek : 0;
|
|
||||||
return i._seek + (_ + d * Math.abs(i._rate))
|
|
||||||
}
|
|
||||||
return i._node.currentTime
|
|
||||||
}
|
|
||||||
var s = t.playing(o);
|
|
||||||
s && t.pause(o, !0), i._seek = e, i._ended = !1, t._clearTimer(o), !t._webAudio && i._node && (i._node.currentTime = e);
|
|
||||||
var l = function() {
|
|
||||||
t._emit("seek", o), s && t.play(o, !0)
|
|
||||||
};
|
|
||||||
if (s && !t._webAudio) {
|
|
||||||
var c = function() {
|
|
||||||
t._playLock ? setTimeout(c, 0) : l()
|
|
||||||
};
|
|
||||||
setTimeout(c, 0)
|
|
||||||
} else l()
|
|
||||||
}
|
|
||||||
return t
|
|
||||||
},
|
|
||||||
playing: function(e) {
|
|
||||||
var n = this;
|
|
||||||
if ("number" == typeof e) {
|
|
||||||
var o = n._soundById(e);
|
|
||||||
return !!o && !o._paused
|
|
||||||
}
|
|
||||||
for (var t = 0; t < n._sounds.length; t++)
|
|
||||||
if (!n._sounds[t]._paused) return !0;
|
|
||||||
return !1
|
|
||||||
},
|
|
||||||
duration: function(e) {
|
|
||||||
var n = this,
|
|
||||||
o = n._duration,
|
|
||||||
t = n._soundById(e);
|
|
||||||
return t && (o = n._sprite[t._sprite][1] / 1e3), o
|
|
||||||
},
|
|
||||||
state: function() {
|
|
||||||
return this._state
|
|
||||||
},
|
|
||||||
unload: function() {
|
|
||||||
for (var e = this, o = e._sounds, t = 0; t < o.length; t++) {
|
|
||||||
if (o[t]._paused || e.stop(o[t]._id), !e._webAudio) {
|
|
||||||
/MSIE |Trident\//.test(n._navigator && n._navigator.userAgent) || (o[t]._node.src = "data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"), o[t]._node.removeEventListener("error", o[t]._errorFn, !1), o[t]._node.removeEventListener(n._canPlayEvent, o[t]._loadFn, !1)
|
|
||||||
}
|
|
||||||
delete o[t]._node, e._clearTimer(o[t]._id)
|
|
||||||
}
|
|
||||||
var a = n._howls.indexOf(e);
|
|
||||||
a >= 0 && n._howls.splice(a, 1);
|
|
||||||
var u = !0;
|
|
||||||
for (t = 0; t < n._howls.length; t++)
|
|
||||||
if (n._howls[t]._src === e._src) {
|
|
||||||
u = !1;
|
|
||||||
break
|
|
||||||
} return r && u && delete r[e._src], n.noAudio = !1, e._state = "unloaded", e._sounds = [], e = null, null
|
|
||||||
},
|
|
||||||
on: function(e, n, o, t) {
|
|
||||||
var r = this,
|
|
||||||
a = r["_on" + e];
|
|
||||||
return "function" == typeof n && a.push(t ? {
|
|
||||||
id: o,
|
|
||||||
fn: n,
|
|
||||||
once: t
|
|
||||||
} : {
|
|
||||||
id: o,
|
|
||||||
fn: n
|
|
||||||
}), r
|
|
||||||
},
|
|
||||||
off: function(e, n, o) {
|
|
||||||
var t = this,
|
|
||||||
r = t["_on" + e],
|
|
||||||
a = 0;
|
|
||||||
if ("number" == typeof n && (o = n, n = null), n || o)
|
|
||||||
for (a = 0; a < r.length; a++) {
|
|
||||||
var u = o === r[a].id;
|
|
||||||
if (n === r[a].fn && u || !n && u) {
|
|
||||||
r.splice(a, 1);
|
|
||||||
break
|
|
||||||
}
|
|
||||||
} else if (e) t["_on" + e] = [];
|
|
||||||
else {
|
|
||||||
var i = Object.keys(t);
|
|
||||||
for (a = 0; a < i.length; a++) 0 === i[a].indexOf("_on") && Array.isArray(t[i[a]]) && (t[i[a]] = [])
|
|
||||||
} return t
|
|
||||||
},
|
|
||||||
once: function(e, n, o) {
|
|
||||||
var t = this;
|
|
||||||
return t.on(e, n, o, 1), t
|
|
||||||
},
|
|
||||||
_emit: function(e, n, o) {
|
|
||||||
for (var t = this, r = t["_on" + e], a = r.length - 1; a >= 0; a--) r[a].id && r[a].id !== n && "load" !== e || (setTimeout(function(e) {
|
|
||||||
e.call(this, n, o)
|
|
||||||
}.bind(t, r[a].fn), 0), r[a].once && t.off(e, r[a].fn, r[a].id));
|
|
||||||
return t._loadQueue(e), t
|
|
||||||
},
|
|
||||||
_loadQueue: function(e) {
|
|
||||||
var n = this;
|
|
||||||
if (n._queue.length > 0) {
|
|
||||||
var o = n._queue[0];
|
|
||||||
o.event === e && (n._queue.shift(), n._loadQueue()), e || o.action()
|
|
||||||
}
|
|
||||||
return n
|
|
||||||
},
|
|
||||||
_ended: function(e) {
|
|
||||||
var o = this,
|
|
||||||
t = e._sprite;
|
|
||||||
if (!o._webAudio && e._node && !e._node.paused && !e._node.ended && e._node.currentTime < e._stop) return setTimeout(o._ended.bind(o, e), 100), o;
|
|
||||||
var r = !(!e._loop && !o._sprite[t][2]);
|
|
||||||
if (o._emit("end", e._id), !o._webAudio && r && o.stop(e._id, !0).play(e._id), o._webAudio && r) {
|
|
||||||
o._emit("play", e._id), e._seek = e._start || 0, e._rateSeek = 0, e._playStart = n.ctx.currentTime;
|
|
||||||
var a = 1e3 * (e._stop - e._start) / Math.abs(e._rate);
|
|
||||||
o._endTimers[e._id] = setTimeout(o._ended.bind(o, e), a)
|
|
||||||
}
|
|
||||||
return o._webAudio && !r && (e._paused = !0, e._ended = !0, e._seek = e._start || 0, e._rateSeek = 0, o._clearTimer(e._id), o._cleanBuffer(e._node), n._autoSuspend()), o._webAudio || r || o.stop(e._id, !0), o
|
|
||||||
},
|
|
||||||
_clearTimer: function(e) {
|
|
||||||
var n = this;
|
|
||||||
if (n._endTimers[e]) {
|
|
||||||
if ("function" != typeof n._endTimers[e]) clearTimeout(n._endTimers[e]);
|
|
||||||
else {
|
|
||||||
var o = n._soundById(e);
|
|
||||||
o && o._node && o._node.removeEventListener("ended", n._endTimers[e], !1)
|
|
||||||
}
|
|
||||||
delete n._endTimers[e]
|
|
||||||
}
|
|
||||||
return n
|
|
||||||
},
|
|
||||||
_soundById: function(e) {
|
|
||||||
for (var n = this, o = 0; o < n._sounds.length; o++)
|
|
||||||
if (e === n._sounds[o]._id) return n._sounds[o];
|
|
||||||
return null
|
|
||||||
},
|
|
||||||
_inactiveSound: function() {
|
|
||||||
var e = this;
|
|
||||||
e._drain();
|
|
||||||
for (var n = 0; n < e._sounds.length; n++)
|
|
||||||
if (e._sounds[n]._ended) return e._sounds[n].reset();
|
|
||||||
return new t(e)
|
|
||||||
},
|
|
||||||
_drain: function() {
|
|
||||||
var e = this,
|
|
||||||
n = e._pool,
|
|
||||||
o = 0,
|
|
||||||
t = 0;
|
|
||||||
if (!(e._sounds.length < n)) {
|
|
||||||
for (t = 0; t < e._sounds.length; t++) e._sounds[t]._ended && o++;
|
|
||||||
for (t = e._sounds.length - 1; t >= 0; t--) {
|
|
||||||
if (o <= n) return;
|
|
||||||
e._sounds[t]._ended && (e._webAudio && e._sounds[t]._node && e._sounds[t]._node.disconnect(0), e._sounds.splice(t, 1), o--)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
_getSoundIds: function(e) {
|
|
||||||
var n = this;
|
|
||||||
if (void 0 === e) {
|
|
||||||
for (var o = [], t = 0; t < n._sounds.length; t++) o.push(n._sounds[t]._id);
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
return [e]
|
|
||||||
},
|
|
||||||
_refreshBuffer: function(e) {
|
|
||||||
var o = this;
|
|
||||||
return e._node.bufferSource = n.ctx.createBufferSource(), e._node.bufferSource.buffer = r[o._src], e._panner ? e._node.bufferSource.connect(e._panner) : e._node.bufferSource.connect(e._node), e._node.bufferSource.loop = e._loop, e._loop && (e._node.bufferSource.loopStart = e._start || 0, e._node.bufferSource.loopEnd = e._stop || 0), e._node.bufferSource.playbackRate.setValueAtTime(e._rate, n.ctx.currentTime), o
|
|
||||||
},
|
|
||||||
_cleanBuffer: function(e) {
|
|
||||||
var o = this;
|
|
||||||
if (n._scratchBuffer && e.bufferSource) {
|
|
||||||
e.bufferSource.onended = null, e.bufferSource.disconnect(0);
|
|
||||||
try {
|
|
||||||
e.bufferSource.buffer = n._scratchBuffer
|
|
||||||
} catch (e) {}
|
|
||||||
}
|
|
||||||
return e.bufferSource = null, o
|
|
||||||
}
|
|
||||||
};
|
|
||||||
var t = function(e) {
|
|
||||||
this._parent = e, this.init()
|
|
||||||
};
|
|
||||||
t.prototype = {
|
|
||||||
init: function() {
|
|
||||||
var e = this,
|
|
||||||
o = e._parent;
|
|
||||||
return e._muted = o._muted, e._loop = o._loop, e._volume = o._volume, e._rate = o._rate, e._seek = 0, e._paused = !0, e._ended = !0, e._sprite = "__default", e._id = ++n._counter, o._sounds.push(e), e.create(), e
|
|
||||||
},
|
|
||||||
create: function() {
|
|
||||||
var e = this,
|
|
||||||
o = e._parent,
|
|
||||||
t = n._muted || e._muted || e._parent._muted ? 0 : e._volume;
|
|
||||||
return o._webAudio ? (e._node = void 0 === n.ctx.createGain ? n.ctx.createGainNode() : n.ctx.createGain(), e._node.gain.setValueAtTime(t, n.ctx.currentTime), e._node.paused = !0, e._node.connect(n.masterGain)) : (e._node = new Audio, e._errorFn = e._errorListener.bind(e), e._node.addEventListener("error", e._errorFn, !1), e._loadFn = e._loadListener.bind(e), e._node.addEventListener(n._canPlayEvent, e._loadFn, !1), e._node.src = o._src, e._node.preload = "auto", e._node.volume = t * n.volume(), e._node.load()), e
|
|
||||||
},
|
|
||||||
reset: function() {
|
|
||||||
var e = this,
|
|
||||||
o = e._parent;
|
|
||||||
return e._muted = o._muted, e._loop = o._loop, e._volume = o._volume, e._rate = o._rate, e._seek = 0, e._rateSeek = 0, e._paused = !0, e._ended = !0, e._sprite = "__default", e._id = ++n._counter, e
|
|
||||||
},
|
|
||||||
_errorListener: function() {
|
|
||||||
var e = this;
|
|
||||||
e._parent._emit("loaderror", e._id, e._node.error ? e._node.error.code : 0), e._node.removeEventListener("error", e._errorFn, !1)
|
|
||||||
},
|
|
||||||
_loadListener: function() {
|
|
||||||
var e = this,
|
|
||||||
o = e._parent;
|
|
||||||
o._duration = Math.ceil(10 * e._node.duration) / 10, 0 === Object.keys(o._sprite).length && (o._sprite = {
|
|
||||||
__default: [0, 1e3 * o._duration]
|
|
||||||
}), "loaded" !== o._state && (o._state = "loaded", o._emit("load"), o._loadQueue()), e._node.removeEventListener(n._canPlayEvent, e._loadFn, !1)
|
|
||||||
}
|
|
||||||
};
|
|
||||||
var r = {},
|
|
||||||
a = function(e) {
|
|
||||||
var n = e._src;
|
|
||||||
if (r[n]) return e._duration = r[n].duration, void d(e);
|
|
||||||
if (/^data:[^;]+;base64,/.test(n)) {
|
|
||||||
for (var o = atob(n.split(",")[1]), t = new Uint8Array(o.length), a = 0; a < o.length; ++a) t[a] = o.charCodeAt(a);
|
|
||||||
i(t.buffer, e)
|
|
||||||
} else {
|
|
||||||
var _ = new XMLHttpRequest;
|
|
||||||
_.open("GET", n, !0), _.withCredentials = e._xhrWithCredentials, _.responseType = "arraybuffer", _.onload = function() {
|
|
||||||
var n = (_.status + "")[0];
|
|
||||||
if ("0" !== n && "2" !== n && "3" !== n) return void e._emit("loaderror", null, "Failed loading audio file with status: " + _.status + ".");
|
|
||||||
i(_.response, e)
|
|
||||||
}, _.onerror = function() {
|
|
||||||
e._webAudio && (e._html5 = !0, e._webAudio = !1, e._sounds = [], delete r[n], e.load())
|
|
||||||
}, u(_)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
u = function(e) {
|
|
||||||
try {
|
|
||||||
e.send()
|
|
||||||
} catch (n) {
|
|
||||||
e.onerror()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
i = function(e, o) {
|
|
||||||
var t = function(e) {
|
|
||||||
e && o._sounds.length > 0 ? (r[o._src] = e, d(o, e)) : onError()
|
|
||||||
},
|
|
||||||
a = function() {
|
|
||||||
o._emit("loaderror", null, "Decoding audio data failed.")
|
|
||||||
};
|
|
||||||
"undefined" != typeof Promise && 1 === n.ctx.decodeAudioData.length ? n.ctx.decodeAudioData(e).then(t).catch(a) : n.ctx.decodeAudioData(e, t, a)
|
|
||||||
},
|
|
||||||
d = function(e, n) {
|
|
||||||
n && !e._duration && (e._duration = n.duration), 0 === Object.keys(e._sprite).length && (e._sprite = {
|
|
||||||
__default: [0, 1e3 * e._duration]
|
|
||||||
}), "loaded" !== e._state && (e._state = "loaded", e._emit("load"), e._loadQueue())
|
|
||||||
},
|
|
||||||
_ = function() {
|
|
||||||
try {
|
|
||||||
"undefined" != typeof AudioContext ? n.ctx = new AudioContext : "undefined" != typeof webkitAudioContext ? n.ctx = new webkitAudioContext : n.usingWebAudio = !1
|
|
||||||
} catch (e) {
|
|
||||||
n.usingWebAudio = !1
|
|
||||||
}
|
|
||||||
var e = /iP(hone|od|ad)/.test(n._navigator && n._navigator.platform),
|
|
||||||
o = n._navigator && n._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),
|
|
||||||
t = o ? parseInt(o[1], 10) : null;
|
|
||||||
if (e && t && t < 9) {
|
|
||||||
var r = /safari/.test(n._navigator && n._navigator.userAgent.toLowerCase());
|
|
||||||
(n._navigator && n._navigator.standalone && !r || n._navigator && !n._navigator.standalone && !r) && (n.usingWebAudio = !1)
|
|
||||||
}
|
|
||||||
n.usingWebAudio && (n.masterGain = void 0 === n.ctx.createGain ? n.ctx.createGainNode() : n.ctx.createGain(), n.masterGain.gain.setValueAtTime(n._muted ? 0 : 1, n.ctx.currentTime), n.masterGain.connect(n.ctx.destination)), n._setup()
|
|
||||||
};
|
|
||||||
"function" == typeof define && define.amd && define([], function() {
|
|
||||||
return {
|
|
||||||
Howler: n,
|
|
||||||
Howl: o
|
|
||||||
}
|
|
||||||
}), "undefined" != typeof exports && (exports.Howler = n, exports.Howl = o), "undefined" != typeof window ? (window.HowlerGlobal = e, window.Howler = n, window.Howl = o, window.Sound = t) : "undefined" != typeof global && (global.HowlerGlobal = e, global.Howler = n, global.Howl = o, global.Sound = t)
|
|
||||||
}();
|
|
||||||
/*! Spatial Plugin */
|
|
||||||
! function() {
|
|
||||||
"use strict";
|
|
||||||
HowlerGlobal.prototype._pos = [0, 0, 0], HowlerGlobal.prototype._orientation = [0, 0, -1, 0, 1, 0], HowlerGlobal.prototype.stereo = function(e) {
|
|
||||||
var n = this;
|
|
||||||
if (!n.ctx || !n.ctx.listener) return n;
|
|
||||||
for (var t = n._howls.length - 1; t >= 0; t--) n._howls[t].stereo(e);
|
|
||||||
return n
|
|
||||||
}, HowlerGlobal.prototype.pos = function(e, n, t) {
|
|
||||||
var r = this;
|
|
||||||
return r.ctx && r.ctx.listener ? (n = "number" != typeof n ? r._pos[1] : n, t = "number" != typeof t ? r._pos[2] : t, "number" != typeof e ? r._pos : (r._pos = [e, n, t], void 0 !== r.ctx.listener.positionX ? (r.ctx.listener.positionX.setTargetAtTime(r._pos[0], Howler.ctx.currentTime, .1), r.ctx.listener.positionY.setTargetAtTime(r._pos[1], Howler.ctx.currentTime, .1), r.ctx.listener.positionZ.setTargetAtTime(r._pos[2], Howler.ctx.currentTime, .1)) : r.ctx.listener.setPosition(r._pos[0], r._pos[1], r._pos[2]), r)) : r
|
|
||||||
}, HowlerGlobal.prototype.orientation = function(e, n, t, r, o, i) {
|
|
||||||
var a = this;
|
|
||||||
if (!a.ctx || !a.ctx.listener) return a;
|
|
||||||
var p = a._orientation;
|
|
||||||
return n = "number" != typeof n ? p[1] : n, t = "number" != typeof t ? p[2] : t, r = "number" != typeof r ? p[3] : r, o = "number" != typeof o ? p[4] : o, i = "number" != typeof i ? p[5] : i, "number" != typeof e ? p : (a._orientation = [e, n, t, r, o, i], void 0 !== a.ctx.listener.forwardX ? (a.ctx.listener.forwardX.setTargetAtTime(e, Howler.ctx.currentTime, .1), a.ctx.listener.forwardY.setTargetAtTime(n, Howler.ctx.currentTime, .1), a.ctx.listener.forwardZ.setTargetAtTime(t, Howler.ctx.currentTime, .1), a.ctx.listener.upX.setTargetAtTime(e, Howler.ctx.currentTime, .1), a.ctx.listener.upY.setTargetAtTime(n, Howler.ctx.currentTime, .1), a.ctx.listener.upZ.setTargetAtTime(t, Howler.ctx.currentTime, .1)) : a.ctx.listener.setOrientation(e, n, t, r, o, i), a)
|
|
||||||
}, Howl.prototype.init = function(e) {
|
|
||||||
return function(n) {
|
|
||||||
var t = this;
|
|
||||||
return t._orientation = n.orientation || [1, 0, 0], t._stereo = n.stereo || null, t._pos = n.pos || null, t._pannerAttr = {
|
|
||||||
coneInnerAngle: void 0 !== n.coneInnerAngle ? n.coneInnerAngle : 360,
|
|
||||||
coneOuterAngle: void 0 !== n.coneOuterAngle ? n.coneOuterAngle : 360,
|
|
||||||
coneOuterGain: void 0 !== n.coneOuterGain ? n.coneOuterGain : 0,
|
|
||||||
distanceModel: void 0 !== n.distanceModel ? n.distanceModel : "inverse",
|
|
||||||
maxDistance: void 0 !== n.maxDistance ? n.maxDistance : 1e4,
|
|
||||||
panningModel: void 0 !== n.panningModel ? n.panningModel : "HRTF",
|
|
||||||
refDistance: void 0 !== n.refDistance ? n.refDistance : 1,
|
|
||||||
rolloffFactor: void 0 !== n.rolloffFactor ? n.rolloffFactor : 1
|
|
||||||
}, t._onstereo = n.onstereo ? [{
|
|
||||||
fn: n.onstereo
|
|
||||||
}] : [], t._onpos = n.onpos ? [{
|
|
||||||
fn: n.onpos
|
|
||||||
}] : [], t._onorientation = n.onorientation ? [{
|
|
||||||
fn: n.onorientation
|
|
||||||
}] : [], e.call(this, n)
|
|
||||||
}
|
|
||||||
}(Howl.prototype.init), Howl.prototype.stereo = function(n, t) {
|
|
||||||
var r = this;
|
|
||||||
if (!r._webAudio) return r;
|
|
||||||
if ("loaded" !== r._state) return r._queue.push({
|
|
||||||
event: "stereo",
|
|
||||||
action: function() {
|
|
||||||
r.stereo(n, t)
|
|
||||||
}
|
|
||||||
}), r;
|
|
||||||
var o = void 0 === Howler.ctx.createStereoPanner ? "spatial" : "stereo";
|
|
||||||
if (void 0 === t) {
|
|
||||||
if ("number" != typeof n) return r._stereo;
|
|
||||||
r._stereo = n, r._pos = [n, 0, 0]
|
|
||||||
}
|
|
||||||
for (var i = r._getSoundIds(t), a = 0; a < i.length; a++) {
|
|
||||||
var p = r._soundById(i[a]);
|
|
||||||
if (p) {
|
|
||||||
if ("number" != typeof n) return p._stereo;
|
|
||||||
p._stereo = n, p._pos = [n, 0, 0], p._node && (p._pannerAttr.panningModel = "equalpower", p._panner && p._panner.pan || e(p, o), "spatial" === o ? void 0 !== p._panner.positionX ? (p._panner.positionX.setValueAtTime(n, Howler.ctx.currentTime), p._panner.positionY.setValueAtTime(0, Howler.ctx.currentTime), p._panner.positionZ.setValueAtTime(0, Howler.ctx.currentTime)) : p._panner.setPosition(n, 0, 0) : p._panner.pan.setValueAtTime(n, Howler.ctx.currentTime)), r._emit("stereo", p._id)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return r
|
|
||||||
}, Howl.prototype.pos = function(n, t, r, o) {
|
|
||||||
var i = this;
|
|
||||||
if (!i._webAudio) return i;
|
|
||||||
if ("loaded" !== i._state) return i._queue.push({
|
|
||||||
event: "pos",
|
|
||||||
action: function() {
|
|
||||||
i.pos(n, t, r, o)
|
|
||||||
}
|
|
||||||
}), i;
|
|
||||||
if (t = "number" != typeof t ? 0 : t, r = "number" != typeof r ? -.5 : r, void 0 === o) {
|
|
||||||
if ("number" != typeof n) return i._pos;
|
|
||||||
i._pos = [n, t, r]
|
|
||||||
}
|
|
||||||
for (var a = i._getSoundIds(o), p = 0; p < a.length; p++) {
|
|
||||||
var s = i._soundById(a[p]);
|
|
||||||
if (s) {
|
|
||||||
if ("number" != typeof n) return s._pos;
|
|
||||||
s._pos = [n, t, r], s._node && (s._panner && !s._panner.pan || e(s, "spatial"), void 0 !== s._panner.positionX ? (s._panner.positionX.setValueAtTime(n, Howler.ctx.currentTime), s._panner.positionY.setValueAtTime(t, Howler.ctx.currentTime), s._panner.positionZ.setValueAtTime(r, Howler.ctx.currentTime)) : s._panner.setOrientation(n, t, r)), i._emit("pos", s._id)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return i
|
|
||||||
}, Howl.prototype.orientation = function(n, t, r, o) {
|
|
||||||
var i = this;
|
|
||||||
if (!i._webAudio) return i;
|
|
||||||
if ("loaded" !== i._state) return i._queue.push({
|
|
||||||
event: "orientation",
|
|
||||||
action: function() {
|
|
||||||
i.orientation(n, t, r, o)
|
|
||||||
}
|
|
||||||
}), i;
|
|
||||||
if (t = "number" != typeof t ? i._orientation[1] : t, r = "number" != typeof r ? i._orientation[2] : r, void 0 === o) {
|
|
||||||
if ("number" != typeof n) return i._orientation;
|
|
||||||
i._orientation = [n, t, r]
|
|
||||||
}
|
|
||||||
for (var a = i._getSoundIds(o), p = 0; p < a.length; p++) {
|
|
||||||
var s = i._soundById(a[p]);
|
|
||||||
if (s) {
|
|
||||||
if ("number" != typeof n) return s._orientation;
|
|
||||||
s._orientation = [n, t, r], s._node && (s._panner || (s._pos || (s._pos = i._pos || [0, 0, -.5]), e(s, "spatial")), void 0 !== s._panner.orientationX ? (s._panner.orientationX.setValueAtTime(n, Howler.ctx.currentTime), s._panner.orientationY.setValueAtTime(t, Howler.ctx.currentTime), s._panner.orientationZ.setValueAtTime(r, Howler.ctx.currentTime)) : s._panner.setOrientation(n, t, r)), i._emit("orientation", s._id)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return i
|
|
||||||
}, Howl.prototype.pannerAttr = function() {
|
|
||||||
var n, t, r, o = this,
|
|
||||||
i = arguments;
|
|
||||||
if (!o._webAudio) return o;
|
|
||||||
if (0 === i.length) return o._pannerAttr;
|
|
||||||
if (1 === i.length) {
|
|
||||||
if ("object" != typeof i[0]) return r = o._soundById(parseInt(i[0], 10)), r ? r._pannerAttr : o._pannerAttr;
|
|
||||||
n = i[0], void 0 === t && (n.pannerAttr || (n.pannerAttr = {
|
|
||||||
coneInnerAngle: n.coneInnerAngle,
|
|
||||||
coneOuterAngle: n.coneOuterAngle,
|
|
||||||
coneOuterGain: n.coneOuterGain,
|
|
||||||
distanceModel: n.distanceModel,
|
|
||||||
maxDistance: n.maxDistance,
|
|
||||||
refDistance: n.refDistance,
|
|
||||||
rolloffFactor: n.rolloffFactor,
|
|
||||||
panningModel: n.panningModel
|
|
||||||
}), o._pannerAttr = {
|
|
||||||
coneInnerAngle: void 0 !== n.pannerAttr.coneInnerAngle ? n.pannerAttr.coneInnerAngle : o._coneInnerAngle,
|
|
||||||
coneOuterAngle: void 0 !== n.pannerAttr.coneOuterAngle ? n.pannerAttr.coneOuterAngle : o._coneOuterAngle,
|
|
||||||
coneOuterGain: void 0 !== n.pannerAttr.coneOuterGain ? n.pannerAttr.coneOuterGain : o._coneOuterGain,
|
|
||||||
distanceModel: void 0 !== n.pannerAttr.distanceModel ? n.pannerAttr.distanceModel : o._distanceModel,
|
|
||||||
maxDistance: void 0 !== n.pannerAttr.maxDistance ? n.pannerAttr.maxDistance : o._maxDistance,
|
|
||||||
refDistance: void 0 !== n.pannerAttr.refDistance ? n.pannerAttr.refDistance : o._refDistance,
|
|
||||||
rolloffFactor: void 0 !== n.pannerAttr.rolloffFactor ? n.pannerAttr.rolloffFactor : o._rolloffFactor,
|
|
||||||
panningModel: void 0 !== n.pannerAttr.panningModel ? n.pannerAttr.panningModel : o._panningModel
|
|
||||||
})
|
|
||||||
} else 2 === i.length && (n = i[0], t = parseInt(i[1], 10));
|
|
||||||
for (var a = o._getSoundIds(t), p = 0; p < a.length; p++)
|
|
||||||
if (r = o._soundById(a[p])) {
|
|
||||||
var s = r._pannerAttr;
|
|
||||||
s = {
|
|
||||||
coneInnerAngle: void 0 !== n.coneInnerAngle ? n.coneInnerAngle : s.coneInnerAngle,
|
|
||||||
coneOuterAngle: void 0 !== n.coneOuterAngle ? n.coneOuterAngle : s.coneOuterAngle,
|
|
||||||
coneOuterGain: void 0 !== n.coneOuterGain ? n.coneOuterGain : s.coneOuterGain,
|
|
||||||
distanceModel: void 0 !== n.distanceModel ? n.distanceModel : s.distanceModel,
|
|
||||||
maxDistance: void 0 !== n.maxDistance ? n.maxDistance : s.maxDistance,
|
|
||||||
refDistance: void 0 !== n.refDistance ? n.refDistance : s.refDistance,
|
|
||||||
rolloffFactor: void 0 !== n.rolloffFactor ? n.rolloffFactor : s.rolloffFactor,
|
|
||||||
panningModel: void 0 !== n.panningModel ? n.panningModel : s.panningModel
|
|
||||||
};
|
|
||||||
var c = r._panner;
|
|
||||||
c ? (c.coneInnerAngle = s.coneInnerAngle, c.coneOuterAngle = s.coneOuterAngle, c.coneOuterGain = s.coneOuterGain, c.distanceModel = s.distanceModel, c.maxDistance = s.maxDistance, c.refDistance = s.refDistance, c.rolloffFactor = s.rolloffFactor, c.panningModel = s.panningModel) : (r._pos || (r._pos = o._pos || [0, 0, -.5]), e(r, "spatial"))
|
|
||||||
} return o
|
|
||||||
}, Sound.prototype.init = function(e) {
|
|
||||||
return function() {
|
|
||||||
var n = this,
|
|
||||||
t = n._parent;
|
|
||||||
n._orientation = t._orientation, n._stereo = t._stereo, n._pos = t._pos, n._pannerAttr = t._pannerAttr, e.call(this), n._stereo ? t.stereo(n._stereo) : n._pos && t.pos(n._pos[0], n._pos[1], n._pos[2], n._id)
|
|
||||||
}
|
|
||||||
}(Sound.prototype.init), Sound.prototype.reset = function(e) {
|
|
||||||
return function() {
|
|
||||||
var n = this,
|
|
||||||
t = n._parent;
|
|
||||||
return n._orientation = t._orientation, n._stereo = t._stereo, n._pos = t._pos, n._pannerAttr = t._pannerAttr, n._stereo ? t.stereo(n._stereo) : n._pos ? t.pos(n._pos[0], n._pos[1], n._pos[2], n._id) : n._panner && (n._panner.disconnect(0), n._panner = void 0, t._refreshBuffer(n)), e.call(this)
|
|
||||||
}
|
|
||||||
}(Sound.prototype.reset);
|
|
||||||
var e = function(e, n) {
|
|
||||||
n = n || "spatial", "spatial" === n ? (e._panner = Howler.ctx.createPanner(), e._panner.coneInnerAngle = e._pannerAttr.coneInnerAngle, e._panner.coneOuterAngle = e._pannerAttr.coneOuterAngle, e._panner.coneOuterGain = e._pannerAttr.coneOuterGain, e._panner.distanceModel = e._pannerAttr.distanceModel, e._panner.maxDistance = e._pannerAttr.maxDistance, e._panner.refDistance = e._pannerAttr.refDistance, e._panner.rolloffFactor = e._pannerAttr.rolloffFactor, e._panner.panningModel = e._pannerAttr.panningModel, void 0 !== e._panner.positionX ? (e._panner.positionX.setValueAtTime(e._pos[0], Howler.ctx.currentTime), e._panner.positionY.setValueAtTime(e._pos[1], Howler.ctx.currentTime), e._panner.positionZ.setValueAtTime(e._pos[2], Howler.ctx.currentTime)) : e._panner.setPosition(e._pos[0], e._pos[1], e._pos[2]), void 0 !== e._panner.orientationX ? (e._panner.orientationX.setValueAtTime(e._orientation[0], Howler.ctx.currentTime), e._panner.orientationY.setValueAtTime(e._orientation[1], Howler.ctx.currentTime), e._panner.orientationZ.setValueAtTime(e._orientation[2], Howler.ctx.currentTime)) : e._panner.setOrientation(e._orientation[0], e._orientation[1], e._orientation[2])) : (e._panner = Howler.ctx.createStereoPanner(), e._panner.pan.setValueAtTime(e._stereo, Howler.ctx.currentTime)), e._panner.connect(e._node), e._paused || e._parent.pause(e._id, !0).play(e._id, !0)
|
|
||||||
}
|
|
||||||
}();
|
|
2607
src/bower_components/jquery/dist/jquery.slim.min.js
vendored
2607
src/bower_components/jquery/dist/jquery.slim.min.js
vendored
File diff suppressed because it is too large
Load diff
91
src/bower_components/libjass/libjass.css
vendored
91
src/bower_components/libjass/libjass.css
vendored
|
@ -1,91 +0,0 @@
|
||||||
.libjass-wrapper {
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden
|
|
||||||
}
|
|
||||||
|
|
||||||
.libjass-subs,
|
|
||||||
.libjass-subs .an {
|
|
||||||
position: absolute
|
|
||||||
}
|
|
||||||
|
|
||||||
.libjass-subs {
|
|
||||||
overflow: hidden;
|
|
||||||
line-height: 0
|
|
||||||
}
|
|
||||||
|
|
||||||
.libjass-subs,
|
|
||||||
.libjass-subs * {
|
|
||||||
pointer-events: none;
|
|
||||||
-webkit-animation-fill-mode: both !important;
|
|
||||||
animation-fill-mode: both !important
|
|
||||||
}
|
|
||||||
|
|
||||||
.libjass-subs.paused * {
|
|
||||||
-webkit-animation-play-state: paused !important;
|
|
||||||
animation-play-state: paused !important
|
|
||||||
}
|
|
||||||
|
|
||||||
.libjass-subs .an1,
|
|
||||||
.libjass-subs .an2,
|
|
||||||
.libjass-subs .an3 {
|
|
||||||
bottom: 0
|
|
||||||
}
|
|
||||||
|
|
||||||
.libjass-subs .an4,
|
|
||||||
.libjass-subs .an5,
|
|
||||||
.libjass-subs .an6 {
|
|
||||||
display: table;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%
|
|
||||||
}
|
|
||||||
|
|
||||||
.libjass-subs .an4>*,
|
|
||||||
.libjass-subs .an5>*,
|
|
||||||
.libjass-subs .an6>* {
|
|
||||||
display: table-cell;
|
|
||||||
vertical-align: middle
|
|
||||||
}
|
|
||||||
|
|
||||||
.libjass-subs .an7,
|
|
||||||
.libjass-subs .an8,
|
|
||||||
.libjass-subs .an9 {
|
|
||||||
top: 0
|
|
||||||
}
|
|
||||||
|
|
||||||
.libjass-subs .an1,
|
|
||||||
.libjass-subs .an4,
|
|
||||||
.libjass-subs .an7 {
|
|
||||||
text-align: left
|
|
||||||
}
|
|
||||||
|
|
||||||
.libjass-subs .an2,
|
|
||||||
.libjass-subs .an5,
|
|
||||||
.libjass-subs .an8 {
|
|
||||||
text-align: center
|
|
||||||
}
|
|
||||||
|
|
||||||
.libjass-subs .an3,
|
|
||||||
.libjass-subs .an6,
|
|
||||||
.libjass-subs .an9 {
|
|
||||||
text-align: right
|
|
||||||
}
|
|
||||||
|
|
||||||
.libjass-subs div[data-dialogue-id]>span {
|
|
||||||
-webkit-perspective-origin: center;
|
|
||||||
perspective-origin: center;
|
|
||||||
-webkit-perspective: 400px;
|
|
||||||
perspective: 400px
|
|
||||||
}
|
|
||||||
|
|
||||||
.libjass-font-measure {
|
|
||||||
position: absolute;
|
|
||||||
visibility: hidden;
|
|
||||||
border: 0;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
line-height: normal
|
|
||||||
}
|
|
||||||
|
|
||||||
.libjass-filters {
|
|
||||||
display: block
|
|
||||||
}
|
|
4185
src/bower_components/libjass/libjass.min.js
vendored
4185
src/bower_components/libjass/libjass.min.js
vendored
File diff suppressed because it is too large
Load diff
|
@ -7,8 +7,30 @@ var _define = window.define;
|
||||||
// jstree
|
// jstree
|
||||||
var jstree = require("jstree");
|
var jstree = require("jstree");
|
||||||
require("jstree/dist/themes/default/style.css");
|
require("jstree/dist/themes/default/style.css");
|
||||||
_define("jstree", ["jQuery"], function() { return jstree; });
|
_define("jstree", function() { return jstree; });
|
||||||
|
|
||||||
|
// jquery
|
||||||
|
var jquery = require("jquery");
|
||||||
|
_define("jQuery", function() { return jquery; });
|
||||||
|
|
||||||
// hlsjs
|
// hlsjs
|
||||||
var hlsjs = require("hls.js");
|
var hlsjs = require("hls.js");
|
||||||
_define("hlsjs", function() { return hlsjs; });
|
_define("hlsjs", function() { return hlsjs; });
|
||||||
|
|
||||||
|
// howler
|
||||||
|
var howler = require("howler");
|
||||||
|
_define("howler", function() { return howler; });
|
||||||
|
|
||||||
|
// swiper
|
||||||
|
var swiper = require("swiper");
|
||||||
|
require("swiper/dist/css/swiper.min.css");
|
||||||
|
_define("swiper", function() { return swiper; });
|
||||||
|
|
||||||
|
// sortable
|
||||||
|
var sortable = require("sortablejs");
|
||||||
|
_define("sortable", function() { return sortable; });
|
||||||
|
|
||||||
|
// libjass
|
||||||
|
var libjass = require("libjass");
|
||||||
|
require("libjass/libjass.css");
|
||||||
|
_define("libjass", function() { return libjass; });
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
define(["datetime"], function(datetime) {
|
define(["datetime"], function(datetime) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
function humane_date(date_str) {
|
function humaneDate(date_str) {
|
||||||
var format, time_formats = [
|
var format, time_formats = [
|
||||||
[90, "a minute"],
|
[90, "a minute"],
|
||||||
[3600, "minutes", 60],
|
[3600, "minutes", 60],
|
||||||
|
@ -24,5 +24,37 @@ define(["datetime"], function(datetime) {
|
||||||
if (seconds < format[0]) return 2 == format.length ? format[1] + " ago" : Math.round(seconds / format[2]) + " " + format[1] + " ago";
|
if (seconds < format[0]) return 2 == format.length ? format[1] + " ago" : Math.round(seconds / format[2]) + " " + format[1] + " ago";
|
||||||
return seconds > 47304e5 ? Math.round(seconds / 47304e5) + " centuries ago" : date_str
|
return seconds > 47304e5 ? Math.round(seconds / 47304e5) + " centuries ago" : date_str
|
||||||
}
|
}
|
||||||
return window.humane_date = humane_date, humane_date
|
|
||||||
|
function humaneElapsed(firstDateStr, secondDateStr) {
|
||||||
|
// TODO replace this whole script with a library or something
|
||||||
|
var dateOne = new Date(firstDateStr);
|
||||||
|
var dateTwo = new Date(secondDateStr);
|
||||||
|
var delta = (dateTwo.getTime() - dateOne.getTime()) / 1e3;
|
||||||
|
|
||||||
|
var days = Math.floor(delta % 31536e3 / 86400);
|
||||||
|
var hours = Math.floor(delta % 31536e3 % 86400 / 3600);
|
||||||
|
var minutes = Math.floor(delta % 31536e3 % 86400 % 3600 / 60);
|
||||||
|
var seconds = Math.round(delta % 31536e3 % 86400 % 3600 % 60);
|
||||||
|
|
||||||
|
var elapsed = "";
|
||||||
|
elapsed += 1 == days ? days + " day " : "";
|
||||||
|
elapsed += days > 1 ? days + " days " : "";
|
||||||
|
elapsed += 1 == hours ? hours + " hour " : "";
|
||||||
|
elapsed += hours > 1 ? hours + " hours " : "";
|
||||||
|
elapsed += 1 == minutes ? minutes + " minute " : "";
|
||||||
|
elapsed += minutes > 1 ? minutes + " minutes " : "";
|
||||||
|
elapsed += elapsed.length > 0 ? "and " : "";
|
||||||
|
elapsed += 1 == seconds ? seconds + " second" : "";
|
||||||
|
elapsed += 0 == seconds || seconds > 1 ? seconds + " seconds" : "";
|
||||||
|
|
||||||
|
return elapsed;
|
||||||
|
}
|
||||||
|
|
||||||
|
window.humaneDate = humaneDate;
|
||||||
|
window.humaneElapsed = humaneElapsed;
|
||||||
|
|
||||||
|
return {
|
||||||
|
humaneDate: humaneDate,
|
||||||
|
humaneElapsed: humaneElapsed
|
||||||
|
}
|
||||||
});
|
});
|
|
@ -5,7 +5,6 @@ define(['playbackManager', 'focusManager', 'appRouter', 'dom'], function (playba
|
||||||
|
|
||||||
function notify() {
|
function notify() {
|
||||||
lastInputTime = new Date().getTime();
|
lastInputTime = new Date().getTime();
|
||||||
|
|
||||||
handleCommand('unknown');
|
handleCommand('unknown');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,27 +17,22 @@ define(['playbackManager', 'focusManager', 'appRouter', 'dom'], function (playba
|
||||||
}
|
}
|
||||||
|
|
||||||
function select(sourceElement) {
|
function select(sourceElement) {
|
||||||
|
|
||||||
sourceElement.click();
|
sourceElement.click();
|
||||||
}
|
}
|
||||||
|
|
||||||
var eventListenerCount = 0;
|
var eventListenerCount = 0;
|
||||||
function on(scope, fn) {
|
function on(scope, fn) {
|
||||||
|
if (eventListenerCount) {
|
||||||
eventListenerCount++;
|
eventListenerCount++;
|
||||||
dom.addEventListener(scope, 'command', fn, {
|
}
|
||||||
|
dom.addEventListener(scope, 'command', fn, {});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function off(scope, fn) {
|
function off(scope, fn) {
|
||||||
|
|
||||||
if (eventListenerCount) {
|
if (eventListenerCount) {
|
||||||
eventListenerCount--;
|
eventListenerCount--;
|
||||||
}
|
}
|
||||||
|
dom.removeEventListener(scope, 'command', fn, {});
|
||||||
dom.removeEventListener(scope, 'command', fn, {
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var commandTimes = {};
|
var commandTimes = {};
|
||||||
|
@ -85,7 +79,6 @@ define(['playbackManager', 'focusManager', 'appRouter', 'dom'], function (playba
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (name) {
|
switch (name) {
|
||||||
|
|
||||||
case 'up':
|
case 'up':
|
||||||
focusManager.moveUp(sourceElement);
|
focusManager.moveUp(sourceElement);
|
||||||
break;
|
break;
|
||||||
|
@ -119,6 +112,7 @@ define(['playbackManager', 'focusManager', 'appRouter', 'dom'], function (playba
|
||||||
case 'end':
|
case 'end':
|
||||||
break;
|
break;
|
||||||
case 'menu':
|
case 'menu':
|
||||||
|
break;
|
||||||
case 'info':
|
case 'info':
|
||||||
break;
|
break;
|
||||||
case 'nextchapter':
|
case 'nextchapter':
|
||||||
|
@ -214,53 +208,9 @@ define(['playbackManager', 'focusManager', 'appRouter', 'dom'], function (playba
|
||||||
case 'toggledisplaymirror':
|
case 'toggledisplaymirror':
|
||||||
playbackManager.toggleDisplayMirroring();
|
playbackManager.toggleDisplayMirroring();
|
||||||
break;
|
break;
|
||||||
case 'togglestats':
|
|
||||||
//playbackManager.toggleStats();
|
|
||||||
break;
|
|
||||||
case 'movies':
|
|
||||||
// TODO
|
|
||||||
appRouter.goHome();
|
|
||||||
break;
|
|
||||||
case 'music':
|
|
||||||
// TODO
|
|
||||||
appRouter.goHome();
|
|
||||||
break;
|
|
||||||
case 'tv':
|
|
||||||
// TODO
|
|
||||||
appRouter.goHome();
|
|
||||||
break;
|
|
||||||
case 'nowplaying':
|
case 'nowplaying':
|
||||||
appRouter.showNowPlaying();
|
appRouter.showNowPlaying();
|
||||||
break;
|
break;
|
||||||
case 'save':
|
|
||||||
break;
|
|
||||||
case 'screensaver':
|
|
||||||
// TODO
|
|
||||||
break;
|
|
||||||
case 'refresh':
|
|
||||||
// TODO
|
|
||||||
break;
|
|
||||||
case 'changebrightness':
|
|
||||||
// TODO
|
|
||||||
break;
|
|
||||||
case 'red':
|
|
||||||
// TODO
|
|
||||||
break;
|
|
||||||
case 'green':
|
|
||||||
// TODO
|
|
||||||
break;
|
|
||||||
case 'yellow':
|
|
||||||
// TODO
|
|
||||||
break;
|
|
||||||
case 'blue':
|
|
||||||
// TODO
|
|
||||||
break;
|
|
||||||
case 'grey':
|
|
||||||
// TODO
|
|
||||||
break;
|
|
||||||
case 'brown':
|
|
||||||
// TODO
|
|
||||||
break;
|
|
||||||
case 'repeatnone':
|
case 'repeatnone':
|
||||||
playbackManager.setRepeatMode('RepeatNone');
|
playbackManager.setRepeatMode('RepeatNone');
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -3846,7 +3846,6 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla
|
||||||
player = player || this._currentPlayer || { isLocalPlayer: true };
|
player = player || this._currentPlayer || { isLocalPlayer: true };
|
||||||
|
|
||||||
if (player.isLocalPlayer) {
|
if (player.isLocalPlayer) {
|
||||||
// https://github.com/jellyfin/jellyfin/blob/master/MediaBrowser.Model/Session/GeneralCommandType.cs
|
|
||||||
var list = [
|
var list = [
|
||||||
"GoHome",
|
"GoHome",
|
||||||
"GoToSettings",
|
"GoToSettings",
|
||||||
|
@ -3974,7 +3973,6 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla
|
||||||
};
|
};
|
||||||
|
|
||||||
PlaybackManager.prototype.sendCommand = function (cmd, player) {
|
PlaybackManager.prototype.sendCommand = function (cmd, player) {
|
||||||
// https://github.com/jellyfin/jellyfin/blob/master/MediaBrowser.Model/Session/GeneralCommandType.cs
|
|
||||||
console.log('MediaController received command: ' + cmd.Name);
|
console.log('MediaController received command: ' + cmd.Name);
|
||||||
switch (cmd.Name) {
|
switch (cmd.Name) {
|
||||||
case 'SetRepeatMode':
|
case 'SetRepeatMode':
|
||||||
|
|
|
@ -178,7 +178,7 @@
|
||||||
.playlistIndexIndicatorImage {
|
.playlistIndexIndicatorImage {
|
||||||
-webkit-background-size: initial initial !important;
|
-webkit-background-size: initial initial !important;
|
||||||
background-size: initial !important;
|
background-size: initial !important;
|
||||||
background-image: url(../img/equalizer.gif) !important
|
background-image: url(../../img/equalizer.gif) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hideVideoButtons .videoButton {
|
.hideVideoButtons .videoButton {
|
||||||
|
@ -202,7 +202,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (max-width:34em) {
|
@media all and (max-width:34em) {
|
||||||
|
|
||||||
.nowPlayingInfoButtons .btnNowPlayingFastForward,
|
.nowPlayingInfoButtons .btnNowPlayingFastForward,
|
||||||
.nowPlayingInfoButtons .btnNowPlayingRewind,
|
.nowPlayingInfoButtons .btnNowPlayingRewind,
|
||||||
.nowPlayingInfoButtons .playlist .listItemMediaInfo {
|
.nowPlayingInfoButtons .playlist .listItemMediaInfo {
|
|
@ -1,4 +1,4 @@
|
||||||
define(["browser", "datetime", "backdrop", "libraryBrowser", "listView", "imageLoader", "playbackManager", "nowPlayingHelper", "events", "connectionManager", "apphost", "globalize", "cardStyle", "emby-itemscontainer", "css!css/nowplaying.css", "emby-ratingbutton"], function (browser, datetime, backdrop, libraryBrowser, listView, imageLoader, playbackManager, nowPlayingHelper, events, connectionManager, appHost, globalize) {
|
define(["browser", "datetime", "backdrop", "libraryBrowser", "listView", "imageLoader", "playbackManager", "nowPlayingHelper", "events", "connectionManager", "apphost", "globalize", "cardStyle", "emby-itemscontainer", "css!./remotecontrol.css", "emby-ratingbutton"], function (browser, datetime, backdrop, libraryBrowser, listView, imageLoader, playbackManager, nowPlayingHelper, events, connectionManager, appHost, globalize) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
function showAudioMenu(context, player, button, item) {
|
function showAudioMenu(context, player, button, item) {
|
||||||
|
@ -156,10 +156,6 @@ define(["browser", "datetime", "backdrop", "libraryBrowser", "listView", "imageL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function buttonEnabled(btn, enabled) {
|
|
||||||
btn.disabled = !enabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
function buttonVisible(btn, enabled) {
|
function buttonVisible(btn, enabled) {
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
btn.classList.remove("hide");
|
btn.classList.remove("hide");
|
||||||
|
@ -172,7 +168,8 @@ define(["browser", "datetime", "backdrop", "libraryBrowser", "listView", "imageL
|
||||||
var all = context.querySelectorAll(".btnCommand");
|
var all = context.querySelectorAll(".btnCommand");
|
||||||
|
|
||||||
for (var i = 0, length = all.length; i < length; i++) {
|
for (var i = 0, length = all.length; i < length; i++) {
|
||||||
buttonEnabled(all[i], -1 != commands.indexOf(all[i].getAttribute("data-command")));
|
var enableButton = -1 !== commands.indexOf(all[i].getAttribute("data-command"));
|
||||||
|
all[i].disabled = !enableButton;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,6 @@ define(['connectionManager', 'playbackManager', 'events', 'inputManager', 'focus
|
||||||
}
|
}
|
||||||
|
|
||||||
function processGeneralCommand(cmd, apiClient) {
|
function processGeneralCommand(cmd, apiClient) {
|
||||||
// https://github.com/jellyfin/jellyfin/blob/master/MediaBrowser.Model/Session/GeneralCommandType.cs
|
|
||||||
console.log('Received command: ' + cmd.Name);
|
console.log('Received command: ' + cmd.Name);
|
||||||
switch (cmd.Name) {
|
switch (cmd.Name) {
|
||||||
case 'Select':
|
case 'Select':
|
||||||
|
|
|
@ -1,15 +1,6 @@
|
||||||
define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globalize", "loading", "connectionManager", "playMethodHelper", "cardBuilder", "imageLoader", "components/activitylog", "scripts/imagehelper", "indicators", "humanedate", "listViewStyle", "emby-button", "flexStyles", "emby-button", "emby-itemscontainer"], function (datetime, events, itemHelper, serverNotifications, dom, globalize, loading, connectionManager, playMethodHelper, cardBuilder, imageLoader, ActivityLog, imageHelper, indicators) {
|
define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globalize", "loading", "connectionManager", "playMethodHelper", "cardBuilder", "imageLoader", "components/activitylog", "scripts/imagehelper", "indicators", "humanedate", "listViewStyle", "emby-button", "flexStyles", "emby-button", "emby-itemscontainer"], function (datetime, events, itemHelper, serverNotifications, dom, globalize, loading, connectionManager, playMethodHelper, cardBuilder, imageLoader, ActivityLog, imageHelper, indicators) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
function buttonEnabled(elem, enabled) {
|
|
||||||
if (enabled) {
|
|
||||||
elem.setAttribute("disabled", "");
|
|
||||||
elem.removeAttribute("disabled");
|
|
||||||
} else {
|
|
||||||
elem.setAttribute("disabled", "disabled");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function showPlaybackInfo(btn, session) {
|
function showPlaybackInfo(btn, session) {
|
||||||
require(["alert"], function (alert) {
|
require(["alert"], function (alert) {
|
||||||
var title;
|
var title;
|
||||||
|
@ -455,7 +446,7 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
|
||||||
|
|
||||||
if (!nowPlayingItem) {
|
if (!nowPlayingItem) {
|
||||||
return {
|
return {
|
||||||
html: "Last seen " + humane_date(session.LastActivityDate),
|
html: "Last seen " + humaneDate(session.LastActivityDate),
|
||||||
image: imgUrl
|
image: imgUrl
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -700,8 +691,8 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
|
||||||
primary: "delete"
|
primary: "delete"
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
var page = dom.parentWithClass(btn, "page");
|
var page = dom.parentWithClass(btn, "page");
|
||||||
buttonEnabled(page.querySelector("#btnRestartServer"), false);
|
page.querySelector("#btnRestartServer").disabled = true;
|
||||||
buttonEnabled(page.querySelector("#btnShutdown"), false);
|
page.querySelector("#btnShutdown").disabled = true;
|
||||||
ApiClient.restartServer();
|
ApiClient.restartServer();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -715,8 +706,8 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
|
||||||
primary: "delete"
|
primary: "delete"
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
var page = dom.parentWithClass(btn, "page");
|
var page = dom.parentWithClass(btn, "page");
|
||||||
buttonEnabled(page.querySelector("#btnRestartServer"), false);
|
page.querySelector("#btnRestartServer").disabled = true;
|
||||||
buttonEnabled(page.querySelector("#btnShutdown"), false);
|
page.querySelector("#btnShutdown").disabled = true;
|
||||||
ApiClient.shutdownServer();
|
ApiClient.shutdownServer();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -86,7 +86,7 @@ define(["loading", "dom", "libraryMenu", "globalize", "scripts/imagehelper", "hu
|
||||||
deviceHtml += "<div class='cardText cardText-secondary'>";
|
deviceHtml += "<div class='cardText cardText-secondary'>";
|
||||||
if (device.LastUserName) {
|
if (device.LastUserName) {
|
||||||
deviceHtml += device.LastUserName;
|
deviceHtml += device.LastUserName;
|
||||||
deviceHtml += ", " + humane_date(device.DateLastActivity);
|
deviceHtml += ", " + humaneDate(device.DateLastActivity);
|
||||||
}
|
}
|
||||||
deviceHtml += " ";
|
deviceHtml += " ";
|
||||||
deviceHtml += "</div>";
|
deviceHtml += "</div>";
|
||||||
|
|
|
@ -217,7 +217,7 @@ define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "gl
|
||||||
}, {
|
}, {
|
||||||
name: globalize.translate("FolderTypeMusic"),
|
name: globalize.translate("FolderTypeMusic"),
|
||||||
value: "music",
|
value: "music",
|
||||||
message: getLink("MovieLibraryHelp", "https://jellyfin.readthedocs.io/en/latest/media/music/")
|
message: getLink("MusicLibraryHelp", "https://jellyfin.readthedocs.io/en/latest/media/music/")
|
||||||
}, {
|
}, {
|
||||||
name: globalize.translate("FolderTypeTvShows"),
|
name: globalize.translate("FolderTypeTvShows"),
|
||||||
value: "tvshows",
|
value: "tvshows",
|
||||||
|
@ -225,7 +225,7 @@ define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "gl
|
||||||
}, {
|
}, {
|
||||||
name: globalize.translate("FolderTypeBooks"),
|
name: globalize.translate("FolderTypeBooks"),
|
||||||
value: "books",
|
value: "books",
|
||||||
message: getLink("BookLibraryHelp", "https://web.archive.org/web/20181216120305/https://github.com/MediaBrowser/Wiki/wiki/Book-naming")
|
message: getLink("BookLibraryHelp", "https://jellyfin.readthedocs.io/en/latest/media/books/")
|
||||||
}, {
|
}, {
|
||||||
name: globalize.translate("OptionHomeVideos"),
|
name: globalize.translate("OptionHomeVideos"),
|
||||||
value: "homevideos"
|
value: "homevideos"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
define(["components/remotecontrol", "libraryMenu", "emby-button"], function(remotecontrolFactory, libraryMenu) {
|
define(["components/remotecontrol/remotecontrol", "libraryMenu", "emby-button"], function(remotecontrolFactory, libraryMenu) {
|
||||||
"use strict";
|
"use strict";
|
||||||
return function(view, params) {
|
return function(view, params) {
|
||||||
var remoteControl = new remotecontrolFactory;
|
var remoteControl = new remotecontrolFactory;
|
||||||
|
|
|
@ -62,23 +62,11 @@ define(["jQuery", "loading", "events", "globalize", "serverNotifications", "huma
|
||||||
page.querySelector(".divScheduledTasks").innerHTML = html;
|
page.querySelector(".divScheduledTasks").innerHTML = html;
|
||||||
}
|
}
|
||||||
|
|
||||||
function humane_elapsed(firstDateStr, secondDateStr) {
|
|
||||||
var dt1 = new Date(firstDateStr),
|
|
||||||
dt2 = new Date(secondDateStr),
|
|
||||||
seconds = (dt2.getTime() - dt1.getTime()) / 1e3,
|
|
||||||
numdays = Math.floor(seconds % 31536e3 / 86400),
|
|
||||||
numhours = Math.floor(seconds % 31536e3 % 86400 / 3600),
|
|
||||||
numminutes = Math.floor(seconds % 31536e3 % 86400 % 3600 / 60),
|
|
||||||
numseconds = Math.round(seconds % 31536e3 % 86400 % 3600 % 60),
|
|
||||||
elapsedStr = "";
|
|
||||||
return elapsedStr += 1 == numdays ? numdays + " day " : "", elapsedStr += numdays > 1 ? numdays + " days " : "", elapsedStr += 1 == numhours ? numhours + " hour " : "", elapsedStr += numhours > 1 ? numhours + " hours " : "", elapsedStr += 1 == numminutes ? numminutes + " minute " : "", elapsedStr += numminutes > 1 ? numminutes + " minutes " : "", elapsedStr += elapsedStr.length > 0 ? "and " : "", elapsedStr += 1 == numseconds ? numseconds + " second" : "", elapsedStr += 0 == numseconds || numseconds > 1 ? numseconds + " seconds" : ""
|
|
||||||
}
|
|
||||||
|
|
||||||
function getTaskProgressHtml(task) {
|
function getTaskProgressHtml(task) {
|
||||||
var html = "";
|
var html = "";
|
||||||
if (task.State === "Idle") {
|
if (task.State === "Idle") {
|
||||||
if (task.LastExecutionResult) {
|
if (task.LastExecutionResult) {
|
||||||
html += globalize.translate("LabelScheduledTaskLastRan").replace("{0}", humane_date(task.LastExecutionResult.EndTimeUtc)).replace("{1}", humane_elapsed(task.LastExecutionResult.StartTimeUtc, task.LastExecutionResult.EndTimeUtc));
|
html += globalize.translate("LabelScheduledTaskLastRan").replace("{0}", humaneDate(task.LastExecutionResult.EndTimeUtc)).replace("{1}", humaneElapsed(task.LastExecutionResult.StartTimeUtc, task.LastExecutionResult.EndTimeUtc));
|
||||||
if (task.LastExecutionResult.Status === "Failed") {
|
if (task.LastExecutionResult.Status === "Failed") {
|
||||||
html += " <span style='color:#FF0000;'>(" + globalize.translate("LabelFailed") + ")</span>";
|
html += " <span style='color:#FF0000;'>(" + globalize.translate("LabelFailed") + ")</span>";
|
||||||
} else if (task.LastExecutionResult.Status === "Cancelled") {
|
} else if (task.LastExecutionResult.Status === "Cancelled") {
|
||||||
|
|
|
@ -128,7 +128,7 @@ define(["loading", "dom", "globalize", "humanedate", "paper-icon-button-light",
|
||||||
|
|
||||||
function getLastSeenText(lastActivityDate) {
|
function getLastSeenText(lastActivityDate) {
|
||||||
if (lastActivityDate) {
|
if (lastActivityDate) {
|
||||||
return "Last seen " + humane_date(lastActivityDate);
|
return "Last seen " + humaneDate(lastActivityDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
define(["jQuery"], function($) {
|
|
||||||
"use strict";
|
|
||||||
$.fn.buttonEnabled = function(enabled) {
|
|
||||||
return enabled ? this.attr("disabled", "").removeAttr("disabled") : this.attr("disabled", "disabled")
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -241,8 +241,6 @@ define(["datetime", "jQuery", "material-icons"], function (datetime, $) {
|
||||||
$(".libraryTree", page).jstree({
|
$(".libraryTree", page).jstree({
|
||||||
"plugins": ["wholerow"],
|
"plugins": ["wholerow"],
|
||||||
core: {
|
core: {
|
||||||
// Disable animations because jQuery slim does not support them
|
|
||||||
animation: false,
|
|
||||||
check_callback: true,
|
check_callback: true,
|
||||||
data: function (node, callback) {
|
data: function (node, callback) {
|
||||||
loadNode(page, this, node, openItems, selectedId, currentUser, callback);
|
loadNode(page, this, node, openItems, selectedId, currentUser, callback);
|
||||||
|
|
|
@ -227,12 +227,6 @@ var AppInfo = {};
|
||||||
!function () {
|
!function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
function onApiClientCreated(e, newApiClient) {
|
|
||||||
if (window.$) {
|
|
||||||
$.ajax = newApiClient.ajax;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function defineConnectionManager(connectionManager) {
|
function defineConnectionManager(connectionManager) {
|
||||||
window.ConnectionManager = connectionManager;
|
window.ConnectionManager = connectionManager;
|
||||||
define("connectionManager", [], function () {
|
define("connectionManager", [], function () {
|
||||||
|
@ -242,7 +236,6 @@ var AppInfo = {};
|
||||||
|
|
||||||
function bindConnectionManagerEvents(connectionManager, events, userSettings) {
|
function bindConnectionManagerEvents(connectionManager, events, userSettings) {
|
||||||
window.Events = events;
|
window.Events = events;
|
||||||
events.on(ConnectionManager, "apiclientcreated", onApiClientCreated);
|
|
||||||
|
|
||||||
connectionManager.currentApiClient = function () {
|
connectionManager.currentApiClient = function () {
|
||||||
if (!localApiClient) {
|
if (!localApiClient) {
|
||||||
|
@ -312,10 +305,6 @@ var AppInfo = {};
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSettingsBuilder(UserSettings, layoutManager, browser) {
|
|
||||||
return UserSettings;
|
|
||||||
}
|
|
||||||
|
|
||||||
function getBowerPath() {
|
function getBowerPath() {
|
||||||
return "bower_components";
|
return "bower_components";
|
||||||
}
|
}
|
||||||
|
@ -411,7 +400,7 @@ var AppInfo = {};
|
||||||
|
|
||||||
define("shell", [componentsPath + "/shell"], returnFirstDependency);
|
define("shell", [componentsPath + "/shell"], returnFirstDependency);
|
||||||
|
|
||||||
define("apiclient", ["bower_components/apiclient/apiclient"], returnFirstDependency);
|
define("apiclient", [apiClientBowerPath + "/apiclient"], returnFirstDependency);
|
||||||
|
|
||||||
if ("registerElement" in document) {
|
if ("registerElement" in document) {
|
||||||
define("registerElement", []);
|
define("registerElement", []);
|
||||||
|
@ -461,9 +450,8 @@ var AppInfo = {};
|
||||||
function init() {
|
function init() {
|
||||||
define("livetvcss", ["css!css/livetv.css"], returnFirstDependency);
|
define("livetvcss", ["css!css/livetv.css"], returnFirstDependency);
|
||||||
define("detailtablecss", ["css!css/detailtable.css"], returnFirstDependency);
|
define("detailtablecss", ["css!css/detailtable.css"], returnFirstDependency);
|
||||||
define("buttonenabled", ["legacy/buttonenabled"], returnFirstDependency);
|
|
||||||
var promises = [];
|
|
||||||
|
|
||||||
|
var promises = [];
|
||||||
if (!window.fetch) {
|
if (!window.fetch) {
|
||||||
promises.push(require(["fetch"]));
|
promises.push(require(["fetch"]));
|
||||||
}
|
}
|
||||||
|
@ -679,18 +667,11 @@ var AppInfo = {};
|
||||||
var apiClientBowerPath = bowerPath + "/apiclient";
|
var apiClientBowerPath = bowerPath + "/apiclient";
|
||||||
var componentsPath = "components";
|
var componentsPath = "components";
|
||||||
var paths = {
|
var paths = {
|
||||||
velocity: bowerPath + "/velocity/velocity.min",
|
playlisteditor: componentsPath + "/playlisteditor/playlisteditor",
|
||||||
ironCardList: "components/ironcardlist/ironcardlist",
|
medialibrarycreator: componentsPath + "/medialibrarycreator/medialibrarycreator",
|
||||||
scrollThreshold: "components/scrollthreshold",
|
medialibraryeditor: componentsPath + "/medialibraryeditor/medialibraryeditor",
|
||||||
playlisteditor: "components/playlisteditor/playlisteditor",
|
imageoptionseditor: componentsPath + "/imageoptionseditor/imageoptionseditor",
|
||||||
medialibrarycreator: "components/medialibrarycreator/medialibrarycreator",
|
humanedate: componentsPath + "/humanedate",
|
||||||
medialibraryeditor: "components/medialibraryeditor/medialibraryeditor",
|
|
||||||
imageoptionseditor: "components/imageoptionseditor/imageoptionseditor",
|
|
||||||
howler: bowerPath + "/howlerjs/dist/howler.min",
|
|
||||||
sortable: bowerPath + "/Sortable/Sortable.min",
|
|
||||||
isMobile: bowerPath + "/isMobile/isMobile.min",
|
|
||||||
masonry: bowerPath + "/masonry/dist/masonry.pkgd.min",
|
|
||||||
humanedate: "components/humanedate",
|
|
||||||
libraryBrowser: "scripts/librarybrowser",
|
libraryBrowser: "scripts/librarybrowser",
|
||||||
events: apiClientBowerPath + "/events",
|
events: apiClientBowerPath + "/events",
|
||||||
credentialprovider: apiClientBowerPath + "/credentialprovider",
|
credentialprovider: apiClientBowerPath + "/credentialprovider",
|
||||||
|
@ -700,7 +681,6 @@ var AppInfo = {};
|
||||||
browser: componentsPath + "/browser",
|
browser: componentsPath + "/browser",
|
||||||
inputManager: componentsPath + "/inputManager",
|
inputManager: componentsPath + "/inputManager",
|
||||||
qualityoptions: componentsPath + "/qualityoptions",
|
qualityoptions: componentsPath + "/qualityoptions",
|
||||||
hammer: bowerPath + "/hammerjs/hammer.min",
|
|
||||||
page: "thirdparty/page",
|
page: "thirdparty/page",
|
||||||
focusManager: componentsPath + "/focusManager",
|
focusManager: componentsPath + "/focusManager",
|
||||||
datetime: componentsPath + "/datetime",
|
datetime: componentsPath + "/datetime",
|
||||||
|
@ -718,12 +698,11 @@ var AppInfo = {};
|
||||||
define("chromecastHelper", [componentsPath + "/chromecast/chromecasthelpers"], returnFirstDependency);
|
define("chromecastHelper", [componentsPath + "/chromecast/chromecasthelpers"], returnFirstDependency);
|
||||||
define("mediaSession", [componentsPath + "/playback/mediasession"], returnFirstDependency);
|
define("mediaSession", [componentsPath + "/playback/mediasession"], returnFirstDependency);
|
||||||
define("actionsheet", [componentsPath + "/actionsheet/actionsheet"], returnFirstDependency);
|
define("actionsheet", [componentsPath + "/actionsheet/actionsheet"], returnFirstDependency);
|
||||||
define("libjass", [bowerPath + "/libjass/libjass.min", "css!" + bowerPath + "/libjass/libjass"], returnFirstDependency);
|
define("tunerPicker", [componentsPath + "/tunerpicker"], returnFirstDependency);
|
||||||
define("tunerPicker", ["components/tunerpicker"], returnFirstDependency);
|
|
||||||
define("mainTabsManager", [componentsPath + "/maintabsmanager"], returnFirstDependency);
|
define("mainTabsManager", [componentsPath + "/maintabsmanager"], returnFirstDependency);
|
||||||
define("imageLoader", [componentsPath + "/images/imageLoader"], returnFirstDependency);
|
define("imageLoader", [componentsPath + "/images/imageLoader"], returnFirstDependency);
|
||||||
define("appFooter", [componentsPath + "/appfooter/appfooter"], returnFirstDependency);
|
define("appFooter", [componentsPath + "/appfooter/appfooter"], returnFirstDependency);
|
||||||
define("directorybrowser", ["components/directorybrowser/directorybrowser"], returnFirstDependency);
|
define("directorybrowser", [componentsPath + "/directorybrowser/directorybrowser"], returnFirstDependency);
|
||||||
define("metadataEditor", [componentsPath + "/metadataeditor/metadataeditor"], returnFirstDependency);
|
define("metadataEditor", [componentsPath + "/metadataeditor/metadataeditor"], returnFirstDependency);
|
||||||
define("personEditor", [componentsPath + "/metadataeditor/personeditor"], returnFirstDependency);
|
define("personEditor", [componentsPath + "/metadataeditor/personeditor"], returnFirstDependency);
|
||||||
define("playerSelectionMenu", [componentsPath + "/playback/playerSelectionMenu"], returnFirstDependency);
|
define("playerSelectionMenu", [componentsPath + "/playback/playerSelectionMenu"], returnFirstDependency);
|
||||||
|
@ -805,7 +784,7 @@ var AppInfo = {};
|
||||||
return viewManager;
|
return viewManager;
|
||||||
});
|
});
|
||||||
|
|
||||||
paths.apphost = "components/apphost";
|
paths.apphost = componentsPath + "/apphost";
|
||||||
define('appStorage', [apiClientBowerPath + '/appStorage'], returnFirstDependency);
|
define('appStorage', [apiClientBowerPath + '/appStorage'], returnFirstDependency);
|
||||||
|
|
||||||
requirejs.config({
|
requirejs.config({
|
||||||
|
@ -817,7 +796,7 @@ var AppInfo = {};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
bundles: {
|
bundles: {
|
||||||
bundle: ["jstree", "hlsjs"]
|
bundle: ["jstree", "jQuery", "hlsjs", "howler", "swiper", "sortable", "libjass"]
|
||||||
},
|
},
|
||||||
urlArgs: urlArgs,
|
urlArgs: urlArgs,
|
||||||
paths: paths,
|
paths: paths,
|
||||||
|
@ -847,32 +826,24 @@ var AppInfo = {};
|
||||||
define("sanitizefilename", [componentsPath + "/sanitizefilename"], returnFirstDependency);
|
define("sanitizefilename", [componentsPath + "/sanitizefilename"], returnFirstDependency);
|
||||||
define("itemrepository", [apiClientBowerPath + "/sync/itemrepository"], returnFirstDependency);
|
define("itemrepository", [apiClientBowerPath + "/sync/itemrepository"], returnFirstDependency);
|
||||||
define("useractionrepository", [apiClientBowerPath + "/sync/useractionrepository"], returnFirstDependency);
|
define("useractionrepository", [apiClientBowerPath + "/sync/useractionrepository"], returnFirstDependency);
|
||||||
define("swiper", [bowerPath + "/Swiper/dist/js/swiper.min", "css!" + bowerPath + "/Swiper/dist/css/swiper.min"], returnFirstDependency);
|
|
||||||
define("scroller", [componentsPath + "/scroller"], returnFirstDependency);
|
define("scroller", [componentsPath + "/scroller"], returnFirstDependency);
|
||||||
define("toast", [componentsPath + "/toast/toast"], returnFirstDependency);
|
define("toast", [componentsPath + "/toast/toast"], returnFirstDependency);
|
||||||
define("scrollHelper", [componentsPath + "/scrollhelper"], returnFirstDependency);
|
define("scrollHelper", [componentsPath + "/scrollhelper"], returnFirstDependency);
|
||||||
define("touchHelper", [componentsPath + "/touchhelper"], returnFirstDependency);
|
define("touchHelper", [componentsPath + "/touchhelper"], returnFirstDependency);
|
||||||
define("appSettings", [componentsPath + "/appSettings"], returnFirstDependency);
|
define("appSettings", [componentsPath + "/appSettings"], returnFirstDependency);
|
||||||
define("userSettings", [componentsPath + "/usersettings/usersettings"], returnFirstDependency);
|
define("userSettings", [componentsPath + "/usersettings/usersettings"], returnFirstDependency);
|
||||||
define("userSettingsBuilder", [componentsPath + "/usersettings/usersettingsbuilder", "layoutManager", "browser"], getSettingsBuilder);
|
define("userSettingsBuilder", [componentsPath + "/usersettings/usersettingsbuilder", "layoutManager", "browser"], returnFirstDependency);
|
||||||
define("material-icons", ["css!css/material-icons/style"], returnFirstDependency);
|
define("material-icons", ["css!css/material-icons/style"], returnFirstDependency);
|
||||||
define("systemFontsCss", ["css!css/fonts"], returnFirstDependency);
|
define("systemFontsCss", ["css!css/fonts"], returnFirstDependency);
|
||||||
define("systemFontsSizedCss", ["css!css/fonts.sized"], returnFirstDependency);
|
define("systemFontsSizedCss", ["css!css/fonts.sized"], returnFirstDependency);
|
||||||
define("scrollStyles", ["css!" + componentsPath + "/scrollstyles"], returnFirstDependency);
|
define("scrollStyles", ["css!" + componentsPath + "/scrollstyles"], returnFirstDependency);
|
||||||
define("imageUploader", [componentsPath + "/imageuploader/imageuploader"], returnFirstDependency);
|
define("imageUploader", [componentsPath + "/imageuploader/imageuploader"], returnFirstDependency);
|
||||||
define("navdrawer", ["components/navdrawer/navdrawer"], returnFirstDependency);
|
define("navdrawer", [componentsPath + "/navdrawer/navdrawer"], returnFirstDependency);
|
||||||
define("htmlMediaHelper", [componentsPath + "/htmlMediaHelper"], returnFirstDependency);
|
define("htmlMediaHelper", [componentsPath + "/htmlMediaHelper"], returnFirstDependency);
|
||||||
define("viewContainer", ["components/viewContainer"], returnFirstDependency);
|
define("viewContainer", [componentsPath + "/viewContainer"], returnFirstDependency);
|
||||||
define("queryString", [bowerPath + "/query-string/index"], function () {
|
define("queryString", [bowerPath + "/query-string/index"], function () {
|
||||||
return queryString;
|
return queryString;
|
||||||
});
|
});
|
||||||
define("jQuery", [bowerPath + "/jquery/dist/jquery.slim.min"], function () {
|
|
||||||
if (window.ApiClient) {
|
|
||||||
jQuery.ajax = ApiClient.ajax;
|
|
||||||
}
|
|
||||||
|
|
||||||
return jQuery;
|
|
||||||
});
|
|
||||||
define("fnchecked", ["legacy/fnchecked"], returnFirstDependency);
|
define("fnchecked", ["legacy/fnchecked"], returnFirstDependency);
|
||||||
define("dialogHelper", [componentsPath + "/dialogHelper/dialogHelper"], returnFirstDependency);
|
define("dialogHelper", [componentsPath + "/dialogHelper/dialogHelper"], returnFirstDependency);
|
||||||
define("inputmanager", ["inputManager"], returnFirstDependency);
|
define("inputmanager", ["inputManager"], returnFirstDependency);
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
"BirthLocation": "Birth location",
|
"BirthLocation": "Birth location",
|
||||||
"BirthPlaceValue": "Birth place: {0}",
|
"BirthPlaceValue": "Birth place: {0}",
|
||||||
"Blacklist": "Blacklist",
|
"Blacklist": "Blacklist",
|
||||||
"BookLibraryHelp": "Audio and text books are supported. Review the {0}Jellyfin Book naming guide{1}.",
|
"BookLibraryHelp": "Audio and text books are supported. Review the {0}book naming guide{1}.",
|
||||||
"Books": "Books",
|
"Books": "Books",
|
||||||
"Box": "Box",
|
"Box": "Box",
|
||||||
"BoxRear": "Box (rear)",
|
"BoxRear": "Box (rear)",
|
||||||
|
@ -237,7 +237,7 @@
|
||||||
"ErrorAddingTunerDevice": "There was an error adding the tuner device. Please ensure it is accessible and try again.",
|
"ErrorAddingTunerDevice": "There was an error adding the tuner device. Please ensure it is accessible and try again.",
|
||||||
"ErrorAddingXmlTvFile": "There was an error accessing the XmlTV file. Please ensure the file exists and try again.",
|
"ErrorAddingXmlTvFile": "There was an error accessing the XmlTV file. Please ensure the file exists and try again.",
|
||||||
"ErrorDeletingItem": "There was an error deleting the item from Jellyfin Server. Please check that Jellyfin Server has write access to the media folder and try again.",
|
"ErrorDeletingItem": "There was an error deleting the item from Jellyfin Server. Please check that Jellyfin Server has write access to the media folder and try again.",
|
||||||
"ErrorGettingTvLineups": "There was an error downloading tv lineups. Please ensure your information is correct and try again.",
|
"ErrorGettingTvLineups": "There was an error downloading TV lineups. Please ensure your information is correct and try again.",
|
||||||
"ErrorMessageStartHourGreaterThanEnd": "End time must be greater than the start time.",
|
"ErrorMessageStartHourGreaterThanEnd": "End time must be greater than the start time.",
|
||||||
"ErrorPleaseSelectLineup": "Please select a lineup and try again. If no lineups are available, then please check that your username, password, and postal code is correct.",
|
"ErrorPleaseSelectLineup": "Please select a lineup and try again. If no lineups are available, then please check that your username, password, and postal code is correct.",
|
||||||
"ErrorSavingTvProvider": "There was an error saving the TV provider. Please ensure it is accessible and try again.",
|
"ErrorSavingTvProvider": "There was an error saving the TV provider. Please ensure it is accessible and try again.",
|
||||||
|
@ -962,7 +962,7 @@
|
||||||
"MessageConfirmRemoveMediaLocation": "Are you sure you wish to remove this location?",
|
"MessageConfirmRemoveMediaLocation": "Are you sure you wish to remove this location?",
|
||||||
"MessageConfirmRestart": "Are you sure you wish to restart Jellyfin Server?",
|
"MessageConfirmRestart": "Are you sure you wish to restart Jellyfin Server?",
|
||||||
"MessageConfirmRevokeApiKey": "Are you sure you wish to revoke this api key? The application's connection to Jellyfin Server will be abruptly terminated.",
|
"MessageConfirmRevokeApiKey": "Are you sure you wish to revoke this api key? The application's connection to Jellyfin Server will be abruptly terminated.",
|
||||||
"MessageConfirmShutdown": "Are you sure you wish to shutdown Jellyfin Server?",
|
"MessageConfirmShutdown": "Are you sure you wish to shutdown the server?",
|
||||||
"MessageContactAdminToResetPassword": "Please contact your system administrator to reset your password.",
|
"MessageContactAdminToResetPassword": "Please contact your system administrator to reset your password.",
|
||||||
"MessageCreateAccountAt": "Create an account at {0}",
|
"MessageCreateAccountAt": "Create an account at {0}",
|
||||||
"MessageDeleteTaskTrigger": "Are you sure you wish to delete this task trigger?",
|
"MessageDeleteTaskTrigger": "Are you sure you wish to delete this task trigger?",
|
||||||
|
@ -1013,10 +1013,11 @@
|
||||||
"MoreMediaInfo": "Media Info",
|
"MoreMediaInfo": "Media Info",
|
||||||
"MoveLeft": "Move left",
|
"MoveLeft": "Move left",
|
||||||
"MoveRight": "Move right",
|
"MoveRight": "Move right",
|
||||||
"MovieLibraryHelp": "Review the {0}Jellyfin movie naming guide{1}.",
|
"MovieLibraryHelp": "Review the {0}movie naming guide{1}.",
|
||||||
"Movies": "Movies",
|
"Movies": "Movies",
|
||||||
"MusicAlbum": "Music Album",
|
"MusicAlbum": "Music Album",
|
||||||
"MusicArtist": "Music Artist",
|
"MusicArtist": "Music Artist",
|
||||||
|
"MusicLibraryHelp": "Review the {0}music naming guide{1}.",
|
||||||
"MusicVideo": "Music Video",
|
"MusicVideo": "Music Video",
|
||||||
"Mute": "Mute",
|
"Mute": "Mute",
|
||||||
"MySubtitles": "My Subtitles",
|
"MySubtitles": "My Subtitles",
|
||||||
|
@ -1060,7 +1061,7 @@
|
||||||
"OptionAllowMediaPlaybackTranscodingHelp": "Restricting access to transcoding may cause playback failures in Jellyfin apps due to unsupported media formats.",
|
"OptionAllowMediaPlaybackTranscodingHelp": "Restricting access to transcoding may cause playback failures in Jellyfin apps due to unsupported media formats.",
|
||||||
"OptionAllowRemoteControlOthers": "Allow remote control of other users",
|
"OptionAllowRemoteControlOthers": "Allow remote control of other users",
|
||||||
"OptionAllowRemoteSharedDevices": "Allow remote control of shared devices",
|
"OptionAllowRemoteSharedDevices": "Allow remote control of shared devices",
|
||||||
"OptionAllowRemoteSharedDevicesHelp": "Dlna devices are considered shared until a user begins controlling it.",
|
"OptionAllowRemoteSharedDevicesHelp": "DLNA devices are considered shared until a user begins controlling them.",
|
||||||
"OptionAllowSyncTranscoding": "Allow media downloading and syncing that requires transcoding",
|
"OptionAllowSyncTranscoding": "Allow media downloading and syncing that requires transcoding",
|
||||||
"OptionAllowUserToManageServer": "Allow this user to manage the server",
|
"OptionAllowUserToManageServer": "Allow this user to manage the server",
|
||||||
"OptionAllowVideoPlaybackRemuxing": "Allow video playback that requires conversion without re-encoding",
|
"OptionAllowVideoPlaybackRemuxing": "Allow video playback that requires conversion without re-encoding",
|
||||||
|
@ -1408,7 +1409,7 @@
|
||||||
"Trailers": "Trailers",
|
"Trailers": "Trailers",
|
||||||
"Transcoding": "Transcoding",
|
"Transcoding": "Transcoding",
|
||||||
"Tuesday": "Tuesday",
|
"Tuesday": "Tuesday",
|
||||||
"TvLibraryHelp": "Review the {0}Jellyfin TV naming guide{1}.",
|
"TvLibraryHelp": "Review the {0}TV naming guide{1}.",
|
||||||
"Uniform": "Uniform",
|
"Uniform": "Uniform",
|
||||||
"UninstallPluginConfirmation": "Are you sure you wish to uninstall {0}?",
|
"UninstallPluginConfirmation": "Are you sure you wish to uninstall {0}?",
|
||||||
"UninstallPluginHeader": "Uninstall Plugin",
|
"UninstallPluginHeader": "Uninstall Plugin",
|
||||||
|
@ -1417,8 +1418,8 @@
|
||||||
"Unrated": "Unrated",
|
"Unrated": "Unrated",
|
||||||
"Up": "Up",
|
"Up": "Up",
|
||||||
"Upload": "Upload",
|
"Upload": "Upload",
|
||||||
"UserAgentHelp": "Supply a custom user-agent http header, if necessary.",
|
"UserAgentHelp": "Supply a custom user-agent HTTP header.",
|
||||||
"UserProfilesIntro": "Jellyfin includes built-in support for user profiles, enabling each user to have their own display settings, playstate and parental controls.",
|
"UserProfilesIntro": "Jellyfin includes support for user profiles with granular display settings, play state, and parental controls.",
|
||||||
"ValueAlbumCount": "{0} albums",
|
"ValueAlbumCount": "{0} albums",
|
||||||
"ValueAudioCodec": "Audio Codec: {0}",
|
"ValueAudioCodec": "Audio Codec: {0}",
|
||||||
"ValueCodec": "Codec: {0}",
|
"ValueCodec": "Codec: {0}",
|
||||||
|
@ -1451,13 +1452,13 @@
|
||||||
"Wednesday": "Wednesday",
|
"Wednesday": "Wednesday",
|
||||||
"WelcomeToProject": "Welcome to Jellyfin!",
|
"WelcomeToProject": "Welcome to Jellyfin!",
|
||||||
"Whitelist": "Whitelist",
|
"Whitelist": "Whitelist",
|
||||||
"WizardCompleted": "That's all we need for now. Jellyfin has begun collecting information about your media library. Check out some of our apps, and then click <b>Finish</b> to view the <b>Server Dashboard</b>.",
|
"WizardCompleted": "That's all we need for now. Jellyfin has begun collecting information about your media library. Check out some of our apps, and then click <b>Finish</b> to view the <b>Dashboard</b>.",
|
||||||
"Writer": "Writer",
|
"Writer": "Writer",
|
||||||
"XmlDocumentAttributeListHelp": "These attributes are applied to the root element of every xml response.",
|
"XmlDocumentAttributeListHelp": "These attributes are applied to the root element of every XML response.",
|
||||||
"XmlTvKidsCategoriesHelp": "Programs with these categories will be displayed as programs for children. Separate multiple with '|'.",
|
"XmlTvKidsCategoriesHelp": "Programs with these categories will be displayed as programs for children. Separate multiple with '|'.",
|
||||||
"XmlTvMovieCategoriesHelp": "Programs with these categories will be displayed as movies. Separate multiple with '|'.",
|
"XmlTvMovieCategoriesHelp": "Programs with these categories will be displayed as movies. Separate multiple with '|'.",
|
||||||
"XmlTvNewsCategoriesHelp": "Programs with these categories will be displayed as news programs. Separate multiple with '|'.",
|
"XmlTvNewsCategoriesHelp": "Programs with these categories will be displayed as news programs. Separate multiple with '|'.",
|
||||||
"XmlTvPathHelp": "A path to an xml tv file. Jellyfin will read this file and periodically check it for updates. You are responsible for creating and updating the file.",
|
"XmlTvPathHelp": "A path to an XML TV file. Jellyfin will read this file and periodically check it for updates. You are responsible for creating and updating the file.",
|
||||||
"XmlTvSportsCategoriesHelp": "Programs with these categories will be displayed as sports programs. Separate multiple with '|'.",
|
"XmlTvSportsCategoriesHelp": "Programs with these categories will be displayed as sports programs. Separate multiple with '|'.",
|
||||||
"Yes": "Yes",
|
"Yes": "Yes",
|
||||||
"Yesterday": "Yesterday"
|
"Yesterday": "Yesterday"
|
||||||
|
|
|
@ -9,19 +9,11 @@ module.exports = {
|
||||||
path: path.resolve(__dirname, 'dist'),
|
path: path.resolve(__dirname, 'dist'),
|
||||||
libraryTarget: 'amd-require'
|
libraryTarget: 'amd-require'
|
||||||
},
|
},
|
||||||
|
|
||||||
externals: [{
|
|
||||||
jquery: {
|
|
||||||
amd: "jQuery"
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
|
|
||||||
resolve: {
|
resolve: {
|
||||||
modules: [
|
modules: [
|
||||||
path.resolve(__dirname, 'node_modules')
|
path.resolve(__dirname, 'node_modules')
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
|
@ -34,7 +26,6 @@ module.exports = {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
plugins: [
|
plugins: [
|
||||||
new CopyPlugin([{
|
new CopyPlugin([{
|
||||||
from: '**/*',
|
from: '**/*',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue